
:root {
  --cws-theme-navy-1:#0c2240;
  --cws-theme-navy-2:#163a67;
  --cws-theme-navy-3:#1a4e8f;
  --cws-theme-surface:#f1f5fa;
  --cws-theme-white:#ffffff;
  --cws-theme-border:#d9e3ef;
  --cws-theme-text:#23364d;
  --cws-theme-muted:#68788a;
  --cws-theme-shadow:0 12px 30px rgba(10, 34, 64, .10);
  --cws-theme-shadow-soft:0 8px 18px rgba(10, 34, 64, .06);
  --cws-theme-radius-xl:24px;
  --cws-theme-radius-lg:18px;
  --cws-theme-radius-md:14px;
}
html, body { background:linear-gradient(180deg,#eef3f8 0%,#f5f8fc 100%) !important; color:var(--cws-theme-text) !important; }
body { -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }

/* Layout shell */
.main { background:transparent !important; }
.content { padding:24px 20px 100px !important; }
.topbar {
  background:linear-gradient(90deg,var(--cws-theme-navy-1) 0%, #102b4c 45%, var(--cws-theme-navy-2) 100%) !important;
  border-bottom:0 !important;
  box-shadow:0 10px 30px rgba(8, 29, 54, .18) !important;
  padding:22px 28px !important;
  min-height:88px;
}
.page-title h1 { color:#fff !important; font-size:20px !important; font-weight:500 !important; letter-spacing:-.02em; margin-bottom:6px !important; }
.page-title p { color:rgba(255,255,255,.78) !important; font-size:13px !important; }
.menu-toggle,
.toggle-btn {
  width:54px !important; height:54px !important; border-radius:18px !important;
  background:rgba(255,255,255,.08) !important; color:#fff !important; border:1px solid rgba(255,255,255,.14) !important;
  box-shadow:none !important;
}
.menu-toggle:hover,
.toggle-btn:hover { background:rgba(255,255,255,.14) !important; }

/* Sidebar */
.sidebar {
  background:linear-gradient(180deg, #0a2f5c 0%, #0c2342 100%) !important;
  box-shadow:10px 0 30px rgba(7, 24, 45, .18) !important;
}
.brand {
  background:rgba(255,255,255,.07) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  border-radius:22px !important;
  box-shadow:none !important;
}
.brand-logo {
  border-radius:16px !important;
  background:rgba(255,255,255,.10) !important;
}
.menu-item, .logout-btn {
  min-height:52px !important;
  border-radius:16px !important;
  font-weight:500 !important;
  color:rgba(255,255,255,.92) !important;
}
.menu-item:hover, .logout-btn:hover { background:rgba(255,255,255,.10) !important; }
.menu-item.active {
  background:rgba(255,255,255,.16) !important;
  border-color:rgba(255,255,255,.12) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04) !important;
}

/* Profile */
.pms-profile-trigger {
  min-height:54px !important;
  padding:9px 16px 9px 10px !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.14) !important;
  color:#fff !important;
  box-shadow:none !important;
}
.pms-profile-trigger:hover { background:rgba(255,255,255,.13) !important; }
.pms-profile-avatar {
  width:32px !important; height:32px !important; min-width:32px !important;
  background:linear-gradient(135deg,#d8df7a 0%,#af8c28 100%) !important;
  color:#fff !important;
  box-shadow:0 4px 12px rgba(168,135,31,.25);
}
.pms-profile-name { color:#fff !important; font-weight:600 !important; }
.pms-profile-caret { color:rgba(255,255,255,.8) !important; }
.pms-profile-dropdown { border-radius:18px !important; border:1px solid #dbe5ef !important; box-shadow:0 20px 40px rgba(10,34,64,.14) !important; }

/* Cards & stats */
.stats-grid, .metrics-grid, .summary-grid { gap:16px !important; }
.stat-card {
  border:none !important; border-radius:22px !important; padding:22px 20px !important;
  box-shadow:0 14px 28px rgba(12, 34, 64, .10) !important;
  color:#fff !important; overflow:hidden; position:relative;
}
.stat-card::after {
  content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0)); pointer-events:none;
}
.stats-grid .stat-card:nth-child(4n+1), .metrics-grid .stat-card:nth-child(4n+1), .summary-grid .stat-card:nth-child(4n+1) {
  background:linear-gradient(135deg,#173c6b 0%,#102d53 100%) !important;
}
.stats-grid .stat-card:nth-child(4n+2), .metrics-grid .stat-card:nth-child(4n+2), .summary-grid .stat-card:nth-child(4n+2) {
  background:linear-gradient(135deg,#245c9d 0%,#1a4d86 100%) !important;
}
.stats-grid .stat-card:nth-child(4n+3), .metrics-grid .stat-card:nth-child(4n+3), .summary-grid .stat-card:nth-child(4n+3) {
  background:linear-gradient(135deg,#18757b 0%,#135f69 100%) !important;
}
.stats-grid .stat-card:nth-child(4n+4), .metrics-grid .stat-card:nth-child(4n+4), .summary-grid .stat-card:nth-child(4n+4) {
  background:linear-gradient(135deg,#6b44bf 0%,#5333aa 100%) !important;
}
.stat-card .stat-title, .stat-card .stat-label, .stat-card h3, .stat-card h4, .stat-card p, .stat-card span {
  color:rgba(255,255,255,.86) !important;
}
.stat-card .stat-value, .stat-card strong, .stat-card .number { color:#fff !important; font-weight:700 !important; }
.stat-card .icon-box, .stat-card .stat-icon {
  background:rgba(255,255,255,.14) !important; border:1px solid rgba(255,255,255,.08) !important; color:#fff !important; border-radius:16px !important;
}

/* Panels / cards */
.card, .panel, .table-card, .content-card, .widget, .form-card {
  background:#fff !important;
  border:1px solid var(--cws-theme-border) !important;
  border-radius:24px !important;
  box-shadow:var(--cws-theme-shadow-soft) !important;
}
.card-title, .panel-head { border-bottom:1px solid #e7edf4 !important; }
.card-title, .panel-head, .widget-head { padding-bottom:16px !important; margin-bottom:16px !important; }
.card-title h3, .panel-head h3, .widget-head h3 { color:#24374f !important; font-size:18px !important; font-weight:700 !important; }
.card-title p, .panel-head p, .widget-head p { color:var(--cws-theme-muted) !important; font-size:12.5px !important; }

/* Forms */
input:not([type='checkbox']):not([type='radio']),
select, textarea {
  min-height:48px !important;
  border-radius:14px !important;
  border:1px solid #cdd9e7 !important;
  background:#fff !important;
  color:#213447 !important;
  box-shadow:none !important;
}
textarea { min-height:110px !important; }
input::placeholder, textarea::placeholder { color:#8a98a9 !important; }
input:focus, select:focus, textarea:focus {
  outline:none !important;
  border-color:#2b68ad !important;
  box-shadow:0 0 0 4px rgba(43,104,173,.10) !important;
}
label { color:#31455d !important; font-weight:600 !important; font-size:12.5px !important; }

/* Buttons */
.btn, .add-btn, .btn-primary, .export-btn, button[type='submit'], .action-btn-primary {
  border-radius:14px !important;
  min-height:46px !important;
  padding:0 16px !important;
  border:none !important;
  background:linear-gradient(135deg,#123a66 0%,#184b84 100%) !important;
  color:#fff !important;
  box-shadow:0 10px 20px rgba(18,58,102,.16) !important;
  font-weight:600 !important;
}
.btn:hover, .add-btn:hover, .btn-primary:hover, .export-btn:hover, button[type='submit']:hover, .action-btn-primary:hover {
  transform:translateY(-1px);
  filter:brightness(1.02);
}
.btn-secondary, .secondary-btn, .btn-light, .btn-outline, .action-btn-secondary {
  border-radius:14px !important;
  min-height:46px !important;
  padding:0 16px !important;
  border:1px solid #cfdaea !important;
  background:#fff !important;
  color:#173d69 !important;
  box-shadow:none !important;
  font-weight:600 !important;
}
.btn-danger { background:linear-gradient(135deg,#c53e49 0%,#a72834 100%) !important; color:#fff !important; border:none !important; }
.btn-success { background:linear-gradient(135deg,#2c8b58 0%,#1d7547 100%) !important; color:#fff !important; border:none !important; }

/* Tabs / pills */
.tab-btn, .tabs button, .nav-pill, .filter-tab {
  border-radius:14px !important;
  min-height:44px !important;
  font-weight:600 !important;
}
.tab-btn.active, .tabs button.active, .nav-pill.active, .filter-tab.active {
  background:linear-gradient(135deg,#123a66 0%,#184b84 100%) !important;
  color:#fff !important;
  box-shadow:0 8px 18px rgba(18,58,102,.12) !important;
}

/* Tables */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:separate !important; border-spacing:0 !important; }
thead th {
  background:linear-gradient(180deg,#17385f 0%,#102b4d 100%) !important;
  color:#fff !important;
  font-size:12px !important;
  font-weight:600 !important;
  padding:14px 16px !important;
  border-bottom:0 !important;
}
thead th:first-child { border-top-left-radius:14px; }
thead th:last-child { border-top-right-radius:14px; }
tbody td {
  background:#fff !important;
  color:#2a3c53 !important;
  padding:16px !important;
  border-bottom:1px solid #ebf0f6 !important;
}
tbody tr:hover td { background:#fbfdff !important; }

/* Badges / statuses */
.status, .badge, .pill {
  border-radius:999px !important;
  padding:8px 12px !important;
  font-size:11px !important;
  font-weight:600 !important;
}
.status.active, .status.success, .status-success, .badge-success { background:#e6f6ec !important; color:#1d7a48 !important; }
.status.overdue, .status-danger, .badge-danger { background:#fff0f0 !important; color:#be3b3b !important; }
.status.warning, .status-warning, .badge-warning { background:#fff6e8 !important; color:#b87314 !important; }
.status-purple { background:#efeaff !important; color:#6842c2 !important; }

/* Filter sections */
.filter-box, .filter-bar, .filters, .search-bar, .toolbar, .toolbar-row {
  align-items:end;
  gap:14px !important;
}

/* Login page */
.login-card, .auth-card, .login-panel {
  border-radius:28px !important;
  border:1px solid #dbe5ef !important;
  box-shadow:0 20px 45px rgba(10,34,64,.10) !important;
}

@media (max-width: 980px) {
  .topbar { padding:16px 16px !important; min-height:auto; }
  .content { padding:16px 14px 96px !important; }
  .page-title h1 { font-size:20px !important; }
  .page-title p { font-size:12px !important; }
  .pms-profile-trigger { min-height:48px !important; border-radius:16px !important; }
  .menu-toggle, .toggle-btn { width:48px !important; height:48px !important; border-radius:16px !important; }
  thead th, tbody td { padding:12px !important; }
}


/* CWS typography refinement: calmer corporate hierarchy */
body { font-weight:400; }
.page-title p { font-weight:400 !important; }
.stat-card .stat-label, .stat-card .stat-title { font-weight:600 !important; letter-spacing:.025em; }
.stat-card .stat-help, .stat-card p { font-weight:400 !important; color:rgba(255,255,255,.64) !important; }
.card-title p, .panel-head p, .widget-head p { font-weight:400 !important; }
tbody td { font-weight:400 !important; }
button, .btn, .add-btn, .btn-primary, .btn-secondary, .secondary-btn, .btn-light, .btn-outline { font-weight:600 !important; }
.status, .badge, .pill { font-weight:600 !important; }

/* Reduce visual weight inside dense data regions */
table strong, table b { font-weight:600 !important; }
.card p, .panel p, .form-card p { font-weight:400; }

/* CWS Excel export consistency - explicit overrides for modules using generic .btn / submit rules */
button.fixed-export-btn[type='submit'],
a.btn.subscription-export-btn {
  background:linear-gradient(135deg,#168a49 0%,#0f6f3a 100%) !important;
  border:1px solid #0f783e !important;
  color:#fff !important;
  box-shadow:0 7px 16px rgba(18,122,64,.18) !important;
}
button.fixed-export-btn[type='submit']:hover,
a.btn.subscription-export-btn:hover {
  background:linear-gradient(135deg,#1b9852 0%,#0d6535 100%) !important;
  border-color:#0d6535 !important;
  color:#fff !important;
  filter:brightness(1.03) !important;
  transform:translateY(-1px);
}
