/* ═══════════════════════════════════════════════
   NexaCRM — Admin Dashboard Stylesheet
   Aesthetic: Industrial-Refined / Dark Workspace
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

/* ── VARIABLES ── */
:root {
  --bg-base: #0b0d11;
  --bg-surface: #12151c;
  --bg-elevated: #1a1e28;
  --bg-hover: #212536;
  --border: #252a38;
  --border-light: #2e3447;

  --accent: #6c63ff;
  --accent-glow: rgba(108,99,255,0.35);
  --accent2: #00d4aa;
  --accent3: #ff6b6b;
  --accent4: #ffb347;

  --text-primary: #e8eaf0;
  --text-secondary: #7a8099;
  --text-muted: #4a5168;

  --c1: #6c63ff;
  --c2: #00d4aa;
  --c3: #ff6b6b;
  --c4: #ffb347;

  --sidebar-w: 260px;
  --sidebar-collapsed-w: 64px;
  --topbar-h: 64px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --transition: 0.3s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; cursor: pointer; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
}

/* ── UTILITY ── */
.hidden { display: none !important; }

body.role-client [data-admin-only="true"],
body.role-client #paymentsTbody .btn-sm {
  display: none !important;
}

/* ════════════════════════════
   LOGIN PAGE
   ════════════════════════════ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 50%, #0f1226 0%, #0b0d11 60%);
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: blobFloat 8s ease-in-out infinite;
}
.login-blob.b1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.login-blob.b2 {
  width: 400px; height: 400px;
  background: var(--accent2);
  bottom: -80px; right: -80px;
  animation-delay: -3s;
}
.login-blob.b3 {
  width: 300px; height: 300px;
  background: var(--accent3);
  top: 50%; left: 60%;
  animation-delay: -6s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.97); }
}

.login-card {
  position: relative;
  z-index: 10;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 52px 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(108,99,255,0.1);
  animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.logo-img {
  width: 240px;
  height: 65px;
  object-fit: contain;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.login-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.login-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.login-error {
  background: rgba(255,107,107,0.12);
  border: 1px solid rgba(255,107,107,0.3);
  color: var(--accent3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.field-group {
  margin-bottom: 18px;
}
.field-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-group select option { background: var(--bg-elevated); }
.field-group textarea { resize: vertical; }

/* ── FORM VALIDATION ── */
.field-group.has-error input,
.field-group.has-error select,
.field-group.has-error textarea {
  border-color: var(--accent3) !important;
  box-shadow: 0 0 0 3px rgba(255,107,107,0.15);
}
.field-group .field-error {
  display: none;
  font-size: 0.75rem;
  color: var(--accent3);
  margin-top: 5px;
  font-weight: 500;
}
.field-group.has-error .field-error { display: block; }
.field-group.has-success input {
  border-color: var(--accent2) !important;
  box-shadow: 0 0 0 3px rgba(0,212,170,0.12);
}

/* ── VIEWING-AS-CLIENT BANNER ── */
.viewing-as-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(90deg, #ff8c00, #ffb347);
  color: #1a1e2e;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-body);
  box-shadow: 0 2px 16px rgba(255,140,0,0.35);
}
.viewing-as-banner.hidden { display: none !important; }
.vab-icon { font-size: 1.1rem; flex-shrink: 0; }
.vab-text { flex: 1; }
.vab-text strong { font-weight: 800; }
.vab-btn {
  background: rgba(0,0,0,0.18);
  border: 1.5px solid rgba(0,0,0,0.25);
  color: #1a1e2e;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.vab-btn:hover { background: rgba(0,0,0,0.30); }
body:has(.viewing-as-banner:not(.hidden)) .app { padding-top: 42px; }

.btn-login {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
  letter-spacing: 0.3px;
}
.btn-login:hover {
  background: #7d76ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-login:active { transform: translateY(0); }

.login-hint {
  text-align: center;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ════════════════════════════
   APP LAYOUT
   ════════════════════════════ */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-header .logo-img {
  width: 170px;
  height: 48px;
  flex: 0 1 170px;
  object-fit: contain;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.sidebar-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--accent);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #9aa3ff transparent;
  scrollbar-gutter: stable;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #9aa3ff;
  border-radius: 20px;
  transition: background 0.3s ease;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #7f88ff;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.87rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: var(--radius-sm);
}
.nav-item:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-item:hover .nav-icon { color: var(--accent); transform: scale(1.15); }
.nav-item.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(108,99,255,0.18) 0%, rgba(108,99,255,0.06) 100%);
  border: 1px solid rgba(108,99,255,0.25);
}
.nav-item.active .nav-icon { color: var(--accent); }

.nav-icon {
  font-size: 1rem;
  width: 22px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
  transition: transform var(--transition), color var(--transition);
}

.nav-icon i,
.child-symbol i,
.nav-arrow i {
  width: 1.1em;
  text-align: center;
  line-height: 1;
}

.sidebar-footer {
  padding: 12px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-surface);
}
.admin-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.admin-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}
.admin-name { font-weight: 600; font-size: 0.9rem; }
.admin-role { color: var(--text-muted); font-size: 0.75rem; }
.btn-logout {
  width: 100%;
  background: rgba(255,107,107,0.1);
  border: 1px solid rgba(255,107,107,0.2);
  color: var(--accent3);
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}
.btn-logout:hover {
  background: rgba(255,107,107,0.2);
  border-color: var(--accent3);
  transform: translateY(-1px);
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
}

body.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-w);
}

