:root{
  --deepBlue:#04162e;
  --midBlue:#0b2f4f;
  --teal:#1b7f86;
  --card:rgba(10,25,47,.88);
  --line:rgba(255,255,255,.12);
  --text:#e6edf3;
  --muted:#b8c7d9;
  --gold:#facc15;
  --btnText:#081423;
  --shadow:0 18px 50px rgba(0,0,0,.35);
  --glassBlur: blur(10px);
}

/* Light theme overrides */
html[data-theme="light"]{
  --deepBlue:#eaf2ff;
  --midBlue:#e7f6ff;
  --teal:#eafaf8;
  --card:rgba(255,255,255,.86);
  --line:rgba(2,6,23,.12);
  --text:#0b1220;
  --muted:#334155;
  --gold:#b45309;
  --btnText:#0b1220;
  --shadow:0 14px 32px rgba(2,6,23,.12);
  --glassBlur: blur(6px);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:
    linear-gradient(135deg,
      rgba(30,78,216,.92) 0%,
      rgba(11,29,58,.88) 30%,
      rgba(8,51,68,.84) 55%,
      rgba(14,165,183,.82) 100%
    ),
    radial-gradient(900px 520px at 18% 18%, rgba(255,255,255,.09), transparent 60%),
    radial-gradient(900px 520px at 82% 22%, rgba(255,255,255,.07), transparent 62%);
  background-size: 200% 200%;
  background-attachment: fixed;
  animation: drift 60s ease-in-out infinite;
}

html[data-theme="light"] body{
  background:
    linear-gradient(135deg,
      rgba(219,234,254,.98) 0%,
      rgba(226,232,240,.96) 35%,
      rgba(204,251,241,.92) 70%,
      rgba(165,243,252,.90) 100%
    ),
    radial-gradient(900px 520px at 18% 18%, rgba(2,6,23,.06), transparent 60%),
    radial-gradient(900px 520px at 82% 22%, rgba(2,6,23,.05), transparent 62%);
}

@keyframes drift{
  0%{background-position: 0% 0%;}
  50%{background-position: 100% 100%;}
  100%{background-position: 0% 0%;}
}

a{color:inherit}
.container{max-width:1120px;margin:18px auto 26px;padding:14px}

/* HERO — faded + drifting for premium feel */
.hero{
  position:relative;
  background:
    linear-gradient(180deg, rgba(4,22,46,.88), rgba(11,47,79,.78) 55%, rgba(27,127,134,.68));
  border-bottom:1px solid var(--line);
  overflow:hidden;
  background-size: 200% 200%;
  animation: drift 75s ease-in-out infinite;
}
html[data-theme="light"] .hero{
  background:
    linear-gradient(180deg, rgba(234,242,255,.96), rgba(231,246,255,.92) 55%, rgba(234,250,248,.92));
}

.hero::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.28));
  pointer-events:none;
}
html[data-theme="light"] .hero::after{
  background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.10));
}

.hero-inner{
  position:relative;
  max-width:1120px;
  margin:0 auto;
  padding:22px 14px 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.hero-logo{
  height: 96px;                 /* ⬅️ BIGGER LOGO */
  width: auto;
  opacity: .98;
  margin-bottom: 10px;
  filter:
    drop-shadow(0 16px 26px rgba(0,0,0,.35))
    drop-shadow(0 0 14px rgba(250,204,21,.18));
}

/* Tablet */
@media (max-width: 900px){
  .hero-logo{
    height: 76px;
  }
}

/* Mobile */
@media (max-width: 600px){
  .hero-logo{
    height: 60px;
  }
}

.hero-title{
  margin:12px 0 0;
  font-size:28px;
  font-weight:800;
  letter-spacing:.02em;
  text-shadow: 0 10px 18px rgba(0,0,0,.25);
}
html[data-theme="light"] .hero-title{
  text-shadow:none;
}
.hero-sub{
  margin:6px 0 0;
  font-size:13px;
  color:var(--muted);
}
.hero-web{
  margin:6px 0 0;
  font-size:12px;
  color:var(--muted);
}

/* ===== CLEAN ROTATING WHEELS (NO SHADOW / NO HALO) ===== */
.hero-wheel{
  animation: wheelSpin 22s linear infinite;
  transform-origin: 50% 50%;
  will-change: transform;

  opacity: 1;
  filter: none;
  background: none;
  padding: 0;
}

/* position */
.hero-wheel.left{ left:36px; }
.hero-wheel.right{ right:36px; }

/* hide on small screens */
@media (max-width:900px){
  .hero-wheel{ display:none; }
  .hero-title{ font-size:22px; }
}


/* NAV STRIP */
.navstrip{
  background: linear-gradient(180deg, rgba(4,22,46,.92), rgba(4,22,46,.84));
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  backdrop-filter: var(--glassBlur);
}
html[data-theme="light"] .navstrip{
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.66));
}
.navstrip-inner{
  max-width:1120px;
  margin:0 auto;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.nav-left{display:flex;align-items:center;gap:10px}
.nav-meta{font-size:12px;color:var(--muted)}
.menuBtn{
  width:38px;height:38px;border-radius:10px;
  border:1px solid var(--line);
  background:rgba(4,22,46,.35);
  display:grid;place-items:center;
  font-weight:900;
}
html[data-theme="light"] .menuBtn{background:rgba(255,255,255,.65)}
.nav-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}

