/* =====================================================
   DIGITAL PRACTICE - High-Impact Design System
   Inspired by Heirs Technologies (Sophisticated, Modern, Bold)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Precision Palette */
    --color-primary: #06132D;
    /* Deeper Brand Navy */
    --color-accent: #1EB0BA;
    /* Intelligence Teal */
    --color-accent-soft: rgba(30, 176, 186, 0.1);

    /* Clean Neutrals */
    --color-white: #FFFFFF;
    --color-off-white: #F8FAFC;
    --color-gray-50: #F1F5F9;
    --color-gray-100: #E2E8F0;
    --color-gray-200: #CBD5E1;
    --color-gray-400: #64748B;
    --color-gray-600: #334155;
    --color-gray-800: #1E293B;
    --color-dark: #000000;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Borders */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --header-height: 90px;
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;

    /* Shadows */
    --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-float: 0 20px 50px -12px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.4s var(--ease-out-expo);
}

/* --- Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-gray-800);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Custom Cursor --- */
.custom-cursor {
    position: fixed;
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
    mix-blend-mode: difference;
}

.custom-cursor-follower {
    position: fixed;
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    /* Hidden initially to prevent obstruction */
    transition: opacity 0.3s;
}

.custom-cursor.active,
.custom-cursor-follower.active {
    opacity: 1;
}

.cursor-hover {
    width: 64px;
    height: 64px;
    background-color: rgba(0, 91, 234, 0.15);
    border-color: transparent;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.section {
    padding: var(--space-xl) 0;
}

.text-center {
    text-align: center;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.1;
    color: var(--color-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 2.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-dark);
    transform: translateY(-3px);
}

.btn-outline {
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* --- Header (Clean Professional Rebuild) --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: stretch;
    transition: all 0.5s var(--ease-out-expo);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    padding: 0;
    margin: 0;
}

/* Homepage hero: transparent header */
.home-page .site-header {
    background: transparent;
}

/* Scrolled state: split background — brand color left, white right */
.site-header.scrolled {
    background: linear-gradient(to right, var(--color-accent) 280px, var(--color-white) 280px) !important;
    height: 80px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--color-gray-100);
}

/* Subpages: always show split background */
body:not(.home-page) .site-header {
    background: linear-gradient(to right, var(--color-accent) 280px, var(--color-white) 280px);
    border-bottom: 1px solid var(--color-gray-100);
}

/* Logo always white on split backgrounds */
.site-header.scrolled .logo img,
body:not(.home-page) .site-header .logo img {
    filter: brightness(0) invert(1);
}

/* Nav links turn dark on white background */
.site-header.scrolled .nav-link,
body:not(.home-page) .site-header .nav-link {
    color: var(--color-primary);
}

/* Homepage hero: logo & links white */
.home-page .site-header:not(.scrolled) .logo img {
    filter: brightness(0) invert(1);
}

.home-page .site-header:not(.scrolled) .nav-link {
    color: var(--color-white);
}

.header-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.logo img {
    height: 44px;
    width: auto;
    transition: filter 0.3s ease;
}

/* --- Desktop Navigation --- */
.nav-menu {
    display: flex;
    align-items: stretch;
    gap: 0;
    height: 100%;
    background: transparent;
    /* NO background on nav — header gradient handles it */
    padding: 0 1rem;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-white);
    font-size: 1.5rem;
    padding: 0 1.5rem;
    align-items: center;
    justify-content: center;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 1.4rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
    border-radius: 0;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    background-color: var(--color-accent);
    color: var(--color-white) !important;
}

/* --- Mega Menu Dropdown --- */
.dropdown-container {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 100%;
}

.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 320px;
    background-color: var(--color-white);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.3s ease;
    z-index: 1100;
    border-top: 3px solid var(--color-accent);
}

.dropdown-container:hover {
    background-color: var(--color-accent);
}

.dropdown-container:hover>.nav-link {
    color: var(--color-white) !important;
}

.dropdown-container:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-list {
    list-style: none;
    padding: 0.75rem 0;
}

.mega-list li {
    padding: 0;
}

