/* ═══════════════════════════════════════════════════════════════
   Askari Life Assurance — Agent Training Portal — tp-site.css
   Updated: Deep Purple & Vibrant Orange Theme
   Palette: Royal Violet + Ember Orange + gradient system
   ═══════════════════════════════════════════════════════════════ */

@import url('https://cdnjs.cloudflare.com/ajax/libs/jetbrains-mono/2.304/css/jetbrains-mono.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Inter+Tight:wght@500;600;700;800&display=swap');

:root {
    /* ── Core palette (Deep Purple & Orange Brand) ─────────── */
    --ink: #1e0a3c; /* Deep Royal Violet */
    --ink-2: #893880; /* Rich Purple */
    --ink-3: #5b21b6; /* Brand Purple */

    --purple: #7c3aed; /* Main Brand Purple */
    --purple-light: #a855f7; /* Soft Violet */
    --purple-soft: #f5f0ff; /* Pale Lavender wash */
    --purple-line: #c4b5fd; /* Border violet */

    --orange: #ea580c; /* Main Brand Orange */
    --orange-light: #fb923c; /* Warm Amber-Orange */
    --orange-soft: #fff7ed; /* Pale Orange wash */
    --orange-line: #fed7aa; /* Border orange */
    /* Accent (Electric Violet for pop) */
    --accent: #8b5cf6; /* Violet */
    --accent-soft: #ede9fe; /* Pale Violet */
    /* Status Colors */
    --red: #dc2626;
    --red-soft: #fee2e2;
    --green: #059669;
    --green-soft: #d1fae5;
    /* Neutrals */
    --paper: #faf8ff; /* Very cool white/violet tint */
    --card: #ffffff;
    --line: #e8e0ff;
    --line-2: #f3f0ff;
    /* ── Text ──────────────────────────────────────────────── */
    --atp-txt-1: #1e0a3c;
    --atp-txt-2: #5b21b6;
    --atp-txt-3: #7c3aed;
    --atp-on-dark: #ffffff;
    --atp-on-dark-2: #ddd6fe; /* Light Lavender text on dark */
    /* ── Gradients ─────────────────────────────────────────── */
    --grad-primary: linear-gradient(135deg, var(--ink-3) 0%, var(--orange) 100%);
    --grad-orange: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 100%);
    --grad-purple: linear-gradient(135deg, var(--purple-light) 0%, var(--purple) 100%);
    --grad-dark: linear-gradient(110deg, var(--ink) 0%, var(--ink-2) 55%, #2d0f5e 100%);
    --grad-surface: linear-gradient(145deg, var(--ink-2) 0%, var(--ink) 100%);
    --grad-card: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.5) 100%);
    --grad-hero: linear-gradient(135deg, #1e0a3c 0%, #893880 40%, #5b21b6 70%, #ea580c 100%);
    /* ── Shape & elevation ─────────────────────────────────── */
    --r-sm: 7px;
    --r-md: 12px;
    --r-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(91,33,182,.07), 0 2px 8px rgba(91,33,182,.05);
    --shadow-md: 0 4px 16px rgba(124,58,237,.14), 0 1px 3px rgba(124,58,237,.09);
    --shadow-lg: 0 24px 64px -12px rgba(30,10,60,.45);
    --shadow-orange: 0 6px 20px rgba(234,88,12,.35);
    /* ── Type ──────────────────────────────────────────────── */
    --font-display: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
    --ease: cubic-bezier(.22,.61,.36,1);
    /* ── Navbar geometry ───────────────────────────────────── */
    --navbar-h: 64px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: var(--paper);
    color: var(--atp-txt-1);
    font-family: var(--font-body);
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */

.atp-navbar {
    background: var(--grad-dark);
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 4px 24px rgba(30,10,60,.35);
    padding: .6rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: var(--navbar-h);
}

    /* Orange glow accent line at bottom */
    .atp-navbar::after {
        content: '';
        position: absolute;
        inset: auto 0 -1px 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, var(--accent) 15%, var(--orange-light) 40%, var(--orange) 50%, var(--orange-light) 60%, var(--accent) 85%, transparent 100%);
        opacity: .9;
    }

    .atp-navbar .navbar-brand {
        gap: .65rem;
        padding: 0;
    }

    .atp-navbar .brand-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: var(--grad-primary);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        box-shadow: var(--shadow-orange);
        flex-shrink: 0;
    }

    .atp-navbar .brand-text {
        line-height: 1.1;
    }

    .atp-navbar .brand-name {
        font-family: var(--font-display);
        font-weight: 700;
        font-size: .98rem;
        color: var(--atp-on-dark);
        letter-spacing: -0.005em;
    }

    .atp-navbar .brand-sub {
        font-family: var(--font-mono);
        font-size: .66rem;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--atp-on-dark-2);
        margin-top: 3px;
    }

    /* Nav links */
    .atp-navbar .nav-link {
        color: var(--atp-on-dark-2) !important;
        font-family: var(--font-body);
        font-size: .87rem;
        font-weight: 500;
        padding: .5rem .85rem !important;
        margin: 0 .15rem;
        border-radius: var(--r-sm);
        transition: color .15s var(--ease), background .15s var(--ease);
        display: inline-flex;
        align-items: center;
        cursor: pointer;
    }

        .atp-navbar .nav-link:hover {
            color: var(--atp-on-dark) !important;
            background: rgba(167,139,250,.18);
        }

        .atp-navbar .nav-link.active {
            color: #fff !important;
            background: var(--grad-primary);
            box-shadow: 0 4px 14px rgba(124,58,237,.45);
        }

            .atp-navbar .nav-link.active:hover {
                background: linear-gradient(135deg, var(--orange-light) 0%, var(--purple) 100%);
            }

    .atp-navbar .dropdown-toggle::after {
        margin-left: .45em;
        vertical-align: .1em;
        opacity: .7;
    }

    .atp-navbar .dropdown-menu {
        border: 1px solid var(--purple-line);
        border-radius: var(--r-md);
        box-shadow: var(--shadow-lg);
        padding: .4rem;
        min-width: 230px;
        background: var(--card);
        margin-top: .35rem !important;
    }

    .atp-navbar .dropdown-item {
        border-radius: var(--r-sm);
        padding: .55rem .75rem;
        font-size: .86rem;
        font-weight: 500;
        color: var(--atp-txt-1);
        transition: background .12s var(--ease), color .12s var(--ease);
    }

        .atp-navbar .dropdown-item:hover,
        .atp-navbar .dropdown-item:focus {
            background: var(--purple-soft);
            color: var(--purple);
        }

    .atp-navbar .dropdown-divider {
        border-color: var(--line-2);
        margin: .35rem 0;
    }

    /* User chip */
    .atp-navbar .user-chip {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        padding: .42rem .9rem;
        border-radius: 22px;
        background: rgba(255,255,255,.1);
        border: 1px solid rgba(255,255,255,.15);
        color: var(--atp-on-dark);
        font-size: .82rem;
        font-weight: 500;
        white-space: nowrap;
        backdrop-filter: blur(4px);
    }

        .atp-navbar .user-chip i {
            color: var(--orange-light);
            font-size: .95rem;
        }

    /* Logout button */
    .atp-navbar .btn-logout {
        width: 36px;
        height: 36px;
        border-radius: 9px;
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.1);
        color: var(--atp-on-dark-2);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        font-size: .9rem;
        transition: all .15s var(--ease);
    }

        .atp-navbar .btn-logout:hover {
            background: rgba(234,88,12,.25);
            border-color: rgba(234,88,12,.55);
            color: #ffedd5;
        }

        .atp-navbar .btn-logout:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(234,88,12,.4);
        }

    .atp-navbar .navbar-toggler {
        border: 1px solid rgba(255,255,255,.2);
        color: var(--atp-on-dark);
        padding: .35rem .65rem;
        border-radius: var(--r-sm);
    }

        .atp-navbar .navbar-toggler:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(234,88,12,.3);
        }

    .atp-navbar .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    }