body.sidebar-collapsed .sidebar-header {
  padding: 14px 10px;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-header .logo-img,
body.sidebar-collapsed .nav-section-label,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-arrow,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .nav-children,
body.sidebar-collapsed .admin-name,
body.sidebar-collapsed .admin-role,
body.sidebar-collapsed .btn-logout {
  display: none !important;
}

body.sidebar-collapsed .sidebar-toggle {
  width: 42px;
  height: 42px;
  margin-left: 0;
  border: 0;
  background: transparent url("new_logo.png") center / contain no-repeat;
  color: transparent;
  font-size: 0;
}

body.sidebar-collapsed .sidebar-nav {
  padding: 12px 8px;
  align-items: center;
  scrollbar-width: none;
}

body.sidebar-collapsed .sidebar-nav::-webkit-scrollbar {
  width: 0;
}

body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .nav-parent {
  width: 44px;
  height: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 0;
  gap: 0;
}

body.sidebar-collapsed .nav-group {
  width: 44px;
}

body.sidebar-collapsed .nav-icon {
  width: 24px;
  height: 24px;
  font-size: 1rem;
}

body.sidebar-collapsed .sidebar-footer {
  padding: 10px;
}

body.sidebar-collapsed .admin-badge {
  justify-content: center;
  padding: 0;
  margin-bottom: 0;
}

body.sidebar-collapsed .admin-avatar {
  width: 36px;
  height: 36px;
}

/* ── TOPBAR ── */
.topbar {
  min-height: 76px;
  height: auto;
  background: #1a1f36;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  margin: 18px 28px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: none;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.mobile-sidebar-toggle {
  width: 38px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.mobile-sidebar-toggle:hover { color: var(--accent); border-color: var(--border-light); background: var(--bg-hover); }
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.3rem;
  line-height: 1;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.hamburger:hover { color: var(--accent); border-color: var(--border-light); background: var(--bg-hover); }
.page-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(241,245,249,0.84);
  font-size: 0.78rem;
  white-space: nowrap;
}
.topbar-date::before {
  content: '\f073';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #5eead4;
}
.topbar-entity-badge,
.topbar-entity-divider {
  display: none;
}
.topbar-avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #6366f1);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
}
.notification-bell {
  width: 40px;
  height: 40px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(251,191,36,0.26);
  border-radius: 999px;
  background: rgba(251,191,36,0.10);
  box-shadow: 0 0 0 5px rgba(251,191,36,0.08);
  color: #fbbf24;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition);
  user-select: none;
}
.notification-bell:hover { transform: translateY(-1px); }
.notif-dot {
  position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px; background: var(--accent3);
  border-radius: 50%; border: 2px solid var(--bg-surface);
  animation: notifPulse 1.5s infinite;
}
@keyframes notifPulse { 0%,100%{transform:scale(1);opacity:1;} 50%{transform:scale(1.4);opacity:0.7;} }
.notif-count {
  position: absolute; top: -6px; right: -8px;
  background: var(--accent3); color: #fff; font-size: 0.62rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--bg-surface); line-height: 1;
}
.notif-dropdown {
  position: absolute; top: calc(var(--topbar-h) - 8px); right: 24px;
  width: 360px; background: var(--bg-elevated); border: 1px solid var(--border-light);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 9999;
  overflow: hidden; animation: notifSlideIn 0.2s ease;
}
@keyframes notifSlideIn { from{opacity:0;transform:translateY(-8px);} to{opacity:1;transform:translateY(0);} }
.notif-dropdown-header { display:flex; align-items:center; justify-content:space-between; padding:14px 16px 10px; border-bottom:1px solid var(--border); }
.notif-dropdown-title { font-weight:700; font-size:0.9rem; color:var(--text-primary); font-family:var(--font-display); }
.notif-clear-all { background:none; border:none; color:var(--accent); font-size:0.78rem; cursor:pointer; padding:4px 8px; border-radius:var(--radius-sm); transition:background var(--transition); }
.notif-clear-all:hover { background:var(--bg-hover); }
.notif-list { max-height:380px; overflow-y:auto; }
.notif-list::-webkit-scrollbar { width:4px; }
.notif-list::-webkit-scrollbar-thumb { background:var(--border-light); border-radius:99px; }
.notif-item { display:flex; align-items:flex-start; gap:12px; padding:12px 16px; border-bottom:1px solid var(--border); cursor:pointer; transition:background var(--transition); position:relative; }
.notif-item:hover { background:var(--bg-hover); }
.notif-item.unread { background:rgba(108,99,255,0.05); }
.notif-item.unread::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--accent); border-radius:0 2px 2px 0; }
.notif-icon { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.notif-icon.payment{background:rgba(0,212,170,0.15);} .notif-icon.message{background:rgba(108,99,255,0.15);} .notif-icon.project{background:rgba(255,179,71,0.15);} .notif-icon.client{background:rgba(108,99,255,0.1);} .notif-icon.document{background:rgba(255,107,107,0.15);} .notif-icon.enquiry{background:rgba(0,212,170,0.1);}
.notif-body { flex:1; min-width:0; }
.notif-text { font-size:0.83rem; color:var(--text-primary); line-height:1.4; margin-bottom:3px; }
.notif-time { font-size:0.73rem; color:var(--text-muted); }
.notif-empty { text-align:center; color:var(--text-muted); padding:40px 16px; font-size:0.85rem; }
body.light-mode .notif-dropdown { background:#fff; border-color:#dde1ee; }
body.light-mode .notif-item.unread { background:rgba(108,99,255,0.04); }
body.light-mode .notif-item:hover { background:#f5f6fa; }
body.light-mode .notif-dropdown-header { border-color:#dde1ee; }
body.light-mode .notif-item { border-color:#edf0f7; }

body.page-current-employees .topbar {
  margin: 18px 28px 0;
  height: 72px;
  border: 1px solid rgba(124,58,237,0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 50%, rgba(59,130,246,0.16), transparent 28%),
    radial-gradient(circle at 92% 46%, rgba(0,212,170,0.14), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(247,250,255,0.90));
  box-shadow: 0 18px 45px rgba(20,35,70,0.12), inset 0 1px 0 rgba(255,255,255,0.85);
  backdrop-filter: blur(18px);
}
body.page-current-employees .page-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #07142f;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0;
}
body.page-current-employees .page-title::before {
  content: '';
  width: 11px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6, #00d4aa);
  box-shadow: 0 0 22px rgba(59,130,246,0.35);
}
body.page-current-employees .topbar-date {
  color: #52627d;
  font-weight: 700;
}
body.page-current-employees .theme-toggle,
body.page-current-employees .notification-bell {
  box-shadow: 0 10px 24px rgba(59,130,246,0.14);
}

body.page-current-interns .topbar {
  margin: 18px 28px 0;
  height: 72px;
  border: 1px solid rgba(124,58,237,0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 50%, rgba(124,58,237,0.16), transparent 28%),
    radial-gradient(circle at 92% 46%, rgba(255,179,71,0.16), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(249,247,255,0.90));
  box-shadow: 0 18px 45px rgba(46,28,95,0.12), inset 0 1px 0 rgba(255,255,255,0.85);
  backdrop-filter: blur(18px);
}
body.page-current-interns .page-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #120b2f;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0;
}
body.page-current-interns .page-title::before {
  content: '';
  width: 11px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7c3aed, #ffb347);
  box-shadow: 0 0 22px rgba(124,58,237,0.35);
}
body.page-current-interns .topbar-date {
  color: #5c5578;
  font-weight: 700;
}
body.page-current-interns .theme-toggle,
body.page-current-interns .notification-bell {
  box-shadow: 0 10px 24px rgba(124,58,237,0.14);
}

/* ── PAGE SECTIONS ── */
.page { display: none; padding: 28px; animation: pageIn 0.3s ease; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════
   DASHBOARD
   ════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

body.role-admin .stat-card.c4 { order: 1; }
body.role-admin .stat-card.c1 { order: 2; }
body.role-admin .stat-card.c2 { order: 3; }
body.role-admin .stat-card.c3 { order: 4; }

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: default;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.c1::before { background: #6c63ff; } /* blue  → info / count   */
.stat-card.c2::before { background: #00d4aa; } /* green → revenue        */
.stat-card.c3::before { background: #ff6b6b; } /* red   → pending due    */
.stat-card.c4::before { background: #ffb347; } /* amber → active work    */

.stat-card::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.07;
}
.stat-card.c1::after { background: var(--c1); }
.stat-card.c2::after { background: var(--c2); }
.stat-card.c3::after { background: var(--c3); }
.stat-card.c4::after { background: var(--c4); }

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

/* RN Chambers - Bricks Income */
.rn-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.rn-page-title {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.rn-page-sub {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}
.rn-income-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
.rn-income-main {
  min-width: 0;
}
.rn-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px;
  gap: 12px;
  margin-bottom: 14px;
}
.rn-toolbar input,
.rn-income-form input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.rn-toolbar input:focus,
.rn-income-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}
.rn-month-control {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  min-width: 0;
  position: relative;
}
.rn-month-control input[type="month"],
body.page-current-employeesalary .salary-month-control input[type="month"] {
  position: absolute;
  inset: 0 50px;
  width: auto;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}
.rn-month-display {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0;
  white-space: nowrap;
  transition: border-color var(--transition), box-shadow var(--transition), color var(--transition);
}
.rn-month-display::after {
  content: '\f073';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.rn-month-display:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}
.rn-year-btn {
  width: 42px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), color var(--transition), background var(--transition), transform var(--transition);
}
.rn-year-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,99,255,0.08);
  transform: translateY(-1px);
}
.rn-income-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.rn-income-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rn-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}
.rn-income-side {
  display: grid;
  gap: 12px;
}
.rn-total-card,
.rn-mini-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.rn-total-card {
  background:
    radial-gradient(circle at 95% 5%, rgba(0,212,170,0.18), transparent 42%),
    var(--bg-surface);
}
.rn-total-label,
.rn-mini-card span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.rn-total-value {
  color: var(--c2);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin: 8px 0 4px;
  letter-spacing: 0;
}
.rn-total-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.rn-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rn-mini-card strong {
  color: var(--text-primary);
  font-size: 1rem;
}
.rn-mini-card.profit strong {
  color: var(--c2);
}
.rn-mini-card.muted {
  opacity: 0.72;
}

@media (max-width: 980px) {
  .rn-income-grid {
    grid-template-columns: 1fr;
  }
  .rn-income-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .rn-page-head,
  .rn-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .rn-toolbar,
  .rn-income-form .form-grid,
  .rn-income-side {
    grid-template-columns: 1fr;
  }
}

/* Bricks Income dashboard layout */
body.page-current-bricksincome .topbar,
body.page-current-thingsexpense .topbar,
body.page-current-employeesalary .topbar {
  margin: 18px 28px 0;
  min-height: 84px;
  height: auto;
  padding: 16px 22px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: #1a1f36;
  box-shadow: none;
}
body.page-current-bricksincome .page-title,
body.page-current-thingsexpense .page-title,
body.page-current-employeesalary .page-title {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
}
body.page-current-bricksincome .page-title::before,
body.page-current-thingsexpense .page-title::before,
body.page-current-employeesalary .page-title::before {
  content: none;
}
body.page-current-bricksincome .page-title::after,
body.page-current-thingsexpense .page-title::after,
body.page-current-employeesalary .page-title::after {
  color: rgba(226,232,240,0.68);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}
body.page-current-thingsexpense .page-title::after {
  content: 'Product based RN Chambers load expenses and weight records';
}
body.page-current-bricksincome .page-title::after {
  content: 'RN Chambers monthly brick sales records';
}
body.page-current-employeesalary .page-title::after {
  content: 'Payment records for brick workers';
}
body.page-current-bricksincome .topbar-left,
body.page-current-thingsexpense .topbar-left,
body.page-current-employeesalary .topbar-left {
  gap: 18px;
  min-width: 0;
}
body.page-current-bricksincome .topbar-entity-badge,
body.page-current-thingsexpense .topbar-entity-badge,
body.page-current-employeesalary .topbar-entity-badge,
body.entity-workspace-active .topbar-entity-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: #ffffff;
  flex-shrink: 0;
}
body.page-current-bricksincome .topbar-entity-dot,
body.page-current-thingsexpense .topbar-entity-dot,
body.page-current-employeesalary .topbar-entity-dot,
body.entity-workspace-active .topbar-entity-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20,184,166,0.14);
}
body.page-current-bricksincome .topbar-entity-label,
body.page-current-thingsexpense .topbar-entity-label,
body.page-current-employeesalary .topbar-entity-label,
body.entity-workspace-active .topbar-entity-label {
  display: block;
  color: rgba(203,213,225,0.62);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 4px;
}
body.page-current-bricksincome .topbar-entity-badge strong,
body.page-current-thingsexpense .topbar-entity-badge strong,
body.page-current-employeesalary .topbar-entity-badge strong,
body.entity-workspace-active .topbar-entity-badge strong {
  display: block;
  color: #f8fafc;
  font-size: 0.88rem;
  line-height: 1.1;
}
body.page-current-bricksincome .topbar-entity-divider,
body.page-current-thingsexpense .topbar-entity-divider,
body.page-current-employeesalary .topbar-entity-divider,
body.entity-workspace-active .topbar-entity-divider {
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}
body.page-current-bricksincome .topbar-right,
body.page-current-thingsexpense .topbar-right,
body.page-current-employeesalary .topbar-right {
  gap: 10px;
  flex-shrink: 0;
}
body.page-current-bricksincome .topbar-date,
body.page-current-thingsexpense .topbar-date,
body.page-current-employeesalary .topbar-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(241,245,249,0.84);
  font-size: 0.78rem;
  white-space: nowrap;
}
body.page-current-bricksincome .topbar-date::before,
body.page-current-thingsexpense .topbar-date::before,
body.page-current-employeesalary .topbar-date::before {
  content: '\f073';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #5eead4;
}
body.page-current-bricksincome .theme-toggle,
body.page-current-thingsexpense .theme-toggle,
body.page-current-employeesalary .theme-toggle {
  display: none;
}
body.page-current-bricksincome .notification-bell,
body.page-current-thingsexpense .notification-bell,
body.page-current-employeesalary .notification-bell {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(251,191,36,0.26);
  border-radius: 999px;
  background: rgba(251,191,36,0.10);
  box-shadow: 0 0 0 5px rgba(251,191,36,0.08);
  color: #fbbf24;
  font-size: 1rem;
}
body.page-current-bricksincome .notification-bell:hover,
body.page-current-thingsexpense .notification-bell:hover,
body.page-current-employeesalary .notification-bell:hover {
  transform: translateY(-1px);
}
body.page-current-bricksincome .notif-dot,
body.page-current-thingsexpense .notif-dot,
body.page-current-employeesalary .notif-dot {
  display: none !important;
}
body.page-current-bricksincome .notif-count,
body.page-current-thingsexpense .notif-count,
body.page-current-employeesalary .notif-count {
  display: none !important;
}
body.page-current-bricksincome .notification-bell::after,
body.page-current-thingsexpense .notification-bell::after,
body.page-current-employeesalary .notification-bell::after {
  content: '3';
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border: 2px solid #1a1f36;
  border-radius: 99px;
  background: #ef4444;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}
body.page-current-bricksincome .topbar-avatar,
body.page-current-thingsexpense .topbar-avatar,
body.page-current-employeesalary .topbar-avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #6366f1);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
}
.rn-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}
.rn-metric-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.rn-metric-card {
  min-height: 190px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(207,213,226,0.86);
  border-radius: 18px;
  padding: 28px 30px;
  color: #111827;
  box-shadow: 0 22px 50px rgba(15,23,42,0.08);
}
.rn-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.rn-metric-top span {
  color: #111827;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
  text-transform: uppercase;
}
.rn-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.rn-metric-icon.blue { background: rgba(59,130,246,0.14); color: #3b82f6; }
.rn-metric-icon.purple { background: rgba(139,92,246,0.14); color: #8b5cf6; }
.rn-metric-icon.green-bg { background: rgba(16,185,129,0.14); color: #10b981; }
.rn-metric-icon.amber { background: rgba(245,158,11,0.14); color: #f59e0b; }
.rn-metric-value {
  margin-top: 24px;
  color: #111827;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}
.rn-metric-sub {
  margin-top: 14px;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 800;
}
.rn-metric-sub.green { color: #10b981; }
.rn-metric-sub.purple-text { color: #8b5cf6; }
.rn-metric-sub.amber-text { color: #f59e0b; }
.salary-progress-card {
  min-height: 190px;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(203,213,225,0.88);
  border-radius: 18px;
  box-shadow: 0 20px 46px rgba(15,23,42,0.07);
  transition: all 0.3s ease;
}
.salary-progress-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16,185,129,0.34);
  box-shadow: 0 28px 58px rgba(15,23,42,0.1), 0 0 0 4px rgba(16,185,129,0.06);
}
.salary-progress-card .rn-metric-top span {
  color: #0f172a;
  font-family: 'Inter', 'DM Sans', sans-serif;
  letter-spacing: 0;
}
.salary-progress-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.18);
  color: #059669;
  font-weight: 800;
}
.salary-progress-value {
  margin-top: 22px;
  color: #0f172a;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 2.45rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}
.salary-progress-track {
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
  border: 1px solid rgba(203,213,225,0.7);
}
.salary-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #10b981;
  transition: width 0.65s ease;
}
.salary-progress-sub {
  margin-top: 13px;
  color: #059669;
  font-size: 0.82rem;
  font-weight: 800;
}
.rn-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px 170px auto;
  gap: 14px;
  justify-content: end;
  align-items: center;
  margin: 0 0 18px;
}
.rn-toolbar input,
.rn-toolbar select,
.rn-income-form input,
.rn-income-form select {
  width: 100%;
  min-height: 40px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(207,213,226,0.95);
  color: #111827;
  padding: 10px 14px;
  border-radius: 12px;
  outline: none;
}
.rn-income-form {
  background: rgba(255,255,255,0.96);
  border-color: rgba(207,213,226,0.86);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.07);
}
.rn-entry-title {
  color: #111827;
  font-size: 0.9rem;
  font-weight: 900;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.rn-income-form .form-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.rn-table-wrap {
  border-radius: 16px;
  box-shadow: 0 22px 48px rgba(15,23,42,0.06);
}
body.page-current-thingsexpense .rn-page-head {
  margin-bottom: 22px;
}
.things-add-product-btn {
  min-height: 42px;
  border: 1px solid rgba(108,99,255,0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, #6c63ff, #4f8cff);
  color: #fff;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(79,140,255,0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.things-add-product-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(79,140,255,0.28);
}
body.page-current-thingsexpense .rn-toolbar-things {
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
}
body.page-current-bricksincome .rn-toolbar {
  grid-template-columns: minmax(220px, 1fr) 220px 170px 170px auto;
}
.things-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 22px;
  align-items: stretch;
}
.things-product-card {
  --things-accent: #f97316;
  --things-accent-rgb: 249, 115, 22;
  position: relative;
  min-height: 236px;
  height: 100%;
  overflow: hidden;
  text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.88));
  border: 1px solid rgba(226,232,240,0.92);
  border-radius: 24px;
  padding: 24px;
  color: #111827;
  box-shadow: 0 18px 42px rgba(15,23,42,0.07);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: 'Inter', var(--font-body), sans-serif;
  transition: all 0.3s ease;
}
.things-product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--things-accent-rgb), 0.34);
  box-shadow: 0 26px 58px rgba(15,23,42,0.11), 0 0 0 4px rgba(var(--things-accent-rgb), 0.06);
}
.things-product-card.active {
  border-color: rgba(var(--things-accent-rgb), 0.5);
  box-shadow: 0 22px 54px rgba(15,23,42,0.09), 0 0 0 4px rgba(var(--things-accent-rgb), 0.08);
}
.things-product-card:focus-visible {
  outline: 3px solid rgba(var(--things-accent-rgb), 0.22);
  outline-offset: 3px;
}
.things-product-card.accent-firewood {
  --things-accent: #f97316;
  --things-accent-rgb: 249, 115, 22;
}
.things-product-card.accent-msand {
  --things-accent: #2563eb;
  --things-accent-rgb: 37, 99, 235;
}
.things-product-card.accent-oil {
  --things-accent: #16a34a;
  --things-accent-rgb: 22, 163, 74;
}
.things-product-card.accent-bricks {
  --things-accent: #ef4444;
  --things-accent-rgb: 239, 68, 68;
}
.things-product-card.accent-default {
  --things-accent: #6c63ff;
  --things-accent-rgb: 108, 99, 255;
}
.things-product-glow {
  display: none;
}
.things-product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding-bottom: 2px;
}
.things-product-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--things-accent-rgb), 0.1);
  border: 1px solid rgba(var(--things-accent-rgb), 0.16);
  color: var(--things-accent);
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0;
}
.things-product-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(2px);
  transition: all 0.3s ease;
}
.things-product-card:hover .things-product-actions,
.things-product-card:focus-within .things-product-actions {
  opacity: 1;
  transform: translateY(0);
}
.things-product-action {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.78);
  color: #64748b;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}
.things-product-action:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--things-accent-rgb), 0.24);
  background: rgba(var(--things-accent-rgb), 0.09);
  color: var(--things-accent);
}
.things-product-action.danger {
  color: #dc2626;
}
.things-product-action.danger:hover {
  border-color: rgba(220,38,38,0.2);
  background: rgba(220,38,38,0.08);
  color: #b91c1c;
}
.things-product-title {
  display: flex;
  align-items: flex-start;
  min-height: 58px;
  max-width: 72%;
  font-family: 'Inter', var(--font-body), sans-serif;
  font-size: 1.26rem;
  line-height: 1.22;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0;
}
.things-product-stats {
  display: grid;
  gap: 12px;
  margin-top: 0;
}
.things-product-stats span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(248,250,252,0.78);
  border: 1px solid rgba(226,232,240,0.68);
}
.things-product-stats small {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 600;
}
.things-product-stats strong {
  color: var(--things-accent);
  font-size: 1.02rem;
  font-weight: 800;
  white-space: nowrap;
}
.things-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(226,232,240,0.7);
}
.things-product-status {
  color: var(--things-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}
.roshan-trade-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
body.page-current-roshantraders .main-content {
  background: #f3f6fb;
}
body.page-current-roshantraders #page-roshantraders {
  color: #111827;
}
body.page-current-roshantraders .rn-page-title {
  color: #0f172a;
}
body.page-current-roshantraders .rn-page-sub {
  color: #64748b;
}
.roshan-trade-card {
  min-height: 190px;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15,23,42,0.08);
}
.roshan-card-due {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}
.roshan-trade-panel {
  max-width: 1180px;
}
.roshan-trade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.roshan-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.roshan-form-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6c63ff, #7c3aed);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(108,99,255,0.26);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.roshan-form-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(108,99,255,0.34);
  filter: brightness(1.04);
}
.roshan-trade-head h3 {
  margin: 0;
  color: #10172a;
  font-size: 1.08rem;
  font-weight: 900;
}
.roshan-trade-head p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}
.roshan-trade-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.roshan-trade-summary div {
  padding: 14px 16px;
  border: 1px solid #e3e8f2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15,23,42,0.05);
}
.roshan-trade-summary span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}
.roshan-trade-summary strong {
  color: #111827;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}
.roshan-trade-form {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid #e3e8f2;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15,23,42,0.06);
}
.roshan-form-title {
  margin-bottom: 12px;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 900;
}
.roshan-form-row {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.roshan-form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.roshan-form-row.notes {
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: end;
  margin-bottom: 0;
}
.roshan-trade-form .field-group {
  margin-bottom: 0;
}
.roshan-trade-form .field-group label {
  margin-bottom: 5px;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
}
.roshan-trade-form input,
.roshan-trade-form select {
  min-height: 39px;
  border-color: #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
}
.roshan-trade-form input:focus,
.roshan-trade-form select:focus {
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}
.roshan-save-btn {
  width: 100%;
  min-height: 39px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6c63ff, #7c3aed);
  box-shadow: 0 10px 22px rgba(108,99,255,0.24);
}
.roshan-table-wrap {
  margin-top: 12px;
  border-color: #e3e8f2;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15,23,42,0.06);
}
.roshan-table-wrap .data-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
}
.roshan-table-wrap .data-table td {
  padding: 12px 14px;
  color: #111827;
}
.field-span-2 {
  grid-column: span 2;
}
.things-table-panel {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(226,232,240,0.82);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 48px rgba(15,23,42,0.06);
}
.things-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.things-table-head h3 {
  margin: 0;
  color: #111827;
  font-size: 1.05rem;
  font-weight: 900;
}
.things-table-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}
.things-back-btn {
  min-height: 40px;
  border: 1px solid rgba(108,99,255,0.24);
  border-radius: 12px;
  background: rgba(108,99,255,0.08);
  color: #5b55f4;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.things-back-btn:hover {
  transform: translateY(-1px);
  background: rgba(108,99,255,0.13);
  box-shadow: 0 10px 24px rgba(108,99,255,0.14);
}
.things-table-wrap {
  overflow-x: auto;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.things-table-fade {
  animation: thingsTableFade 0.26s ease;
}
.things-empty-state {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 36px 16px;
  color: #64748b;
}
.things-empty-state strong {
  color: #111827;
  font-size: 0.95rem;
}
.things-empty-state span {
  font-size: 0.82rem;
}
@keyframes thingsTableFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
body.page-current-employeesalary .rn-toolbar-salary {
  grid-template-columns: minmax(220px, 1fr) 220px 170px auto;
}
body.page-current-employeesalary .salary-month-control {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  min-width: 0;
  position: relative;
}
body.page-current-employeesalary .salary-year-btn {
  width: 42px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), color var(--transition), background var(--transition), transform var(--transition);
}
body.page-current-employeesalary .salary-year-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,99,255,0.08);
  transform: translateY(-1px);
}
body.page-current-employeesalary .salary-table-scroll {
  overflow-x: auto;
}
body.page-current-employeesalary .employee-salary-table {
  min-width: 900px;
}
body.page-current-employeesalary .employee-salary-table th,
body.page-current-employeesalary .employee-salary-table td {
  white-space: nowrap;
}
body.page-current-employeesalary .salary-worker-name {
  min-width: 160px;
  font-weight: 700;
}
body.page-current-employeesalary .salary-amount-cell {
  min-width: 118px;
}
body.page-current-employeesalary .salary-amount-input {
  width: 104px;
  min-height: 34px;
  border: 1px solid rgba(207,213,226,0.95);
  border-radius: 10px;
  background: rgba(255,255,255,0.98);
  color: #111827;
  font-weight: 800;
  padding: 8px 10px;
  outline: none;
}
body.page-current-employeesalary .salary-amount-input:focus {
  border-color: rgba(108,99,255,0.72);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}
