/* ==========================================================
   Ircodin Secure Upload — brand tokens
   navy #0A1438 / black #111111 / gold #D4AF37 / white #FFFFFF
   ========================================================== */

:root {
  --navy: #0A1438;
  --navy-soft: #10193f;
  --navy-deep: #070d24;
  --black: #111111;
  --gold: #D4AF37;
  --gold-soft: #e6c866;
  --white: #FFFFFF;
  --muted: #9aa3c4;
  --line: rgba(212, 175, 55, 0.18);
  --danger: #c0453c;
  --radius: 10px;
  --font-fa: 'Vazirmatn', 'Tahoma', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 15% -10%, #131f52 0%, var(--navy) 45%, var(--navy-deep) 100%);
  background-attachment: fixed;
  color: var(--white);
  font-family: var(--font-fa);
  min-height: 100vh;
}

::selection { background: var(--gold); color: var(--black); }

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

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.brand-mark-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px 2px rgba(212,175,55,0.55);
}
.brand-mark-text { color: var(--white); }
.brand-mark-sep { color: var(--muted); font-weight: 400; }
.brand-mark-sub { color: var(--gold); font-weight: 500; letter-spacing: 0.04em; text-transform: lowercase; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 13, 36, 0.55);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: rgba(17, 17, 17, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.auth-card .brand-mark { justify-content: center; margin-bottom: 22px; }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-sub { margin: 0 0 24px; color: var(--muted); font-size: 13px; letter-spacing: 0.05em; }
.auth-card form { display: flex; flex-direction: column; gap: 10px; text-align: right; }
.auth-card label { font-size: 13px; color: var(--muted); }

input[type="password"], input[type="text"] {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease;
}
input[type="password"]:focus, input[type="text"]:focus {
  border-color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--black);
  margin-top: 8px;
}
.btn-gold:hover { box-shadow: 0 6px 20px rgba(212,175,55,0.35); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.18);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger {
  background: transparent;
  border-color: rgba(192,69,60,0.5);
  color: #e07971;
}
.btn-danger:hover { background: rgba(192,69,60,0.12); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  text-align: right;
}
.alert-error {
  background: rgba(192,69,60,0.12);
  border: 1px solid rgba(192,69,60,0.35);
  color: #f0a8a2;
}
.alert-success {
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.35);
  color: var(--gold-soft);
}

.dropzone {
  border: 1.5px dashed rgba(212,175,55,0.35);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--gold);
  background: rgba(212,175,55,0.06);
}
.dropzone-icon { color: var(--gold); margin-bottom: 12px; }
.dropzone-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.dropzone-sub { margin: 0; color: var(--muted); font-size: 13px; }

.upload-queue { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.upload-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}
.upload-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}
.upload-item-name { color: var(--white); }
.upload-item-pct { color: var(--gold); font-variant-numeric: tabular-nums; }
.progress-track {
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transition: width .15s ease;
}
.upload-item.error .progress-fill { background: var(--danger); }
.upload-item-msg { font-size: 12px; color: var(--muted); margin-top: 6px; }
.upload-item.error .upload-item-msg { color: #e07971; }

.list-section { margin-top: 44px; }
.list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.list-header h2 { font-size: 17px; margin: 0; font-weight: 600; }
.count-pill {
  background: rgba(212,175,55,0.12);
  color: var(--gold);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

.file-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.file-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.file-table thead th {
  text-align: right;
  background: rgba(17,17,17,0.55);
  color: var(--muted);
  font-weight: 500;
  padding: 12px 16px;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.file-table tbody tr {
  border-top: 1px solid var(--line);
  transition: background .12s ease;
}
.file-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.file-table td { padding: 13px 16px; vertical-align: middle; }
.file-name-cell { display: flex; align-items: center; gap: 10px; }
.file-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.actions-cell { display: flex; gap: 8px; justify-content: flex-end; }
.empty-row td { text-align: center; color: var(--muted); padding: 30px 16px; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--navy-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-card h3 { margin: 0 0 10px; }
.modal-card p { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

@media (max-width: 560px) {
  .topbar { padding: 16px; }
  .container { padding: 28px 14px 60px; }
  .file-table thead { display: none; }
  .file-table, .file-table tbody, .file-table tr, .file-table td { display: block; width: 100%; }
  .file-table tr { padding: 12px 4px; }
  .actions-cell { justify-content: flex-start; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
