/* =========================================
   1. VARIABLES & BASE SETUP
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea { touch-action: manipulation; }
.btn, .btn-macos, button { user-select: none; -webkit-user-select: none; }
@media (max-width: 768px) { input, select, textarea { font-size: 16px !important; } }
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .fade-up { opacity: 1 !important; transform: none !important; transition: none !important; }
}

:root {
    --color-primary: #047857;
    --color-secondary: #1e3a8a;
    --color-dark: #0f172a;
    --color-light: #f8fafc;
    --color-border: #e2e8f0;
    --color-text-muted: #334155;
    --color-text-secondary: #334155;
    --color-text-light: #334155;
    --color-success-bg: #ecfdf5;
    --color-info-bg: #f1f5f9;
    --color-white: #fcfcfc;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --badge-danger-bg: #fee2e2;
    --badge-danger-text: #dc2626;
    --badge-success-bg: #dcfce7;
    --badge-success-text: #16a34a;
    --badge-info-bg: #e0f2fe;
    --badge-info-text: #1e3a8a;
    --badge-warning-bg: #fef3c7;
    --badge-warning-text: #d97706;

    --spacing-xs: 8px; 
    --spacing-sm: 12px; 
    --spacing-md: 16px; 
    --spacing-lg: clamp(16px, 3vw, 24px);
    --spacing-xl: clamp(24px, 4vw, 32px); 
    --spacing-2xl: clamp(32px, 5vw, 40px);
    
    --radius-sm: 6px; 
    --radius-md: 12px; 
    --radius-lg: 18px; 
    --radius-xl: 24px;
    --shadow-sm: 0px 4px 6px -1px rgba(0,0,0,0.05);
    --shadow-md: 0px 25px 50px -12px rgba(0,0,0,0.15);
}

[data-theme="dark"] {
    --color-white: #0f172a; 
    --color-light: #1e293b; 
    --color-dark: #f8fafc;
    --color-text-muted: #cbd5e1; 
    --color-text-secondary: #cbd5e1;
    --color-text-light: #94a3b8; 
    --color-border: #334155;
    
    --color-primary: #34d399;
    --color-secondary: #60a5fa; 
    --color-success-bg: rgba(52, 211, 153, 0.15); 
    --color-info-bg: rgba(96, 165, 250, 0.15);

    --badge-danger-bg: rgba(220, 38, 38, 0.25);
    --badge-danger-text: #f87171;
    --badge-success-bg: rgba(22, 163, 74, 0.25);
    --badge-success-text: #4ade80;
    --badge-info-bg: rgba(30, 58, 138, 0.35);
    --badge-info-text: #93c5fd;
    --badge-warning-bg: rgba(217, 119, 6, 0.25);
    --badge-warning-text: #fcd34d;
    
    --shadow-sm: 0px 4px 6px -1px rgba(0,0,0,0.5);
    --shadow-md: 0px 25px 50px -12px rgba(0,0,0,0.5);
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--color-dark); line-height: 1.6; background-color: var(--color-white); overflow-x: hidden; }

/* =========================================
   2. UTILITIES & ANIMATIONS
   ========================================= */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

.btn { padding: 10px 20px; border-radius: var(--radius-lg); font-size: 14px; font-weight: 700; border: none; cursor: pointer; transition: all 0.3s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.btn-primary { background-color: var(--color-primary); color: #fff; box-shadow: 0px 4px 7px rgba(5, 150, 105, 0.25); }
.btn-primary:hover { background-color: #01ce94; transform: translateY(-2px); box-shadow: 0px 8px 14px rgba(4, 230, 158, 0.35); }
.btn-secondary { background-color: transparent; color: var(--color-dark); border: 1px solid var(--color-border); }
.btn-secondary:hover { background-color: #dfe2e1; transform: translateY(-2px); box-shadow: 0px 8px 14px rgba(5, 150, 105, 0.35); }

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.header { position: sticky; top: 0; z-index: 999; background-color: var(--color-white); border-bottom: 1px solid var(--color-border); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.header-container { max-width: 1360px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; height: 70px; padding: 0 var(--spacing-md); transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1); gap: 12px; }

.logo-section { display: flex; align-items: center; gap: var(--spacing-sm); text-decoration: none; color: inherit; flex-shrink: 0; }
.logo-image { height: 40px; width: auto; max-width: 90px; object-fit: contain; transition: transform 0.4s ease; transform-origin: left center; }
.logo-text .logo-title { font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.logo-text p { display: none; font-size: 12px; color: var(--color-text-light); font-weight: 600; white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: var(--spacing-sm); flex-shrink: 0; }
.theme-toggle { background: none; border: none; cursor: pointer; font-size: 18px; padding: 6px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.header-actions .smart-contact-btn { display: none; }
.hamburger { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--color-dark); padding: 8px; min-width: 44px; min-height: 44px; border-radius: 6px; }

.nav-section { position: absolute; top: 70px; left: 0; right: 0; background-color: var(--color-white); display: none; flex-direction: column; align-items: flex-start; padding: var(--spacing-lg); border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-md); max-height: 85vh; overflow-y: auto; gap: var(--spacing-md); }
.nav-section.active { display: flex; }
.nav-link { font-size: 14.5px; color: var(--color-dark); text-decoration: none; font-weight: 750; padding: 6px 0; position: relative; display: inline-block; width: fit-content; white-space: nowrap; }
.nav-link-wrapper { width: 100%; }

.mega-menu { display: none; flex-direction: column; background-color: var(--color-info-bg); border-radius: var(--radius-sm); padding: 16px; margin-top: 8px; gap: 16px; }
.mega-menu.mobile-open { display: flex; }
.mega-col { display: flex; flex-direction: column; gap: 8px; }
.mega-col .mega-heading { font-size: 12px; color: var(--color-secondary); margin-bottom: 8px; text-transform: uppercase; font-weight: 750; }
.mega-col a { color: var(--color-text-secondary); text-decoration: none; font-size: 13.5px; padding: 6px 0; transition: color 0.2s ease; }

/* FIX FOR ALL DROPDOWN LINKS */
.mega-menu a { 
    color: var(--color-text-secondary) !important; 
    text-decoration: none !important; 
    font-size: 14.5px; 
    font-weight: 600;
    padding: 6px 0; 
    transition: color 0.2s ease; 
    display: block;
}

.mega-menu a:hover {
    color: var(--color-primary) !important;
}

.header.scrolled { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1); background-color: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
[data-theme="dark"] .header.scrolled { background-color: rgba(15, 23, 42, 0.95); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); }

@media (min-width: 1025px) {
    .header-container { height: 76px; padding: 0 24px; }
    .hamburger { display: none; }
    .logo-image { height: 44px; }
    .logo-text p { display: block; }
    .header-actions .smart-contact-btn { display: inline-flex; }

    .nav-section { position: static; display: flex; flex-direction: row; background-color: transparent; border: none; box-shadow: none; padding: 0; align-items: center; gap: clamp(10px, 1.3vw, 18px); overflow: visible; }
    .nav-link { font-size: 14.5px; padding: 4px 0; white-space: nowrap; }
    .nav-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -2px; left: 0; background-color: var(--color-primary); transition: width 0.3s; }
    .nav-link:hover::after { width: 100%; }
    .nav-link-wrapper { width: auto; position: relative; }

    .mega-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(15px); width: max-content; display: none; grid-template-columns: repeat(2, max-content); gap: 8px 24px; background-color: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: 0px 8px 20px -6px rgba(0, 0, 0, 0.12); opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease; margin-top: 10px; padding: 16px 20px; }
    .mega-menu::before { content: ''; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background: transparent; }
    .nav-link-wrapper:hover .mega-menu { display: grid; opacity: 1; transform: translateX(-50%) translateY(0); }
    
    a.mega-heading { display: block; color: var(--color-primary); font-size: 12.5px; font-weight: 700; text-transform: uppercase; text-decoration: none; text-align: left; white-space: nowrap; padding: 8px 12px; border-radius: var(--radius-sm); transition: color 0.2s ease, transform 0.2s ease, background-color 0.2s ease; }
    a.mega-heading:hover { color: var(--color-secondary); background-color: var(--color-info-bg); transform: translateX(4px); }

    .header.scrolled .header-container { height: 64px; }
    .header.scrolled .logo-image { transform: scale(0.9); }
    .header.scrolled .nav-section { transform: scale(0.98); }
}

/* =========================================
   4. LAYOUTS & GENERAL CONTAINERS
   ========================================= */
.page-header { padding: clamp(24px, 4vw, 40px) 20px; text-align: center; background: linear-gradient(to bottom, var(--color-light), var(--color-white)); border-bottom: 1px solid var(--color-border); }
[data-theme="dark"] .page-header { background: transparent; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.page-title { font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 8px;color: var(--color-secondary); }
.section-container { max-width: 1280px; margin: 0 auto; padding: clamp(32px, 5vw, 48px) 20px; }
.section-title { font-size: clamp(1.75rem, 4vw, 2.35rem); font-weight: 800; line-height: 1.2; color: var(--color-secondary); text-align: center; margin-bottom: clamp(24px, 4vw, 32px); transition: text-shadow 0.3s ease; }
.section-title:hover { text-shadow: 5px 10px 20px rgba(4, 120, 87, 0.621); }
.section-tag { color: var(--color-primary); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; margin-bottom: var(--spacing-sm); text-align: center; display: block; transition: text-shadow 0.3s ease; }
.section-tag:hover { text-shadow: 5px 10px 20px rgb(0, 255, 183); }
.cards-grid, .services-grid, .footer-grid, .detailed-services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--spacing-lg); }

