/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-soft: #f1f5f2;
  --text: #20231f;
  --muted: #687066;
  --line: #dfe4dd;
  --blue: #246bfe;
  --green: #2f7d57;
  --red: #b63a2f;
  --amber: #9b6a12;
  --ink: #10130f;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

img,
svg {
  flex-shrink: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.button {
  align-items: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-align: center;
  white-space: nowrap;
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.button.danger {
  background: #fff3f0;
  border-color: #f0b8ae;
  color: var(--red);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.button.loading {
  opacity: 1;
}

.spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 42px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

.select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 38px;
  outline: none;
  padding: 0 10px;
}

.input:focus,
.select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.12);
}

.login-page {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 24px;
}

.login-panel {
  margin: 0 auto;
  max-width: 460px;
  width: 100%;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  margin-bottom: 22px;
  width: 44px;
}

.login-panel h1 {
  font-size: 34px;
  line-height: 1.08;
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
}

.stack {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}

.auth-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 26px;
  padding: 22px;
}

.auth-box img {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  height: auto;
  max-width: 220px;
  width: 100%;
}

.secret {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "Courier New", monospace;
  overflow-wrap: anywhere;
  padding: 12px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  min-width: 0;
}

.sidebar {
  background: #171a16;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px;
}

.sidebar-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  font-weight: 700;
}