body.page-current-employeesalary .salary-row-total {
  min-width: 130px;
  color: var(--c2);
  font-weight: 900;
}
body.page-current-employeesalary .salary-modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.page-current-employeesalary .salary-modal-saturdays {
  margin-top: 18px;
}
body.page-current-employeesalary .salary-modal-saturday-title {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
body.page-current-employeesalary .salary-modal-saturday-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.rn-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.rn-status.paid {
  color: #00b884;
  background: rgba(16,185,129,0.14);
  border: 1px solid rgba(16,185,129,0.35);
}
body.page-current-employeesalary .rn-status.salary-status.paid {
  box-shadow: 0 0 0 3px rgba(16,185,129,0.08), 0 10px 24px rgba(16,185,129,0.24);
}
body.page-current-employeesalary .rn-status.salary-status.paid:hover {
  background: rgba(16,185,129,0.2);
  border-color: rgba(16,185,129,0.58);
  box-shadow: 0 0 0 5px rgba(16,185,129,0.11), 0 14px 32px rgba(16,185,129,0.34);
  transform: translateY(-1px) scale(1.03);
}
.rn-status.pending {
  color: #f59e0b;
  background: rgba(245,158,11,0.13);
  border: 1px solid rgba(245,158,11,0.32);
}
.rn-status.partial {
  color: #8b5cf6;
  background: rgba(139,92,246,0.13);
  border: 1px solid rgba(139,92,246,0.32);
}
body.page-current-employeesalary .rn-status.salary-status.pending:hover,
body.page-current-employeesalary .rn-status.salary-status.partial:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 10px 24px rgba(15,23,42,0.12);
}
body.page-current-employeesalary .salary-action-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
body.page-current-employeesalary .salary-action-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.14rem;
  border-radius: 10px;
}
body.page-current-employeesalary .salary-action-btn:hover {
  background: rgba(108,99,255,0.12);
  color: var(--accent);
  transform: translateY(-1px) scale(1.08);
}
body.page-current-employeesalary .salary-action-btn.danger:hover {
  background: rgba(255,107,107,0.13);
  color: var(--accent3);
}

@media (max-width: 1200px) {
  .rn-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rn-metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .things-product-grid,
  .roshan-trade-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roshan-trade-summary,
  .roshan-form-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rn-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-current-bricksincome .rn-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-current-thingsexpense .rn-toolbar-things { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-current-employeesalary .rn-toolbar-salary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rn-toolbar .btn-primary { width: 100%; }
  .rn-income-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .rn-metric-grid,
  .rn-metric-grid-four,
  .things-product-grid,
  .roshan-trade-cards,
  .roshan-trade-summary,
  .roshan-form-row.three,
  .roshan-form-row.notes,
  .rn-toolbar,
  .rn-income-form .form-grid {
    grid-template-columns: 1fr;
  }
  .field-span-2 {
    grid-column: auto;
  }
  body.page-current-thingsexpense .rn-toolbar-things {
    grid-template-columns: 1fr;
  }
  body.page-current-bricksincome .rn-toolbar {
    grid-template-columns: 1fr;
  }
  body.page-current-employeesalary .rn-toolbar-salary {
    grid-template-columns: 1fr;
  }
  .things-table-panel {
    padding: 14px;
  }
  .things-table-head {
    align-items: stretch;
    flex-direction: column;
  }
  .roshan-trade-head {
    align-items: stretch;
    flex-direction: column;
  }
  .roshan-head-actions {
    justify-content: space-between;
  }
  .things-product-card {
    min-height: 230px;
    padding: 20px;
  }
  .things-product-actions {
    opacity: 1;
    transform: none;
  }
  .things-product-title {
    max-width: calc(100% - 64px);
    font-size: 1.14rem;
  }
  body.page-current-employeesalary .salary-modal-grid,
  body.page-current-employeesalary .salary-modal-saturday-grid {
    grid-template-columns: 1fr;
  }
  .rn-metric-card {
    min-height: 150px;
    padding: 20px;
  }
  .rn-metric-value { font-size: 2rem; }
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 10px;
  font-weight: 600;
}
.stat-value {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  transition: font-size 0.15s ease;
}
.stat-value:empty::before {
  content: '\00a0';
  visibility: hidden;
}
/* ₹ symbol in Inter at reduced size so it doesn't overpower digits */
.stat-value .currency-symbol {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  vertical-align: baseline;
  margin-right: 1px;
}
/* Numbers neutral — white in dark, black in light */
.stat-card.c1 .stat-value,
.stat-card.c2 .stat-value,
.stat-card.c3 .stat-value,
.stat-card.c4 .stat-value { color: var(--text-primary); }

/* Alignment per card type:
   c1 = Total Clients (plain number)   → center
   c2 = Total Revenue (currency)       → right
   c3 = Pending Payments (currency)    → right
   c4 = Active Projects (plain number) → center */
.stat-card.c1 .stat-value,
.stat-card.c4 .stat-value { text-align: center; }
.stat-card.c2 .stat-value,
.stat-card.c3 .stat-value { text-align: right; }

/* Trend line follows same alignment */
.stat-card.c1 .stat-trend,
.stat-card.c4 .stat-trend { text-align: center; }
.stat-card.c2 .stat-trend,
.stat-card.c3 .stat-trend { text-align: right; }

.stat-trend { font-size: 0.8rem; color: var(--text-secondary); }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.dash-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 24px rgba(0,0,0,0.26);
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.dash-card-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.project-status-card { margin-top: 0; }

/* ── MINI TABLE ── */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.mini-table td {
  padding: 10px 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--transition);
}
.mini-table tr:hover td { background: var(--bg-hover); }

/* ── ACTIVITY LIST ── */
.activity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-text { font-size: 0.85rem; color: var(--text-secondary); }
.activity-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ── STATUS BARS ── */
.status-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.status-bar-item { display: flex; flex-direction: column; gap: 8px; }
.status-bar-label { font-size: 0.82rem; color: var(--text-secondary); display: flex; justify-content: space-between; }
.status-bar-track { height: 8px; background: var(--bg-elevated); border-radius: 4px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(0.4,0,0.2,1); }

/* ════════════════════════════
   PAGE ACTIONS
   ════════════════════════════ */
.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.search-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}
.search-wrap input, .search-wrap select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap input { min-width: 220px; }
.search-wrap input:focus, .search-wrap select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.action-btns { display: flex; gap: 10px; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  background: #7d76ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}
.btn-export {
  background: rgba(0,212,170,0.12);
  border: 1px solid rgba(0,212,170,0.25);
  color: var(--accent2);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-export:hover {
  background: rgba(0,212,170,0.2);
  border-color: var(--accent2);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-sm {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--transition);
}
.btn-sm:hover { background: var(--bg-hover); color: var(--accent); border-color: rgba(108,99,255,0.3); }

.btn-edit {
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.2);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--transition);
  margin-right: 5px;
}
.btn-edit:hover { background: rgba(108,99,255,0.25); transform: scale(1.05); }

.btn-delete {
  background: rgba(255,107,107,0.12);
  border: 1px solid rgba(255,107,107,0.2);
  color: var(--accent3);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-delete:hover { background: rgba(255,107,107,0.25); transform: scale(1.05); }

/* ════════════════════════════
   DATA TABLE
   ════════════════════════════ */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
}
.interns-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg-elevated);
}
.data-table td {
  padding: 13px 16px;
  font-size: 0.87rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--transition);
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

/* ── BADGES / PILLS ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-pending { background: rgba(255,179,71,0.15); color: var(--c4); border: 1px solid rgba(255,179,71,0.25); }
.badge-progress { background: rgba(108,99,255,0.15); color: var(--c1); border: 1px solid rgba(108,99,255,0.25); }
.badge-completed { background: rgba(0,212,170,0.15); color: var(--c2); border: 1px solid rgba(0,212,170,0.25); }
.badge-paid { background: rgba(0,212,170,0.15); color: var(--c2); border: 1px solid rgba(0,212,170,0.25); }
.badge-partial { background: rgba(255,179,71,0.15); color: var(--c4); border: 1px solid rgba(255,179,71,0.25); }
.badge-due { background: rgba(255,107,107,0.15); color: var(--c3); border: 1px solid rgba(255,107,107,0.25); }

/* ════════════════════════════
   PAYMENTS PAGE
   ════════════════════════════ */
.payments-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.pay-sum-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all var(--transition);
}
.pay-sum-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.pay-sum-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.pay-sum-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; margin-top: 6px; }

/* Progress bar inside table */
.pay-progress-wrap { display: flex; align-items: center; gap: 10px; }
.pay-progress-track { flex: 1; height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; min-width: 80px; }
.pay-progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width 0.8s ease; }

/* ════════════════════════════
   DOCUMENTS PAGE
   ════════════════════════════ */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.doc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.doc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.doc-card:hover { border-color: var(--border-light); transform: translateY(-4px); box-shadow: var(--shadow); }
.doc-icon { font-size: 2rem; }
.doc-title { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
.doc-client { font-size: 0.8rem; color: var(--text-muted); }
.doc-date { font-size: 0.75rem; color: var(--text-muted); }
.doc-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-download {
  background: rgba(0,212,170,0.1);
  border: 1px solid rgba(0,212,170,0.2);
  color: var(--accent2);
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-download:hover { background: rgba(0,212,170,0.2); transform: scale(1.05); }

/* ── FILE DROP ── */
.file-drop {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.88rem;
}
.file-drop:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ════════════════════════════
   NOTES PAGE
   ════════════════════════════ */
.notes-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.note-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
}
.note-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--accent), var(--accent2));
}
.note-card:hover { border-color: var(--border-light); transform: translateY(-3px); box-shadow: var(--shadow); }
.note-client { font-weight: 700; font-size: 0.85rem; color: var(--accent); margin-bottom: 8px; }
.note-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.note-time { font-size: 0.75rem; color: var(--text-muted); }

/* ════════════════════════════
   ACTIVITY PAGE
   ════════════════════════════ */
.activity-full {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.activity-entry {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
.activity-entry:last-child { border-bottom: none; }
.act-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.act-body { flex: 1; }
.act-action { font-size: 0.88rem; color: var(--text-primary); font-weight: 500; }
.act-time { font-size: 0.77rem; color: var(--text-muted); margin-top: 3px; }

/* ════════════════════════════
   MODALS
   ════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.modal-closing {
  animation: fadeOut 0.18s ease forwards;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.modal-closing .modal {
  animation: modalOut 0.18s cubic-bezier(0.22,1,0.36,1) forwards;
}
.modal.modal-sm { max-width: 440px; }
.payment-edit-modal { max-width: 520px; }
.payment-edit-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(0,212,170,0.05));
  margin-bottom: 14px;
}
.payment-edit-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  flex-shrink: 0;
}
.payment-edit-client {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.2;
}
.payment-edit-project {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3px;
}
.payment-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.payment-edit-stat {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
}
.payment-edit-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.payment-edit-stat strong {
  color: var(--text-primary);
  font-size: 1.08rem;
}
.payment-edit-hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(108,99,255,0.08);
  color: var(--text-secondary);
  font-size: 0.82rem;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.97) translateY(14px); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-close {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(255,107,107,0.15); color: var(--accent3); border-color: rgba(255,107,107,0.3); }

.modal-body { padding: 24px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ════════════════════════════
   TOAST
   ════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast.success { border-left: 4px solid var(--accent2); }
.toast.error { border-left: 4px solid var(--accent3); }
.toast.info { border-left: 4px solid var(--accent); }

/* ════════════════════════════
   RESPONSIVE
   ════════════════════════════ */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .status-bars { grid-template-columns: 1fr; }
  .payments-summary { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    width: var(--sidebar-w);
    transform: none !important;
  }
  .sidebar.open {
    transform: none !important;
  }
  .sidebar-close { display: block; }
  .main-content { margin-left: var(--sidebar-w); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page { padding: 16px; }
  .topbar { padding: 0 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-actions { flex-direction: column; align-items: stretch; }
  .action-btns { justify-content: flex-end; }
  body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed-w); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; }
  .search-wrap { flex-direction: column; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state-text { font-size: 0.9rem; }

/* ── NUMBER ROW ── */
.row-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ════════════════════════════════
   VIEW BUTTON & VIEW MODAL
   ════════════════════════════════ */
.btn-view {
  background: rgba(0,212,170,0.12);
  border: 1px solid rgba(0,212,170,0.25);
  color: var(--accent2);
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.3px;
}
.btn-view:hover {
  background: rgba(0,212,170,0.22);
  border-color: var(--accent2);
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(0,212,170,0.2);
}

/* View Modal Grid */
.view-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.view-row {
  display: flex;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 16px;
}
.view-row:last-child { border-bottom: none; }
.view-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 130px;
  flex-shrink: 0;
}
.view-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ════════════════════════════════
   ICON ACTION BUTTONS (replaces old btn-edit/delete in table)
   ════════════════════════════════ */
.action-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform var(--transition), filter var(--transition);
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.icon-btn:hover { transform: scale(1.3); }
.icon-view:hover  { filter: drop-shadow(0 0 6px var(--accent2)); }
.icon-edit:hover  { filter: drop-shadow(0 0 6px var(--accent)); }
.icon-delete:hover{ filter: drop-shadow(0 0 6px var(--accent3)); }

/* Clickable row */
.client-row {
  cursor: pointer;
  transition: background var(--transition);
}
.client-row:hover td { background: var(--bg-hover) !important; }

/* ════════════════════════════════
   CLIENT PROFILE PAGE
   ════════════════════════════════ */

/* Top bar */
.profile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-back {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.btn-back:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: rgba(108,99,255,0.4);
  transform: translateX(-3px);
}
.profile-actions { display: flex; gap: 10px; }
.btn-delete-sm {
  background: rgba(255,107,107,0.12);
  border: 1px solid rgba(255,107,107,0.25);
  color: var(--accent3);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.btn-delete-sm:hover { background: rgba(255,107,107,0.22); transform: translateY(-1px); }

/* Hero card */
.profile-hero {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.profile-hero-info { flex: 1; }
.profile-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.profile-company { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 10px; }
.profile-badges  { display: flex; gap: 8px; flex-wrap: wrap; }

/* Stats row */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.pstat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: all var(--transition);
}
.pstat-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.pstat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.pstat-value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }

/* Profile grid */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.profile-col { display: flex; flex-direction: column; gap: 18px; }

/* Profile cards */
.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}
.profile-card:hover { border-color: var(--border-light); }
.profile-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Info rows */
.pinfo-row {
  display: flex;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 12px;
}
.pinfo-row:last-child { border-bottom: none; }
.pinfo-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  min-width: 100px;
  flex-shrink: 0;
}
.pinfo-value { font-size: 0.9rem; color: var(--text-primary); }

/* Progress bar */
.profile-progress-wrap { margin-top: 14px; }
.profile-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.profile-progress-track {
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 5px;
  overflow: hidden;
}
.profile-progress-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
  background: var(--accent);
}

/* Notes in profile */
.pnote-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pnote-item:last-child { border-bottom: none; }
.pnote-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.pnote-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* Docs in profile */
.pdoc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.pdoc-item:last-child { border-bottom: none; }
.pdoc-date { font-size: 0.75rem; color: var(--text-muted); }