/* Mobile collapsed state */
@media (max-width: 991.98px) {
    .atp-navbar .navbar-collapse {
        background: rgba(30,10,60,.98);
        margin: .65rem -1rem -.6rem;
        padding: 1rem 1rem 1.25rem;
        border-top: 1px solid rgba(255,255,255,.08);
        border-radius: 0 0 var(--r-md) var(--r-md);
        box-shadow: var(--shadow-lg);
    }

    .atp-navbar .navbar-nav {
        gap: .2rem;
    }

    .atp-navbar .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .atp-nav-actions {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255,255,255,.1);
        justify-content: space-between !important;
    }

    .atp-navbar .dropdown-menu {
        background: rgba(255,255,255,.05);
        border-color: rgba(255,255,255,.1);
        box-shadow: none;
        padding: .3rem;
        margin-top: .25rem !important;
    }

    .atp-navbar .dropdown-item {
        color: var(--atp-on-dark-2);
    }

        .atp-navbar .dropdown-item:hover {
            background: rgba(167,139,250,.2);
            color: #fff;
        }

    .atp-navbar .dropdown-divider {
        border-color: rgba(255,255,255,.1);
    }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.main-content {
    min-height: calc(100vh - var(--navbar-h));
    padding: 1.5rem 0 3rem;
}

