/* iOS-like Admin Motion & Glass Theme */
:root {
    --admin-bg: #edf3fb;
    --admin-bg-2: #dce8f8;
    --header-bg: #133557;
    --glass: rgba(255, 255, 255, 0.76);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --ink: #0f172a;
    --muted: #475569;
    --ring: rgba(30, 64, 175, 0.35);
    --card-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --card-shadow-hover: 0 25px 55px rgba(15, 23, 42, 0.18);
    --sidebar-blue: #0a1a34;
    --sidebar-blue-soft: #133557;
    --accent-pink: #fc2366;
}

body {
    background: radial-gradient(circle at 15% -10%, #ffffff 0%, var(--admin-bg) 42%, var(--admin-bg-2) 100%);
    color: var(--ink);
    font-family: var(--font-secondary);
    overflow-x: hidden;
}

body:not(.admin-login) {
    background: radial-gradient(circle at 15% -8%, #f7fbff 0%, #e7f0fd 46%, #d9e8fb 100%);
}

.admin-login {
    font-family: "Sora", var(--font-secondary), sans-serif;
}

.admin-login::before {
    opacity: 0.42;
    filter: blur(36px);
    animation-duration: 12s;
}

.admin-login::after {
    opacity: 0.4;
    filter: blur(30px);
    animation-duration: 14s;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    z-index: 0;
    filter: blur(24px);
    opacity: 0.32;
    pointer-events: none;
    animation: blobFloat 16s ease-in-out infinite;
}

body::before {
    top: -140px;
    right: -90px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

body::after {
    bottom: -160px;
    left: -90px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    animation-delay: -6s;
}

main,
.admin-header {
    position: relative;
    z-index: 1;
}

.admin-header {
    background: var(--header-bg) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 45px rgba(19, 53, 87, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.admin-header-spacer {
    height: 92px;
}

.admin-logo {
    height: 58px !important;
    width: auto;
    max-width: none;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.admin-nav a {
    position: relative;
    overflow: hidden;
}

.easy-mode-toggle {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

.easy-mode-toggle.is-active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

.admin-nav.is-open {
    display: flex !important;
}

.admin-nav--mobile {
    display: none;
}

.admin-menu-toggle i {
    font-size: 1.28rem;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-menu-toggle[aria-expanded="true"] i {
    transform: rotate(90deg);
}

.admin-nav a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
    transform: translateX(-110%);
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-nav a:hover::after {
    transform: translateX(0);
}

.dashboard-card,
.rounded-xl.bg-white,
.rounded-2xl:not(.dashboard-hero) {
    background: var(--glass) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow: var(--card-shadow) !important;
    transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 380ms cubic-bezier(0.22, 1, 0.36, 1), background-color 260ms ease;
}

body:not(.admin-login):not(.performance-mode) .dashboard-panel,
body:not(.admin-login):not(.performance-mode) .dashboard-kpi,
body:not(.admin-login):not(.performance-mode) .rounded-xl.bg-white,
body:not(.admin-login):not(.performance-mode) .rounded-2xl:not(.dashboard-hero) {
    background: linear-gradient(180deg, #f7fbff 0%, #ebf2fb 100%) !important;
    border-color: rgba(19, 53, 87, 0.22) !important;
    box-shadow: 0 10px 22px rgba(15, 35, 62, 0.1) !important;
}

body:not(.admin-login):not(.performance-mode) .dashboard-panel,
body:not(.admin-login):not(.performance-mode) .dashboard-kpi,
body:not(.admin-login):not(.performance-mode) .rounded-2xl:not(.dashboard-hero) {
    border-top: 3px solid var(--sidebar-blue-soft) !important;
}

body:not(.admin-login):not(.performance-mode) .dashboard-kpi {
    border-top-color: var(--sidebar-blue) !important;
}

body:not(.admin-login):not(.performance-mode) main.container {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.admin-login .login-shell {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: loginCardIn 560ms cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.admin-login .login-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: loginSweep 5.8s ease-in-out infinite;
}

.login-shell--compact {
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 22px 46px rgba(2, 6, 23, 0.2) !important;
}

.login-brand {
    background:
        radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.28), transparent 36%),
        radial-gradient(circle at 80% 84%, rgba(233, 48, 106, 0.35), transparent 32%),
        linear-gradient(140deg, #133557 0%, #1a4068 45%, #0f2843 100%);
}

.login-brand__ornament {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 999px;
    right: -130px;
    top: -120px;
    background: radial-gradient(circle, rgba(252, 35, 102, 0.42) 0%, rgba(252, 35, 102, 0) 64%);
    filter: blur(8px);
    pointer-events: none;
}

.login-brand__orbital {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    left: -70px;
    bottom: -72px;
    opacity: 0.7;
    animation: orbitSpin 12s linear infinite;
    pointer-events: none;
}

.login-brand__orbital--two {
    width: 120px;
    height: 120px;
    left: 36px;
    bottom: 20px;
    border-color: rgba(252, 35, 102, 0.5);
    animation-duration: 8s;
    animation-direction: reverse;
}

.login-brand__grid-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.3;
    background:
        linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    animation: gridDrift 14s linear infinite;
}

.login-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: pulseDot 1.8s ease-out infinite;
}

.login-feature {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.login-feature i {
    color: #ffffff;
}

.login-brand__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.login-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    animation: loginChipFloat 4.8s ease-in-out infinite;
}

.login-chip:nth-child(2) {
    animation-delay: -1.2s;
}

.login-chip:nth-child(3) {
    animation-delay: -2.3s;
}

.login-form-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
    animation: loginPanelIn 620ms cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.login-form-panel::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    top: -110px;
    right: -90px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(19, 53, 87, 0.15), rgba(19, 53, 87, 0));
}

.login-form-card {
    animation: fadeInUp 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.login-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #133557;
    text-transform: uppercase;
}

.login-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    padding: 0 12px;
    transition: border-color 220ms ease, box-shadow 220ms ease;
}

.login-input-wrap:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.login-input-wrap i {
    color: #e9306a;
    font-size: 0.9rem;
}

.login-input-wrap:focus-within {
    border-color: #133557;
    box-shadow: 0 0 0 4px rgba(19, 53, 87, 0.12);
}

.login-input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #0f172a;
    padding: 12px 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.login-input::placeholder {
    color: #94a3b8;
}

.login-submit {
    border: 0;
    color: #ffffff;
    background: linear-gradient(90deg, #133557 0%, #1a4068 45%, #e9306a 100%);
    box-shadow: 0 14px 30px rgba(19, 53, 87, 0.28);
    transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(19, 53, 87, 0.34);
    filter: saturate(1.08);
}

.login-submit i {
    transition: transform 220ms ease;
}

.login-submit:hover i {
    transform: translateX(2px);
}

.login-submit:active {
    transform: translateY(0);
}

.login-form-stack > div {
    animation: loginFieldIn 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.login-form-stack > div:nth-child(2) {
    animation-delay: 80ms;
}

.login-form-stack > div:nth-child(3) {
    animation-delay: 150ms;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.2), transparent 30%),
        linear-gradient(125deg, #08152c 0%, #0a1a34 45%, #133557 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 26px 52px rgba(8, 21, 44, 0.38);
}

.dashboard-hero:hover {
    transform: none !important;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.2), transparent 30%),
        linear-gradient(125deg, #08152c 0%, #0a1a34 45%, #133557 100%) !important;
    box-shadow: 0 26px 52px rgba(8, 21, 44, 0.38) !important;
}

.dashboard-hero h1,
.dashboard-hero p,
.dashboard-hero a,
.dashboard-hero span {
    color: #ffffff !important;
}

.dashboard-hero .text-blue-100,
.dashboard-hero .text-blue-100\/90 {
    color: rgba(219, 234, 254, 0.98) !important;
}

.dashboard-hero .bg-white\/15 {
    background-color: rgba(255, 255, 255, 0.16) !important;
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.08) 2px,
        transparent 2px,
        transparent 12px
    );
    opacity: 0.2;
    pointer-events: none;
}

.dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.dashboard-pulse {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #86efac;
    box-shadow: 0 0 0 0 rgba(134, 239, 172, 0.7);
    animation: pulseDot 1.8s ease-out infinite;
}

.dashboard-kpi {
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7));
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.dashboard-kpi__icon {
    position: relative;
    overflow: hidden;
}

.dashboard-kpi__icon::after {
    content: "";
    position: absolute;
    width: 160%;
    height: 160%;
    top: -30%;
    left: -30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 60%);
}