/* Activity in profile */
.pact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pact-item:last-child { border-bottom: none; }
.pact-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.pact-action { font-size: 0.88rem; color: var(--text-secondary); }
.pact-time   { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* Empty state inside profile cards */
.pempty {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}

/* Responsive profile */
@media (max-width: 768px) {
  .profile-grid  { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-hero  { flex-direction: column; text-align: center; }
  .profile-badges { justify-content: center; }
}
@media (max-width: 480px) {
  .profile-stats { grid-template-columns: 1fr 1fr; }
}

/* ════════════════════════════════
   CLIENT PORTAL
   ════════════════════════════════ */
#clientPortal {
  min-height: 100vh;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
}
.client-topbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.client-topbar-left  { display: flex; align-items: center; gap: 12px; }
.client-topbar-right { display: flex; align-items: center; gap: 16px; }
.client-portal-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent2);
  background: rgba(0,212,170,0.1);
  border: 1px solid rgba(0,212,170,0.2);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.client-welcome {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.client-dashboard {
  padding: 28px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Client credentials hint in add client form */
.client-cred-hint {
  background: rgba(108,99,255,0.08);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.83rem;
  color: var(--accent);
  margin-top: 4px;
}

/* Dashboard icon in client table */
.icon-dashboard {
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform var(--transition), filter var(--transition);
  padding: 4px;
  display: inline-flex;
}
.icon-dashboard:hover {
  transform: scale(1.3);
  filter: drop-shadow(0 0 6px var(--c4));
}

/* ════════════════════════════════
   DASHBOARD WELCOME
   ════════════════════════════════ */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(0,212,170,0.05));
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  flex-wrap: wrap;
  gap: 10px;
}
.dash-welcome-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.dash-welcome-sub  { color: var(--text-secondary); font-size: 0.88rem; }
.dash-welcome-date { color: var(--text-muted); font-size: 0.82rem; text-align: right; }
.stat-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
  opacity: 0.6;
}
.stats-grid { margin-bottom: 0; }

/* ════════════════════════════════
   MESSAGES PAGE
   ════════════════════════════════ */
.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background:
    linear-gradient(135deg, rgba(108,99,255,0.08), rgba(0,212,170,0.04) 38%, transparent 70%),
    var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  overflow: hidden;
  height: calc(100vh - 160px);
  min-height: 500px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.03);
}
.msg-sidebar {
  background: rgba(18,21,28,0.86);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.msg-sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.msg-sidebar-title-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 22px rgba(108,99,255,0.22);
}
.msg-client-list { overflow-y: auto; flex: 1; }
.msg-client-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 10px;
  padding: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.msg-client-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(108,99,255,0.22);
  transform: translateX(2px);
}
.msg-client-item.active {
  background: linear-gradient(135deg, rgba(108,99,255,0.18), rgba(0,212,170,0.08));
  border-color: rgba(108,99,255,0.42);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.msg-client-avatar,
.msg-chat-avatar {
  width: 38px; height: 38px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,0.52), transparent 28%),
    linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: #fff; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.16);
  box-shadow: 0 10px 22px rgba(0,212,170,0.18);
  text-transform: uppercase;
}
.msg-client-item.active .msg-client-avatar {
  box-shadow: 0 0 0 4px rgba(108,99,255,0.14), 0 12px 24px rgba(0,212,170,0.18);
}
.msg-client-name    { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.msg-client-company {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-chat-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(108,99,255,0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 42%);
}
.msg-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
}
.msg-empty-icon {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.3rem;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,0.48), transparent 28%),
    linear-gradient(135deg, var(--accent), var(--accent2));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 22px 50px rgba(108,99,255,0.2), 0 12px 26px rgba(0,212,170,0.16);
  margin-bottom: 18px;
}
.msg-empty-title {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.msg-empty-copy {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 320px;
}
.msg-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(26,30,40,0.88);
}
.msg-chat-name   { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.msg-chat-status { font-size: 0.78rem; color: var(--accent2); }
.msg-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg-bubble-wrap { display: flex; }
.msg-bubble-wrap.sent     { justify-content: flex-end; }
.msg-bubble-wrap.received { justify-content: flex-start; }
.msg-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  position: relative;
}
.bubble-sent {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble-received {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-time { font-size: 0.7rem; opacity: 0.6; margin-top: 4px; text-align: right; }
.msg-input-area {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  background: rgba(26,30,40,0.88);
}
.msg-input-area input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition);
}
.msg-input-area input:focus { border-color: var(--accent); }
.btn-send {
  background: linear-gradient(135deg, var(--accent), #756eff);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-send:hover { box-shadow: 0 10px 20px rgba(108,99,255,0.24); transform: translateY(-1px); }

/* Client portal messaging */
.client-msg-body {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
  margin-bottom: 12px;
}
.client-msg-input {
  display: flex;
  gap: 8px;
}
.client-msg-input input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color var(--transition);
}
.client-msg-input input:focus { border-color: var(--accent); }

/* Client Portal Badge */
.client-portal-badge {
  display: inline-block;
  background: rgba(0,212,170,0.12);
  border: 1px solid rgba(0,212,170,0.25);
  color: var(--accent2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Responsive messages */
@media (max-width: 768px) {
  .messages-layout { grid-template-columns: 1fr; height: auto; }
  .msg-sidebar { height: 200px; }
}

/* ════════════════════════════════
   LIGHT MODE VARIABLES
   ════════════════════════════════ */
body.light-mode {
  --bg-base:     #f0f2f8;
  --bg-surface:  #ffffff;
  --bg-elevated: #f5f6fa;
  --bg-hover:    #eceef6;
  --border:      #dde1f0;
  --border-light:#c8cde3;

  --text-primary:   #1a1e2e;
  --text-secondary: #4a5168;
  --text-muted:     #8892b0;

  --accent-glow: rgba(108,99,255,0.15);
}

/* Fix specific elements for light mode */
body.light-mode .sidebar {
  background: #ffffff;
  border-right: 1px solid #dde1f0;
  box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}
body.light-mode .sidebar-nav {
  scrollbar-color: #9aa3ff transparent;
}
body.light-mode .sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
body.light-mode .sidebar-nav::-webkit-scrollbar-thumb {
  background: #9aa3ff;
}
body.light-mode .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #7f88ff;
}
body.light-mode .topbar {
  background: #1a1f36;
  border-color: rgba(255,255,255,0.08);
  box-shadow: none;
}
body.light-mode .stat-card {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
body.light-mode .stat-value { color: #1a1e2e; }
body.light-mode .nav-item:hover {
  background: #f0f2ff;
}
body.light-mode .nav-item.active {
  background: linear-gradient(135deg, rgba(108,99,255,0.12) 0%, rgba(108,99,255,0.04) 100%);
}
body.light-mode .data-table th {
  background: #f5f6fa;
  color: #6b7280;
}
body.light-mode .data-table tr:hover td {
  background: #f5f7ff;
}
body.light-mode .modal {
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
body.light-mode .field-group input,
body.light-mode .field-group select,
body.light-mode .field-group textarea {
  background: #f5f6fa;
  border-color: #dde1f0;
  color: #1a1e2e;
}
body.light-mode .profile-hero {
  background: linear-gradient(135deg, #ffffff, #f5f6fa);
}
body.light-mode .login-card {
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
body.light-mode .login-wrapper {
  background: radial-gradient(ellipse at 20% 50%, #e8eaff 0%, #f0f2f8 60%);
}
body.light-mode .msg-bubble.bubble-received {
  background: #f0f2f8;
  color: #1a1e2e;
  border-color: #dde1f0;
}
body.light-mode .activity-full,
body.light-mode .table-wrap,
body.light-mode .dash-card,
body.light-mode .profile-card,
body.light-mode .note-card,
body.light-mode .doc-card,
body.light-mode .pay-sum-card,
body.light-mode .pstat-card {
  background: #ffffff;
  border-color: #dde1f0;
}
body.light-mode .messages-layout {
  background:
    linear-gradient(135deg, rgba(108,99,255,0.08), rgba(0,212,170,0.05) 38%, transparent 70%),
    #ffffff;
  border-color: #dde1f0;
  box-shadow: 0 12px 32px rgba(28,35,70,0.08);
}
body.light-mode .msg-sidebar {
  background: rgba(255,255,255,0.88);
  border-right-color: #dde1f0;
}
body.light-mode .msg-sidebar-title { border-bottom-color: #dde1f0; }
body.light-mode .msg-client-item:hover { background: #f7f8ff; }
body.light-mode .msg-client-item.active {
  background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(0,212,170,0.08));
}
body.light-mode .msg-chat-area {
  background:
    radial-gradient(circle at 50% 42%, rgba(108,99,255,0.08), transparent 34%),
    linear-gradient(180deg, rgba(245,246,250,0.7), rgba(255,255,255,0.2) 42%);
}
body.light-mode .msg-chat-header { background: rgba(245,246,250,0.9); }
body.light-mode .msg-input-area { background: rgba(245,246,250,0.9); }
body.light-mode .msg-input-area input { background: #ffffff; border-color: #dde1f0; color: #1a1e2e; }
body.light-mode .sidebar-footer { border-top-color: #dde1f0; }
body.light-mode .btn-ghost { border-color: #dde1f0; color: #4a5168; }
body.light-mode .btn-ghost:hover { background: #f0f2f8; }
body.light-mode .search-wrap input,
body.light-mode .search-wrap select { background: #ffffff; border-color: #dde1f0; color: #1a1e2e; }
body.light-mode .topbar-date { color: rgba(241,245,249,0.84); }
body.light-mode .admin-name  { color: #1a1e2e; }
body.light-mode .admin-role  { color: #8892b0; }
body.light-mode .logo-text   { color: #1a1e2e; }
body.light-mode .page-title  { color: #ffffff; }
body.light-mode .dash-welcome {
  background: linear-gradient(135deg, rgba(108,99,255,0.07), rgba(0,212,170,0.03));
  border-color: #dde1f0;
}
body.light-mode.page-current-bricksincome .topbar,
body.light-mode.page-current-thingsexpense .topbar,
body.light-mode.page-current-employeesalary .topbar {
  background: #1a1f36;
  border-color: rgba(255,255,255,0.08);
  box-shadow: none;
}
body.light-mode.page-current-bricksincome .page-title,
body.light-mode.page-current-thingsexpense .page-title,
body.light-mode.page-current-employeesalary .page-title {
  color: #ffffff;
}
body.light-mode.page-current-bricksincome .topbar-date,
body.light-mode.page-current-thingsexpense .topbar-date,
body.light-mode.page-current-employeesalary .topbar-date {
  color: rgba(241,245,249,0.84);
}
body.light-mode.page-current-bricksincome .topbar-entity-badge,
body.light-mode.page-current-thingsexpense .topbar-entity-badge,
body.light-mode.page-current-employeesalary .topbar-entity-badge {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
body.light-mode.page-current-bricksincome .topbar-entity-label,
body.light-mode.page-current-thingsexpense .topbar-entity-label,
body.light-mode.page-current-employeesalary .topbar-entity-label {
  color: rgba(203,213,225,0.62);
}
body.light-mode.page-current-bricksincome .topbar-entity-badge strong,
body.light-mode.page-current-thingsexpense .topbar-entity-badge strong,
body.light-mode.page-current-employeesalary .topbar-entity-badge strong {
  color: #f8fafc;
}
body.light-mode ::-webkit-scrollbar-track { background: #f0f2f8; }
body.light-mode ::-webkit-scrollbar-thumb { background: #c8cde3; }

/* ════════════════════════════════
   THEME TOGGLE BUTTON
   ════════════════════════════════ */
.theme-toggle {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-light);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(108,99,255,0.12);
  transform: rotate(20deg) scale(1.1);
  box-shadow: 0 0 12px var(--accent-glow);
}
.theme-toggle:active {
  transform: scale(0.92);
}

/* ════════════════════════════════
   CHARTS / ANALYTICS
   ════════════════════════════════ */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}
.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}
.chart-card:hover { border-color: var(--border-light); }
.chart-card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
@media (max-width: 900px) { .charts-grid { grid-template-columns: 1fr; } }

/* ════════════════════════════════
   INVOICE GENERATOR
   ════════════════════════════════ */
.invoice-layout {
  display: grid;
  grid-template-columns: 300px minmax(420px, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.invoice-form-card,
.invoice-history-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.invoice-form-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.invoice-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 400px;
}
.inv-preview-empty {
  color: var(--text-muted);
  text-align: center;
  margin-top: 60px;
  font-size: 0.9rem;
}
/* Invoice Document Styling */
.invoice-doc { font-family: var(--font-body); }
.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--accent);
}
.inv-company-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.inv-company-details { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.inv-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--text-primary); text-align: right; }
.inv-number { color: var(--accent); font-size: 0.85rem; text-align: right; }
.inv-dates-row { display: flex; gap: 32px; margin-bottom: 20px; color: var(--text-secondary); font-size: 0.88rem; }
.inv-label { font-weight: 700; color: var(--text-primary); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.inv-bill-to { background: var(--bg-elevated); padding: 16px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.inv-client-name { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin: 6px 0 4px; }
.inv-client-detail { color: var(--text-secondary); font-size: 0.85rem; }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.inv-table th { background: var(--accent); color: #fff; padding: 10px 16px; text-align: left; font-size: 0.85rem; }
.inv-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.88rem; color: var(--text-secondary); }
.inv-paid-row td { color: var(--accent2); }
.inv-total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--bg-elevated); border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 12px; }
.inv-total-amount { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); }
.inv-status-badge { text-align: center; padding: 8px; font-weight: 700; font-size: 0.88rem; background: var(--bg-elevated); border-radius: var(--radius-sm); margin-bottom: 14px; }
.inv-notes { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 14px; }
.inv-footer { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding-top: 16px; border-top: 1px solid var(--border); }
.invoice-history-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}
.invoice-history-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-align: left;
  transition: border-color var(--transition), background var(--transition);
}
.invoice-history-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}
.invoice-history-item span {
  min-width: 0;
}
.invoice-history-item strong,
.invoice-history-item small {
  display: block;
}
.invoice-history-item strong {
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.invoice-history-item small,
.invoice-history-empty {
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.invoice-history-empty {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
@media (max-width: 1200px) { .invoice-layout { grid-template-columns: 300px 1fr; } .invoice-history-panel { grid-column: 1 / -1; } }
@media (max-width: 768px) { .invoice-layout { grid-template-columns: 1fr; } .invoice-history-panel { grid-column: auto; } }

/* ════════════════════════════════
   COLLEGE PORTAL PREVIEW
   ════════════════════════════════ */
.college-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.college-page-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}
.college-page-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 2px;
}
.college-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  font-size: 0.85rem;
  font-weight: 700;
  transition: border-color var(--transition), background var(--transition);
}
.college-open-link:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}
.college-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.college-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 4px;
}
.college-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.college-contact-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  background: var(--bg-elevated);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
}
.college-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
  min-width: 520px;
}
.college-metric-pill {
  padding: 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}
.college-metric-pill span {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}
.college-metric-pill strong {
  display: block;
  margin-top: 4px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}
.college-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}
.college-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.college-stat-card,
.college-panel,
.college-empty-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.college-stat-card {
  padding: 12px;
}
.college-stat-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}
.college-stat-value {
  margin-top: 6px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}
.college-panel {
  padding: 18px;
}
.college-quick-panel { padding: 18px; }
.college-browser { padding: 0; overflow: hidden; }
.college-panel-title {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 14px;
}
.college-profile-name {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
}
.college-profile-meta,
.college-muted,
.college-empty-text,
.college-gallery-item small {
  color: var(--text-secondary);
  font-size: 0.86rem;
}
.college-profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.college-profile-list div {
  padding: 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}
.college-profile-list span {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.college-profile-list strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.86rem;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.college-enquiry-list,
.college-gallery-list {
  display: grid;
  gap: 10px;
}
.college-gallery-list.compact {
  padding: 0 18px 18px;
}
.college-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 18px 18px;
}
.college-gallery-card {
  min-width: 0;
}
.college-gallery-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.college-gallery-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.college-gallery-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 12px;
}
.college-gallery-card.image-missing .college-gallery-thumb img {
  display: none;
}
.college-gallery-card.image-missing .college-gallery-fallback {
  display: flex;
}
.college-gallery-caption {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 8px;
}
.college-gallery-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 2px;
}
.college-enquiry-item,
.college-gallery-item {
  padding: 11px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}
.college-enquiry-top,
.college-gallery-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.college-enquiry-top span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}
.college-enquiry-msg {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-top: 4px;
}
.college-enquiry-reply {
  color: var(--accent2);
  font-size: 0.82rem;
  margin-top: 5px;
}
.college-gallery-item span {
  color: var(--text-primary);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}
.college-tabs {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.college-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.college-tab strong {
  color: inherit;
  font-size: 0.78rem;
}
.college-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.college-tab.active {
  background: rgba(108,99,255,0.1);
  border-color: rgba(108,99,255,0.25);
  color: var(--accent);
}
.college-table-head {
  display: flex;
  justify-content: space-between;
  padding: 18px 18px 0;
}
.college-table-wrap {
  margin: 14px 18px 18px;
  max-height: 560px;
  overflow: auto;
}
.college-empty-panel,
.college-loading {
  padding: 24px;
  text-align: center;
}
.college-empty-title {
  color: var(--text-primary);
  font-weight: 800;
  margin-bottom: 8px;
}
@media (max-width: 1100px) {
  .college-hero-panel,
  .college-overview-grid { grid-template-columns: 1fr; }
  .college-metric-strip { min-width: 0; }
  .college-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .college-page-head { flex-direction: column; }
  .college-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .college-stat-grid,
  .college-profile-list { grid-template-columns: 1fr; }
  .college-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .college-tabs { overflow-x: auto; }
  .college-tab { white-space: nowrap; }
}

/* ════════════════════════════════
   PROJECT TIMELINE
   ════════════════════════════════ */
.timeline-client-select {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.timeline-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.timeline-client-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.timeline-progress-wrap { max-width: 500px; }
.timeline-progress-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.timeline-list { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 0; }
.timeline-left { display: flex; flex-direction: column; align-items: center; width: 50px; flex-shrink: 0; }
.timeline-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
  flex-shrink: 0; z-index: 1;
  border: 2px solid;
}
.dot-done    { background: rgba(0,212,170,0.15);  border-color: var(--c2); color: var(--c2); }
.dot-active  { background: rgba(108,99,255,0.15); border-color: var(--c1); color: var(--c1); animation: pulse 2s infinite; }
.dot-pending { background: var(--bg-elevated);    border-color: var(--border-light); color: var(--text-muted); }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(108,99,255,0.4)} 50%{box-shadow:0 0 0 8px rgba(108,99,255,0)} }
.timeline-line { width: 2px; flex: 1; background: var(--border); min-height: 40px; margin: 4px 0; }
.timeline-body { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 16px; flex: 1; transition: border-color var(--transition); }
.timeline-body:hover { border-color: var(--accent); }
.timeline-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.timeline-title { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.timeline-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ms-action-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px; cursor: pointer; font-size: 0.8rem; transition: all var(--transition); }
.ms-action-btn:hover { background: var(--bg-elevated); border-color: var(--accent); }
.ms-whatsapp-btn {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.28);
}
.ms-whatsapp-btn:hover {
  color: #15803d;
  background: rgba(22, 163, 74, 0.10);
  border-color: rgba(22, 163, 74, 0.48);
}
/* Quick status toggle buttons on each milestone */
.ms-status-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ms-status-btn { background: var(--bg-elevated); border: 1.5px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 0.75rem; font-weight: 600; cursor: pointer; color: var(--text-secondary); transition: all var(--transition); font-family: var(--font-body); }
.ms-status-btn:hover { border-color: var(--accent); color: var(--accent); }
.ms-status-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.timeline-date  { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.timeline-desc  { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }

/* ════════════════════════════════
   RATINGS & FEEDBACK
   ════════════════════════════════ */
.ratings-summary {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
.rating-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.rating-avg-num { font-family: var(--font-display); font-size: 3.5rem; font-weight: 800; color: var(--c4); line-height: 1; }
.rating-avg-stars { font-size: 1.2rem; margin: 8px 0; }
.rating-avg-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.rating-avg-count { font-size: 0.88rem; color: var(--text-secondary); margin-top: 4px; }
.rating-bars-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.rating-bar-row { display: flex; align-items: center; gap: 12px; }
.rating-bar-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); min-width: 24px; }
.rating-bar-track { flex: 1; height: 10px; background: var(--bg-elevated); border-radius: 5px; overflow: hidden; }
.rating-bar-fill  { height: 100%; border-radius: 5px; transition: width 0.8s ease; }
.rating-bar-count { font-size: 0.82rem; color: var(--text-muted); min-width: 16px; text-align: right; }
.ratings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rating-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: all var(--transition); }
.rating-card:hover { border-color: var(--c4); transform: translateY(-3px); box-shadow: var(--shadow); }
.rating-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rating-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--accent2)); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 1rem; flex-shrink: 0; }
.rating-client-name { font-weight: 700; color: var(--text-primary); font-size: 0.92rem; }
.rating-company { font-size: 0.78rem; color: var(--text-muted); }
.rating-stars { margin-left: auto; }
.rating-feedback { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; font-style: italic; margin-bottom: 10px; }
.rating-date { font-size: 0.75rem; color: var(--text-muted); }
/* Star input */
.rating-stars-input { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.star-input { font-size: 2.5rem; color: #555; cursor: pointer; transition: all var(--transition); }
.star-input:hover { transform: scale(1.2); }
/* Rate button in client portal */
.btn-rate {
  background: rgba(255,179,71,0.15);
  border: 1px solid rgba(255,179,71,0.3);
  color: var(--c4);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-rate:hover { background: rgba(255,179,71,0.25); transform: translateY(-1px); }
@media (max-width: 768px) { .ratings-summary { grid-template-columns: 1fr; } }

/* ════════════════════════════════
   PUBLIC ENQUIRY FORM PAGE
   ════════════════════════════════ */
.enq-form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.enq-form-preview-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  font-weight: 600;
}
.public-enq-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.public-enq-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.public-enq-sub { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }
.enq-received { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.enq-received-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.pub-enq-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; transition: all var(--transition); }
.pub-enq-card:hover { border-color: var(--border-light); }
.pub-enq-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pub-enq-detail { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 3px; }
.pub-enq-msg { font-size: 0.85rem; color: var(--text-secondary); font-style: italic; margin: 6px 0; padding: 8px; background: var(--bg-surface); border-radius: 4px; }
.pub-enq-date { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
@media (max-width: 768px) { .enq-form-layout { grid-template-columns: 1fr; } }

/* ════════════════════════════════
   CLIENT PORTAL BUTTON ON LOGIN PAGE
   ════════════════════════════════ */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 16px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-client-portal {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--accent2);
  color: var(--accent2);
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition);
  letter-spacing: 0.3px;
}
.btn-client-portal:hover {
  background: rgba(0,212,170,0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,212,170,0.2);
}

/* ════════════════════════════════
   COLLAPSIBLE SIDEBAR NAV
   ════════════════════════════════ */

/* Section label */
.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 10px 16px 8px;
  text-transform: uppercase;
}