/* =========================================
   5. HOMEPAGE HERO SECTION
   ========================================= */
.hero { background: linear-gradient(to bottom, var(--color-white), var(--color-light)); border-bottom: 1px solid var(--color-border); padding: clamp(40px, 8vw, 80px) var(--spacing-md); }
.hero-container { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: var(--spacing-xl); }
@media (min-width: 1025px) { .hero-container { grid-template-columns: 1.2fr 0.8fr; align-items: center; } }
.hero-heading { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; line-height: 1.15; letter-spacing: -1px; }
.hero-subtitle { color: var(--color-text-muted); font-size: clamp(0.95rem, 1.8vw, 1.1rem); line-height: 1.7; margin-top: var(--spacing-md); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--spacing-md); margin-top: var(--spacing-lg); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 24px; border-top: 1px solid var(--color-border); margin-top: var(--spacing-xl); }
.stat-value { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 800; color: var(--color-secondary); }
.stat-label { font-size: 13px; color: var(--color-text-light); font-weight: 600; margin-top: 4px; }

.hero-right { background-color: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: var(--spacing-lg); transition: transform 0.3s, box-shadow 0.3s; }
.hero-right:hover { transform: translateY(-6px); box-shadow: 0px 15px 30px -10px rgba(4, 120, 87, 0.755); }
.card-header { display: flex; align-items: center; gap: var(--spacing-md); padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.card-icon { width: 50px; height: 50px; background: linear-gradient(135deg, var(--color-secondary), var(--color-primary)); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; }
.card-title { font-size: 17px; font-weight: 800; line-height: 1.3; }
.card-subtitle { font-size: 13px; color: var(--color-text-muted); font-weight: 500; margin-top: 3px; }
.security-note { background-color: var(--color-success-bg); border: 1px solid #a7f3d0; border-radius: var(--radius-md); padding: 14px; display: flex; gap: 12px; font-size: 13px; font-weight: 600; align-items: center; color: var(--color-secondary); }
.security-note svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-primary); }

.value-card { background-color: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 32px); box-shadow: var(--shadow-sm); transition: transform 0.3s, box-shadow 0.3s; position: relative; display: flex; flex-direction: column; }
.value-card:hover { transform: translateY(-4px); box-shadow: 0px 12px 24px -8px rgba(4, 120, 87, 0.4); }
.value-card-icon { width: 52px; height: 52px; background-color: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--spacing-lg); }
.value-card-title { font-size: 18px; font-weight: 700; margin-bottom: var(--spacing-md); }
.value-card-desc { color: var(--color-text-muted); font-size: 14.5px; line-height: 1.65; }

/* =========================================
   6. INNER PAGES (SERVICES & FORMS)
   ========================================= */