.dashboard-kpi--blue .dashboard-kpi__icon {
    background: linear-gradient(135deg, #1d4ed8, #0284c7);
}

.dashboard-kpi--green .dashboard-kpi__icon {
    background: linear-gradient(135deg, #059669, #16a34a);
}

.dashboard-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 250, 255, 0.84));
    border: 1px solid rgba(255, 255, 255, 0.58);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.plantel-row {
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid transparent;
}

.plantel-row__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.plantel-row__name {
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 700;
}

.plantel-row__count {
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 800;
    min-width: 26px;
    text-align: right;
}

.plantel-row__track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
}

.plantel-row__bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.plantel-row--blue {
    background: rgba(239, 246, 255, 0.75);
    border-color: rgba(147, 197, 253, 0.4);
}

.plantel-row--blue .plantel-row__track {
    background: rgba(147, 197, 253, 0.3);
}

.plantel-row--blue .plantel-row__bar {
    background: linear-gradient(90deg, #3b82f6, #0ea5e9);
}

.plantel-row--green {
    background: rgba(236, 253, 245, 0.82);
    border-color: rgba(110, 231, 183, 0.45);
}

.plantel-row--green .plantel-row__track {
    background: rgba(167, 243, 208, 0.35);
}

.plantel-row--green .plantel-row__bar {
    background: linear-gradient(90deg, #10b981, #22c55e);
}

.dashboard-card:hover,
.rounded-xl.bg-white:hover,
.rounded-2xl:not(.dashboard-hero):hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 35, 62, 0.12) !important;
    background: #f7fbff !important;
}