/* Single nav item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
  margin: 0;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(108,99,255,0.18), rgba(108,99,255,0.06));
  border: 1px solid rgba(108,99,255,0.25);
  color: var(--text-primary);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--accent); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

/* Nav group wrapper */
.nav-group {
  margin: 0;
}

/* Parent item (collapsible header) */
.nav-parent {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  user-select: none;
}
.nav-parent:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-parent-active {
  color: var(--text-primary);
  font-weight: 600;
}
.nav-parent-active .nav-icon { color: var(--accent); }

/* Arrow icon */
.nav-arrow {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), color var(--transition);
  line-height: 1;
  font-style: normal;
}
.arrow-open {
  transform: rotate(90deg);
  color: var(--accent);
}

/* Children container */
.nav-children {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.22s ease;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  margin-top: 3px;
  margin-bottom: 3px;
}
.nav-children:not(.hidden) {
  /* shown state handled by JS */
}

.entity-children {
  padding-left: 10px;
}

.entity-launch {
  cursor: pointer;
}

.entity-launch-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: color var(--transition), transform var(--transition);
}

.entity-launch:hover .entity-launch-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

.entity-workspace-nav {
  gap: 6px;
}

.entity-back-item {
  color: var(--text-primary);
  background: rgba(108,99,255,0.08);
}

.entity-workspace-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 4px 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.entity-workspace-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--accent);
  background: rgba(108,99,255,0.12);
  flex-shrink: 0;
}

.entity-workspace-kicker {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.entity-workspace-name {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
}

body.sidebar-collapsed .entity-workspace-heading,
body.sidebar-collapsed .entity-launch-arrow {
  display: none !important;
}

.entity-subgroup {
  margin: 3px 0;
}

.entity-subparent {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.45;
}

.entity-subparent .child-symbol {
  width: 23px;
  font-size: 0.96rem;
}

.business-group-children {
  padding-left: 8px;
}

.business-entity-children {
  padding-left: 14px;
  margin: 3px 0 8px;
}

#groupBusinessAgriculture:not(.hidden) {
  min-height: 38px;
}

.business-entity-children .nav-child {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
}

.business-entity-children .child-symbol {
  width: 23px;
  font-size: 0.92rem;
}

.business-entity-children .entity-launch-arrow {
  font-size: 0.86rem;
}

.entity-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.entity-dashboard-title {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 5px;
  letter-spacing: 0;
}

.entity-dashboard-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.entity-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 18px;
}

.entity-dashboard-card {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-areas:
    "icon name"
    "icon type";
  align-items: center;
  gap: 7px 14px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-align: left;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.entity-dashboard-card:hover,
.entity-dashboard-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--entity-ring);
  box-shadow: 0 18px 34px rgba(0,0,0,0.14);
  outline: none;
}

.entity-dashboard-number {
  position: absolute;
  right: 16px;
  top: 12px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.5;
}

.entity-dashboard-icon {
  grid-area: icon;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--entity-fg);
  background: var(--entity-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--entity-ring) 35%, transparent);
  font-size: 1.25rem;
}

.entity-dashboard-name {
  grid-area: name;
  min-width: 0;
  padding-right: 22px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.entity-dashboard-type {
  grid-area: type;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

#fg-fProject,
#fg-fQuotation,
#fg-fPaid,
#fg-fProject + .field-group,
#fg-fPaid + .field-group {
  display: none !important;
}

.business-entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.business-entity-card {
  min-height: 118px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  grid-template-areas:
    "icon copy arrow"
    "icon status arrow";
  align-items: center;
  gap: 10px 12px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.business-entity-card:hover,
.business-entity-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(108,99,255,0.5);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  outline: none;
}

.business-entity-icon {
  grid-area: icon;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(108,99,255,0.12);
  font-size: 1.05rem;
}

.business-entity-copy {
  grid-area: copy;
  min-width: 0;
}

.business-entity-copy strong,
.business-entity-copy small {
  display: block;
}

.business-entity-copy strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.business-entity-copy small,
.business-entity-status {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.business-entity-status {
  grid-area: status;
}

.business-entity-arrow {
  grid-area: arrow;
  color: var(--text-muted);
}

.entity-empty-wrap {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
}

.entity-empty-panel {
  width: min(560px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  text-align: center;
}

.entity-empty-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(108,99,255,0.12);
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.entity-empty-kicker {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.entity-empty-panel h3 {
  color: var(--text-primary);
  margin: 6px 0 8px;
}

.entity-empty-panel p {
  color: var(--text-secondary);
  margin: 0 0 18px;
}

/* Child item */
.nav-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  margin-bottom: 1px;
}
.nav-child:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-child.child-active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(108,99,255,0.08);
  border-radius: 8px;
}
.nav-child.child-active .child-dot {
  background: var(--accent);
  transform: scale(1.3);
}

/* Child dot bullet */
.child-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-light);
  flex-shrink: 0;
  transition: all var(--transition);
}

.child-symbol {
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.88rem;
  line-height: 1;
}

.external-nav-child:hover .child-symbol {
  transform: scale(1.1);
}

/* Nav text */
.nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav icon fixed size */
.nav-icon {
  font-size: 0.95rem;
  width: 22px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
  transition: color var(--transition), transform var(--transition);
}

.nav-parent:hover .nav-icon,
.nav-item:hover .nav-icon {
  transform: scale(1.15);
  color: var(--accent);
}

/* Light mode adjustments */
body.light-mode .nav-children { border-left-color: #dde1f0; }
body.light-mode .nav-child:hover { background: #f0f2ff; }
body.light-mode .nav-item:hover  { background: #f0f2ff; }
body.light-mode .nav-parent:hover { background: #f0f2ff; }
body.light-mode .nav-section-label { color: #aab0c8; }

/* ════════════════════════════════
   LOADING SPINNER
   ════════════════════════════════ */
.page-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px 40px;
  box-shadow: var(--shadow-lg);
}
.spinner-ring {
  width: 42px;
  height: 42px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ════════════════════════════════
   PASSWORD SHOW / HIDE
   ════════════════════════════════ */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  width: 100%;
  padding-right: 44px !important;
}
.pwd-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all var(--transition);
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}
.pwd-toggle:hover {
  color: var(--accent);
  transform: scale(1.15);
}

/* ════════════════════════════════
   SIDEBAR BADGES
   ════════════════════════════════ */
.nav-badge {
  min-width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: auto;
  animation: badgePop 0.3s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}
.nav-badge:first-of-type { margin-right: 4px; }
@keyframes badgePop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
/* Clients badge — teal color */
#badgeClients { background: var(--accent2); }
/* Enquiries badge — orange */
#badgeEnquiries { background: var(--c4); }
/* Messages badge — red */
#badgeMessages { background: var(--c3); }

/* ════════════════════════════════
   QUICK ACTIONS
   ════════════════════════════════ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  text-decoration: none;
}
.qa-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.18s;
}
.qa-btn:hover {
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 10px 28px var(--accent-glow);
}
.qa-btn:hover::before { opacity: 0.92; }
.qa-btn:hover .qa-icon { color: #fff; transform: scale(1.2); }
.qa-btn:active { transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }
.qa-icon {
  font-size: 1.2rem;
  transition: all 0.18s;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.qa-btn span:last-child { position: relative; z-index: 1; }

@media (max-width: 768px) {
  .quick-actions { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .quick-actions { grid-template-columns: 1fr 1fr; }
}

/* ════════════════════════════════
   TIMELINE EMPTY STATE
   ════════════════════════════════ */
.timeline-empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
}
.timeline-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 14px;
  opacity: 0.4;
}
.timeline-empty-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.timeline-empty-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Light mode quick actions */
body.light-mode .qa-btn {
  background: #ffffff;
  border-color: #dde1f0;
}
body.light-mode .qa-btn:hover {
  background: #f5f7ff;
}
body.light-mode .page-spinner {
  background: #ffffff;
  border-color: #dde1f0;
}
/* ════════════════════════════════
   CLIENT CREDENTIALS IN PORTAL
   ════════════════════════════════ */
.pinfo-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  margin: 8px 0;
  opacity: 0.3;
  border-radius: 1px;
}
.credential-value {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent) !important;
  letter-spacing: 0.5px;
}
.pwd-hidden {
  letter-spacing: 3px;
  color: var(--text-muted) !important;
  font-size: 1rem;
}
.pwd-eye-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  line-height: 1.4;
}
.pwd-eye-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: scale(1.1);
}
.pinfo-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(108,99,255,0.06);
  border-radius: 6px;
  border-left: 2px solid var(--accent);
}

/* ════════════════════════════════
   LOGOUT CONFIRMATION MODAL
   ════════════════════════════════ */