.detailed-card h3 { color: var(--color-secondary); font-size: 22px; font-weight: 800; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--color-light); text-transform: uppercase; }
.detailed-card li { position: relative; padding-left: 24px; margin-bottom: 12px; font-size: 14.5px; color: var(--color-text-muted); line-height: 1.6; }
.detailed-card li::before { content: '→'; position: absolute; left: 0; color: var(--color-primary); font-weight: 900; }
.single-service-container { max-width: 1000px; margin: -40px auto 40px auto; background-color: var(--color-white); padding: clamp(24px, 5vw, 48px); border-radius: var(--radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); position: relative; z-index: 10; }
.single-service-title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: var(--color-dark); margin-bottom: 32px; padding-bottom: 24px; border-bottom: 2px dashed var(--color-border); text-transform: uppercase; }
.single-service-content h4 { font-size: 16px; font-weight: 800; color: var(--color-secondary); margin: 32px 0 16px 0; text-transform: uppercase; }
.single-service-content li { list-style: none; position: relative; padding-left: 24px; margin-bottom: 16px; font-size: 15.5px; color: var(--color-text-muted); line-height: 1.7; }
.single-service-content li::before { content: '•'; position: absolute; left: 0; top: -2px; color: var(--color-primary); font-weight: 900; font-size: 20px; }

.application-form { background-color: var(--color-light); border: 1px solid var(--color-border); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); }
.form-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.form-group.full-width { grid-column: 1 / -1; }
.form-label { font-size: 14px; font-weight: 700; color: var(--color-dark); }
.form-textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; transition: border-color 0.3s, box-shadow 0.3s; background-color: var(--color-light); color: var(--color-dark); outline: none; resize: vertical; min-height: 120px;}
.form-textarea:focus { border-color: var(--color-primary); background-color: var(--color-white); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15); }
.contact-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); margin-bottom: 40px; }
.map-container iframe { width: 100%; height: 100%; min-height: 400px; border: 0; display: block; }

/* =========================================
   7. 3D FLIP CARDS & CORE TEAM
   ========================================= */
.experts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 40px; }
.expert-card-wrapper { background-color: transparent; perspective: 1000px; width: 100%; height: 420px; }
.expert-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d; }
.expert-card-inner.flipped { transform: rotateY(180deg); }
.expert-card-front, .expert-card-back { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: var(--radius-lg); border: 1px solid var(--color-border); background-color: var(--color-white); padding: 32px 24px; display: flex; flex-direction: column; align-items: center; box-shadow: var(--shadow-sm); }
.expert-card-front { transform: rotateY(0deg); }
.expert-avatar-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid var(--color-white); box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1); margin: 0 auto 20px auto; background-color: var(--color-info-bg); }
.expert-card-back { transform: rotateY(180deg); justify-content: flex-start; overflow: hidden; }
.expert-card-back::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(to right, var(--color-secondary), var(--color-primary)); }
.expert-card-back .value-card-desc { font-size: 14.5px; line-height: 1.6; margin-bottom: 24px; color: var(--color-text-muted); text-align: left; padding-top: 10px; }
.btn-card { background-color: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); border-radius: 9999px; padding: 8px 24px; font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s ease; margin-top: auto; }
.btn-card:hover { background-color: var(--color-primary); color: var(--color-white); transform: translateY(-2px); box-shadow: 0 8px 16px rgba(4, 120, 87, 0.25); }
.btn-card-back { color: var(--color-text-muted); border-color: var(--color-border); }
.btn-card-back:hover { background-color: var(--color-text-muted); border-color: var(--color-text-muted); color: var(--color-white); }

/* =========================================
   8. COMPLIANCE ENGINE UI
   ========================================= */
.compliance-page-wrapper { padding: clamp(20px, 4vw, 40px) 16px; background-color: var(--color-light); min-height: calc(100vh - 150px); }
.engine-card { max-width: 1200px; margin: 0 auto; background: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-md); border: 1px solid var(--color-border); overflow: hidden; }
.engine-header { background: linear-gradient(135deg, var(--color-secondary), var(--color-primary)); color: #ffffff; padding: clamp(20px, 4vw, 24px) clamp(16px, 5vw, 30px); }
.engine-header h1 { font-size: clamp(1.2rem, 4vw, 1.45rem); font-weight: 800; margin-bottom: 6px; }
.engine-header p { font-size: clamp(0.85rem, 3vw, 0.9rem); opacity: 0.9; }

.form-section { padding: clamp(16px, 4vw, 24px) clamp(16px, 5vw, 30px); background: var(--color-white); border-bottom: 1px solid var(--color-border); }
.engine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; align-items: end; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 700; color: var(--color-dark); }
.form-input, .form-select { width: 100%; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; background-color: var(--color-light); color: var(--color-dark); outline: none; transition: border-color 0.2s; }
.form-input:focus, .form-select:focus { border-color: var(--color-primary); background-color: var(--color-white); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15); }
.btn-calc { height: 42px; width: 100%; }

.table-container { padding: clamp(16px, 4vw, 20px) clamp(16px, 5vw, 30px); overflow-x: auto; }
.compliance-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.88rem; min-width: 750px; }
.compliance-table th { background: var(--color-light); color: var(--color-text-muted); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.5px; padding: 12px 14px; border-bottom: 2px solid var(--color-border); }
.compliance-table td { padding: 14px; border-bottom: 1px solid var(--color-border); vertical-align: top; color: var(--color-dark); }
.compliance-table tr:hover td { background-color: var(--color-info-bg); }