/* Cards */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  margin-bottom:14px;
  box-shadow:var(--shadow);
  backdrop-filter: var(--glassBlur);
}
.small{font-size:12px;color:var(--muted)}
label{font-size:12px;color:var(--muted);display:block;margin-bottom:6px}
input,textarea,select{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(4,22,46,.35);
  color:var(--text);
  outline:none;
}
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select{
  background:rgba(255,255,255,.75);
  border-color:rgba(2,6,23,.14);
}
textarea{resize:vertical}
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:760px){.row{grid-template-columns:1fr}}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid rgba(250,204,21,.45);
  background: linear-gradient(180deg, rgba(250,204,21,.90), rgba(250,204,21,.70));
  color:var(--btnText);
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
}
.btn:hover{transform: translateY(-1px)}
.btn.gray{
  background:rgba(255,255,255,.12);
  border-color:var(--line);
  color:var(--text);
}
html[data-theme="light"] .btn.gray{
  background:rgba(2,6,23,.06);
  color:var(--text);
}
.btn.red{
  background:rgba(239,68,68,.90);
  color:#fff;
  border-color:rgba(239,68,68,.45);
}

.badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(250,204,21,.35);
  color:var(--gold);
  font-size:12px
}

table{width:100%;border-collapse:collapse}
th,td{padding:10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
th{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em}

.notice{padding:10px 12px;border-radius:14px;border:1px solid rgba(250,204,21,.35);background:rgba(250,204,21,.12)}
.error{padding:10px 12px;border-radius:14px;border:1px solid rgba(239,68,68,.45);background:rgba(239,68,68,.12)}

.noselect,.noselect *{user-select:none;-webkit-user-select:none}

/* ===== PDF WATERMARK (NON-INTRUSIVE) ===== */
.watermark{
  position:absolute;
  inset:auto 14px 14px auto;   /* bottom-right */
  pointer-events:none;
  z-index:5;
}

.watermark span{
  font-size:11px;
  color:rgba(229,231,235,.55);
  background:rgba(2,6,23,.35);
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  padding:6px 10px;
  backdrop-filter: blur(6px);
}
html[data-theme="light"] .watermark span{
  color:rgba(2,6,23,.45);
  background:rgba(255,255,255,.55);
}
/* ===== PROFESSIONAL LOGIN LOGO SIZE FIX ===== */
.brandmark img,
.login-logo,
.center-logo {
  max-width: 180px;
  width: 100%;
  height: auto;
  margin: 0 auto 12px;
  display: block;
  opacity: 0.95;
}

/* Tablet */
@media (max-width: 1024px) {
  .brandmark img,
  .login-logo,
  .center-logo {
    max-width: 150px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .brandmark img,
  .login-logo,
  .center-logo {
    max-width: 120px;
  }
}

/* Add spacing around logo */
.brandmark {
  padding: 18px 0;
}
/* ===== HERO WHEELS (CLEAN + SIZE CONTROL) ===== */
@keyframes wheelSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-wheel{
  position:absolute;               /* keep inside hero */
  top: 18px;
  width: 130px;                    /* ✅ size control */
  height: 130px;                   /* ✅ size control */
  object-fit: contain;

  animation: wheelSpin 22s linear infinite;
  transform-origin: 50% 50%;
  will-change: transform;

  opacity: 1;                      /* crisp */
  filter: none;                    /* no shadow */
  background: none;                /* no halo */
  padding: 0;
}

/* Position */
.hero-wheel.left{ left:36px; }
.hero-wheel.right{ right:36px; animation-direction: reverse; }

/* Responsive */
@media (max-width:1100px){
  .hero-wheel{ width:105px; height:105px; top: 14px; }
}
@media (max-width:900px){
  .hero-wheel{ display:none; }
  .hero-title{ font-size:22px; }
}
/* ===== SMALLER LOGIN CARD (PRO LOOK) ===== */
.container{
  max-width: 820px;     /* smaller overall */
}

/* make the two cards (title + form) compact and centered */
.container .card{
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* make login form fields not too wide */
.row{
  grid-template-columns: 1fr 1fr;
}
@media (max-width:760px){
  .container{ max-width: 520px; }
  .container .card{ max-width: 520px; }
  .row{ grid-template-columns: 1fr; }
}
/* ===== DASHBOARD: PROFESSIONAL SPACING ===== */

/* Make cards breathe */
.card{
  padding: 22px;
}

/* Add spacing between sections inside cards */
.card form .row{
  gap: 18px;
}

/* Table spacing */
table th, table td{
  padding: 14px 12px;
}

/* Make dashboard container wider so table feels professional */
.container{
  max-width: 1200px;
}

/* Let table card use full width */
.card table{
  width: 100%;
}

/* ===== PAGE-SPECIFIC WIDTHS ===== */
.container.login{ max-width: 820px; }
.container.dash{ max-width: 1250px; }

/* ===== DASHBOARD TABLE FIX (NO OVERFLOW) ===== */
.container.dash .card table{
  width: 100%;
  table-layout: fixed;
}

.container.dash th, 
.container.dash td{
  padding: 14px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

/* column widths */
.container.dash td:nth-child(1){ width: 14%; } /* Category */
.container.dash td:nth-child(2){ width: 30%; } /* Title */
.container.dash td:nth-child(3){ width: 18%; } /* File */
.container.dash td:nth-child(4){ width: 16%; } /* Uploaded */
.container.dash td:nth-child(5){ width: 22%; overflow: visible; } /* Actions */

/* ===== ACTIONS: PROFESSIONAL 2x2 GRID ===== */
.container.dash .actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 280px;
}

.container.dash .actions .btn{
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}

/* Mobile: actions stack full width */
@media (max-width: 700px){
  .container.dash .actions{
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}
.intro-text {
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
}

.intro-text strong {
  color: #e5e7eb;
}

/* ===== BUTTONS (ONE SYSTEM ONLY) ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.10);
  color: var(--text);
  font-size:13px;
  font-weight:800;
  letter-spacing:.2px;
  cursor:pointer;
  text-decoration:none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space:nowrap;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
  filter: brightness(1.05);
}

/* Brand gold button (default) */
.btn-primary{
  background: linear-gradient(180deg, rgba(250,204,21,.92), rgba(250,204,21,.72));
  border-color: rgba(250,204,21,.38);
  color: var(--btnText);
}

/* Neutral / Gray */
.btn-gray{
  background: rgba(255,255,255,.10);
  border-color: var(--line);
  color: var(--text);
}
html[data-theme="light"] .btn-gray{
  background: rgba(2,6,23,.06);
  border-color: rgba(2,6,23,.14);
}

/* Danger */
.btn-danger{
  background: linear-gradient(135deg,#fb7185,#be123c);
  border-color: rgba(255,255,255,.10);
  color:#fff;
}

/* Professional action types */
.btn-view{
  background: linear-gradient(135deg,#334155,#0f172a);
  border-color: rgba(255,255,255,.10);
  color:#e5e7eb;
}
.btn-download{
  background: linear-gradient(135deg,#facc15,#eab308);
  border-color: rgba(250,204,21,.40);
  color:#111827;
}
.btn-print{
  background: linear-gradient(135deg,#38bdf8,#0284c7);
  border-color: rgba(255,255,255,.10);
  color:#fff;
}
.btn-delete{
  background: linear-gradient(135deg,#ef4444,#b91c1c);
  border-color: rgba(255,255,255,.10);
  color:#fff;
}
/* ===== ACTION BUTTON COLORS (FOR TABLE ONLY) ===== */
.container.dash .actions .btn{
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.25) !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
}

/* View */
.container.dash .actions .btn-view{
  background: linear-gradient(135deg,#334155,#0f172a) !important;
  color: #e5e7eb !important;
}

/* Download */
.container.dash .actions .btn-download{
  background: linear-gradient(135deg,#facc15,#eab308) !important;
  color: #111827 !important;
}

/* Print */
.container.dash .actions .btn-print{
  background: linear-gradient(135deg,#38bdf8,#0284c7) !important;
  color: #ffffff !important;
}

/* Delete */
.container.dash .actions .btn-delete{
  background: linear-gradient(135deg,#ef4444,#b91c1c) !important;
  color: #ffffff !important;
}
/* ===== ULTRA FORCE ACTION BUTTON COLORS ===== */
td .actions a.btn.btn-view { background: #1f2937 !important; color:#fff !important; border:1px solid rgba(255,255,255,.12) !important; }
td .actions a.btn.btn-download { background: #facc15 !important; color:#111827 !important; border:1px solid rgba(250,204,21,.35) !important; }
td .actions a.btn.btn-print { background: #0284c7 !important; color:#fff !important; border:1px solid rgba(255,255,255,.12) !important; }
td .actions a.btn.btn-delete { background: #dc2626 !important; color:#fff !important; border:1px solid rgba(255,255,255,.12) !important; }