.dashboard-card__icon,
.h-12.w-12.rounded-xl {
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
    animation: iconDrift 3.4s ease-in-out infinite;
}

.dashboard-card:nth-child(2) .dashboard-card__icon,
.dashboard-card:nth-child(2) .h-12.w-12.rounded-xl {
    animation-delay: -1.4s;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    background: linear-gradient(120deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.04));
    letter-spacing: 0.01em;
}

tbody tr {
    transition: transform 240ms ease, background-color 240ms ease;
}

tbody tr:hover {
    transform: translateX(2px);
    background: rgba(59, 130, 246, 0.08);
}

.admin-mobile-card {
    box-shadow: 0 8px 20px rgba(15, 35, 62, 0.09);
}

.admin-mobile-card p {
    margin: 0;
    line-height: 1.4;
}

.admin-mobile-card textarea,
.admin-mobile-card select {
    background: #ffffff;
}

td form textarea {
    resize: vertical;
    min-height: 62px;
}

td form select,
td form textarea {
    min-width: 180px;
}

a,
button,
input,
select {
    transition: all 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

button:hover,
a[class*="bg-"]:hover {
    transform: translateY(-1px);
}

input:focus,
select:focus {
    box-shadow: 0 0 0 3px var(--ring) !important;
}

.ios-reveal {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
}

.ios-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 560ms cubic-bezier(0.22, 1, 0.36, 1), transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ios-tap {
    transform-origin: center;
}

.ios-tap.is-pressed {
    transform: scale(0.975);
}

@keyframes blobFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(12px, -16px, 0) scale(1.06);
    }
}