.dropdown-container .mega-list a {
    display: block;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-gray-800) !important;
    text-transform: none;
    letter-spacing: normal;
    background: transparent;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.dropdown-container .mega-list a:hover {
    background-color: var(--color-gray-50);
    color: var(--color-accent) !important;
    padding-left: 2.5rem;
    border-left-color: var(--color-accent);
}


/* --- New Hero (Heirs Inspired — Scattered Letters) --- */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 0;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Scattered decorative letter blocks — Exact Heirs Positioning */
.hero-letters-grid {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    user-select: none;
    overflow: hidden;
}

.hero-letter {
    position: absolute;
    font-family: var(--font-heading);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.28);
    /* Increased visibility — Premium Impact */
    line-height: 0.75;
    letter-spacing: -0.05em;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.1));
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
    transform: scale(0.8) translateY(20px);
}

.hero-letter.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.hero-letter.exiting {
    opacity: 0;
    transform: scale(1.2) translateY(-20px);
    filter: blur(10px);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding-top: var(--header-height);
    /* Ensure it clears the header */
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4.2rem);
    color: var(--color-white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.hero-morph-word {
    display: inline-block;
    color: var(--color-accent);
    position: relative;
    padding-bottom: 5px;
    border-bottom: 4px solid var(--color-accent);
    min-width: 250px;
    transition: all 0.5s var(--ease-out-expo);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3rem;
    max-width: 600px;
    font-weight: 400;
    animation: reveal-text 1.2s var(--ease-out-expo) 0.2s both;
}

.learn-more-link {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    animation: reveal-text 1.2s var(--ease-out-expo) 0.4s both;
}

.learn-more-link .arrow-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.learn-more-link:hover .arrow-circle {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateX(10px);
}

/* --- Animations --- */
@keyframes reveal-text {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flipIn {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateY(360deg) scale(0.8) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: perspective(1000px) rotateY(0deg) scale(1) translateY(0);
    }
}

/* --- Section Title Rebuild --- */
.section-header {
    margin-bottom: var(--space-lg);
    text-align: left;
}

.section-label {
    display: block;
    color: var(--color-accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.title-bold {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
}

/* --- Divisions Grid (Corporate Architectural Layout) --- */
.divisions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    /* Spacious breathing room for designed cards */
    margin-top: 4rem;
}

/* --- Service Cards (Premium Executive Design) --- */
.service-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-100);
    padding: 4rem 3.5rem;
    transition: all 0.5s var(--ease-out-expo);
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--color-gray-50);
    z-index: -1;
    transition: width 0.5s var(--ease-out-expo);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.08);
}

.service-card:hover::before {
    width: 100%;
}

/* Accent underline that expands on hover */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--color-accent);
    transition: width 0.5s var(--ease-out-expo);
}

.service-card:hover::after {
    width: 100%;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    transition: all 0.4s var(--ease-out-expo);
}

.service-card:hover .service-icon {
    background: var(--color-accent);
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.service-card p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--color-gray-500);
    flex-grow: 1;
}

/* --- CTA Banner --- */
.cta-banner {
    background-color: var(--color-primary);
    text-align: left;
    color: var(--color-white);
    padding: var(--space-xl) 0;
}

.cta-banner h2 {
    color: var(--color-white);
    font-size: 4rem;
}

/* --- Stats Grid --- */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

