:root {
    --bg: #060816;
    --panel: rgba(11, 16, 33, 0.78);
    --panel-strong: rgba(9, 13, 28, 0.92);
    --panel-border: rgba(148, 163, 184, 0.16);
    --text: #eff6ff;
    --muted: #98a8c6;
    --accent: #56ccf2;
    --accent-2: #7c3aed;
    --accent-soft: rgba(86, 204, 242, 0.16);
    --shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(86, 204, 242, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.18), transparent 26%),
        linear-gradient(145deg, #03050d 0%, #09101e 42%, #070b16 100%);
    color: var(--text);
    overflow-x: hidden;
}

.login-page,
.dashboard-page {
    position: relative;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.ambient {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.5;
    animation: float 10s ease-in-out infinite;
    pointer-events: none;
}

.ambient-a {
    top: 5%;
    left: 6%;
    background: rgba(56, 189, 248, 0.22);
}

.ambient-b {
    right: 8%;
    bottom: 8%;
    background: rgba(139, 92, 246, 0.18);
    animation-delay: -3s;
}

.auth-shell {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.dashboard-shell {
    width: min(920px, 100%);
}

.glass {
    position: relative;
    backdrop-filter: blur(16px);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.brand-panel,
.form-panel,
.dashboard-card {
    padding: 36px;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #8ddcff;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
    margin-bottom: 16px;
    max-width: 12ch;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.lead,
.dashboard-copy,
.muted,
.demo-value,
.form-copy {
    color: var(--muted);
}

.demo-list {
    display: grid;
    gap: 14px;
    margin-top: 32px;
}

.demo-item,
.profile-card,
.stat-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: 2px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.35);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar span {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.demo-label {
    font-weight: 700;
}

.hero-slider {
    position: relative;
    margin: -36px -36px 30px;
    padding: 22px 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(15, 23, 42, 0)),
        linear-gradient(90deg, rgba(3, 7, 18, 0.98), rgba(3, 7, 18, 0));
}

.hero-slider::before,
.hero-slider::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 84px;
    z-index: 2;
    pointer-events: none;
}

.hero-slider::before {
    left: 0;
    background: linear-gradient(90deg, rgba(7, 11, 22, 1), rgba(7, 11, 22, 0));
}

.hero-slider::after {
    right: 0;
    background: linear-gradient(270deg, rgba(7, 11, 22, 1), rgba(7, 11, 22, 0));
}

.dashboard-slider {
    margin-bottom: 24px;
}

.slide-track {
    display: flex;
    gap: 18px;
    width: max-content;
    animation: slideGallery 28s linear infinite;
}

.slide-card {
    margin: 0;
    width: 250px;
    height: 148px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.45);
    transform: rotate(-2deg);
}

.slide-card:nth-child(2n) {
    transform: rotate(2deg);
}

.slide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.95) contrast(1.05) brightness(0.72);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(8, 13, 28, 0.92);
    padding: 15px 16px;
    font: inherit;
    color: var(--text);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-form select,
.auth-form input[type="file"],
.inline-form input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(8, 13, 28, 0.92);
    padding: 15px 16px;
    font: inherit;
    color: var(--text);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(86, 204, 242, 0.65);
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.auth-form select:focus,
.auth-form input[type="file"]:focus,
.inline-form input:focus {
    outline: none;
    border-color: rgba(86, 204, 242, 0.65);
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.auth-form input::placeholder,
.inline-form input::placeholder {
    color: #6f82a6;
}

.auth-form input[type="file"] {
    padding: 12px 14px;
}

.auth-form input[type="file"]::file-selector-button {
    margin-right: 14px;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
}

button,
.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.25s ease, border-color 0.3s ease;
}

button {
    margin-top: 8px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 14px 32px rgba(86, 204, 242, 0.22);
}

.cta-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.28) 50%, transparent 80%);
    transform: translateX(-130%);
    transition: transform 0.7s ease;
    z-index: -1;
}

.cta-button span {
    position: relative;
    z-index: 1;
}

button:hover,
.logout-link:hover {
    transform: translateY(-3px) scale(1.01);
}

.logout-link {
    color: var(--text);
    background: rgba(13, 18, 35, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

button:hover {
    box-shadow: 0 20px 42px rgba(124, 58, 237, 0.28);
}

.cta-button:hover::before {
    transform: translateX(130%);
}

.secondary-button {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.45);
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    color: #fecaca;
    background: rgba(69, 10, 10, 0.72);
    border: 1px solid rgba(248, 113, 113, 0.22);
}

.alert-success {
    color: #a7f3d0;
    background: rgba(6, 78, 59, 0.72);
    border-color: rgba(16, 185, 129, 0.24);
}

.dashboard-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.profile-card {
    margin: 28px 0 20px;
}

.level-badge {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.badge-admin {
    color: #dbeafe;
    background: rgba(29, 78, 216, 0.28);
}

.badge-manager {
    color: #ccfbf1;
    background: rgba(13, 148, 136, 0.28);
}

.badge-user {
    color: #fde68a;
    background: rgba(180, 83, 9, 0.24);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.stat-box {
    flex-direction: column;
    align-items: flex-start;
}

.stat-box span {
    color: var(--muted);
    font-size: 0.92rem;
}

.stat-box strong {
    font-size: 1.1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
    margin-top: 30px;
}

.admin-panel {
    padding: 24px;
    border-radius: 24px;
    background: rgba(8, 13, 28, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.limited-panel {
    margin-top: 28px;
}

.section-heading h2 {
    margin-bottom: 18px;
}

.user-list {
    display: grid;
    gap: 14px;
}

.user-row {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.user-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.user-meta span {
    color: var(--muted);
}

.mini-badge {
    padding: 8px 12px;
    font-size: 0.72rem;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    animation: reveal 0.85s ease forwards;
}

.reveal-delay {
    animation-delay: 0.18s;
}

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

@keyframes float {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -18px, 0) scale(1.04);
    }
}

@keyframes slideGallery {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 9px));
    }
}

@media (max-width: 860px) {
    .auth-shell,
    .stats-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .brand-panel,
    .form-panel,
    .dashboard-card {
        padding: 28px;
    }

    .hero-slider {
        margin: -28px -28px 24px;
    }

    .slide-card {
        width: 210px;
        height: 126px;
    }

    .dashboard-topbar,
    .profile-card,
    .demo-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .inline-form {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .slide-track {
        transform: none !important;
    }
}