.nav {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.nav a {
  align-items: center;
  border-radius: 8px;
  color: #d8ded5;
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
}

.nav a.active {
  background: #2f392f;
  color: white;
}

.sidebar-footer {
  margin-top: auto;
}

.user-pill {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  padding-top: 16px;
}

.content {
  min-width: 0;
  padding: 32px;
}

.page-head {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
  min-width: 0;
}

.page-head > div {
  min-width: 0;
}

.page-head h1 {
  font-size: 28px;
  line-height: 1.1;
  margin: 0 0 8px;
}

.page-head h2 {
  font-size: 22px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.page-head.compact {
  margin-bottom: 4px;
}

.toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  min-width: 0;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-workspace {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  min-width: 0;
}

.tabs {
  align-items: center;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.tab {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 38px;
  max-width: 260px;
  overflow: hidden;
  padding: 0 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.item-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 18px;
}

.item-card {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.channel-panel {
  max-width: 920px;
}

.item-top {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.item-top > div {
  min-width: 0;
}

.thumb {
  background: var(--surface-soft);
  border-radius: 8px;
  height: 54px;
  object-fit: cover;
  width: 54px;
}

.thumb-fallback {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  justify-content: center;
}

.item-title {
  font-weight: 700;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.item-card .muted,
.panel .muted,
.user-pill .muted {
  overflow-wrap: anywhere;
}

.tiny-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tiny-actions a,
.tiny-actions button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 4px;
  min-height: 26px;
  padding: 0 8px;
}

.stats {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  min-width: 0;
}

.stat {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 10px;
}

.stat strong {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}

.status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  width: -moz-fit-content;
  width: fit-content;
}

.status.ok {
  background: #e7f5ec;
  color: var(--green);
}

.status.warn {
  background: #fff5dc;
  color: var(--amber);
}

.status.err {
  background: #fff0ed;
  color: var(--red);
}

.status-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-icon-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
}

.code-block {
  background: #11140f;
  border-radius: 0 0 8px 8px;
  color: #e7eadf;
  font-family: "Courier New", monospace;
  font-size: 13px;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 14px;
  white-space: pre-wrap;
}

.copy-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.copy-block-head {
  align-items: center;
  background: var(--surface-soft);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 10px 0 12px;
}

.copy-block-head span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.copy-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
}

.shorts-report {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  min-width: 0;
}

.chart-group {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  min-width: 0;
}

.chart-group h3 {
  font-size: 18px;
  margin: 0 0 4px;
}

.chart-grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.ranking-grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.chart-panel {
  align-content: start;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.chart-panel-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.chart-panel-head > div {
  min-width: 0;
}

.chart-panel h3 {
  font-size: 15px;
  margin: 0;
}

.chart-panel h4 {
  font-size: 15px;
  margin: 0;
}

.chart-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: -4px 0 2px;
}

.chart-period {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.chart-period label {
  display: grid;
  grid-gap: 5px;
  gap: 5px;
}

.chart-period label span {
  color: var(--muted);
  font-size: 12px;
}

.chart-period .select {
  min-height: 34px;
  min-width: 118px;
}

.ranking-controls {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.ranking-controls label {
  display: grid;
  grid-gap: 5px;
  gap: 5px;
}

.ranking-controls label span {
  color: var(--muted);
  font-size: 12px;
}

.loading-state {
  align-items: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  min-height: 96px;
  padding: 14px;
}

.video-ranking {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  min-width: 0;
}

.video-rank-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  grid-template-columns: 34px 88px minmax(0, 1fr) minmax(104px, auto) 18px;
  min-height: 74px;
  min-width: 0;
  padding: 8px;
}

.video-rank-row:hover {
  border-color: var(--blue);
}

.rank-number {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.video-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
  border-radius: 6px;
  object-fit: cover;
  width: 88px;
}

.video-thumb-fallback {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
}

.video-rank-title {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  min-width: 0;
}

.video-rank-title strong {
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-rank-title span,
.video-rank-metric span,
.video-rank-metric small {
  color: var(--muted);
  font-size: 12px;
}

.video-rank-metric {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.video-rank-metric strong {
  font-size: 15px;
}

.bar-chart {
  align-content: start;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  min-width: 0;
}

.bar-row {
  align-items: center;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  grid-template-columns: 64px minmax(0, 1fr) 72px;
  min-height: 28px;
  min-width: 0;
}

.bar-label {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.bar-fill {
  background: var(--blue);
  border-radius: inherit;
  height: 100%;
}

.bar-value {
  font-size: 13px;
  text-align: right;
}

.empty-state {
  align-items: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  min-height: 96px;
  padding: 14px;
}

.form-row {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.form-row .input {
  flex: 1 1;
}

@media (max-width: 1180px) {
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 16px;
    padding: 18px;
    position: static;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .tab {
    max-width: min(260px, 78vw);
  }

  .sidebar-footer {
    margin-top: 0;
  }

  .user-pill {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .content {
    padding: 22px;
  }

  .page-head,
  .form-row {
    display: grid;
  }

  .two-col,
  .stats,
  .chart-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .page-head .button {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .login-page {
    padding: 16px;
  }

  .login-panel h1 {
    font-size: 28px;
  }

  .auth-box,
  .item-card,
  .panel {
    padding: 14px;
  }

  .content {
    padding: 16px;
  }

  .sidebar {
    padding: 16px;
  }

  .sidebar-brand {
    align-items: flex-start;
  }

  .user-pill {
    grid-template-columns: 1fr;
  }

  .page-head {
    gap: 12px;
    margin-bottom: 18px;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .page-head h2 {
    font-size: 20px;
  }

  .page-head .button,
  .form-row .button,
  .toolbar .button,
  .item-card > .button {
    white-space: normal;
    width: 100%;
  }

  .item-top {
    align-items: flex-start;
  }

  .thumb {
    height: 48px;
    width: 48px;
  }

  .copy-block-head {
    align-items: flex-start;
    display: grid;
    padding: 10px;
  }

  .copy-button,
  .copy-icon-button {
    justify-content: center;
    width: 100%;
  }

  .chart-panel {
    padding: 12px;
  }

  .chart-panel-head {
    display: grid;
  }

  .chart-period {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chart-period .select,
  .ranking-controls .select {
    width: 100%;
  }

  .ranking-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .video-rank-row {
    align-items: start;
    grid-template-columns: 28px 76px minmax(0, 1fr);
  }

  .video-rank-row > svg {
    display: none;
  }

  .video-thumb {
    width: 76px;
  }

  .video-rank-title strong {
    white-space: normal;
  }

  .video-rank-metric {
    grid-column: 3;
    justify-items: start;
    text-align: left;
  }

  .bar-row {
    gap: 6px;
    grid-template-columns: 52px minmax(0, 1fr) 64px;
  }

  .bar-label,
  .bar-value,
  .chart-description {
    font-size: 12px;
  }

  .code-block {
    font-size: 12px;
  }
}