/* ═══════════════════════════════════════════════════════════════
   FLASH ALERTS
   ═══════════════════════════════════════════════════════════════ */

.atp-flash.alert {
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    padding: .85rem 1rem;
    font-size: .88rem;
    font-weight: 500;
    margin-bottom: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.atp-flash.alert-success {
    background: var(--green-soft);
    color: #065f46;
    border-color: #a7f3d0;
}

.atp-flash.alert-danger {
    background: var(--red-soft);
    color: #991b1b;
    border-color: #fecaca;
}

.atp-flash .btn-close {
    background-size: .65em;
    opacity: .55;
    padding: .85rem;
}

    .atp-flash .btn-close:hover {
        opacity: .85;
    }

/* ═══════════════════════════════════════════════════════════════
   AUTH SHELL
   ═══════════════════════════════════════════════════════════════ */

.atp-auth-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    background: var(--card);
}

/* ── AUTH ASIDE — animated gradient background with 3D logo ── */
.atp-auth-aside {
    position: relative;
    background: var(--grad-hero);
    color: var(--atp-on-dark);
    padding: clamp(2.5rem, 5vw, 4.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    isolation: isolate;
}

@media (max-width: 880px) {
    .atp-auth-screen {
        grid-template-columns: 1fr;
    }

    .atp-auth-aside {
        display: none;
    }
}

/* Animated gradient mesh — layer 1: slow drift */
.atp-auth-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 20% 20%, rgba(139,92,246,.55) 0%, transparent 60%), radial-gradient(ellipse 60% 80% at 80% 70%, rgba(234,88,12,.45) 0%, transparent 55%), radial-gradient(ellipse 50% 50% at 50% 90%, rgba(168,85,247,.3) 0%, transparent 50%);
    animation: aside-drift 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

/* Animated gradient mesh — layer 2: counter-drift */
.atp-auth-aside::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 75% 10%, rgba(251,146,60,.35) 0%, transparent 55%), radial-gradient(ellipse 40% 60% at 10% 80%, rgba(91,33,182,.4) 0%, transparent 50%);
    animation: aside-drift-counter 14s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes aside-drift {
    0% {
        opacity: .8;
        transform: scale(1) translate(0, 0);
    }

    33% {
        opacity: 1;
        transform: scale(1.04) translate(2%, -2%);
    }

    66% {
        opacity: .9;
        transform: scale(.97) translate(-3%, 2%);
    }

    100% {
        opacity: 1;
        transform: scale(1.02) translate(1%, -1%);
    }
}

@keyframes aside-drift-counter {
    0% {
        opacity: .7;
        transform: scale(1) translate(0, 0);
    }

    40% {
        opacity: 1;
        transform: scale(1.05) translate(-2%, 3%);
    }

    100% {
        opacity: .85;
        transform: scale(.98) translate(3%, -2%);
    }
}

/* Diagonal shimmer sweep */
.atp-auth-aside .aside-shimmer {
    position: absolute;
    inset: -50%;
    background: linear-gradient( 115deg, transparent 30%, rgba(255,255,255,.04) 45%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 55%, transparent 70% );
    animation: shimmer-sweep 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes shimmer-sweep {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }

    100% {
        transform: translateX(100%) translateY(100%);
    }
}