.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.89rem; font-weight: 700; white-space: nowrap; }
.badge-overdue { background: var(--badge-danger-bg); color: var(--badge-danger-text); }
.badge-active { background: var(--badge-success-bg); color: var(--badge-success-text); }
.badge-recurring { background: var(--badge-info-bg); color: var(--badge-info-text); }
.badge-annual { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.badge-inactive { background: var(--color-border); color: var(--color-text-muted); }

.law-code { display: inline-block; font-family: monospace; font-size: 0.78rem; background: var(--color-info-bg); padding: 2px 6px; border-radius: 4px; color: var(--color-text-muted); }
.deadline-text { font-weight: 700; margin-bottom: 4px; }
.penalty-text { font-size: 0.8rem; color: var(--color-text-muted); line-height: 1.4; }
.authority-link { color: var(--color-secondary); text-decoration: none; font-weight: 600; }
.authority-link:hover { text-decoration: underline; }

/* COMPLIANCE TABLE MOBILE */
@media (max-width: 768px) {
    .table-container { padding: 16px; overflow-x: hidden; }
    .compliance-table { min-width: 100%; border: none; }
    .compliance-table thead { display: none; }
    .compliance-table, .compliance-table tbody, .compliance-table tr, .compliance-table td { display: block; width: 100%; }
    .compliance-table tr { margin-bottom: 20px; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px; background-color: var(--color-white); box-shadow: var(--shadow-sm); }
    .compliance-table td { padding: 12px 0; border-bottom: 1px solid var(--color-border); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; }
    .compliance-table td:last-child { border-bottom: none; padding-bottom: 0; }
    .compliance-table td:first-child { padding-top: 0; }
    .compliance-table td::before { font-size: 11px; color: var(--color-text-light); text-transform: uppercase; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 2px; }
    
    .compliance-table td:nth-child(1)::before { content: "Compliance / Form"; }
    .compliance-table td:nth-child(2)::before { content: "Authority"; }
    .compliance-table td:nth-child(3)::before { content: "Governing Section"; }
    .compliance-table td:nth-child(4)::before { content: "Computed Deadline & Status"; }
    .compliance-table td:nth-child(5)::before { content: "Statutory Default Penalty"; }
}

/* =========================================
   9. FOOTER
   ========================================= */
.footer { background-color: #020617; color: #f8fafc; padding: 48px 20px 8px; }
.footer-title { font-size: 15px; font-weight: 700; color: #ffffff; margin-bottom: 16px; text-transform: uppercase; display: flex; align-items: center; }
.footer-title::before { content: "||"; color: var(--color-primary); margin-right: 10px; font-weight: 900; }
.footer-link { color: #94a3b8; text-decoration: none; font-size: 14.5px; display: block; width: fit-content; margin-bottom: 12px; transition: color 0.3s, transform 0.3s; }
.footer-link:hover { color: var(--color-primary); transform: translateX(5px); }
.footer-link.contact-info { display: flex !important; align-items: flex-start !important; gap: 12px !important; }
.footer-link.contact-info svg { width: 18px !important; height: 18px !important; fill: var(--color-primary); flex-shrink: 0 !important; margin-top: 2px; }
.footer-link.contact-info span { display: block !important; line-height: 1.5 !important; }

/* New Legal Bar Styling */
.footer-bottom-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; max-width: 1280px; margin: 40px auto 0; padding: 20px 20px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.footer-legal a { color: #94a3b8; text-decoration: none; font-size: 13px; transition: color 0.3s; }
.footer-legal a:hover { color: var(--color-primary); }
.footer-copyright { font-size: 13px; color: #94a3b8; }
.admin-trigger-link { color: inherit; text-decoration: none; cursor: pointer; }

/* =========================================
   10. RESTORED CUSTOM HOVER EFFECTS & UTILITIES
   ========================================= */
.experts-grid > * {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.experts-grid > *:hover {
    transform: translateY(-8px);
    box-shadow: 0px 20px 40px -10px rgba(30, 58, 138, 0.3);
}

.expert-card { 
    text-align: center; 
    padding: clamp(24px, 4vw, 40px) 20px; 
    background-color: var(--color-light); 
    border-radius: var(--radius-lg); 
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expert-card:hover {
    transform: translateY(-6px);
    box-shadow: 0px 15px 30px -10px rgba(4, 120, 87, 0.25);
}

.expert-avatar { 
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary)); 
    margin: 0 auto 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    font-size: 32px; 
    font-weight: bold; 
}

.value-card, .service-card, .detailed-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1); border-radius: var(--radius-lg); border: 1px solid var(--color-border); background-color: var(--color-white); padding: clamp(24px, 4vw, 32px); box-shadow: var(--shadow-sm);
}

.value-card:hover, .service-card:hover, .detailed-card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0px 15px 30px -8px rgba(4, 120, 87, 0.3); 
}

.section-title, .section-tag {
    transition: text-shadow 0.3s ease, transform 0.3s ease;
}

.section-title:hover {
    text-shadow: 3px 6px 15px rgba(4, 120, 87, 0.4);
}

.section-tag:hover {
    text-shadow: 2px 4px 10px rgba(4, 120, 87, 0.5);
    transform: translateY(-1px);
}

/* =========================================
   11. CONTACT PAGE & LOCATIONS TAB SYSTEM
   ========================================= */
.main-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.contact-cards-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-map-col {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 350px;
    box-shadow: var(--shadow-sm);
}

.main-iframe-map {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 900px) {
    .main-contact-grid {
        grid-template-columns: 1fr;
    }
}

.location-tabs {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--color-border);
}

.loc-tab-btn {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 700;
    padding: 14px 32px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.loc-tab-btn:hover {
    color: var(--color-secondary);
}

.loc-tab-btn.active {
    background-color: var(--color-dark);
    color: var(--color-white);
}

.loc-tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
    max-width: 400px;
    margin: 0 auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loc-card {
    background: var(--color-white);
    border: 3px solid var(--color-border);
    padding: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}
.loc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 12px 24px -8px rgba(4, 120, 87, 0.925);
}

.loc-icon-wrapper {
    color: var(--color-secondary);
    margin-top: -2px;
}

.loc-pin-svg {
    width: 24px;
    height: 24px;
}

.loc-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 16px;
}

.loc-address {
    font-size: 14.5px;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* =========================================
   12. AREAS OF PRACTICE (FACTUAL UI)
   ========================================= */
.practice-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.practice-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.practice-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 16px;
}

.practice-num {
    font-family: monospace;
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 700;
    background: var(--color-info-bg);
    padding: 4px 8px;
    border-radius: 4px;
}

.practice-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.practice-desc {
    font-size: 14.5px;
    color: var(--color-text-muted);
    line-height: 1.65;
    margin: 0;
}
/* =========================================
   14. EXECUTIVE BIO MODAL
   ========================================= */
.bio-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.bio-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.bio-modal-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.bio-modal-overlay.active .bio-modal-card {
    transform: translateY(0);
}

.bio-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--color-text-muted);
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.bio-close-btn:hover {
    color: var(--color-dark);
}

.bio-modal-left {
    flex: 0 0 300px;
    background: var(--color-light);
    border-right: 1px solid var(--color-border);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bio-modal-left img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-white);
    box-shadow: var(--shadow-sm);
}

.bio-modal-right {
    padding: 40px 32px;
    overflow-y: auto;
    flex: 1;
}

.bio-paragraph {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.bio-paragraph:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .bio-modal-card {
        flex-direction: column;
    }
    .bio-modal-left {
        flex: none;
        padding: 24px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
    .bio-modal-left img {
        width: 120px;
        height: 120px;
    }
    .bio-modal-right {
        padding: 24px;
    }
}

#audit-cert {
    flex: 1; 
    display: flex;
    flex-direction: column;
    margin-left: center;
    margin-right: center;
    margin-top: 20px;
    margin-bottom: 50px;
}
#tax-compliance {
    flex: 1; 
    display: flex;
    flex-direction: column;
    margin-left: center;
    margin-right: center;
    margin-top: 20px;
    margin-bottom: 50px;
}
.footer-divider {
    border: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 30px 0 20px 0;
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    padding-bottom: 4px;
}