.logout-confirm-modal {
  text-align: center;
  padding: 0;
  max-width: 380px;
  overflow: hidden;
}
.logout-confirm-icon {
  font-size: 3rem;
  padding: 32px 24px 12px;
  background: linear-gradient(135deg, rgba(255,107,107,0.08), rgba(255,107,107,0.03));
  border-bottom: 1px solid var(--border);
}
.logout-confirm-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: 20px 24px 8px;
  letter-spacing: -0.3px;
}
.logout-confirm-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0 28px 24px;
  line-height: 1.7;
}
.logout-confirm-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}
.logout-cancel-btn {
  border-radius: 0 0 0 20px !important;
  border: none !important;
  border-right: 1px solid var(--border) !important;
  padding: 16px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  transition: all var(--transition) !important;
}
.logout-cancel-btn:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}
.btn-logout-confirm {
  background: var(--accent3);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 0 0 20px 0;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition);
  letter-spacing: 0.3px;
}
.btn-logout-confirm:hover {
  background: #e05555;
  letter-spacing: 0.8px;
}

/* Light mode */
body.light-mode .logout-confirm-icon { background: linear-gradient(135deg, rgba(255,107,107,0.06), #fff); }
body.light-mode .credential-value { color: var(--accent) !important; }
body.light-mode .pinfo-hint { background: rgba(108,99,255,0.05); }

/* ════════════════════════════════
   FIX — Credential row spacing
   ════════════════════════════════ */
.pinfo-row .credential-value {
  margin-left: 8px;
  gap: 12px;
}
.pinfo-row .pinfo-label {
  min-width: 120px;
  flex-shrink: 0;
}
/* ════════════════════════════════
   DEADLINE BADGES
   ════════════════════════════════ */
.deadline-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.deadline-ok       { background: rgba(0,212,170,0.15); color: #00d4aa; }
.deadline-warning  { background: rgba(255,179,71,0.15); color: #ffb347; }
.deadline-critical { background: rgba(255,107,107,0.15); color: #ff6b6b; }
.deadline-today    { background: rgba(255,107,107,0.2);  color: #ff6b6b; animation: pulse 1.2s infinite; }
.deadline-overdue  { background: rgba(255,107,107,0.2);  color: #ff4444; font-weight: 800; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.6;} }

/* ════════════════════════════════
   DASHBOARD DEADLINE WIDGET
   ════════════════════════════════ */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 20px 0;
}
.deadline-widget {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.deadline-widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  font-family: var(--font-display);
}
.dl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.dl-item:last-child { border-bottom: none; }
.dl-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.dl-client { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.dl-empty { color: var(--text-muted); font-size: 0.85rem; text-align: center; padding: 16px 0; }

body.light-mode .deadline-widget { background: #fff; border-color: #dde1ee; }
/* ════════════════════════════════
   CLIENT PROJECTS PAGE — Cards
   ════════════════════════════════ */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 4px 0;
}
.cp-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.cp-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(108,99,255,0.12);
}
.cp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cp-card-icon { font-size: 1.3rem; flex-shrink: 0; }
.cp-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  flex: 1;
}
.cp-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.cp-card-stats {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cp-stat {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.cp-stat:last-child { border-right: none; }
.cp-stat-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.cp-stat-value { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.cp-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.cp-progress-track {
  flex: 1;
  height: 8px;
  background: var(--bg-hover);
  border-radius: 99px;
  overflow: hidden;
}
.cp-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}
.cp-pct { font-size: 0.78rem; color: var(--text-muted); min-width: 36px; text-align: right; }
.cp-deadline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.cp-deadline-date { font-size: 0.75rem; color: var(--text-muted); }
.cp-card-actions {
  display: flex;
  gap: 10px;
}
.cp-btn {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.cp-btn-timeline {
  background: rgba(108,99,255,0.12);
  color: var(--accent);
  border: 1px solid rgba(108,99,255,0.25);
}
.cp-btn-timeline:hover { background: rgba(108,99,255,0.22); }
.cp-btn-docs {
  background: rgba(0,212,170,0.12);
  color: var(--c2);
  border: 1px solid rgba(0,212,170,0.25);
}
.cp-btn-docs:hover { background: rgba(0,212,170,0.22); }

/* Light mode */
body.light-mode .cp-card { background: #fff; border-color: #dde1ee; }
body.light-mode .cp-card:hover { border-color: var(--accent); }
body.light-mode .cp-card-stats { background: #f5f6fa; }
body.light-mode .cp-stat { border-color: #dde1ee; }
body.light-mode .cp-progress-track { background: #edf0f7; }

.intern-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.intern-metric-card {
  min-height: 236px;
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background:
    radial-gradient(circle at 85% 12%, rgba(108,99,255,0.08), transparent 32%),
    var(--bg-surface);
  box-shadow: 0 18px 50px rgba(0,0,0,0.16);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.intern-metric-card::before {
  content: none !important;
  display: none !important;
}
.intern-metric-card::after {
  content: none !important;
  display: none !important;
}
.intern-metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: 0 24px 64px rgba(0,0,0,0.24);
}
.intern-metric-card:focus,
.intern-metric-card:focus-visible,
.intern-metric-card:active {
  outline: none !important;
}
.intern-metric-card:hover:focus,
.intern-metric-card:hover:focus-visible,
.intern-metric-card:hover:active {
  border-color: var(--border-light) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.24) !important;
}
.intern-upload-card {
  width: 100%;
  font-family: var(--font-body);
  cursor: pointer;
  color: inherit;
}
.intern-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.intern-metric-top span {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.intern-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.intern-metric-icon.blue { background: rgba(59,130,246,0.14); color: #3b82f6; }
.intern-metric-icon.purple { background: rgba(139,92,246,0.14); color: #8b5cf6; }
.intern-metric-icon.green-bg { background: rgba(16,185,129,0.14); color: #10b981; }
.intern-metric-value {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.intern-metric-value.word {
  font-size: clamp(2.25rem, 3vw, 3.1rem);
  line-height: 1.05;
}
.intern-metric-value.two-line {
  margin-top: -2px;
}
.intern-metric-sub {
  font-size: 0.88rem;
  font-weight: 600;
}
.intern-metric-sub.green { color: #10b981; }
.intern-metric-sub.purple-text { color: #8b5cf6; }
body.light-mode .intern-metric-card {
  background:
    radial-gradient(circle at 85% 12%, rgba(108,99,255,0.05), transparent 34%),
    #fff;
  border-color: #e4e7ee;
  box-shadow: 0 20px 55px rgba(31,41,55,0.08);
}
body.light-mode .intern-metric-card:hover {
  border-color: #d7dcea;
  box-shadow: 0 24px 68px rgba(31,41,55,0.12);
}
body.light-mode .intern-metric-card:focus,
body.light-mode .intern-metric-card:focus-visible,
body.light-mode .intern-metric-card:active {
  border-color: #e4e7ee !important;
  box-shadow: 0 20px 55px rgba(31,41,55,0.08) !important;
}
body.light-mode .intern-metric-card:hover:focus,
body.light-mode .intern-metric-card:hover:focus-visible,
body.light-mode .intern-metric-card:hover:active {
  border-color: #d7dcea !important;
  box-shadow: 0 24px 68px rgba(31,41,55,0.12) !important;
}

.candidate-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -14px 0 18px;
}
.candidate-toolbar-spacer { flex: 1; }
.candidate-search {
  width: min(100%, 250px);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
}
.candidate-search span {
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text-muted);
}
.candidate-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.candidate-date {
  width: min(100%, 186px);
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0 14px;
  outline: none;
}
.candidate-search:focus-within,
.candidate-date:focus {
  border-color: var(--border-light);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.08);
}
.candidate-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-grid.candidate-form {
  display: grid;
  gap: 18px;
}
.candidate-form .field-group {
  margin-bottom: 14px;
}
.candidate-form .field-group label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.candidate-form .field-group input,
.candidate-form .field-group select {
  min-height: 46px;
  border-radius: 11px;
  background: var(--bg-elevated);
  transition: border-color 0.28s cubic-bezier(0.22,1,0.36,1), box-shadow 0.28s cubic-bezier(0.22,1,0.36,1), transform 0.28s cubic-bezier(0.22,1,0.36,1), background 0.28s ease;
}
.candidate-form .field-group input:focus,
.candidate-form .field-group select:focus {
  transform: scale(1.012);
  border-color: rgba(108,99,255,0.62);
  box-shadow: 0 0 0 4px rgba(108,99,255,0.12), 0 14px 30px rgba(108,99,255,0.10);
}
.candidate-field {
  position: relative;
}
.candidate-field.is-invalid input,
.candidate-field.is-invalid select {
  border-color: rgba(255,84,112,0.88) !important;
  box-shadow: 0 0 0 4px rgba(255,84,112,0.12), 0 10px 26px rgba(255,84,112,0.13);
}
.candidate-field.is-valid input,
.candidate-field.is-valid select {
  border-color: rgba(0,212,170,0.76) !important;
  box-shadow: 0 0 0 4px rgba(0,212,170,0.10), 0 10px 26px rgba(0,212,170,0.10);
}
.field-error {
  display: block;
  min-height: 0;
  max-height: 0;
  margin-top: 0;
  color: #ff647c;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-5px);
  overflow: hidden;
  transition: opacity 0.24s ease, transform 0.24s ease, max-height 0.24s ease, margin-top 0.24s ease;
}
.candidate-field.is-invalid .field-error {
  max-height: 44px;
  margin-top: 7px;
  opacity: 1;
  transform: translateY(0);
}
.candidate-form input[type="file"] {
  padding: 12px 16px;
}
.resume-file-name {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(108,99,255,0.16);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(108,99,255,0.08);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resume-strength {
  position: relative;
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(148,163,184,0.18);
  overflow: hidden;
}
.resume-strength span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5470, #ffb347);
  transition: width 0.32s cubic-bezier(0.22,1,0.36,1), background 0.32s ease, box-shadow 0.32s ease;
}
.resume-strength.weak span {
  width: 36%;
  box-shadow: 0 0 14px rgba(255,84,112,0.35);
}
.resume-strength.strong span {
  width: 100%;
  background: linear-gradient(90deg, #00d4aa, #3b82f6);
  box-shadow: 0 0 16px rgba(0,212,170,0.32);
}
.candidate-submit-btn {
  min-width: 190px;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  box-shadow: 0 12px 28px rgba(108,99,255,0.28);
  transition: transform 0.24s cubic-bezier(0.22,1,0.36,1), box-shadow 0.24s ease, filter 0.24s ease, opacity 0.24s ease;
}
.candidate-submit-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(108,99,255,0.38);
}
.candidate-submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  filter: grayscale(0.18);
  box-shadow: none;
}
.candidate-form.candidate-valid + .modal-footer .candidate-submit-btn,
.candidate-submit-btn:not(:disabled) {
  animation: candidateReady 0.42s cubic-bezier(0.22,1,0.36,1);
}
.candidate-submit-btn.shake {
  animation: candidateShake 0.36s cubic-bezier(0.36,0.07,0.19,0.97);
}
@keyframes candidateReady {
  0% { transform: scale(0.98); box-shadow: 0 0 0 rgba(0,212,170,0); }
  65% { transform: scale(1.025); box-shadow: 0 0 0 5px rgba(0,212,170,0.14), 0 16px 34px rgba(108,99,255,0.30); }
  100% { transform: scale(1); }
}
@keyframes candidateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
body.light-mode .candidate-form .field-group input,
body.light-mode .candidate-form .field-group select {
  background: #fff;
  border-color: #dde1ee;
}
body.light-mode .candidate-search,
body.light-mode .candidate-date {
  background: #fff;
  border-color: #e4e7ee;
  color: #111827;
}
@media (max-width: 720px) {
  .candidate-toolbar {
    flex-direction: column;
    align-items: stretch;
    margin-top: -4px;
  }
  .candidate-toolbar-spacer { display: none; }
  .candidate-search,
  .candidate-date { width: 100%; }
  .form-grid.candidate-form { grid-template-columns: 1fr; }
}

.intern-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.intern-status.active {
  background: rgba(0,212,170,0.15);
  color: #00d4aa;
  border: 1px solid rgba(0,212,170,0.3);
}
.intern-status.completed {
  background: rgba(108,99,255,0.15);
  color: #a78bfa;
  border: 1px solid rgba(108,99,255,0.3);
}
.intern-status.training {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.3);
}
.intern-status.hold {
  background: rgba(255,179,71,0.15);
  color: #ffb347;
  border: 1px solid rgba(255,179,71,0.3);
}
.intern-actions {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.intern-menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1.2rem;
  line-height: 1;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.intern-menu-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}
.intern-menu {
  position: absolute;
  right: 0;
  top: 38px;
  width: 138px;
  padding: 7px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: internMenuIn 0.16s cubic-bezier(0.16,1,0.3,1);
}
.intern-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1.2;
}
.intern-menu button:hover { background: var(--bg-hover); }
.intern-menu button.danger { color: var(--accent3); }
@keyframes internMenuIn {
  from { opacity: 0; transform: translateY(-5px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.plain-action-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 4px 5px;
  border-radius: 6px;
  line-height: 1;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.plain-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.plain-action-btn.danger:hover {
  color: var(--accent3);
}
body.light-mode .intern-menu,
body.light-mode .intern-menu-btn {
  background: #fff;
  border-color: #dde1ee;
}
body.light-mode .intern-menu {
  box-shadow: 0 18px 44px rgba(31,41,55,0.16);
}
body.light-mode .intern-menu button:hover {
  background: #f5f6fa;
}

@media (max-width: 1100px) {
  .intern-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .intern-metric-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }
  .intern-metric-card {
    min-height: 190px;
    padding: 24px;
  }
}

/* ════════════════════════════════
   PROJECTS PAGE
   ════════════════════════════════ */

/* Summary Cards Row */
.proj-summary-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.proj-sum-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  flex: 1;
  min-width: 140px;
  transition: var(--transition);
}

.proj-sum-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.proj-sum-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.proj-sum-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.proj-sum-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Project Status Badges */
.proj-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.proj-in-progress {
  background: rgba(255,179,71,0.15);
  color: #ffb347;
  border: 1px solid rgba(255,179,71,0.3);
}

.proj-completed {
  background: rgba(0,212,170,0.15);
  color: #00d4aa;
  border: 1px solid rgba(0,212,170,0.3);
}

.proj-pending {
  background: rgba(255,107,107,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255,107,107,0.3);
}

.proj-upcoming {
  background: rgba(108,99,255,0.15);
  color: #a78bfa;
  border: 1px solid rgba(108,99,255,0.3);
}

/* Project Detail Modal Stats */
.proj-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .proj-summary-row { flex-direction: column; }
  .proj-detail-stats { grid-template-columns: repeat(2, 1fr); }
}
/* ════════════════════════════════════════════════
   WEBSITES PAGE — 10/10 PREMIUM
   ════════════════════════════════════════════════ */

/* ── Page wrapper ── */
#page-websites {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  isolation: isolate;
  padding-bottom: 44px;
}

/* ── Animated mesh background ── */
.ws-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ws-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: wsBlobFloat 12s ease-in-out infinite;
}
body.light-mode .ws-blob { opacity: 0.06; }
.ws-blob.b1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #7c3aed, #06b6d4);
  top: -120px; left: -100px;
  animation-delay: 0s;
}
.ws-blob.b2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #f43f5e, #f97316);
  bottom: 0; right: -80px;
  animation-delay: -4s;
}
.ws-blob.b3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #10b981, #06b6d4);
  top: 50%; left: 50%;
  animation-delay: -8s;
}
.ws-particle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.42);
  box-shadow: 0 0 28px rgba(255,255,255,0.35);
  filter: blur(0.3px);
  animation: wsParticleDrift 11s cubic-bezier(0.45,0,0.2,1) infinite;
}
.ws-particle.p1 { top: 18%; left: 12%; background: #a78bfa; animation-delay: -1s; }
.ws-particle.p2 { top: 34%; right: 15%; background: #22d3ee; animation-delay: -4s; }
.ws-particle.p3 { bottom: 22%; left: 28%; background: #fb7185; animation-delay: -7s; }
.ws-particle.p4 { bottom: 12%; right: 30%; background: #34d399; animation-delay: -9s; }
@keyframes wsBlobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(40px,-30px) scale(1.08); }
  66%      { transform: translate(-30px,40px) scale(0.95); }
}
@keyframes wsParticleDrift {
  0%,100% { opacity: 0.18; transform: translate3d(0,0,0) scale(0.75); }
  35% { opacity: 0.58; transform: translate3d(26px,-34px,0) scale(1.15); }
  70% { opacity: 0.34; transform: translate3d(-20px,24px,0) scale(0.92); }
}

/* ── Page-wide spotlight cursor ── */
.ws-spotlight {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,99,255,0.07) 0%, transparent 70%);
  transform: translate(-50%,-50%);
  pointer-events: none;
  z-index: 1;
  transition: left 0.08s, top 0.08s;
}

/* ── Header ── */
.websites-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 38px;
  flex-wrap: wrap;
  gap: 16px;
}
.websites-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.7vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  background: linear-gradient(130deg, #fff 0%, #a78bfa 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light-mode .websites-title {
  background: linear-gradient(130deg, #1e1b4b 0%, #7c3aed 50%, #0891b2 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.websites-sub { color: var(--text-muted); font-size: 0.88rem; margin: 0; }
.websites-count-badge {
  padding: 8px 20px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(108,99,255,0.15), rgba(6,182,212,0.15));
  border: 1px solid rgba(108,99,255,0.35);
  color: #a78bfa;
  box-shadow: 0 10px 30px rgba(108,99,255,0.18), inset 0 1px 0 rgba(255,255,255,0.12);
}

/* ── Grid ── */
.websites-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 28px;
  perspective: 1400px;
}

/* ── Card shell (handles 3D perspective) ── */
.ws-card {
  border-radius: 24px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), box-shadow 0.45s cubic-bezier(0.16,1,0.3,1), filter 0.45s cubic-bezier(0.16,1,0.3,1);
  animation: wsFlipIn 0.72s cubic-bezier(0.16,1,0.3,1) both;
  will-change: transform;
  position: relative;
  z-index: 2;
  --mx: 50%;
  --my: 50%;
  --px: 50%;
  --py: 50%;
}
.ws-card::after {
  content: '';
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: -18px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--ws-c) 38%, transparent), transparent 68%);
  filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transform: translateY(8px) scale(0.88);
  transition: opacity 0.48s cubic-bezier(0.16,1,0.3,1), transform 0.48s cubic-bezier(0.16,1,0.3,1), filter 0.48s ease;
}
.ws-card:hover::after {
  opacity: 0.72;
  transform: translateY(0) scale(1);
  filter: blur(20px);
}
@keyframes wsFlipIn {
  from {
    opacity: 0;
    transform: perspective(900px) rotateY(-25deg) translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: perspective(900px) rotateY(0deg) translateY(0) scale(1);
  }
}