/* ── Opacity 3D Logo Mark ─────────────────────────────────── */
.atp-auth-aside .aside-logo-watermark {
    position: absolute;
    right: -60px;
    bottom: -40px;
    width: 420px;
    height: 420px;
    opacity: .07;
    z-index: 1;
    pointer-events: none;
    animation: logo-float 9s ease-in-out infinite alternate;
}


    .atp-auth-aside .aside-logo-watermark img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
        filter: brightness(0) invert(1); /* forces logo to white */
    }

@keyframes logo-float {
    0% {
        transform: rotate(-8deg) scale(1) translateY(0);
    }

    50% {
        transform: rotate(-4deg) scale(1.03) translateY(-18px);
    }

    100% {
        transform: rotate(-10deg) scale(.98) translateY(8px);
    }
}

/* The actual 3D logo shape rendered in SVG */
.atp-auth-aside .aside-logo-watermark svg {
    width: 100%;
    height: 100%;
}

/* Small floating orbs for depth */
.atp-auth-aside .aside-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.atp-auth-aside .aside-orb--1 {
    width: 180px;
    height: 180px;
    top: -60px;
    right: -40px;
    background: radial-gradient(circle, rgba(251,146,60,.3) 0%, transparent 70%);
    animation: orb-pulse 7s ease-in-out infinite alternate;
}

.atp-auth-aside .aside-orb--2 {
    width: 120px;
    height: 120px;
    bottom: 30%;
    left: -30px;
    background: radial-gradient(circle, rgba(139,92,246,.35) 0%, transparent 70%);
    animation: orb-pulse 9s ease-in-out infinite alternate-reverse;
}

.atp-auth-aside .aside-orb--3 {
    width: 80px;
    height: 80px;
    top: 40%;
    right: 15%;
    background: radial-gradient(circle, rgba(234,88,12,.25) 0%, transparent 70%);
    animation: orb-pulse 6s ease-in-out infinite alternate;
}

@keyframes orb-pulse {
    0% {
        transform: scale(1);
        opacity: .8;
    }

    100% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* Content inside aside — above the animation layers */
.atp-aside-mark {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    position: relative;
    z-index: 2;
}

    .atp-aside-mark .glyph {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: var(--grad-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        box-shadow: var(--shadow-orange);
    }

.atp-aside-body {
    position: relative;
    z-index: 2;
    max-width: 420px;
}

    .atp-aside-body .eyebrow {
        font-family: var(--font-mono);
        font-size: .72rem;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--orange-light);
        margin: 0 0 1rem;
    }

    .atp-aside-body h1 {
        font-family: var(--font-display);
        font-size: clamp(1.7rem, 3vw, 2.3rem);
        font-weight: 700;
        line-height: 1.18;
        letter-spacing: -0.01em;
        margin: 0 0 .9rem;
        background: linear-gradient(to right, #fff 0%, #fed7aa 60%, #fb923c 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .atp-aside-body p {
        color: var(--atp-on-dark-2);
        font-size: .95rem;
        line-height: 1.65;
        margin: 0;
    }

    /* Divider line below paragraph */
    .atp-aside-body .aside-divider {
        width: 48px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, var(--orange) 0%, transparent 100%);
        margin: 1.25rem 0;
        position: relative;
        z-index: 2;
    }

.atp-aside-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .78rem;
    color: var(--atp-on-dark-2);
    font-family: var(--font-mono);
}

    .atp-aside-foot .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--orange-light);
        box-shadow: 0 0 10px var(--orange);
        animation: dot-blink 2.5s ease-in-out infinite;
    }

@keyframes dot-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 6px var(--orange);
    }

    50% {
        opacity: .5;
        box-shadow: 0 0 14px var(--orange-light);
    }
}

/* ── AUTH MAIN ──────────────────────────────────────────────── */

.atp-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 3rem);
}

@media (max-width: 880px) {
    .atp-auth-main {
        align-items: flex-start;
        padding-top: 3rem;
    }
}