.legal-links {
    display: flex;
    gap: 20px;
}

.copyright-text, .legal-links a {
    font-size: 0.85rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7); 
    transition: color 0.3s ease;
}

.hidden-admin-year {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: text-decoration 0.2s ease, color 0.2s ease;
}

.hidden-admin-year:hover {
    text-decoration: underline !important;
    color: #ffffff !important;
}

.legal-links a:hover {
    color: #ffffff; 
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}


/* ==========================================================================
   4. EMIL KOWALSKI CRAFT & APPLE-TIER ANIMATION ENGINE
   ========================================================================== */
:root {
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.15);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-apple: cubic-bezier(0.32, 0.72, 0, 1);
    --trans-fast: 160ms var(--ease-out);
    --trans-normal: 220ms var(--ease-out);
    --trans-spring: 320ms var(--ease-spring);
    --macos-traffic-close: #ff5f56;
    --macos-traffic-min: #ffbd2e;
    --macos-traffic-max: #27c93f;
    --admin-surface: #ffffff;
    --admin-sidebar: #f8fafc;
    --admin-border: #e2e8f0;
    --admin-text-main: #0f172a;
    --admin-text-muted: #64748b;
}

[data-theme="dark"] {
    --admin-surface: #0f172a;
    --admin-sidebar: #090d16;
    --admin-border: #1e293b;
    --admin-text-main: #f8fafc;
    --admin-text-muted: #94a3b8;
}

/* Button & Clickable Press Feedback (Subtle scale 0.97 - never scale 0) */
button:active, .btn:active, .action-btn:active, .nav-item:active {
    transform: scale(0.97) !important;
    transition: transform var(--trans-fast) !important;
}

/* Practice Card Elevation & Fluid Physics */
.practice-card {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    padding: var(--spacing-xl);
    transition: transform var(--trans-normal), border-color var(--trans-normal), box-shadow var(--trans-normal);
    cursor: default;
    will-change: transform, box-shadow;
}

.practice-card:hover {
    transform: translateY(-3px) scale(1.004);
    border-color: rgba(4, 120, 87, 0.35);
    box-shadow: 0 12px 30px -10px rgba(15, 23, 42, 0.08);
}

.practice-card .practice-header {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.practice-card .practice-num {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--color-primary);
    background: var(--color-success-bg);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}

.practice-card .practice-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.3;
}

.practice-card .practice-desc {
    font-size: 14.5px;
    color: var(--color-text-muted);
    line-height: 1.65;
}

/* DOM Hydration Transitions */
.cms-hydrating {
    opacity: 0.6;
    filter: blur(1px);
    transition: opacity 180ms ease, filter 180ms ease;
}

.cms-hydrated {
    opacity: 1;
    filter: blur(0);
    animation: emilHydrateIn 240ms var(--ease-out) forwards;
}

@keyframes emilHydrateIn {
    0% {
        opacity: 0;
        transform: scale(0.985);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Origin-Aware Modals & Dialogs (Centred, scale(0.96) to scale(1)) */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--trans-normal);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.25);
    transform: scale(0.96) translateY(8px);
    transform-origin: center;
    transition: transform var(--trans-normal), opacity var(--trans-normal);
}

.modal-overlay.open .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--admin-border);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-text-main);
    letter-spacing: -0.2px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--admin-text-muted);
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background var(--trans-fast), color var(--trans-fast);
}

.modal-close-btn:hover {
    background: rgba(100, 116, 139, 0.12);
    color: var(--admin-text-main);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--admin-border);
    background: rgba(248, 250, 252, 0.5);
}

/* Stacked Apple-tier Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--admin-surface);
    color: var(--admin-text-main);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transform: scale(0.95) translateY(12px);
    opacity: 0;
    filter: blur(2px);
    transition: transform 220ms var(--ease-apple), opacity 220ms var(--ease-apple), filter 220ms var(--ease-apple);
}

.toast-item.visible {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0);
}

.toast-item.exit {
    transform: scale(0.95) translateY(8px);
    opacity: 0;
    filter: blur(2px);
}

.toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--color-primary); }
.toast-error .toast-icon { color: #dc2626; }
.toast-info .toast-icon { color: var(--color-secondary); }

/* ==========================================================================
   5. TASTE-SKILL ANTI-SLOP NATIVE MACOS ADMIN PORTAL
   ========================================================================== */
.macos-window-shell {
    min-height: 100vh;
    background: #f1f5f9;
    color: var(--admin-text-main);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

.macos-titlebar {
    height: 48px;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    -webkit-user-select: none;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

.macos-traffic-lights {
    display: flex;
    align-items: center;
    gap: 8px;
}

.macos-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot-close { background: var(--macos-traffic-close); }
.dot-min { background: var(--macos-traffic-min); }
.dot-max { background: var(--macos-traffic-max); }

.macos-titlebar-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.1px;
}

.macos-titlebar-title .pill-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--color-success-bg);
    color: var(--color-primary);
    padding: 2px 7px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.macos-titlebar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.macos-layout-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar: Neutral, quiet, recedes into background */
.macos-sidebar {
    width: 250px;
    background: var(--admin-sidebar);
    border-right: 1px solid var(--admin-border);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--admin-text-muted);
    padding: 8px 12px;
    margin-top: 12px;
}

.sidebar-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--admin-text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--trans-fast), color var(--trans-fast);
}

.sidebar-nav-item:hover {
    background: rgba(148, 163, 184, 0.12);
    color: var(--admin-text-main);
}

.sidebar-nav-item.active {
    background: rgba(15, 23, 42, 0.08);
    color: var(--admin-text-main);
    font-weight: 600;
}

[data-theme="dark"] .sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.sidebar-nav-item svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.8px;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--admin-border);
}

/* Admin Main Canvas */
.macos-main-canvas {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
    background: var(--color-white);
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.admin-header-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--admin-text-main);
    line-height: 1.2;
}

.admin-header-sub {
    font-size: 14px;
    color: var(--admin-text-muted);
    margin-top: 4px;
}

/* Anti-Slop KPIs: Type, not tiles. No rainbow icons in tinted circles */
.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.metric-panel {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    padding: 18px 22px;
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--admin-text-muted);
    margin-bottom: 6px;
}

.metric-number {
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--admin-text-main);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.metric-caption {
    font-size: 12px;
    color: var(--admin-text-muted);
    margin-top: 6px;
}