/* Hover box shadow glow */
.ws-card:hover {
  filter: saturate(1.18) contrast(1.05);
  box-shadow:
    0 30px 70px rgba(0,0,0,0.42),
    0 0 0 1px color-mix(in srgb, var(--ws-c) 70%, transparent),
    0 0 28px color-mix(in srgb, var(--ws-c) 26%, transparent),
    0 0 68px color-mix(in srgb, var(--ws-g2) 14%, transparent);
}
body.light-mode .ws-card:hover {
  box-shadow:
    0 20px 54px rgba(31,41,55,0.16),
    0 0 0 1px color-mix(in srgb, var(--ws-c) 60%, transparent),
    0 0 34px color-mix(in srgb, var(--ws-c) 25%, transparent);
}

/* ── Inner (actual visible card) ── */
.ws-card-inner {
  position: relative;
  border-radius: 24px;
  padding: 24px;
  overflow: hidden;
  height: 100%;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  /* Dark mode */
  background:
    radial-gradient(circle at var(--px) var(--py), color-mix(in srgb, var(--ws-c) 18%, transparent), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,0.105), rgba(255,255,255,0.028) 42%, rgba(255,255,255,0.012));
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(20px) saturate(1.28);
  -webkit-backdrop-filter: blur(20px) saturate(1.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -30px 70px rgba(0,0,0,0.16);
  transform-style: preserve-3d;
}
body.light-mode .ws-card-inner {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow:
    0 2px 16px rgba(0,0,0,0.07),
    0 1px 4px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,1);
}

/* Unique gradient tint per card */
.ws-card-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--ws-g1) 20%, transparent) 0%,
    color-mix(in srgb, var(--ws-g2) 10%, transparent) 58%,
    color-mix(in srgb, var(--ws-c) 6%, transparent) 100%
  );
  opacity: 0.45;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}
.ws-card:hover .ws-card-bg { opacity: 0.95; }
body.light-mode .ws-card-bg {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--ws-g1) 6%, transparent) 0%,
    color-mix(in srgb, var(--ws-g2) 3%, transparent) 100%
  );
}

/* Colored top border */
.ws-card-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: linear-gradient(135deg, transparent 8%, var(--ws-g1), var(--ws-g2), var(--ws-g1), transparent 92%);
  background-size: 220% 220%;
  background-position: 0% 50%;
  border-radius: inherit;
  opacity: 0.42;
  z-index: 10;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 0.45s cubic-bezier(0.16,1,0.3,1), filter 0.45s cubic-bezier(0.16,1,0.3,1);
}
.ws-card:hover .ws-card-inner::before {
  opacity: 1;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--ws-c) 60%, transparent));
  animation: wsBorderGlow 2.6s cubic-bezier(0.16,1,0.3,1) infinite alternate;
}
@keyframes wsBorderGlow {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.ws-card-orbit {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  background: conic-gradient(
    from 180deg at 50% 50%,
    transparent 0deg,
    color-mix(in srgb, var(--ws-g1) 85%, transparent) 80deg,
    color-mix(in srgb, var(--ws-g2) 85%, transparent) 160deg,
    transparent 250deg,
    transparent 360deg
  );
  filter: blur(18px);
  transform: translateZ(-1px) rotate(0deg);
  transition: opacity 0.35s ease;
}
.ws-card:hover .ws-card-orbit {
  opacity: 0;
  animation: none;
}
@keyframes wsOrbitSpin {
  to { transform: translateZ(-1px) rotate(360deg); }
}

.ws-card-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--px) var(--py), rgba(255,255,255,0.28), transparent 22%),
    linear-gradient(115deg, transparent 16%, rgba(255,255,255,0.08) 34%, rgba(255,255,255,0.26) 46%, rgba(255,255,255,0.08) 58%, transparent 76%);
  background-size: 100% 100%, 240% 100%;
  background-position: center, -120% 0;
  mix-blend-mode: screen;
  transition: opacity 0.25s ease;
}
.ws-card:hover .ws-card-shine {
  opacity: 0.82;
  animation: wsShineSweep 1.55s cubic-bezier(0.16,1,0.3,1) infinite;
}
@keyframes wsShineSweep {
  0% { background-position: center, -120% 0; }
  100% { background-position: center, 140% 0; }
}

.ws-float-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.36;
  filter: blur(1px);
  background: color-mix(in srgb, var(--ws-c) 70%, #fff);
  box-shadow: 0 0 26px color-mix(in srgb, var(--ws-c) 44%, transparent);
  animation: wsDotFloat 6.5s cubic-bezier(0.45,0,0.2,1) infinite;
}
.ws-float-dot.d1 { width: 9px; height: 9px; top: 82px; right: 52px; }
.ws-float-dot.d2 { width: 6px; height: 6px; bottom: 94px; left: 34px; animation-delay: -2s; }
.ws-float-dot.d3 { width: 12px; height: 12px; bottom: 34px; right: 28px; animation-delay: -4s; }
@keyframes wsDotFloat {
  0%,100% { transform: translate3d(0,0,18px) scale(0.72); opacity: 0.22; }
  50% { transform: translate3d(10px,-18px,24px) scale(1.1); opacity: 0.58; }
}

/* ── Per-card cursor spotlight ── */
.ws-cursor-spot {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--ws-c) 40%, transparent), transparent 68%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}

