/* ============================================
   KOC Media Rights Dashboard — Stylesheet
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #0C61AC;
  --primary-dark:  #094d8a;
  --primary-light: #e8f1fb;
  --text:          #1a1a2e;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #f4f7fb;
  --card:          #ffffff;
  --success:       #16a34a;
  --success-bg:    #f0fdf4;
  --warning:       #d97706;
  --danger:        #dc2626;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(12,97,172,.06);
  --transition:    .18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* ── HEADER ─────────────────────────────── */
.header {
  background: #fff;
  border-bottom: 2px solid var(--primary);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(12,97,172,.1);
}
.header-inner {
  max-width: 1060px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 14px;
}
.logo { height: 50px; width: auto; }
.header-title { flex: 1; }
.header-title h1 { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.header-sub { font-size: .74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.badge-official {
  background: var(--primary); color: #fff;
  font-size: .68rem; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
  letter-spacing: .06em; text-transform: uppercase;
}

/* ── MAIN ────────────────────────────────── */
.main {
  flex: 1; max-width: 1060px; width: 100%;
  margin: 28px auto; padding: 0 24px;
  display: flex; flex-direction: column; gap: 20px;
}

/* ── CARD ────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.step {
  font-size: .62rem; font-weight: 800;
  color: var(--primary); background: var(--primary-light);
  border: 1.5px solid var(--primary); border-radius: 6px;
  padding: 3px 7px; letter-spacing: .05em;
  flex-shrink: 0; margin-top: 2px;
}
.card-header h2 { font-size: 1rem; font-weight: 700; }
.card-desc { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }

/* ── LOGO PAIR ───────────────────────────── */
.logo-preview-pair {
  display: flex; gap: 16px; margin-left: auto; flex-shrink: 0;
}
.logo-slot { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.slot-label { font-size: .68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.slot-img-wrap {
  width: 70px; height: 70px;
  border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); overflow: hidden;
}
.slot-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.slot-pos { font-size: .68rem; color: var(--primary); font-weight: 600; }

/* ── LOGO UPLOAD ROW ─────────────────────── */
.logo-upload-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-file-info {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 600; color: var(--primary);
  background: var(--primary-light); padding: 6px 12px; border-radius: var(--radius-sm);
}
.hint { font-size: .78rem; color: var(--text-muted); }

/* ── DROP ZONE ───────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary); background: var(--primary-light);
}
.drop-title { font-size: .95rem; font-weight: 600; }
.drop-sub   { font-size: .8rem; color: var(--text-muted); }

/* ── PROGRESS ────────────────────────────── */
.progress-wrap {
  padding: 0 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.progress-bar-bg {
  flex: 1; height: 7px; background: var(--border);
  border-radius: 99px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: var(--primary);
  border-radius: 99px; width: 0%;
  transition: width .3s ease;
}
.progress-text { font-size: .78rem; font-weight: 600; color: var(--primary); white-space: nowrap; }

/* ── IMAGE LIST ──────────────────────────── */
.image-list {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.image-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; background: var(--card);
  transition: background var(--transition);
}
.image-row:hover { background: var(--bg); }
.image-row + .image-row { border-top: 1px solid var(--border); }

.thumb-wrap {
  width: 52px; height: 52px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border);
}
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.image-row-info { flex: 1; min-width: 0; }
.image-row-name {
  font-size: .88rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.image-row-meta { font-size: .75rem; color: var(--text-muted); }

.status-pill {
  font-size: .7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0;
}
.status-pending    { background: #f3f4f6; color: #6b7280; }
.status-processing { background: #dbeafe; color: #1d4ed8; }
.status-done       { background: var(--success-bg); color: var(--success); }
.status-error      { background: #fef2f2; color: var(--danger); }

.row-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── DOWNLOAD ────────────────────────────── */
.download-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: .86rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--transition);
  font-family: inherit; text-decoration: none;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(12,97,172,.28);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(12,97,172,.38);
  transform: translateY(-1px);
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-outline { background: none; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: none; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 13px; font-size: .78rem; }
.btn-large { padding: 13px 26px; font-size: .92rem; }
.btn-dl { background: var(--success); color: #fff; padding: 6px 13px; font-size: .78rem; }
.btn-dl:hover { background: #15803d; }
.btn-icon {
  background: none; border: none; cursor: pointer;
  padding: 3px; color: var(--text-muted); border-radius: 4px;
  font-size: .85rem; line-height: 1;
  transition: color var(--transition);
}
.btn-icon:hover { color: var(--danger); }

/* ── TOAST ───────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--text); color: #fff;
  padding: 10px 22px; border-radius: 8px;
  font-size: .86rem; font-weight: 500;
  opacity: 0; transition: opacity .22s, transform .22s;
  pointer-events: none; white-space: nowrap;
  z-index: 1000; box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ── FOOTER ──────────────────────────────── */
.footer {
  text-align: center; padding: 20px 24px 28px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.footer-koc   { font-size: .75rem; color: var(--text-muted); }
.footer-credit {
  font-size: .78rem; color: #999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 640px) {
  .main { padding: 0 14px; margin: 18px auto; }
  .card { padding: 18px 16px; }
  .logo-preview-pair { display: none; }
  .header-inner { padding: 10px 14px; }
  .logo { height: 40px; }
}