/* Tabular Grids: Rules and alignment, no zebra striping */
.admin-table-container {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 32px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.admin-table th {
    padding: 12px 18px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--admin-text-muted);
    background: rgba(248, 250, 252, 0.7);
    border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text-main);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(241, 245, 249, 0.4);
}

.table-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--color-info-bg);
    color: var(--color-secondary);
}

.table-tag.tag-active {
    background: var(--color-success-bg);
    color: var(--color-primary);
}

.table-tag.tag-inactive {
    background: #fee2e2;
    color: #dc2626;
}

/* Subtle Action Buttons */
.btn-macos {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background var(--trans-fast), border-color var(--trans-fast), color var(--trans-fast);
}

.btn-macos:hover {
    background: rgba(241, 245, 249, 0.8);
    border-color: #cbd5e1;
}

.btn-macos-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.btn-macos-primary:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.btn-macos-danger {
    background: transparent;
    border-color: #fca5a5;
    color: #b91c1c;
    font-weight: 600;
}

.btn-macos-danger:hover {
    background: #fee2e2;
    color: #991b1b;
}

/* Admin Form Controls */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--admin-text-main);
    margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 9px 12px;
    font-size: 13.5px;
    font-family: inherit;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-sm);
    background: var(--admin-surface);
    color: var(--admin-text-main);
    outline: none;
    transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.form-hint {
    font-size: 11.5px;
    color: var(--admin-text-muted);
    margin-top: 4px;
}


/* =========================================
   17. HOMEPAGE HERO & PRACTICE LEDGER ENHANCEMENTS (Zero-Inline-Styles)
   ========================================= */
.text-left {
    text-align: left !important;
}

.hero-left .section-tag {
    text-align: left;
}

/* Hero Right: Practice Checklist */
.practice-checklist {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.practice-check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--color-secondary);
}

.practice-check-link {
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--color-success-bg);
    min-height: 36px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.practice-check-link:hover {
    background: var(--color-primary);
    color: #ffffff;
    transform: translateX(2px);
}

/* Areas of Professional Practice Ledger Section */
.practice-areas-section {
    background-color: var(--color-white);
    padding: 80px 24px;
    border-top: 1px solid var(--color-border);
}

.practice-ledger-container {
    max-width: 850px;
    padding: 0;
}

.practice-ledger-header {
    margin-bottom: 40px;
}

.practice-ledger-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.practice-ledger-subtitle {
    font-size: 14.5px;
    color: var(--color-text-muted);
    margin-top: 8px;
}

.practice-ledger-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Admin Portal Login Styles */
.btn-login-submit {
    width: 100%;
    height: 42px;
    margin-top: 10px;
}

.login-footer-nav {
    text-align: center;
    margin-top: 24px;
}

.login-back-link {
    font-size: 13px;
    color: var(--color-text-muted);
    text-decoration: none;
}

.login-back-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ==========================================================================
   18. MACOS ADMIN DASHBOARD & SITE-WIDE COMPREHENSIVE DARK THEME SYSTEM
   ========================================================================== */
[data-theme="dark"] .macos-window-shell {
    background: #090d16 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .macos-titlebar {
    background: rgba(15, 23, 42, 0.94) !important;
    border-bottom: 1px solid #1e293b !important;
}

[data-theme="dark"] .macos-titlebar-title {
    color: #f8fafc !important;
}

[data-theme="dark"] .macos-titlebar-title span {
    color: #f8fafc;
}