.atp-auth-box {
    width: 100%;
    max-width: 380px;
    position: relative;
}

.atp-access-line {
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--orange) 100%);
    background-size: 200% 100%;
    margin-bottom: 1.75rem;
    transform-origin: left;
    animation: atp-draw .7s var(--ease) both;
}

@keyframes atp-draw {
    from {
        transform: scaleX(0);
        opacity: 0;
    }

    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

.atp-auth-logo {
    margin-bottom: 1.85rem;
}

    .atp-auth-logo .mark {
        display: none;
    }

@media (max-width: 880px) {
    .atp-auth-logo {
        display: flex;
        align-items: center;
        gap: .65rem;
        margin-bottom: 2rem;
    }

        .atp-auth-logo .mark {
            display: flex;
            width: 36px;
            height: 36px;
            border-radius: 9px;
            background: var(--grad-primary);
            color: #fff;
            font-family: var(--font-display);
            font-weight: 700;
            font-size: .8rem;
            align-items: center;
            justify-content: center;
        }
}

.atp-auth-logo h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--atp-txt-1);
    letter-spacing: -0.01em;
    margin: 0 0 .35rem;
}

.atp-auth-logo p {
    color: var(--atp-txt-2);
    font-size: .88rem;
    margin: 0;
    line-height: 1.5;
}

.atp-auth-footnote {
    text-align: center;
    font-size: .82rem;
    color: var(--atp-txt-3);
    margin: 1.5rem 0 0;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

.atp-form-group {
    margin-bottom: 1.15rem;
}

.atp-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--atp-txt-1);
    margin-bottom: .4rem;
    letter-spacing: -0.003em;
}

.atp-input, .atp-select {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    font-size: .92rem;
    font-family: var(--font-body);
    padding: .65rem .8rem;
    background: var(--card);
    color: var(--atp-txt-1);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

    .atp-input::placeholder {
        color: var(--atp-txt-3);
        opacity: .6;
    }

    .atp-input:hover, .atp-select:hover {
        border-color: var(--purple-line);
    }

    .atp-input:focus, .atp-select:focus {
        outline: none;
        border-color: var(--purple);
        box-shadow: 0 0 0 3.5px rgba(124,58,237,.2);
    }

    .atp-input[type="text"].is-code, input.is-code {
        font-family: var(--font-mono);
        letter-spacing: .02em;
    }

.atp-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237c3aed' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    padding-right: 2.2rem;
}

.atp-form-hint {
    font-size: .78rem;
    color: var(--atp-txt-3);
    margin: .35rem 0 0;
}

.atp-check-row {
    display: flex;
    align-items: center;
    gap: .55rem;
}

    .atp-check-row input[type="checkbox"] {
        width: 17px;
        height: 17px;
        border-radius: 5px;
        accent-color: var(--purple);
        cursor: pointer;
    }

    .atp-check-row label {
        font-size: .85rem;
        color: var(--atp-txt-2);
        cursor: pointer;
        user-select: none;
    }

.atp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

@media (max-width: 560px) {
    .atp-grid-2 {
        grid-template-columns: 1fr;
    }
}

.field-validation-error {
    display: block;
    font-size: .78rem;
    color: var(--red);
    margin-top: .35rem;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.atp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .88rem;
    padding: .68rem 1.3rem;
    border-radius: var(--r-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
    white-space: nowrap;
}

.atp-btn--primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124,58,237,.35);
    border: 1px solid rgba(255,255,255,.1);
}

    .atp-btn--primary:hover {
        background: linear-gradient(135deg, var(--orange-light) 0%, var(--purple) 100%);
        transform: translateY(-1px);
        box-shadow: 0 7px 22px rgba(124,58,237,.5);
    }

    .atp-btn--primary:active {
        transform: translateY(0);
    }

