/* Vorden PMS — brand-led application shell */
:root {
  --vorden-ink: #061a33;
  --vorden-navy: #0a2545;
  --vorden-blue: #123f70;
  --vorden-emerald: #07805f;
  --vorden-mint: #e6f5ef;
  --vorden-gold: #c5a35d;
  --vorden-canvas: #f4f7fa;
}

* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
html { background: var(--vorden-canvas); }
body {
  color: #172033;
  background:
    radial-gradient(circle at 92% 2%, rgba(7, 128, 95, .07), transparent 24rem),
    radial-gradient(circle at 42% 100%, rgba(18, 63, 112, .05), transparent 30rem),
    var(--vorden-canvas) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app-shell { min-height: 100vh; }
.app-sidebar {
  width: 264px;
  background:
    radial-gradient(circle at 15% 0%, rgba(16, 126, 96, .22), transparent 16rem),
    linear-gradient(165deg, #081f3a 0%, #07172c 72%, #041222 100%);
  box-shadow: 18px 0 45px rgba(6, 26, 51, .08);
}
.app-main { margin-left: 264px; padding: 34px 38px 48px; max-width: 1720px; min-width: 0; }
.app-main section:not(.dashboard-hero) { min-width: 0; max-width: 100%; overflow-x: auto; }
.app-main .text-slate-400 { color: #64748b; }
.brand-panel { min-height: 92px; }
.brand-mark {
  width: 45px;
  height: 45px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.24));
}
.brand-wordmark { font-family: Georgia, "Times New Roman", serif; letter-spacing: .14em; }
.brand-kicker { color: rgba(255,255,255,.48); letter-spacing: .22em; }
.sidebar-link {
  margin: 3px 13px;
  border-radius: 11px;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.sidebar-link:hover { transform: translateX(2px); color: white; }
.sidebar-link.active {
  background: linear-gradient(100deg, rgba(7,128,95,.95), rgba(7,128,95,.6));
  color: #fff;
  border-left: 0;
  box-shadow: 0 8px 20px rgba(0, 89, 67, .25);
}
.sidebar-link i { color: rgba(255,255,255,.55); }
.sidebar-link.active i { color: #fff; }
.sidebar-user { background: rgba(255,255,255,.035); }

.page-heading { letter-spacing: -.035em; }
.page-subtitle strong { font-weight: 700; }
.header-actions > button, .header-actions > a { box-shadow: 0 4px 12px rgba(15, 37, 64, .07); }

.bg-white.rounded-xl {
  border-color: rgba(203, 213, 225, .72) !important;
  border-radius: 17px !important;
  box-shadow: 0 8px 28px rgba(10, 37, 69, .055) !important;
}
.bg-white.rounded-xl:hover { box-shadow: 0 12px 34px rgba(10, 37, 69, .08) !important; }

.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 28px 30px;
  color: white;
  background: linear-gradient(120deg, #082241 0%, #0b3558 52%, #087a5e 125%);
  box-shadow: 0 18px 42px rgba(6, 26, 51, .16);
}
.dashboard-hero::before,
.dashboard-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.11);
}
.dashboard-hero::before { width: 330px; height: 330px; right: -100px; top: -180px; }
.dashboard-hero::after { width: 230px; height: 230px; right: 30px; bottom: -180px; }
.hero-logo { width: 72px; height: 72px; object-fit: contain; opacity: .92; filter: drop-shadow(0 8px 20px rgba(0,0,0,.2)); }

.metric-card {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  border: 1px solid rgba(203, 213, 225, .7);
  background: rgba(255,255,255,.94);
  padding: 20px;
  box-shadow: 0 8px 26px rgba(10, 37, 69, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(10, 37, 69, .09); }
.metric-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.metric-value { letter-spacing: -.035em; }
.metric-accent { position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, var(--metric-color, #123f70), transparent); }

.occupancy-ring {
  flex-shrink: 0;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--vorden-emerald) var(--occupancy), #e8eef3 0);
}
.occupancy-ring::after { content: ""; width: 82px; height: 82px; background: white; border-radius: 50%; }
.occupancy-copy { position: absolute; text-align: center; }

.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  transition: all .18s ease;
}
.quick-action:hover { border-color: rgba(7,128,95,.45); background: #f3fbf8; transform: translateY(-1px); }
.quick-action i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--vorden-mint); color: var(--vorden-emerald); }

table thead { background: rgba(248, 250, 252, .78); }
table tbody tr { transition: background-color .15s ease; }
table tbody tr:last-child { border-bottom: 0 !important; }
.applications-table th, .applications-table td { padding-left: .75rem; padding-right: .75rem; }
.applications-table th:first-child, .applications-table td:first-child { padding-left: 0; }
.applications-table th:last-child, .applications-table td:last-child { padding-right: 0; }
.table-row:hover {
  background: #f5faf8;
}
.modal-backdrop {
  background: rgba(5, 20, 39, 0.68);
  backdrop-filter: blur(6px);
}
@media print {
  .no-print { display: none !important; }
  body { background: white !important; }
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .015em;
  white-space: nowrap;
}
input, select, textarea {
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--vorden-emerald);
  box-shadow: 0 0 0 3px rgba(7, 128, 95, 0.12);
}