[data-theme="dark"] .macos-titlebar-title .pill-badge {
    background: rgba(52, 211, 153, 0.2) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .macos-sidebar {
    background: #090d16 !important;
    border-right: 1px solid #1e293b !important;
}

[data-theme="dark"] .macos-main-canvas {
    background: #0f172a !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .metric-panel,
[data-theme="dark"] .admin-table-container,
[data-theme="dark"] .media-card,
[data-theme="dark"] .modal-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .admin-table th {
    background: rgba(30, 41, 59, 0.75) !important;
    color: #94a3b8 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .admin-table td {
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .admin-table tr:hover td {
    background: rgba(30, 41, 59, 0.35) !important;
}

[data-theme="dark"] .btn-macos {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .btn-macos:hover {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-macos-primary {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-macos-primary:hover {
    background: #10b981 !important;
    border-color: #10b981 !important;
}

[data-theme="dark"] .btn-macos-danger {
    background: transparent !important;
    border-color: #7f1d1d !important;
    color: #f87171 !important;
}

[data-theme="dark"] .btn-macos-danger:hover {
    background: rgba(127, 29, 29, 0.35) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #1e293b !important;
}

[data-theme="dark"] .modal-footer {
    background: rgba(15, 23, 42, 0.85) !important;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select {
    background: #090d16 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus,
[data-theme="dark"] .form-select:focus {
    border-color: #34d399 !important;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2) !important;
}

[data-theme="dark"] .media-thumb-box {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .empty-placeholder {
    background: rgba(15, 23, 42, 0.4) !important;
    border-color: #1e293b !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] select.form-select option {
    background: #0f172a !important;
    color: #f8fafc !important;
}


/* Footer Admin Link */
.footer-admin-link {
    color: var(--color-primary) !important;
    font-weight: 600;
}
.footer-admin-link:hover {
    color: #34d399 !important;
    text-decoration: underline;
}

/* Careers & Accessible Form Utilities */
.required-star { color: #dc2626; font-weight: 700; margin-left: 2px; }
.careers-apply-heading { margin-bottom: 16px; }
.careers-submit-wrap { align-items: center; margin-top: 16px; display: flex; justify-content: center; }
.careers-submit-btn { min-width: 200px; }
.resume-hint { font-size: 12px; color: var(--color-text-light); font-weight: 500; }


/* Admin Profile & Team CMS Utilities */
.panel-header-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.team-avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; }
.table-action-cell { display: flex; gap: 8px; align-items: center; }
.btn-delete-subtle { background: #fee2e2; color: #dc2626; border: none; font-weight: 600; cursor: pointer; border-radius: 6px; padding: 4px 8px; }
.btn-delete-subtle:hover { background: #fecaca; }
.photo-upload-label { font-size: 11px; cursor: pointer; margin: 0; display: inline-flex; align-items: center; gap: 4px; }

/* ============================================================
   18. IN-CONTEXT LIVE WEBPAGE EDITOR & UNIVERSAL UNDO
   ============================================================ */

/* Hover state for editable targets when Admin Live Editor is active */
.csh-editable-target {
    position: relative;
    cursor: pointer;
    transition: outline 0.15s ease, background-color 0.15s ease;
}

.csh-editable-target:hover {
    outline: 1.5px dashed var(--color-primary, #047857) !important;
    outline-offset: 3px;
    border-radius: 4px;
    background-color: rgba(4, 120, 87, 0.05);
}

.csh-editable-target:hover::after {
    content: "✎ Double-click to edit";
    position: absolute;
    top: -24px;
    left: 0;
    background: #0f172a;
    color: #f8fafc;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Active Inline Editing state (like a PDF / Canva) */
.csh-editing-active {
    outline: 2px solid var(--color-primary, #047857) !important;
    outline-offset: 4px;
    border-radius: 4px;
    background-color: rgba(4, 120, 87, 0.08) !important;
    cursor: text !important;
}

/* Floating Mini Toolbar anchored to the active element */
.csh-live-toolbar {
    position: absolute;
    z-index: 100000;
    background: #0f172a;
    color: #f8fafc;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11.5px;
    animation: cshToolbarPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cshToolbarPop {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.csh-toolbar-select {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}

.csh-toolbar-btn-save {
    background: #047857;
    color: #ffffff;
    border: none;
    padding: 5px 11px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.15s ease;
}

.csh-toolbar-btn-save:hover {
    background: #059669;
}

.csh-toolbar-btn-cancel {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.csh-toolbar-btn-cancel:hover {
    background: #1e293b;
    color: #f8fafc;
}

/* Floating Bottom-Right Dock Pill */
.csh-live-dock {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #f8fafc;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
}

.csh-dock-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #e2e8f0;
}

.csh-dock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.csh-dock-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.csh-dock-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.csh-dock-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.csh-dock-link {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
}

.csh-dock-link:hover {
    background: rgba(52, 211, 153, 0.15);
}

.csh-dock-btn-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}
.csh-dock-btn-danger:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    color: #ffffff !important;
}
.csh-dock-btn-activate {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #6ee7b7 !important;
}
.csh-dock-btn-activate:hover {
    background: rgba(16, 185, 129, 0.28) !important;
    color: #ffffff !important;
}
.csh-live-dock-minimized {
    padding: 4px 10px;
    gap: 8px;
}

/* ==========================================================================
   PRODUCTION ENHANCEMENTS: PRE-LAUNCH SUITE
   ========================================================================== */

/* 1. Glassmorphism Sticky Header on Scroll */
header.header {
    transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.3s, box-shadow 0.3s, border-color 0.3s;
}
header.header.header-scrolled {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] header.header.header-scrolled {
    background: rgba(15, 23, 42, 0.88) !important;
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* 2. Floating WhatsApp Contact Button */
.csh-whatsapp-btn {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4);
    z-index: 990;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
    text-decoration: none;
}
.csh-whatsapp-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
    color: #ffffff;
}
.csh-whatsapp-btn svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}
.csh-whatsapp-tooltip {
    position: absolute;
    right: 64px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px);
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.csh-whatsapp-btn:hover .csh-whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* 3. Fluid Back to Top Scroll Button */
.csh-back-to-top {
    position: fixed;
    bottom: 154px;
    right: 27px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-dark);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 989;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s, background-color 0.2s, color 0.2s;
}
.csh-back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.csh-back-to-top:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.csh-back-to-top svg {
    width: 20px;
    height: 20px;
}

/* 4. Lightweight Cookie Consent Banner */
.csh-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    max-width: 400px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--color-text-main);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s;
}
.csh-cookie-banner.visible {
    transform: translateY(0);
    opacity: 1;
}
.csh-cookie-banner p {
    margin: 0 0 12px 0;
    color: var(--color-text-muted);
    font-size: 13px;
}
.csh-cookie-banner a {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: 600;
}
.csh-cookie-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.csh-cookie-btn {
    font-size: 13px;
    font-weight: 600;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--trans-fast), transform var(--trans-fast);
}
.csh-cookie-btn-accept {
    background: var(--color-primary);
    color: #ffffff;
}
.csh-cookie-btn-accept:hover {
    filter: brightness(1.1);
}
.csh-cookie-btn-essential {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
.csh-cookie-btn-essential:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* 5. Contact Form Status States */
.contact-form.submitting button[type="submit"] {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}
.contact-form.success {
    border-color: #10b981 !important;
}
.contact-form.error {
    border-color: #ef4444 !important;
}
.form-feedback-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 14px;
    font-size: 13.5px;
    display: none;
    animation: emilHydrateIn 200ms ease-out;
}
.form-feedback-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.form-feedback-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 6. Print Stylesheet */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    header,
    footer,
    #header-placeholder,
    #footer-placeholder,
    .csh-whatsapp-btn,
    .csh-back-to-top,
    .csh-cookie-banner,
    #csh-live-dock,
    .theme-toggle,
    .hamburger,
    .hero-cta,
    .header-actions,
    .btn,
    .csh-dock-btn,
    form,
    #csh-toast-container {
        display: none !important;
    }

    body {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff !important;
        padding: 0;
        margin: 0;
    }

    main {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        font-family: 'Helvetica Neue', Arial, sans-serif;
        color: #000 !important;
        margin-top: 1.2em;
        margin-bottom: 0.5em;
    }

    h1 { font-size: 20pt; }
    h2 { font-size: 16pt; border-bottom: 1pt solid #ccc; padding-bottom: 4pt; }
    h3 { font-size: 13pt; }

    p, ul, ol {
        orphans: 3;
        widows: 3;
    }

    table {
        border-collapse: collapse !important;
        width: 100% !important;
        margin-bottom: 1em;
    }

    table, th, td {
        border: 1pt solid #ddd !important;
        padding: 6pt 8pt !important;
    }

    th {
        font-weight: bold;
        background: #f4f4f4 !important;
    }

    a {
        text-decoration: underline;
        color: #000 !important;
    }

    .service-card, .expert-card, .section-container {
        page-break-inside: avoid;
        border: 1pt solid #eee !important;
        margin-bottom: 12pt !important;
        padding: 10pt !important;
    }
}

/* 7. Mobile Navigation Smooth Transitions */
@media (max-width: 1024px) {
    .nav-section {
        display: flex !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
        z-index: 1000;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    }
    .nav-section.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
    .nav-link {
        padding: 10px 0;
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Media Storage Folder Tabs - Apple Segmented Bar */
.folder-tabs-bar {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
[data-theme="dark"] .folder-tabs-bar {
    background: #0f172a;
    border-color: #1e293b;
}
.folder-pill {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 7px;
    background: transparent;
    color: #475569;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.folder-pill:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .folder-pill {
    color: #94a3b8;
}
[data-theme="dark"] .folder-pill:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}
.folder-pill.active {
    background: #ffffff;
    color: #047857;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .folder-pill.active {
    background: #1e293b;
    color: #10b981;
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.folder-pill .pill-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    font-feature-settings: "tnum";
}
.folder-pill.active .pill-count {
    background: #ecfdf5;
    color: #047857;
}
[data-theme="dark"] .folder-pill .pill-count {
    background: #334155;
    color: #94a3b8;
}
[data-theme="dark"] .folder-pill.active .pill-count {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}
.folder-badge-tag {
    display: inline-block;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}


/* ==========================================================================
   6. EXECUTIVE ADMIN PORTAL MOBILE & TABLET RESPONSIVE ENGINE
   ========================================================================== */
@media (max-width: 860px) {
  /* Prevent horizontal scrollbars from clipping layout */
  html, body.macos-window-shell {
    overflow-x: hidden;
    width: 100%;
    min-height: 100dvh;
    -webkit-text-size-adjust: 100%;
  }

  /* Titlebar: Clean compact mobile header */
  .macos-titlebar {
    height: 54px;
    padding: 0 12px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 500;
  }

  .macos-traffic-lights {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text-main);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--trans-fast), transform var(--trans-fast);
  }

  .mobile-menu-toggle:active {
    transform: scale(0.94);
  }

  .macos-titlebar-title {
    font-size: 13.5px;
    gap: 6px;
    flex: 1;
    min-width: 0;
  }

  .macos-titlebar-title span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .macos-titlebar-actions {
    gap: 6px;
  }

  /* Hide verbose desktop buttons on mobile header */
  .macos-titlebar-actions .btn-macos:not(#theme-btn):not(.btn-macos-danger) {
    display: none !important;
  }

  .macos-titlebar-actions #theme-btn {
    padding: 6px 10px;
    font-size: 14px;
    min-height: 36px;
  }

  .macos-titlebar-actions .btn-macos-danger {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 36px;
  }

  /* Slide-Over Drawer for Sidebar Navigation */
  .macos-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 84vw !important;
    height: 100dvh !important;
    z-index: 10000 !important;
    background: var(--admin-sidebar) !important;
    border-right: 1px solid var(--admin-border) !important;
    padding: 20px 14px calc(24px + env(safe-area-inset-bottom)) 14px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .macos-sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.25) !important;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--admin-border);
  }

  .sidebar-mobile-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background: transparent;
    color: var(--admin-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
  }

  .sidebar-nav-item {
    padding: 12px 14px !important;
    font-size: 14px !important;
    border-radius: var(--radius-md) !important;
    min-height: 44px !important;
  }

  .sidebar-mobile-actions {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border);
  }

  .sidebar-mobile-actions .btn-macos {
    width: 100% !important;
    justify-content: center !important;
    min-height: 40px !important;
    font-size: 13px !important;
  }

  /* Main Workspace Canvas */
  .macos-main-canvas {
    padding: 14px 14px 44px 14px !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Mobile Horizontal Tab Quick-Scroller */
  .mobile-tab-scroller {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 12px 2px;
    margin-bottom: 16px;
    scrollbar-width: none;
    border-bottom: 1px solid var(--admin-border);
  }

  .mobile-tab-scroller::-webkit-scrollbar {
    display: none;
  }

  .mobile-tab-pill {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-tab-pill:active {
    transform: scale(0.96);
  }

  .mobile-tab-pill.active {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 2px 8px rgba(4, 120, 87, 0.28) !important;
  }

  /* Page Header */
  .admin-page-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
  }

  .admin-header-title {
    font-size: 20px !important;
    letter-spacing: -0.3px;
  }

  .admin-header-sub {
    font-size: 13px !important;
    line-height: 1.4;
  }

  .admin-page-header button {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
    font-size: 13.5px !important;
  }

  /* Anti-Slop KPI Metrics Grid */
  .admin-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 22px !important;
  }

  .metric-panel {
    padding: 14px 12px !important;
    border-radius: 12px !important;
  }

  .metric-value {
    font-size: 22px !important;
    font-weight: 700;
  }

  .metric-label {
    font-size: 11px !important;
  }

  /* Search & Filter Controls */
  .search-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .filter-controls {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .filter-controls select,
  .filter-controls input,
  .search-filter-bar input {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 15px !important;
  }

  /* Tables: Fluid Horizontal Scroll with smooth touch */
  .admin-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    border: 1px solid var(--admin-border) !important;
  }

  .admin-table {
    min-width: 560px !important;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }

  /* Table Action Buttons for easy touch */
  .admin-table td .btn-macos,
  .admin-table td .table-action-btn,
  .admin-table td button {
    min-height: 36px !important;
    padding: 6px 11px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }

  /* Media Grid */
  .media-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
  }

  .media-thumb-box {
    height: 110px !important;
    padding: 8px !important;
  }

  .media-card-body {
    padding: 10px !important;
  }

  .media-file-name {
    font-size: 12px !important;
  }

  .media-meta {
    font-size: 10.5px !important;
    margin: 3px 0 8px 0 !important;
  }

  /* Modals: Mobile Bottom Sheet Experience */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88dvh !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    animation: mobileSheetUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes mobileSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-header {
    padding: 16px 20px !important;
    border-bottom: 1px solid var(--admin-border) !important;
    flex-shrink: 0;
  }

  .modal-title {
    font-size: 15.5px !important;
  }

  .modal-body {
    padding: 18px 16px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1;
  }

  .modal-footer {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom)) 16px !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
    border-top: 1px solid var(--admin-border) !important;
    flex-shrink: 0;
  }

  .modal-footer button {
    width: 100% !important;
    min-height: 46px !important;
    font-size: 14.5px !important;
    justify-content: center !important;
    border-radius: 10px !important;
  }

  /* Form Elements */
  .form-input,
  .form-textarea,
  .form-select {
    font-size: 16px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
  }
}

@media (min-width: 861px) {
  .mobile-menu-toggle {
    display: none !important;
  }
  .sidebar-backdrop {
    display: none !important;
  }
  .sidebar-mobile-header {
    display: none !important;
  }
  .sidebar-mobile-actions {
    display: none !important;
  }
  .mobile-tab-scroller {
    display: none !important;
  }
}