.atp-btn--orange {
    background: var(--grad-orange);
    color: #fff;
    box-shadow: var(--shadow-orange);
    border: 1px solid rgba(255,255,255,.1);
}

    .atp-btn--orange:hover {
        background: linear-gradient(135deg, var(--orange) 0%, #c2410c 100%);
        transform: translateY(-1px);
        box-shadow: 0 7px 22px rgba(234,88,12,.5);
    }

.atp-btn--ghost {
    background: var(--card);
    color: var(--atp-txt-1);
    border-color: var(--line);
}

    .atp-btn--ghost:hover {
        border-color: var(--purple);
        color: var(--purple);
        background: var(--purple-soft);
    }

.atp-btn--navy {
    background: var(--ink);
    color: #fff;
}

    .atp-btn--navy:hover {
        background: var(--ink-2);
        transform: translateY(-1px);
    }

.atp-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   INLINE ALERTS
   ═══════════════════════════════════════════════════════════════ */

.atp-alert {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem 1rem;
    border-radius: var(--r-sm);
    font-size: .85rem;
    line-height: 1.5;
    margin-bottom: 1.1rem;
}

    .atp-alert:empty {
        display: none;
    }

    .atp-alert ul {
        margin: 0;
        padding-left: 1.1rem;
        list-style: disc;
    }

.atp-alert--danger {
    background: var(--red-soft);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.atp-alert--success {
    background: var(--green-soft);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS & PAGE HEADERS
   ═══════════════════════════════════════════════════════════════ */

.atp-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
}

.atp-page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

    .atp-page-header-row h1 {
        font-family: var(--font-display);
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--atp-txt-1);
        letter-spacing: -0.01em;
        margin: 0;
    }

/* ═══════════════════════════════════════════════════════════════
   REGISTER — split layout
   ═══════════════════════════════════════════════════════════════ */

.atp-register-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .atp-register-grid {
        grid-template-columns: 1fr;
    }
}

.atp-summary-rail {
    position: sticky;
    top: 1.5rem;
    background: var(--grad-surface);
    border-radius: var(--r-md);
    padding: 1.6rem;
    color: var(--atp-on-dark);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,.1);
}

@media (max-width: 900px) {
    .atp-summary-rail {
        position: static;
    }
}

.atp-summary-rail .eyebrow {
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--orange-light);
    margin: 0 0 1.1rem;
}

.atp-summary-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--orange-light);
    margin-bottom: 1rem;
    transition: background .2s var(--ease);
}

.atp-summary-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 .15rem;
    min-height: 1.4em;
}

.atp-summary-code {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--atp-on-dark-2);
    margin: 0 0 1.1rem;
    min-height: 1.2em;
}

.atp-summary-divider {
    height: 1px;
    background: rgba(255,255,255,.15);
    margin: 1.1rem 0;
}

.atp-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    padding: .5rem 0;
    color: var(--atp-on-dark-2);
}

    .atp-summary-row strong {
        color: var(--atp-on-dark);
        font-weight: 600;
    }

.atp-role-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: .3rem .65rem;
    border-radius: 20px;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
}

    .atp-role-pill.is-manager {
        background: rgba(234,88,12,.25);
        color: #fed7aa;
        border-color: rgba(234,88,12,.45);
    }

/* ═══════════════════════════════════════════════════════════════
   ACCESS DENIED
   ═══════════════════════════════════════════════════════════════ */

.atp-denied-screen {
    min-height: calc(100vh - var(--navbar-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.atp-denied-card {
    max-width: 460px;
    width: 100%;
    text-align: center;
}

.atp-denied-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--orange-soft);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1.5rem;
    animation: atp-pop .45s var(--ease) both;
    box-shadow: 0 8px 24px rgba(234,88,12,.2);
}

@keyframes atp-pop {
    from {
        transform: scale(.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.atp-denied-card h1 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--atp-txt-1);
    margin: 0 0 .65rem;
    letter-spacing: -0.01em;
}

.atp-denied-card p {
    color: var(--atp-txt-2);
    font-size: .92rem;
    line-height: 1.6;
    margin: 0 0 .5rem;
}

.atp-denied-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.atp-denied-code {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--atp-txt-3);
    letter-spacing: .04em;
    margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HEADER (interior pages)
   ═══════════════════════════════════════════════════════════════ */

.atp-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--purple);
    background: var(--purple-soft);
    padding: .25rem .6rem;
    border-radius: 20px;
    margin-bottom: .65rem;
    border: 1px solid var(--purple-line);
}