/* --- Mobile & Tablet --- */
@media (max-width: 1100px) {
    .divisions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile header: solid dark, NO split gradient */
    .site-header,
    body:not(.home-page) .site-header {
        background: var(--color-primary) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .site-header.scrolled {
        background: var(--color-white) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    /* Logo: white on dark header, original on scrolled */
    .site-header .logo img {
        filter: brightness(0) invert(1);
    }

    .site-header.scrolled .logo img {
        filter: none !important;
    }

    .header-inner {
        padding: 0 0 0 1rem !important;
    }

    .logo {
        flex-grow: 1;
    }

    /* Hamburger button */
    .menu-toggle {
        display: flex !important;
        width: 60px;
        height: 100%;
        background-color: var(--color-accent) !important;
        color: var(--color-white) !important;
        font-size: 1.4rem;
        border-radius: 0 !important;
        margin: 0 !important;
        z-index: 10;
    }

    .site-header.scrolled .menu-toggle {
        background-color: var(--color-accent) !important;
        color: var(--color-white) !important;
    }

    /* Mobile nav: hidden off-screen, slides in */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: auto;
        min-height: 50vh;
        max-height: calc(100vh - var(--header-height));
        background-color: var(--color-white) !important;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        transition: right 0.4s var(--ease-out-expo);
        overflow-y: auto;
        border-top: 3px solid var(--color-accent);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Mobile nav links */
    .dropdown-container {
        width: 100%;
        display: block;
        height: auto;
    }

    .dropdown-container:hover {
        background-color: transparent !important;
    }

    .nav-link {
        padding: 1.1rem 2rem !important;
        height: auto !important;
        border-bottom: 1px solid var(--color-gray-100);
        color: var(--color-primary) !important;
        justify-content: space-between;
        font-size: 0.85rem;
    }

    .nav-link:hover {
        background-color: var(--color-gray-50) !important;
        color: var(--color-accent) !important;
    }

    /* Mobile dropdown: static, hidden until .open */
    .mega-dropdown {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: var(--color-gray-50);
        border-top: none;
        border-left: 4px solid var(--color-accent);
        min-width: 100%;
    }

    .dropdown-container.open .mega-dropdown {
        display: block;
    }

    .dropdown-container .mega-list {
        padding: 0;
    }

    .dropdown-container .mega-list a {
        color: var(--color-gray-600) !important;
        padding: 0.9rem 1.5rem 0.9rem 2rem;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        border-left: none;
    }

    .dropdown-container .mega-list a:hover {
        background: var(--color-white) !important;
        color: var(--color-accent) !important;
        padding-left: 2.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .hero form {
        flex-direction: column;
        background: transparent !important;
        box-shadow: none !important;
        gap: 10px;
    }

    .hero form input {
        width: 100%;
        background: white;
        padding: 1rem 1.5rem !important;
    }

    .hero form button {
        width: 100%;
        padding: 1rem !important;
    }
}

/* --- Grid Systems --- */
.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 3rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* --- Custom Footer CSS --- */
.site-footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 6rem 0 2rem;
    border-top: 2px solid var(--color-accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
}

.footer-brand .logo img {
    height: 50px;
    width: auto;
}

.footer-brand .brand-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 90%;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.footer-social a:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--color-accent) !important;
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact-item i {
    color: var(--color-accent);
    margin-top: 5px;
}

.footer-contact-item span {
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 991px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero .container {
        padding: 0 1.5rem;
    }

    .learn-more-link {
        font-size: 1rem;
        gap: 1rem;
    }

    .learn-more-link .arrow-circle {
        width: 45px;
        height: 45px;
    }

    .page-header h1 {
        font-size: 2.5rem !important;
    }

    .page-header {
        padding: calc(var(--header-height) + 2rem) 0 3rem !important;
    }

    .title-bold {
        font-size: 2rem !important;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .site-footer {
        padding: 4rem 0 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

@media (max-width: 600px) {
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .divisions-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1.5rem;
    }
}

/* =========================================================================
   ADMIN PANEL - Elite Dynamic Design System
   Sharp, Architectural, High-Contrast Corporate Standard
   ========================================================================= */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-white);
}

/* Sidebar: Deep Precision Navy */
.admin-sidebar {
    width: 280px;
    background-color: var(--color-primary);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: transform 0.4s var(--ease-out-expo);
    z-index: 1000;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.05);
}

.admin-sidebar .logo {
    padding: 2.5rem 2rem !important;
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
    color: var(--color-white) !important;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 0 1.2rem;
}

.admin-nav a {
    color: rgba(255, 255, 255, 0.5);
    padding: 1rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s;
    border-radius: 0;
    margin-bottom: 4px;
    border-left: none !important;
}

.admin-nav a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: var(--color-white) !important;
    background-color: var(--color-accent) !important;
    padding-left: 2rem;
}

.admin-nav a.active i {
    opacity: 1;
}

.admin-main {
    flex-grow: 1;
    padding: 4rem;
    background-color: var(--color-off-white);
    overflow-x: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--color-gray-200);
    padding-bottom: 2.5rem;
}