@keyframes iconDrift {
    0%,
    100% {
        transform: translateY(0) rotate(0.001deg);
    }
    50% {
        transform: translateY(-4px) rotate(-1deg);
    }
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(134, 239, 172, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(134, 239, 172, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(134, 239, 172, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes loginPanelIn {
    from {
        opacity: 0;
        transform: translateX(14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes loginFieldIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginChipFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes gridDrift {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-28px);
    }
}

@keyframes orbitSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes loginSweep {
    0%,
    72% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(120%);
    }
}

@media (max-width: 768px) {
    .admin-header-spacer {
        height: 56px;
    }

    .admin-header__inner {
        align-items: center;
        gap: 0.35rem;
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
    }

    .admin-menu-toggle {
        min-height: 52px;
        min-width: 52px;
        padding: 0.72rem !important;
    }

    .admin-nav {
        margin-top: 0;
        border-top: 0;
        padding: 0;
        border-radius: 16px;
        background: transparent;
        box-shadow: none;
    }

    .admin-nav--mobile {
        display: flex;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        transform-origin: top right;
        pointer-events: none;
        transition: max-height 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .admin-nav--mobile > * {
        opacity: 0;
        transform: translateY(-7px) scale(0.985);
        transition: opacity 240ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: 0ms;
    }

    .admin-nav--mobile.is-open {
        max-height: 620px;
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        margin-top: 0.35rem;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        padding: 0.7rem;
        background: linear-gradient(160deg, rgba(10, 27, 46, 0.94), rgba(24, 59, 94, 0.92));
        box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
    }

    .admin-nav--mobile.is-open > * {
        opacity: 1;
        transform: translateY(0) scale(1);
        transition-delay: calc(var(--nav-item-index, 0) * 45ms + 35ms);
    }

    .admin-nav a,
    .admin-nav .easy-mode-toggle,
    .admin-nav .admin-logout,
    .admin-nav > span,
    .admin-nav > a,
    .admin-nav > button {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-nav > span {
        min-height: 42px;
    }

    .admin-nav .admin-logout {
        background: linear-gradient(90deg, #e11d48, #7c3aed);
    }

    .admin-logo {
        height: 68px !important;
    }

    body::before,
    body::after {
        width: 220px;
        height: 220px;
        filter: blur(16px);
    }

    .dashboard-hero {
        padding: 1.1rem;
    }

    .dashboard-hero__meta {
        grid-template-columns: 1fr;
    }

    .login-brand {
        padding: 1.4rem;
    }

    .login-brand__orbital {
        width: 150px;
        height: 150px;
        left: -40px;
        bottom: -36px;
    }

    .login-brand__orbital--two {
        width: 86px;
        height: 86px;
        left: 24px;
        bottom: 34px;
    }

    .login-form-panel {
        padding: 1.2rem;
    }

    .dashboard-panel {
        border-radius: 1rem;
    }

    .admin-mobile-card {
        border-radius: 0.9rem;
    }

    .admin-mobile-card .text-xs {
        font-size: 0.75rem;
    }
}

@media (min-width: 769px) {
    .admin-nav--mobile {
        display: flex !important;
        max-height: none !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }
}

@media (min-width: 1024px) {
    body:not(.admin-login) .admin-header {
        background: linear-gradient(180deg, #08152c 0%, #0a1a34 100%) !important;
        left: 0;
        right: auto;
        top: 0;
        bottom: 0;
        width: 286px;
        height: 100vh;
        border-bottom: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.09);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }

    body:not(.admin-login) .admin-header-spacer {
        display: none;
    }

    body:not(.admin-login) .admin-header__inner {
        height: 100%;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.55rem;
        padding: 1rem 0.8rem;
    }

    body:not(.admin-login) .admin-logo-link {
        width: 100%;
        justify-content: flex-start;
        gap: 0.7rem;
        padding: 0.45rem 0.35rem 0.75rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    body:not(.admin-login) .admin-logo {
        height: 62px !important;
    }

    body:not(.admin-login) .admin-menu-toggle {
        display: none !important;
    }

    body:not(.admin-login) .admin-nav {
        width: 100% !important;
        margin-top: 0.35rem;
        padding: 0.35rem 0.15rem 0 0.15rem;
        border-top: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0.52rem;
        max-height: none !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        display: flex !important;
    }

    body:not(.admin-login) .admin-nav__section-title {
        display: block;
        margin: 0.75rem 0 0.15rem;
        padding: 0 0.45rem;
        font-size: 0.68rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-weight: 700;
        color: rgba(148, 163, 184, 0.9);
    }

    body:not(.admin-login) .admin-nav__section-title:first-child {
        margin-top: 0;
    }

    body:not(.admin-login) .admin-nav > a,
    body:not(.admin-login) .admin-nav > button,
    body:not(.admin-login) .admin-nav > span {
        position: relative;
        width: 100%;
        justify-content: flex-start;
    }

    body:not(.admin-login) .admin-nav__link,
    body:not(.admin-login) .easy-mode-toggle,
    body:not(.admin-login) .admin-logout,
    body:not(.admin-login) .admin-nav > a:not(.admin-nav__link) {
        min-height: 44px;
        border-radius: 11px;
        border: 1px solid transparent;
        background: transparent;
        color: #cbd5e1;
        padding: 0.62rem 0.82rem !important;
        font-size: 0.98rem;
        font-weight: 600;
    }

    body:not(.admin-login) .admin-nav__link i,
    body:not(.admin-login) .easy-mode-toggle i,
    body:not(.admin-login) .admin-logout i,
    body:not(.admin-login) .admin-nav > a:not(.admin-nav__link) i {
        width: 18px;
        text-align: center;
        color: rgba(226, 232, 240, 0.92);
        font-size: 0.95rem;
    }

    body:not(.admin-login) .admin-nav__link.is-active {
        color: #ffffff;
        border-color: rgba(252, 35, 102, 0.72);
        background: var(--accent-pink);
        box-shadow: 0 10px 20px rgba(252, 35, 102, 0.36);
    }

    body:not(.admin-login) .admin-nav__link.is-idle:hover,
    body:not(.admin-login) .easy-mode-toggle:hover,
    body:not(.admin-login) .admin-nav > a:not(.admin-nav__link):hover {
        color: #f8fafc;
        border-color: rgba(148, 163, 184, 0.28);
        background: rgba(148, 163, 184, 0.14);
    }

    body:not(.admin-login) .admin-nav > span {
        text-align: left;
        margin-top: 0.45rem;
        border-radius: 11px;
        border: 1px solid rgba(148, 163, 184, 0.25);
        background: rgba(15, 23, 42, 0.45);
        padding: 0.72rem 0.8rem;
        color: #e2e8f0;
        line-height: 1.3;
        font-size: 0.82rem;
    }

    body:not(.admin-login) .easy-mode-toggle {
        color: #86efac;
        border-color: rgba(34, 197, 94, 0.26);
        background: rgba(34, 197, 94, 0.08);
    }

    body:not(.admin-login) .easy-mode-toggle:hover {
        border-color: rgba(34, 197, 94, 0.45);
        background: rgba(34, 197, 94, 0.14);
    }

    body:not(.admin-login) .admin-nav > a[href="../index.php"] {
        margin-top: 0.2rem;
        color: #cbd5e1;
    }

    body:not(.admin-login) .admin-logout {
        margin-top: auto;
        color: #f8fafc;
        border-color: rgba(148, 163, 184, 0.35);
        background: rgba(255, 255, 255, 0.08);
    }

    body:not(.admin-login) main.container {
        margin-left: 302px;
        max-width: calc(100% - 324px) !important;
        padding-top: 1.15rem !important;
    }
}

.perf-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.perf-modal.is-open {
    display: flex;
}

.perf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.82));
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.perf-modal__panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 540px);
    margin: 0;
    border-radius: 18px;
    border: 1px solid rgba(19, 53, 87, 0.22);
    background:
        radial-gradient(circle at 82% 8%, rgba(59, 130, 246, 0.2), transparent 36%),
        linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
    box-shadow: 0 30px 54px rgba(2, 6, 23, 0.38);
    padding: 1.2rem 1.1rem 1.05rem;
    animation: perfModalIn 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.perf-modal__close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.95);
    color: #334155;
}

.perf-modal__close:hover {
    background: #ffffff;
    color: #0f172a;
}

.perf-modal__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.72rem;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(252, 35, 102, 0.3);
    background: rgba(252, 35, 102, 0.08);
}

.perf-modal__badge-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fc2366;
    color: #ffffff;
    font-size: 0.72rem;
}

.perf-modal__badge-text {
    color: #9f1239;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.perf-modal__title {
    margin: 0;
    color: #0f172a;
    font-size: 1.16rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.perf-modal__text {
    margin: 0.62rem 0 0;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.52;
}

.perf-modal__list {
    margin: 0.8rem 0 0;
    padding: 0.7rem 0.75rem 0.7rem 1.6rem;
    border-radius: 12px;
    border: 1px solid rgba(19, 53, 87, 0.14);
    background: rgba(255, 255, 255, 0.78);
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.45;
}

.perf-modal__list li + li {
    margin-top: 0.42rem;
}

.perf-modal__remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 600;
}

.perf-modal__remember-check {
    width: 15px;
    height: 15px;
    accent-color: #fc2366;
}

.perf-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.62rem;
    margin-top: 1.05rem;
}