.atp-page-header-row h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.2vw, 1.85rem);
    font-weight: 700;
    color: var(--atp-txt-1);
    letter-spacing: -0.015em;
    margin: 0 0 .25rem;
}

.atp-page-sub {
    font-size: .85rem;
    color: var(--atp-txt-2);
    margin: 0;
    line-height: 1.5;
}

.atp-page-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   KPI STAT CARDS
   ═══════════════════════════════════════════════════════════════ */

.atp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

@media (max-width: 1199.98px) {
    .atp-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .atp-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.atp-kpi {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: .95rem;
    position: relative;
    overflow: hidden;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}

    .atp-kpi::before {
        content: '';
        position: absolute;
        inset: 0 auto 0 0;
        width: 3px;
        background: var(--grad-primary);
        opacity: 0;
        transition: opacity .18s var(--ease);
    }

    .atp-kpi:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--purple-line);
    }

        .atp-kpi:hover::before {
            opacity: 1;
        }

.atp-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--purple-soft);
    color: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    transition: transform .18s var(--ease);
}

.atp-kpi:hover .atp-kpi-icon {
    transform: scale(1.05);
}

/* Icon accent variants */
.atp-kpi-icon--violet {
    background: #ede9fe;
    color: #6d28d9;
}

.atp-kpi-icon--indigo {
    background: #e0e7ff;
    color: #4338ca;
}

.atp-kpi-icon--orange {
    background: var(--orange-soft);
    color: var(--orange);
}

.atp-kpi-icon--amber {
    background: #fef3c7;
    color: #b45309;
}

.atp-kpi-icon--green {
    background: var(--green-soft);
    color: var(--green);
}

.atp-kpi-icon--red {
    background: var(--red-soft);
    color: var(--red);
}

.atp-kpi-icon--purple {
    background: var(--purple-soft);
    color: var(--purple);
}

.atp-kpi-body {
    min-width: 0;
    flex: 1;
}

.atp-kpi-label {
    font-size: .76rem;
    font-weight: 600;
    color: var(--atp-txt-2);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atp-kpi-value {
    font-family: var(--font-display);
    font-size: 1.95rem;
    font-weight: 700;
    color: var(--atp-txt-1);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.atp-kpi-meta {
    font-size: .74rem;
    color: var(--atp-txt-3);
    margin-top: .35rem;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   PANELS
   ═══════════════════════════════════════════════════════════════ */

.atp-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    align-items: start;
}

@media (max-width: 991.98px) {
    .atp-dash-grid {
        grid-template-columns: 1fr;
    }
}

.atp-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

    .atp-panel:last-child {
        margin-bottom: 0;
    }

.atp-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line-2);
    background: linear-gradient(180deg, var(--purple-soft) 0%, var(--card) 100%);
}

.atp-panel-title {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    color: var(--atp-txt-1);
    letter-spacing: -0.005em;
}

    .atp-panel-title i {
        color: var(--purple);
        font-size: .9rem;
    }

.atp-panel-link {
    font-size: .78rem;
    font-weight: 600;
    color: var(--purple);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: gap .15s var(--ease), color .15s var(--ease);
}

    .atp-panel-link:hover {
        color: var(--orange);
        gap: .5rem;
    }

.atp-panel-body {
    padding: .25rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */

.atp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.atp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
    margin: 0;
}

    .atp-table thead th {
        text-align: left;
        font-family: var(--font-body);
        font-weight: 600;
        font-size: .72rem;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--atp-txt-2);
        padding: .75rem 1.25rem;
        background: var(--purple-soft);
        border-bottom: 1px solid var(--purple-line);
        white-space: nowrap;
        position: sticky;
        top: 0;
    }

    .atp-table tbody td {
        padding: .75rem 1.25rem;
        border-bottom: 1px solid var(--line-2);
        color: var(--atp-txt-1);
        vertical-align: middle;
    }

    .atp-table tbody tr:last-child td {
        border-bottom: none;
    }

    .atp-table tbody tr {
        transition: background .12s var(--ease);
    }

        .atp-table tbody tr:hover {
            background: var(--purple-soft);
        }

    .atp-table .atp-num {
        text-align: right;
        font-variant-numeric: tabular-nums;
        font-weight: 500;
    }

    .atp-table .atp-cell-user {
        font-weight: 600;
        color: var(--atp-txt-1);
    }

    .atp-table .atp-cell-date {
        font-family: var(--font-mono);
        font-size: .8rem;
        color: var(--atp-txt-2);
        white-space: nowrap;
    }