/* ── Top row ── */
.ws-top-row {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.ws-badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1.3px;
  padding: 7px 11px;
  border-radius: 50px;
  color: var(--ws-c);
  background: color-mix(in srgb, var(--ws-c) 13%, rgba(255,255,255,0.04));
  border: 1px solid color-mix(in srgb, var(--ws-c) 34%, transparent);
  font-family: var(--font-display);
  text-transform: uppercase;
  max-width: 155px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.ws-card:hover .ws-badge {
  background: color-mix(in srgb, var(--ws-c) 22%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--ws-c) 25%, transparent);
  transform: translateZ(34px);
}
.ws-num {
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 6vw, 5.15rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.86;
  margin: 4px 0 20px;
  width: max-content;
  background: linear-gradient(135deg, var(--ws-g1), var(--ws-g2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.64;
  filter: drop-shadow(0 14px 34px color-mix(in srgb, var(--ws-c) 22%, transparent));
  transition: opacity 0.38s cubic-bezier(0.16,1,0.3,1), transform 0.38s cubic-bezier(0.16,1,0.3,1), filter 0.38s cubic-bezier(0.16,1,0.3,1);
}
.ws-card:hover .ws-num {
  opacity: 0.96;
  transform: translateZ(48px) scale(1.045);
  filter: drop-shadow(0 20px 46px color-mix(in srgb, var(--ws-c) 38%, transparent));
}

/* ── 3D floating icon ── */
.ws-icon-3d {
  position: relative;
  z-index: 4;
  margin-bottom: 0;
  width: 66px;
  transform-style: preserve-3d;
}
.ws-icon-shadow {
  position: absolute;
  bottom: -8px; left: 4px;
  width: 50px; height: 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ws-c) 35%, transparent);
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
  transform: scaleX(1);
}
.ws-card:hover .ws-icon-shadow {
  opacity: 1;
  transform: scaleX(1.2);
}
.ws-icon-box {
  width: 62px; height: 62px;
  border-radius: 19px;
  font-size: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--ws-g1) 18%, transparent),
    color-mix(in srgb, var(--ws-g2) 10%, transparent)
  );
  background-size: 180% 180%;
  border: 1px solid color-mix(in srgb, var(--ws-c) 30%, transparent);
  box-shadow:
    0 8px 24px color-mix(in srgb, var(--ws-c) 18%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform 0.55s cubic-bezier(0.16,1,0.3,1), box-shadow 0.45s ease, background-position 0.55s ease, border-color 0.45s ease;
  transform: translateZ(0px);
}
body.light-mode .ws-icon-box {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--ws-g1) 14%, #fff),
    color-mix(in srgb, var(--ws-g2) 8%, #fff)
  );
  box-shadow: 0 6px 22px color-mix(in srgb, var(--ws-c) 20%, transparent);
}
.ws-card:hover .ws-icon-box {
  background-position: 100% 0;
  border-color: color-mix(in srgb, var(--ws-c) 70%, rgba(255,255,255,0.4));
  transform: translateY(-8px) translateZ(58px) rotate(-10deg) scale(1.18);
  box-shadow:
    0 22px 46px color-mix(in srgb, var(--ws-c) 38%, transparent),
    0 0 34px color-mix(in srgb, var(--ws-g2) 30%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ── Name & desc ── */
.ws-name {
  position: relative; z-index: 2;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  line-height: 1.18;
  transition: color 0.25s, transform 0.3s ease, text-shadow 0.3s ease;
}
.ws-card:hover .ws-name {
  color: var(--ws-c);
  transform: translateZ(34px);
  text-shadow: 0 0 18px color-mix(in srgb, var(--ws-c) 26%, transparent);
}
.ws-desc {
  position: relative; z-index: 2;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.62;
  margin: 0 0 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: transform 0.3s ease, color 0.3s ease;
}
.ws-card:hover .ws-desc {
  color: color-mix(in srgb, var(--text-primary) 72%, var(--text-muted));
  transform: translateZ(30px);
}

/* ── Divider ── */
.ws-divider {
  position: relative; z-index: 2;
  height: 1px;
  background: linear-gradient(90deg, var(--ws-g1), var(--ws-g2), transparent);
  opacity: 0.15;
  margin-top: auto;
  margin-bottom: 16px;
  transition: opacity 0.3s;
}
.ws-card:hover .ws-divider { opacity: 0.5; }
.ws-card:hover .ws-footer { transform: translateZ(30px); }

/* ── Footer ── */
.ws-footer {
  position: relative; z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.3s ease;
}
.ws-url-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 145px;
  transition: color 0.25s;
}
.ws-card:hover .ws-url-text { color: var(--ws-c); }

/* ── Visit button ── */
.ws-visit-btn {
  position: relative;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-display);
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid var(--ws-c);
  color: var(--ws-c);
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--ws-c) 26%, transparent), transparent 48%),
    color-mix(in srgb, var(--ws-c) 10%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ws-c) 15%, transparent);
  transition: color 0.24s, background 0.24s, transform 0.42s cubic-bezier(0.16,1,0.3,1), box-shadow 0.42s cubic-bezier(0.16,1,0.3,1), border-color 0.3s ease;
}
.ws-visit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--ws-g1), var(--ws-g2));
  background-size: 180% 180%;
  opacity: 0;
  transition: opacity 0.28s;
}
.ws-visit-btn:hover::before {
  opacity: 1;
  animation: wsButtonGradient 1.2s ease infinite alternate;
}
.ws-visit-btn:hover {
  color: #fff;
  border-color: color-mix(in srgb, var(--ws-c) 92%, #fff);
  transform: scale(1.08) translateY(-5px);
  box-shadow:
    0 16px 38px color-mix(in srgb, var(--ws-c) 42%, transparent),
    0 0 22px color-mix(in srgb, var(--ws-g2) 42%, transparent);
}
.ws-visit-label { position: relative; z-index: 1; }
@keyframes wsButtonGradient {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

/* ── Sparkle animation ── */
@keyframes wsSparkFly {
  0%   { transform: translate(-50%,-50%) translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-50%) translate(var(--sx),var(--sy)) scale(0); opacity: 0; }
}
.ws-sparkle { position: absolute; border-radius: 50%; pointer-events: none; z-index: 999; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .websites-grid { grid-template-columns: 1fr; }
  .ws-card-inner { padding: 20px; min-height: 310px; }
  .ws-footer { align-items: stretch; flex-direction: column; }
  .ws-url-text { max-width: 100%; }
  .ws-visit-btn { justify-content: center; width: 100%; }
  .ws-num { font-size: 3.4rem; }
}
@media (min-width: 601px) and (max-width: 960px) {
  .websites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ── Websites page — Light mode fixes ── */
body.light-mode .websites-title {
  background: linear-gradient(130deg, #1e1b4b 0%, #7c3aed 50%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light-mode .websites-sub {
  color: #6b7280;
}
body.light-mode .websites-count-badge {
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(6,182,212,0.1));
  border-color: rgba(108,99,255,0.25);
  color: #6d28d9;
}
body.light-mode .ws-spotlight {
  background: radial-gradient(circle, rgba(108,99,255,0.05) 0%, transparent 70%);
}
body.light-mode .ws-cursor-spot {
  background: radial-gradient(circle, color-mix(in srgb, var(--ws-c) 15%, transparent), transparent 70%);
}
body.light-mode .ws-num {
  opacity: 0.15;
}
body.light-mode .ws-card:hover .ws-num { opacity: 0.6; }
body.light-mode .ws-badge {
  border-color: color-mix(in srgb, var(--ws-c) 35%, transparent);
}
body.light-mode .ws-visit-btn {
  border-color: color-mix(in srgb, var(--ws-c) 70%, transparent);
  background: color-mix(in srgb, var(--ws-c) 7%, transparent);
}
body.light-mode .ws-visit-btn:hover {
  color: #fff;
}
body.light-mode .ws-card:hover .ws-name {
  color: var(--ws-c);
}

@media (prefers-reduced-motion: reduce) {
  .ws-card,
  .ws-card *,
  .ws-blob,
  .ws-particle,
  .ws-float-dot {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS OVERRIDES
   Covers every app surface without changing desktop layouts.
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 248px; }
  .page { padding: 22px; }
  .stats-grid,
  .charts-grid,
  .payments-summary,
  .ratings-summary,
  .proj-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .intern-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .websites-grid,
  .doc-grid,
  .notes-container,
  .ratings-grid,
  .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  body.sidebar-open {
    overflow: hidden;
  }
  .app { display: block; min-width: 0; }
  .sidebar {
    width: var(--sidebar-w);
    max-width: var(--sidebar-w);
    transform: none !important;
    z-index: 1000;
    box-shadow: none;
  }
  .sidebar.open {
    transform: none !important;
  }
  .sidebar-header { padding: 14px 16px; }
  .sidebar-header .logo-img { width: 156px; height: 44px; flex-basis: 156px; }
  .sidebar-nav { padding: 10px; }
  .nav-item,
  .nav-parent,
  .nav-child { min-height: 42px; }
  .main-content {
    width: 100%;
    min-width: 0;
    margin-left: var(--sidebar-w);
  }
  body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-w);
    max-width: var(--sidebar-collapsed-w);
  }
  body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-w);
  }
  .topbar,
  body.page-current-employees .topbar,
  body.page-current-interns .topbar {
    height: auto;
    min-height: 60px;
    margin: 12px;
    padding: 10px 14px;
    border-radius: 16px;
    gap: 10px;
  }
  body.page-current-bricksincome .topbar,
  body.page-current-thingsexpense .topbar,
  body.page-current-employeesalary .topbar {
    margin: 12px;
    padding: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .topbar-left,
  .topbar-right { min-width: 0; }
  .topbar-left { flex: 1; gap: 10px; }
  .topbar-right { gap: 10px; flex-shrink: 0; }
  body.page-current-bricksincome .topbar-left,
  body.page-current-thingsexpense .topbar-left,
  body.page-current-employeesalary .topbar-left {
    width: 100%;
    flex-wrap: wrap;
  }
  .page-title,
  body.page-current-employees .page-title,
  body.page-current-interns .page-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
  }
  body.page-current-employees .page-title::before,
  body.page-current-interns .page-title::before {
    width: 8px;
    height: 24px;
  }
  .topbar-date { display: none; }
  .theme-toggle,
  .notification-bell {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .notif-dropdown {
    position: fixed;
    top: 62px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 86px);
  }
  .notif-list { max-height: calc(100vh - 156px); }
  .viewing-as-banner {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 10px 14px;
  }
  .vab-btn { width: 100%; }
  .page { padding: 16px; }
  .dash-welcome,
  .page-actions,
  .profile-topbar,
  .websites-header,
  .timeline-client-select,
  .candidate-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-welcome-date { text-align: left; }
  .search-wrap,
  .action-btns,
  .profile-actions,
  .doc-actions,
  .cp-card-actions,
  .modal-footer,
  .logout-confirm-btns { width: 100%; }
  .search-wrap input,
  .search-wrap select,
  .action-btns button,
  .profile-actions button,
  .timeline-client-select select,
  .timeline-client-select button,
  .candidate-search,
  .candidate-date {
    width: 100% !important;
    min-width: 0 !important;
  }
  .action-btns,
  .profile-actions,
  .doc-actions,
  .cp-card-actions,
  .modal-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
  .stats-grid,
  .charts-grid,
  .payments-summary,
  .ratings-summary,
  .proj-summary-row,
  .profile-stats,
  .quick-actions,
  .doc-grid,
  .notes-container,
  .ratings-grid,
  .cp-grid,
  .websites-grid,
  .intern-metric-grid,
  .enq-form-layout,
  .invoice-layout,
  .profile-grid,
  .view-grid,
  .form-grid,
  .form-grid.candidate-form {
    grid-template-columns: 1fr !important;
  }
  .stat-card,
  .pay-sum-card,
  .chart-card,
  .deadline-widget,
  .profile-card,
  .invoice-form-card,
  .invoice-preview,
  .activity-full,
  .doc-card,
  .note-card,
  .cp-card,
  .intern-metric-card,
  .ws-card { border-radius: 12px; }
  .stat-card,
  .pay-sum-card,
  .deadline-widget,
  .profile-card,
  .invoice-form-card,
  .invoice-preview,
  .activity-full,
  .doc-card,
  .note-card,
  .cp-card { padding: 16px; }
  .stat-value {
    font-size: 1.8rem;
    text-align: left !important;
  }
  .stat-trend { text-align: left !important; }
  .quick-actions { gap: 10px; }
  .qa-btn {
    min-height: 54px;
    padding: 12px 14px;
  }
  .table-wrap,
  .interns-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
  .table-wrap::after,
  .interns-table-wrap::after {
    content: 'Swipe to view more';
    display: block;
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-align: center;
    border-top: 1px solid var(--border);
  }
  .data-table { min-width: 720px; }
  .data-table th,
  .data-table td {
    padding: 11px 12px;
    font-size: 0.82rem;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 10px;
  }
  .modal {
    max-width: none;
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }
  .modal-header { padding: 16px 18px; }
  .modal-body { padding: 18px; }
  .modal-footer { padding: 14px 18px 18px; }
  .modal-footer button,
  .logout-confirm-btns button { width: 100%; }
  .messages-layout {
    height: calc(100vh - 96px);
    min-height: 560px;
    grid-template-columns: 1fr;
  }
  .msg-sidebar {
    height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .msg-chat-body {
    min-height: 220px;
    padding: 14px;
  }
  .msg-bubble { max-width: 88%; }
  .msg-input-area,
  .client-msg-input { align-items: stretch; }
  .msg-input-area { padding: 12px; }
  .profile-hero { padding: 22px 18px; }
  .profile-avatar {
    width: 76px;
    height: 76px;
    font-size: 1.7rem;
  }
  .profile-name { font-size: 1.45rem; }
  .profile-info-row,
  .pinfo-row,
  .view-row,
  .activity-entry,
  .dl-item,
  .timeline-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .pinfo-row .pinfo-label { min-width: 0; }
  .credential-value {
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }
  .timeline-left { width: 32px; }
  .timeline-body { padding: 14px; }
  .timeline-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .invoice-preview { overflow-x: auto; }
  .invoice-doc { min-width: 560px; }
  .websites-header { gap: 12px; }
  .websites-count-badge {
    width: 100%;
    text-align: center;
  }
  .candidate-toolbar-spacer { display: none; }
  .intern-metric-card {
    min-height: 170px;
    padding: 22px;
  }
  .intern-metric-value { font-size: 3rem; }
  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .login-wrapper {
    align-items: stretch;
    padding: 16px;
  }
  .login-card {
    align-self: center;
    padding: 28px 18px;
    border-radius: 18px;
  }
  .login-logo .logo-img,
  .logo-img {
    width: 190px;
    height: 54px;
  }
  .login-title { font-size: 1.65rem; }
  .page { padding: 12px; }
  .topbar { padding: 8px 10px; }
  .page-title { max-width: 44vw; }
  .theme-toggle { font-size: 0; }
  .theme-toggle::before {
    content: 'Theme';
    font-size: 0.78rem;
  }
  .notif-dropdown {
    top: 58px;
    left: 8px;
    right: 8px;
  }
  .stat-card,
  .pay-sum-card,
  .chart-card,
  .deadline-widget,
  .profile-card,
  .activity-full,
  .modal-body,
  .invoice-form-card,
  .invoice-preview { padding: 14px; }
  .dash-welcome { padding: 16px; }
  .dash-welcome-title { font-size: 1.08rem; }
  .quick-actions { grid-template-columns: 1fr !important; }
  .btn-primary,
  .btn-export,
  .btn-ghost,
  .btn-login,
  .btn-send { min-height: 42px; }
  .field-group input,
  .field-group select,
  .field-group textarea,
  .search-wrap input,
  .search-wrap select,
  .candidate-search,
  .candidate-date { min-height: 42px; }
  .data-table { min-width: 680px; }
  .messages-layout { min-height: 520px; }
  .msg-sidebar { height: 170px; }
  .msg-chat-header,
  .msg-input-area,
  .client-msg-input { flex-wrap: wrap; }
  .msg-input-area input,
  .msg-input-area .btn-send,
  .client-msg-input input,
  .client-msg-input button { width: 100%; }
  .profile-stats { grid-template-columns: 1fr !important; }
  .profile-topbar .btn-back { width: 100%; }
  .profile-badges { justify-content: center; }
  .profile-info-row,
  .pinfo-row { word-break: break-word; }
  .cp-card-stats { flex-direction: column; }
  .cp-stat {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .cp-stat:last-child { border-bottom: 0; }
  .timeline-item { gap: 4px; }
  .timeline-left { width: 24px; }
  .timeline-dot {
    width: 18px;
    height: 18px;
  }
  .websites-title { font-size: 1.55rem; }
  .ws-card-inner { padding: 18px; }
  .intern-metric-card {
    min-height: 150px;
    padding: 18px;
  }
  .intern-metric-value { font-size: 2.6rem; }
  .logout-confirm-btns { grid-template-columns: 1fr; }
  .logout-cancel-btn,
  .btn-logout-confirm { border-radius: 0 !important; }
}

@media (max-width: 360px) {
  .page-title { max-width: 38vw; }
  .sidebar { width: var(--sidebar-w); }
  .stat-value,
  .pay-sum-value { font-size: 1.55rem; }
  .modal-header h3 { font-size: 1rem; }
  .data-table { min-width: 640px; }
}

@media (max-width: 768px) {
  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar,
  body.sidebar-collapsed .sidebar {
    width: var(--sidebar-w);
    max-width: min(var(--sidebar-w), 86vw);
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
  }

  .sidebar.open,
  body.sidebar-open .sidebar {
    transform: translateX(0) !important;
    box-shadow: var(--shadow-lg);
  }

  .main-content,
  body.sidebar-collapsed .main-content {
    margin-left: 0 !important;
  }

  body.sidebar-collapsed .sidebar-header .logo-img,
  body.sidebar-collapsed .nav-section-label,
  body.sidebar-collapsed .nav-text,
  body.sidebar-collapsed .nav-arrow,
  body.sidebar-collapsed .nav-badge,
  body.sidebar-collapsed .nav-children,
  body.sidebar-collapsed .admin-name,
  body.sidebar-collapsed .admin-role,
  body.sidebar-collapsed .btn-logout {
    display: initial !important;
  }

  body.sidebar-collapsed .nav-item,
  body.sidebar-collapsed .nav-parent,
  body.sidebar-collapsed .nav-group {
    width: auto;
  }

  body.sidebar-collapsed .sidebar-footer {
    padding: 12px;
  }

  body.sidebar-collapsed .admin-badge {
    justify-content: flex-start;
    padding: 10px;
    margin-bottom: 10px;
  }

  body.sidebar-collapsed .nav-item,
  body.sidebar-collapsed .nav-parent {
    height: auto;
    min-height: 42px;
    justify-content: flex-start;
    padding: 9px 14px;
    gap: 12px;
  }

  body.sidebar-collapsed .sidebar-toggle {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    margin-left: auto;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 1.1rem;
  }
}

/* Final mobile responsiveness pass. Desktop rules above remain untouched. */
.responsive-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.invoice-table-wrap {
  margin: 18px 0;
}

.sidebar-backdrop {
  display: none;
}

@media (min-width: 769px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  html,
  body,
  #app,
  .app,
  .main-content {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 14px;
  }

  .page,
  .modal,
  .sidebar,
  .topbar,
  .notif-dropdown,
  .toast {
    font-size: 14px;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: block;
    pointer-events: none;
    background: rgba(0,0,0,0);
    transition: background 0.25s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    pointer-events: auto;
    background: rgba(0,0,0,0.62);
  }

  .sidebar,
  body.sidebar-collapsed .sidebar {
    width: min(320px, 88vw) !important;
    max-width: min(320px, 88vw) !important;
    transform: translateX(-100%) !important;
    z-index: 1000;
  }

  .sidebar.open,
  body.sidebar-open .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-toggle.mobile-close-visible,
  .sidebar-toggle.mobile-close-visible:hover {
    font-size: 0;
  }

  .sidebar-toggle.mobile-close-visible::before {
    content: 'X';
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1;
  }

  .main-content,
  body.sidebar-collapsed .main-content {
    margin-left: 0 !important;
    width: 100%;
    padding-top: 74px;
  }

  .topbar,
  body.page-current-employees .topbar,
  body.page-current-interns .topbar,
  body.page-current-bricksincome .topbar,
  body.page-current-thingsexpense .topbar,
  body.page-current-employeesalary .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    min-height: 62px;
    height: 62px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }

  .topbar-right {
    flex: 0 0 auto;
    gap: 8px;
    min-width: 0;
  }

  .mobile-sidebar-toggle {
    display: inline-flex !important;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .topbar-date,
  .topbar-entity-divider {
    display: none !important;
  }

  .topbar-entity-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }

  .topbar-entity-badge strong,
  .page-title {
    display: block;
    min-width: 0;
    max-width: 28vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-entity-label {
    display: none;
  }

  .theme-toggle,
  .notification-bell,
  .topbar-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .charts-grid,
  .chart-card {
    min-width: 0;
    max-width: 100%;
  }

  .chart-card {
    overflow: hidden;
  }

  .chart-card canvas {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    max-height: 260px;
  }

  .table-wrap,
  .responsive-table-wrap,
  .rn-table-wrap,
  .interns-table-wrap,
  .college-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .data-table,
  .inv-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
  }

  .data-table th,
  .data-table td,
  .inv-table th,
  .inv-table td {
    min-width: max-content;
    white-space: nowrap;
    font-size: 13px;
  }

  .data-table button,
  .data-table .btn-sm,
  .data-table .btn-edit,
  .data-table .btn-delete,
  .data-table .btn-delete-sm,
  .data-table .icon-btn {
    min-height: 40px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .form-grid,
  .payment-edit-grid,
  .salary-modal-grid,
  .salary-modal-saturday-grid,
  .rn-income-form .form-grid,
  .candidate-form,
  .invoice-layout,
  .enq-form-layout {
    grid-template-columns: 1fr !important;
  }

  input,
  select,
  textarea,
  button,
  .icon-btn,
  .btn-primary,
  .btn-export,
  .btn-ghost,
  .btn-sm,
  .btn-send,
  .nav-item,
  .nav-parent,
  .nav-child,
  .qa-btn,
  a {
    min-height: 44px;
  }

  .field-group input,
  .field-group select,
  .field-group textarea,
  .search-wrap input,
  .search-wrap select,
  .rn-toolbar input,
  .rn-toolbar select,
  .candidate-search,
  .candidate-date {
    width: 100% !important;
    min-height: 44px;
    font-size: 14px;
  }

  .field-group button,
  .form-grid button,
  .rn-form-actions button,
  .action-btns button,
  .modal-footer button,
  .search-wrap button,
  .rn-toolbar button {
    width: 100%;
  }

  .modal-overlay {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
  }

  .modal,
  .modal.modal-sm,
  .payment-edit-modal,
  .logout-confirm-modal {
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border-left: 0;
    border-right: 0;
  }

  .modal {
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-surface);
  }

  .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .main-content {
    padding-top: 66px;
  }

  .topbar,
  body.page-current-employees .topbar,
  body.page-current-interns .topbar,
  body.page-current-bricksincome .topbar,
  body.page-current-thingsexpense .topbar,
  body.page-current-employeesalary .topbar {
    height: 58px;
    min-height: 58px;
    padding: 7px 8px;
  }

  .mobile-sidebar-toggle,
  .theme-toggle,
  .notification-bell,
  .topbar-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .topbar-entity-badge strong {
    max-width: 30vw;
  }

  .page-title {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .chart-card canvas {
    max-height: 220px;
  }
}