.login-shell {
  background:
    radial-gradient(circle at 15% 15%, rgba(7,128,95,.22), transparent 26rem),
    linear-gradient(145deg, #061a33 0%, #092b4c 62%, #075945 150%);
}
.login-brand-panel { background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); backdrop-filter: blur(8px); }
.login-logo { width: 116px; filter: drop-shadow(0 18px 28px rgba(0,0,0,.25)); }

@media (max-width: 1050px) {
  .app-sidebar { width: 224px; }
  .app-main { margin-left: 224px; padding: 28px 24px 42px; }
  .sidebar-link { margin-inline: 9px; padding-inline: 14px !important; }
}

#agency-profile { scroll-margin-top: 24px; }
.work-queue-categories { display: grid; align-content: start; gap: 8px; min-width: 0; }
@media (max-width: 1023px) {
  .work-queue-categories { display: flex; overflow-x: auto; padding-bottom: 8px; }
  .work-queue-categories > a { flex-shrink: 0; min-width: 190px; }
}

@media (max-width: 760px) {
  #agency-profile { scroll-margin-top: 190px; }
  .app-shell { display: block !important; padding-top: 174px; }
  .app-sidebar { width: 100%; height: 174px; bottom: auto; display: block !important; overflow: hidden; }
  .brand-panel { min-height: 66px; height: 66px; padding: 10px 16px !important; border-bottom: 1px solid rgba(255,255,255,.08); }
  .brand-mark { width: 38px; height: 38px; }
  .brand-panel .brand-kicker { display: none; }
  .brand-wordmark { font-size: 17px !important; }
  #main-nav { height: 66px; display: flex; padding: 8px !important; overflow-x: auto; overflow-y: hidden; gap: 3px; }
  .sidebar-link { flex: 0 0 auto; margin: 0; padding: 10px 13px !important; border-radius: 10px; }
  .sidebar-link:hover { transform: none; }
  .sidebar-user { height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 16px !important; }
  .sidebar-user > p:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-user > p:nth-child(2) { display: none; }
  .sidebar-user button { flex-shrink: 0; margin-top: 0; color: white; min-height: 32px; }
  .app-main { margin-left: 0; padding: 22px 16px 36px; }
  .page-header { display: block !important; }
  .header-actions { margin-top: 14px; flex-wrap: wrap; }
  .dashboard-hero { padding: 23px 21px; }
  .hero-logo { display: none; }
  .metric-card { padding: 17px; }
  table { min-width: 680px; }
  .login-brand-panel { display: none; }
}

@media (max-width: 440px) {
  .sidebar-link { font-size: 12px !important; padding-inline: 11px !important; }
  .dashboard-hero h2 { font-size: 25px !important; }
  .metric-value { font-size: 21px !important; }
}

@media print {
  .app-shell { display: block !important; padding-top: 0 !important; }
  .app-main { margin-left: 0 !important; padding: 0 !important; max-width: none; }
  .app-main section { overflow: visible !important; box-shadow: none !important; }
  table { min-width: 0 !important; }
}