.perf-modal__btn {
    min-height: 40px;
    border-radius: 11px;
    border: 1px solid transparent;
    padding: 0.58rem 0.98rem;
    font-weight: 700;
    font-size: 0.88rem;
}

.perf-modal__btn--secondary {
    border-color: rgba(148, 163, 184, 0.5);
    color: #334155;
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.perf-modal__btn--primary {
    color: #ffffff;
    border-color: rgba(252, 35, 102, 0.82);
    background: linear-gradient(135deg, #fc2366 0%, #e11d68 100%);
    box-shadow: 0 10px 20px rgba(252, 35, 102, 0.32);
}

.perf-modal__btn--primary:hover {
    filter: brightness(1.04);
}

@keyframes perfModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .admin-nav__section-title {
        display: block;
        margin: 0.5rem 0 0.15rem;
        padding: 0 0.2rem;
        font-size: 0.66rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-weight: 700;
        color: rgba(186, 230, 253, 0.88);
    }

    .admin-nav__section-title:first-child {
        margin-top: 0;
    }

    .perf-modal__panel {
        width: min(94vw, 520px);
        padding: 1rem 0.9rem 0.9rem;
    }

    .perf-modal__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .perf-modal__btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .ios-reveal {
        opacity: 1;
        transform: none;
    }
}

body.performance-mode {
    background: #f5f7fb;
    font-size: 16.5px;
}

body.performance-mode::before,
body.performance-mode::after {
    display: none;
}

body.performance-mode .admin-header {
    box-shadow: 0 8px 20px rgba(19, 53, 87, 0.18);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.performance-mode .dashboard-hero,
body.performance-mode .dashboard-panel,
body.performance-mode .dashboard-kpi,
body.performance-mode .rounded-xl.bg-white,
body.performance-mode .rounded-2xl:not(.dashboard-hero) {
    background: #ffffff !important;
    border: 1px solid #d9e2ee !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
}

body.performance-mode .dashboard-hero h1,
body.performance-mode .dashboard-hero p,
body.performance-mode .dashboard-hero a,
body.performance-mode .dashboard-hero span,
body.performance-mode .dashboard-hero .text-blue-100,
body.performance-mode .dashboard-hero .text-blue-100\/90 {
    color: #0f172a !important;
}

body.performance-mode .dashboard-hero::before,
body.performance-mode .admin-nav a::after,
body.performance-mode .dashboard-card__icon::after {
    display: none;
}

body.performance-mode .dashboard-card:hover,
body.performance-mode .rounded-xl.bg-white:hover,
body.performance-mode .rounded-2xl:not(.dashboard-hero):hover,
body.performance-mode tbody tr:hover,
body.performance-mode button:hover,
body.performance-mode a[class*="bg-"]:hover {
    transform: none;
}

body.performance-mode a,
body.performance-mode button,
body.performance-mode input,
body.performance-mode select,
body.performance-mode tbody tr,
body.performance-mode .ios-reveal,
body.performance-mode .ios-reveal.is-visible,
body.performance-mode .dashboard-card,
body.performance-mode .dashboard-kpi__icon,
body.performance-mode .h-12.w-12.rounded-xl,
body.performance-mode .admin-menu-toggle i,
body.performance-mode .admin-nav--mobile,
body.performance-mode .admin-nav--mobile > * {
    animation: none !important;
    transition: none !important;
}

body.performance-mode .admin-nav a,
body.performance-mode .easy-mode-toggle,
body.performance-mode .admin-logout {
    min-height: 44px;
    padding: 0.65rem 0.85rem !important;
}

body.performance-mode input,
body.performance-mode select,
body.performance-mode button {
    min-height: 44px;
    font-size: 0.95rem !important;
}

body.performance-mode thead th {
    background: #eef2f8;
}