.atp-text-green {
    color: var(--green) !important;
}

.atp-text-red {
    color: var(--red) !important;
}

.atp-text-orange {
    color: var(--orange) !important;
}

.atp-text-purple {
    color: var(--purple) !important;
}

/* Inline code chip */
.atp-code {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .76rem;
    font-weight: 600;
    color: var(--purple);
    background: var(--purple-soft);
    padding: .18rem .5rem;
    border-radius: 5px;
    letter-spacing: .02em;
    border: 1px solid var(--purple-line);
}

/* Status pills */
.atp-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: .25rem .6rem;
    border-radius: 20px;
    line-height: 1.2;
    white-space: nowrap;
}

    .atp-status::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
    }

.atp-status--success {
    background: var(--green-soft);
    color: #065f46;
}

.atp-status--info {
    background: var(--purple-soft);
    color: #5b21b6;
}

.atp-status--warning {
    background: var(--orange-soft);
    color: #9a3412;
}

.atp-status--danger {
    background: var(--red-soft);
    color: #991b1b;
}

.atp-status--neutral {
    background: #eef0f5;
    color: #4b5563;
}

/* Empty state */
.atp-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--atp-txt-3);
}

    .atp-empty i {
        font-size: 1.6rem;
        color: var(--purple-line);
        margin-bottom: .65rem;
        display: block;
    }

    .atp-empty p {
        font-size: .88rem;
        margin: 0;
        color: var(--atp-txt-2);
    }

/* ═══════════════════════════════════════════════════════════════
   ACTION BAR
   ═══════════════════════════════════════════════════════════════ */

.atp-action-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .85rem;
    margin-top: 1rem;
}

@media (max-width: 991.98px) {
    .atp-action-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .atp-action-bar {
        grid-template-columns: 1fr;
    }
}

.atp-action {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .95rem 1.05rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
    cursor: pointer;
    color: inherit;
}

    .atp-action:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--purple-line);
        text-decoration: none;
    }

.atp-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--purple-soft);
    color: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
    transition: background .18s var(--ease), color .18s var(--ease);
}

.atp-action:hover .atp-action-icon {
    background: var(--grad-primary);
    color: #fff;
}

.atp-action-label {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

    .atp-action-label strong {
        font-family: var(--font-display);
        font-size: .88rem;
        font-weight: 700;
        color: var(--atp-txt-1);
        letter-spacing: -0.005em;
    }

    .atp-action-label small {
        font-size: .74rem;
        color: var(--atp-txt-3);
        margin-top: .1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 575.98px) {
    .atp-action-label small {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   BADGE / PILL UTILITY
   ═══════════════════════════════════════════════════════════════ */

.atp-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .2rem .55rem;
    border-radius: 20px;
    white-space: nowrap;
}

.atp-badge--purple {
    background: var(--purple-soft);
    color: var(--purple);
    border: 1px solid var(--purple-line);
}

.atp-badge--orange {
    background: var(--orange-soft);
    color: var(--orange);
    border: 1px solid var(--orange-line);
}

.atp-badge--green {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid #6ee7b7;
}

.atp-badge--red {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid #fca5a5;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.atp-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.atp-table-wrap::-webkit-scrollbar {
    height: 8px;
}

.atp-table-wrap::-webkit-scrollbar-track {
    background: var(--line-2);
}

.atp-table-wrap::-webkit-scrollbar-thumb {
    background: var(--purple-line);
    border-radius: 4px;
}

    .atp-table-wrap::-webkit-scrollbar-thumb:hover {
        background: var(--purple);
    }

/* Orange highlight for important numbers */
.atp-highlight-orange {
    background: linear-gradient(to right, var(--orange-soft), transparent);
    border-left: 3px solid var(--orange);
    padding: .4rem .75rem;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