.admin-header h1 {
    font-size: 2.8rem;
    letter-spacing: -0.04em;
    color: var(--color-primary);
    margin-bottom: 0;
}

/* Elite Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: var(--color-white);
    padding: 2.5rem;
    border: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-subtle);
    border-color: var(--color-accent);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: -2px;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--color-gray-400);
    letter-spacing: 1.5px;
}

/* Elite Admin Containers */
.admin-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    padding: 3rem;
    margin-bottom: 3rem;
}

.admin-table-container {
    overflow-x: auto;
    border: 1px solid var(--color-gray-200);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-white);
}

.admin-table th,
.admin-table td {
    padding: 1.5rem 2rem;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-100);
}

.admin-table th {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    background: var(--color-gray-50);
    font-weight: 800;
}

.admin-table tr:hover td {
    background-color: var(--color-off-white);
}

/* Feedback Systems: Elite Alerts */
.alert {
    padding: 1.5rem 2.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-left: 6px solid !important;
    border-radius: 0 !important;
}

.alert i {
    font-size: 1.2rem;
}

.alert-success {
    background-color: #ECFDF5 !important;
    color: #065F46 !important;
    border-color: #10B981 !important;
}

.alert-error {
    background-color: #FEF2F2 !important;
    color: #991B1B !important;
    border-color: #EF4444 !important;
}

/* Badges: Sharp & Subtle */
.badge {
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
    border-radius: 0 !important;
}

.badge-active {
    background: #DCFCE7 !important;
    color: #166534 !important;
}

.badge-inactive {
    background: #F3F4F6 !important;
    color: #374151 !important;
}

/* Forms: Elite Precision */
.form-group {
    margin-bottom: 2.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-gray-600);
}

.form-control {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 1px solid var(--color-gray-200);
    background: var(--color-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s;
    border-radius: 0;
    outline: none;
}

.form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-soft);
}

.action-btns {
    display: flex;
    gap: 0.8rem;
}

.edit-btn,
.delete-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-gray-200);
    transition: all 0.3s;
    background: transparent;
    color: var(--color-gray-400);
}

.edit-btn:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.delete-btn:hover {
    background: #EF4444;
    color: white;
    border-color: #EF4444;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

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

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

@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-primary);
        transition: left 0.4s var(--ease-out-expo);
        padding-top: 2rem;
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-sidebar .logo {
        display: none !important;
    }

    .admin-main {
        padding: 2.5rem 1.5rem;
    }

    .admin-header h1 {
        font-size: 2rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .admin-menu-toggle {
        display: flex !important;
        margin-bottom: 2rem;
    }
}

/* =====================================================
   GLOBAL COMMAND ORCHESTRATION: SCROLL & HUD
   ===================================================== */
.scroll-to-top-btn {
    position: fixed;
    right: 3rem;
    bottom: -100px;
    /* Hidden initially */
    width: 50px;
    height: 50px;
    background-color: var(--color-accent);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.5s var(--ease-out-expo);
    border: none;
    opacity: 0;
}

.scroll-to-top-btn.visible {
    bottom: 3rem;
    opacity: 1;
}

.scroll-to-top-btn:hover {
    background-color: var(--color-primary);
    transform: translateY(-5px);
}

/* TACTICAL INTELLIGENCE HUD (Innovation Overlay) */
.tactical-hud {
    position: fixed;
    left: 2rem;
    bottom: 2rem;
    padding: 0.8rem 1.2rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    z-index: 999;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    pointer-events: none;
    animation: slideInHUD 1.2s var(--ease-out-expo) both;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-pulse {
    width: 6px;
    height: 6px;
    background-color: #10B981;
    /* Optimized Green */
    border-radius: 50%;
    box-shadow: 0 0 10px #10B981;
    animation: hud-pulse 2s infinite;
}

@keyframes hud-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInHUD {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .tactical-hud {
        display: none;
    }

    /* Hide HUD on mobile for tactical focus */
    .scroll-to-top-btn {
        right: 1.5rem;
        bottom: 1.5rem;
        width: 40px;
        height: 40px;
    }
}