/* -------------------------------------------------------------------------- */
/* Filter Bars & Inline Controls                                              */
/* -------------------------------------------------------------------------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    align-items: flex-end;
}

.filter-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }
    .filter-bar .form-group,
    .filter-bar .form-input,
    .filter-bar select {
        width: 100%;
    }
    .filter-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* -------------------------------------------------------------------------- */
/* Design Tokens & Global Base                                                */
/* -------------------------------------------------------------------------- */
:root {
    --color-black: #020617;
    --color-white: #ffffff;
    --color-surface: #0b1120;
    --color-surface-2: #111a2c;
    --color-muted: #94a3b8;
    --color-border: rgba(148, 163, 184, 0.14);
    --color-primary: #8B5CF6;
    --color-secondary: #3B82F6;
    --color-accent: #EC4899;
    --color-cyan: #06B6D4;
    --color-success: #22C55E;
    --color-warning: #FBBF24;
    --color-danger: #EF4444;
    --gradient-primary: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --topbar-height: 72px;
    --sidebar-width: 280px;
    --content-max-width: 1440px;
    --spacing-xs: 0.35rem;
    --spacing-sm: 0.6rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --radius-pill: 999px;
    --radius-lg: 1rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-family);
    background: var(--color-black);
    color: #f8fafc;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

body.admin-layout,
body.customer-layout,
body.employee-layout {
    background: radial-gradient(circle at 8% 15%, rgba(139, 92, 246, 0.18), transparent 40%),
                radial-gradient(circle at 70% 10%, rgba(6, 182, 212, 0.22), transparent 35%),
                #01060f;
    color: #e2e8f0;
}

body.customer-layout,
body.employee-layout {
    --sidebar-width: 240px;
    --topbar-height: 68px;
}

body.sidebar-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Animated gradient background ------------------------------------------- */
.hero-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: #030712;
}

.hero-background::before,
.hero-background::after {
    content: '';
    position: absolute;
    inset: -50%;
    background-size: 400% 400%;
    animation: gradientFlow 32s linear infinite;
    opacity: 0.75;
}

.hero-background::before {
    background: radial-gradient(circle at 25% 30%, rgba(6, 182, 212, 0.4), transparent 40%),
                radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.35), transparent 45%),
                radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.25), transparent 55%);
    filter: blur(60px);
}

.hero-background::after {
    background: linear-gradient(135deg,
        rgba(6, 182, 212, 0.35),
        rgba(139, 92, 246, 0.3),
        rgba(236, 72, 153, 0.35),
        rgba(59, 130, 246, 0.28));
    mix-blend-mode: screen;
}

/* Intro Overlay ------------------------------------------------------------ */
.intro-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.35), transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(6, 182, 212, 0.35), transparent 40%),
                #01060f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    z-index: 1400;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    transition: opacity 0.6s ease;
}

.intro-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.intro-content {
    text-align: center;
}

.intro-logo {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: introPulse 1.8s ease both;
}

.intro-slogan {
    font-size: clamp(1rem, 3vw, 1.35rem);
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.25em;
    opacity: 0;
    animation: introSlideUp 1s ease 0.6s forwards;
}

@keyframes introPulse {
    0% { transform: scale(0.75); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes introSlideUp {
    0% { transform: translateY(15px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

body.intro-visible {
    overflow: hidden;
}

@keyframes gradientFlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sidebar + topbar -------------------------------------------------------- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.78);
    opacity: 0;
    pointer-events: none;
    z-index: 880;
    transition: opacity 0.3s ease;
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: all;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(5, 9, 20, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(26px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem 1.75rem;
    z-index: 900;
    transform: translateX(0);
    transition: transform 0.35s ease;
}

body:not(.admin-layout):not(.customer-layout):not(.employee-layout) .app-sidebar {
    display: none;
}

@media (max-width: 1023px) {
    .app-sidebar {
        transform: translateX(-110%);
    }
    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sidebar-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: grid;
    place-items: center;
    color: #021027;
    font-weight: 800;
}

.logo-text {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
}

.logo-text small {
    color: var(--color-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 1.35rem;
    cursor: pointer;
    display: none;
}

@media (max-width: 1023px) {
    .sidebar-close {
        display: inline-flex;
    }
}

.sidebar-sections {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.sidebar-section-title {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.65rem;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.85);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-link i {
    width: 1.15rem;
    color: rgba(226, 232, 240, 0.65);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.user-chip i {
    font-size: 1.35rem;
    color: rgba(226, 232, 240, 0.9);
}

.user-chip small {
    color: var(--color-muted);
    font-size: 0.75rem;
}

.app-topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: rgba(2, 6, 23, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    z-index: 800;
}

@media (max-width: 1023px) {
    .app-topbar {
        left: 0;
        padding: 0 1.5rem;
    }
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: rgba(248, 250, 252, 0.85);
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
}

.icon-button.only-mobile {
    display: none;
}

@media (max-width: 1023px) {
    .icon-button.only-mobile {
        display: inline-flex;
    }
}

/* Public navbar -------------------------------------------------------- */
.navbar {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

body.admin-layout .navbar {
    background: #111827;
    border-bottom: 1px solid #1f2937;
    backdrop-filter: none;
    padding: 0.75rem 2rem;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.7);
    position: sticky;
    top: 0;
    z-index: 500;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.navbar-menu {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.navbar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 98;
}

.navbar-overlay.is-visible {
    opacity: 1;
    pointer-events: all;
}

body.nav-open {
    overflow: hidden;
}

.nav-groups {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-group-toggle {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 0.2rem;
    cursor: pointer;
}

.nav-group-toggle i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.nav-group.open .nav-group-toggle i {
    transform: rotate(180deg);
}

.nav-group-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-hint {
    font-size: 0.76em;
    color: #94a3b8;
    margin-left: 0.35rem;
}

.nav-tool {
    color: #fbbf24 !important;
}

.nav-tool.nav-tool-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.nav-tool-status {
    font-size: 0.75rem;
    color: #94a3b8;
    min-height: 1rem;
    margin-top: 0.15rem;
}

.nav-tool-status.error {
    color: #f87171;
}

.nav-tool-status.success {
    color: #22C55E;
}

.navbar-section {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

.navbar-section-title {
    display: none;
}

.navbar-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: transparent;
}

.navbar-link i {
    font-size: 0.9rem;
    opacity: 0.9;
    display: inline-block;
}

.navbar-link:hover {
    color: #8B5CF6;
    background: rgba(139, 92, 246, 0.15);
}

.navbar-link.active {
    color: #8B5CF6;
    background: rgba(139, 92, 246, 0.2);
}

body.admin-layout .navbar-link {
    color: #cbd5f5;
    background: transparent;
    padding: 0.35rem 0.6rem;
    border-radius: 0.45rem;
}

body.admin-layout .navbar-link:hover,
body.admin-layout .navbar-link.active {
    background: #1f2937;
    color: #ffffff;
}

.navbar-user {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.navbar-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
}

.navbar-user-info i {
    font-size: 1.1rem;
    color: rgba(139, 92, 246, 0.8);
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

@media (min-width: 1024px) {
    .navbar-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 2rem;
    }

    .navbar-menu {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 2rem;
        position: static;
        width: 100%;
        padding: 0;
        max-width: none;
        background: transparent;
        border: none;
    }

    .navbar-toggle {
        display: none;
    }

    .nav-groups {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem 2rem;
    }

    .nav-group-toggle {
        cursor: default;
    }

    .nav-group-toggle i {
        display: none;
    }
}

@media (max-width: 1023px) {
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(85%, 420px);
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(30px) saturate(180%);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        align-items: stretch;
        padding: 4rem 1.5rem 1.5rem;
        gap: 1.25rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }

    .navbar-menu.active {
        right: 0;
    }

    .navbar-toggle {
        display: inline-flex;
    }

    .nav-group {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 0.5rem;
    }

    .nav-group-links {
        display: none;
        padding-bottom: 0.5rem;
    }

    .nav-group.open .nav-group-links {
        display: flex;
    }

    .navbar-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .navbar-link {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 0.65rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .navbar-user {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem 1rem 1.5rem;
        margin-top: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        gap: 0.75rem;
        background: rgba(139, 92, 246, 0.08);
    }

    .navbar-user .btn-logout {
        width: 100%;
        justify-content: center;
    }
}

.navbar-menu::-webkit-scrollbar {
    width: 8px;
}

.navbar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-menu::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.75);
    border-radius: 4px;
}
.app-content {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: calc(var(--topbar-height) + var(--spacing-lg)) var(--spacing-xl) 3rem;
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .app-content {
        padding-left: calc(var(--sidebar-width) + 2.5rem);
        padding-right: var(--spacing-xl);
    }
}

@media (max-width: 1023px) {
    .app-content {
        padding: calc(var(--topbar-height) + var(--spacing-md)) var(--spacing-lg) 2.5rem;
    }
}

/* Containers & typography ------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

body.admin-layout .container {
    max-width: 1200px;
    padding: 2rem 1.75rem 1.5rem;
}

.admin-main {
    margin-top: calc(var(--topbar-height) + 2.5rem);
    padding-top: 2rem;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.page-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    color: var(--color-muted);
}

.page-title {
    font-size: clamp(1.75rem, 2vw, 2.4rem);
    margin: 0;
}

.page-subtitle {
    color: var(--color-muted);
    max-width: 640px;
    margin: 0;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

.section-grid {
    display: grid;
    gap: 1.5rem;
}

.section-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.section-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Cards & stats ----------------------------------------------------------- */
.content-section {
    margin-bottom: var(--spacing-xl);
}

.content-section:last-child {
    margin-bottom: 0;
}

.card {
    background: rgba(11, 17, 32, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1.15rem;
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(2, 8, 35, 0.35);
    backdrop-filter: blur(18px);
}

body.admin-layout .card {
    background: #1c1f2b;
    border: 1px solid #262c3f;
    box-shadow: none;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.card-balance .card-header {
    align-items: flex-start;
}

.balance-value {
    font-size: clamp(2rem, 3vw, 2.6rem);
    color: var(--color-success);
    font-weight: 700;
    line-height: 1.1;
    text-align: right;
}

.transaction-grid {
    gap: var(--spacing-md);
}

.card-title {
    margin: 0;
    font-size: 1.15rem;
}

/* Generic grids --------------------------------------------------------- */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
}

.transaction-card {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.transaction-card-title {
    font-weight: 600;
}

.transaction-card .transaction-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.transaction-card .transaction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    gap: var(--spacing-sm);
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.is-credit {
    color: var(--color-success);
}

.transaction-amount.is-debit {
    color: var(--color-danger);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: -30%;
    background: var(--gradient-primary);
    opacity: 0.08;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-trend {
    font-size: 0.85rem;
    color: var(--color-success);
}

/* Buttons ----------------------------------------------------------------- */
.btn,
.btn-secondary,
.btn-ghost,
.btn-danger,
.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-pill);
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.2;
    min-height: 48px;
    min-width: 48px;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn {
    background: var(--gradient-primary);
    color: #f8fafc;
    box-shadow: 0 15px 32px rgba(8, 108, 212, 0.35);
}

.btn:hover,
.btn-secondary:hover,
.btn-ghost:hover,
.btn-danger:hover,
.btn-success:hover {
    transform: translateY(-1px);
}

.btn:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible,
.btn-danger:focus-visible,
.btn-success:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.btn:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled,
.btn-danger:disabled,
.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
}

.btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fee2e2;
}

.btn-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: #22C55E;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.55);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.45);
}

body.admin-layout .btn {
    border-radius: 0.5rem;
    box-shadow: none;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
}

body.admin-layout .btn-secondary {
    background: #1f2937;
    border: 1px solid #2f3c52;
}

body.admin-layout .btn-danger {
    border: 1px solid rgba(239, 68, 68, 0.6);
}

.btn-small {
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    min-height: 40px;
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    padding: 0;
}

.btn.active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* Alerts ------------------------------------------------------------------ */
.alert {
    border-radius: 0.95rem;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
    margin-bottom: 1.25rem;
}

body.admin-layout .alert {
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.alert-success { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); color: #a7f3d0; }
.alert-warning { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }
.alert-error   { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: #fecaca; }
.alert-info    { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.35); color: #bfdbfe; }

/* Tables ------------------------------------------------------------------ */
.table-responsive {
    overflow-x: auto;
    border-radius: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.table th,
.table td {
    padding: 0.95rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.table th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--color-muted);
}

.table tr:last-child td {
    border-bottom: none;
}

body.admin-layout .table {
    border: 1px solid #1f2937;
}

body.admin-layout .table th,
body.admin-layout .table td {
    border-color: #1f2937;
    padding: 0.85rem;
}

body.admin-layout .table thead th {
    background: #111827;
    color: #cbd5f5;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.table-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.table-row-actions .btn {
    min-height: 40px;
    padding: 0.45rem 1.05rem;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .table-row-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .table-row-actions .btn {
        width: 100%;
    }
}

.table-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: rgba(248, 250, 252, 0.65);
}

.table-row-actions .table-hint {
    flex-basis: 100%;
    margin-top: 0.25rem;
}

.table-row-actions form {
    margin: 0;
}

.table-inline-form {
    display: inline-flex;
    width: auto;
}

.table-card {
    padding: 0;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.table-card .table {
    min-width: 720px;
}

.table.table-sticky thead th {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2;
}

.admin-meta {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.35rem;
}

.text-muted {
    color: rgba(255, 255, 255, 0.65);
}

.text-success {
    color: var(--color-success);
}

.text-danger {
    color: var(--color-danger);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
}

.data-pair {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.data-value {
    font-weight: 600;
    font-size: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: 1rem;
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.chip.is-info {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.35);
    color: #c4b5fd;
}

.chip.is-neutral {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
}

/* Quote details --------------------------------------------------------- */
.quote-items {
    margin: 2rem 0 1rem;
}

.quote-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quote-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.quote-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.quote-notes {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1300;
}

.modal-card {
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-card .card-title {
    margin-bottom: 1.25rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.form-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.balance-card {
    margin-bottom: 1.5rem;
}

.filter-actions {
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    padding-bottom: var(--spacing-xs);
    scroll-snap-type: x proximity;
}

.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
}

.tab {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tab.active {
    color: #fff;
    border-bottom-color: rgba(139, 92, 246, 0.9);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@media (max-width: 600px) {
    .tabs {
        flex-wrap: nowrap;
    }
    .tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

.form-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-option input {
    width: auto;
}

.form-option-stack {
    align-items: flex-start;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-subtitle {
    margin: var(--spacing-xl) 0 var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.discount-row {
    display: flex;
    gap: var(--spacing-sm);
}

.discount-row .form-input {
    flex: 1;
}

.ticket-holder-card {
    margin-bottom: var(--spacing-md);
}

.ticket-holder-grid {
    margin-top: var(--spacing-md);
    gap: var(--spacing-md);
}

.order-line {
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.order-summary {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.summary-row.is-discount {
    color: var(--success-color);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-note {
    margin-top: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--success-color);
}

.credit-box {
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    background: rgba(34, 197, 94, 0.08);
}

.payment-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.payment-option input {
    width: auto;
}

.payment-option.is-credit {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.12);
}

.payment-option.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-option-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.payment-option-title {
    font-weight: 600;
}

.payment-option-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.full-width {
    width: 100%;
}

.link-inline {
    color: var(--primary-color);
    text-decoration: underline;
}

.centered-card {
    max-width: 640px;
    margin: 0 auto;
}

.feedback-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.feedback-icon {
    font-size: 3.5rem;
}

.feedback-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.card-input {
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
}

body.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-md);
}

.auth-wrapper {
    width: 100%;
    max-width: 480px;
}

.auth-wrapper.is-wide {
    max-width: 640px;
}

.auth-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.auth-header {
    text-align: center;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    margin-top: var(--spacing-xs);
}

.auth-links {
    margin-top: var(--spacing-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-links-inline {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
}

.auth-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #fff;
}

.auth-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.auth-info-list {
    padding-left: 1.25rem;
    margin: 0;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.8);
}

.auth-note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--spacing-sm);
}

.auth-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.auth-actions .btn {
    min-width: 180px;
}

.auth-icon {
    font-size: 3rem;
}

.auth-icon.is-success {
    color: var(--success-color);
}

.auth-icon.is-error {
    color: var(--danger-color);
}

.shop-highlight {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.shop-highlight-icon {
    font-size: 2.25rem;
}

.shop-highlight-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .shop-highlight {
        flex-direction: column;
        align-items: flex-start;
    }
    .event-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .favorite-btn {
        align-self: flex-start;
    }
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.favorite-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.85rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.15rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.favorite-btn.is-active {
    color: #fbbf24;
    border-color: #fbbf24;
}

.ticket-type-grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: var(--spacing-md);
    width: 100%;
}

@media (max-width: 560px) {
    .ticket-type-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

.ticket-type-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.02);
}

.ticket-type-card.is-muted {
    opacity: 0.6;
}

.ticket-type-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-type-name {
    font-weight: 600;
}

.ticket-type-price {
    font-weight: 700;
    font-size: 1.25rem;
}

.ticket-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ticket-qr-block {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
    text-align: center;
}

.ticket-qr-image {
    max-width: 260px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ticket-qr-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--spacing-lg);
}

.tab {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tab.active {
    color: #fff;
    border-bottom-color: rgba(139, 92, 246, 0.9);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.mfa-box {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.scanner-layout {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.scanner-card video {
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-xl);
    background: #000;
}

.scanner-card {
    text-align: center;
}

.scanner-overlay {
    position: relative;
    display: inline-block;
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border: 3px solid #22C55E;
    border-radius: var(--radius-xl);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}

.scanner-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--spacing-md);
}

.scanner-stat {
    text-align: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.scanner-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.scanner-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.scan-result {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.scan-success {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.35);
    color: #22c55e;
}

.scan-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

.sync-status-card {
    display: none;
}

.sync-status-card.is-active {
    display: block;
}

.offline-badge {
    display: none;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.sync-warning {
    display: none;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fecaca;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.sync-conflict-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.sync-conflict-item {
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    background: rgba(251, 191, 36, 0.08);
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.sync-conflict-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.sync-conflict-item small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.is-hidden {
    display: none !important;
}

.time-tracking-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.time-tracking-card.is-active .status-chip {
    align-self: flex-start;
}

.time-tracking-timer {
    padding: var(--spacing-lg);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: var(--radius-xl);
    text-align: center;
    background: rgba(34, 197, 94, 0.08);
}

.timer-display {
    font-size: 2.75rem;
    font-weight: 700;
    color: #22C55E;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
}

.timer-label {
    margin-top: var(--spacing-xs);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.65);
}

.time-tracking-info {
    display: grid;
    gap: var(--spacing-sm);
}

.time-tracking-info .info-item {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
}

.time-tracking-info .info-item i {
    color: rgba(139, 92, 246, 0.85);
    font-size: 1.25rem;
}

.info-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
}

.time-tracking-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.time-stats-grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: var(--spacing-md);
}

.stat-box {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.02);
}

.stat-box-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.stat-box-icon.is-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

.stat-box-icon.is-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.stat-box-icon.is-primary {
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
}

.stat-box-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.25rem;
}

.stat-box-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.stat-box-earnings {
    font-size: 0.85rem;
    color: rgba(34, 197, 94, 0.85);
    font-weight: 600;
}

.time-entry-row.is-long {
    background: rgba(245, 158, 11, 0.05);
}

.time-entry-duration {
    font-weight: 700;
    font-size: 1rem;
}

.time-entry-earnings {
    font-size: 0.85rem;
    color: rgba(34, 197, 94, 0.9);
}

.time-entry-note {
    font-size: 0.8rem;
    color: rgba(245, 158, 11, 0.9);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-muted {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.ticket-card .card-title {
    margin-bottom: 0.35rem;
}

.section-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--spacing-md);
}

.wizard-steps {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.wizard-step {
    flex: 1;
    min-width: 160px;
    padding: 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.wizard-step.is-active {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.35);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.25);
}

.ticket-rows {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.ticket-card {
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 6, 18, 0.45);
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: var(--spacing-sm);
}

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
}

.wizard-actions {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.summary-card {
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 6, 18, 0.35);
}

.summary-card + .summary-card {
    margin-top: var(--spacing-md);
}

.wizard-review-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wizard-review-item {
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wizard-review-item:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .wizard-steps {
        flex-direction: column;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.2rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.status-chip.is-valid {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
    color: var(--color-success);
}

.status-chip.is-pending {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.35);
    color: var(--color-warning);
}

.status-chip.is-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--color-danger);
}

.availability-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 34px;
    padding: 0.2rem 0.85rem;
    border-radius: 0.65rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.availability-chip.is-available {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--color-success);
}

.availability-chip.is-empty {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-danger);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1300;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-card .card-title {
    margin-bottom: 1.25rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge.success { background: rgba(34, 197, 94, 0.15); color: var(--color-success); }
.badge.warning { background: rgba(251, 191, 36, 0.15); color: var(--color-warning); }
.badge.danger  { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.badge.info    { background: rgba(59, 130, 246, 0.15); color: var(--color-secondary); }

@media (max-width: 768px) {
    .table {
        min-width: 0;
    }
    .table thead {
        display: none;
    }
    .table tbody tr {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        padding: 1rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }
    .table td {
        border: none;
        padding: 0;
    }
    .table td::before {
        content: attr(data-label);
        text-transform: uppercase;
        letter-spacing: 0.12em;
        font-size: 0.65rem;
        color: var(--color-muted);
        display: block;
        margin-bottom: 0.2rem;
    }
}

/* Forms ------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(248, 250, 252, 0.9);
}

.form-input,
textarea.form-input,
select.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #f8fafc;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-input:focus-visible {
    border-color: rgba(139, 92, 246, 0.6);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-help {
    font-size: 0.8rem;
    color: var(--color-muted);
}

body.admin-layout .form-group {
    margin-bottom: 1rem;
}

body.admin-layout .form-input,
body.admin-layout textarea.form-input {
    background: #111827;
    border: 1px solid #2b3549;
    border-radius: 0.5rem;
    color: #e2e8f0;
}

body.admin-layout .form-input::placeholder {
    color: #64748b;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.form-actions-split {
    justify-content: space-between;
}

.form-actions-split .btn {
    flex: 0 0 auto;
}

.form-error {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #F87171;
}

.input-error {
    border-color: rgba(239, 68, 68, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

@media (max-width: 640px) {
    .form-actions-split {
        flex-direction: column;
        align-items: stretch;
    }
    .form-actions-split .btn {
        width: 100%;
    }
}

/* Empty states ------------------------------------------------------------ */
.empty-state {
    padding: 2rem;
    border-radius: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    text-align: center;
    color: var(--color-muted);
}

.empty-state-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

/* Customer & employee nuances -------------------------------------------- */
body.customer-layout .app-sidebar,
body.employee-layout .app-sidebar {
    background: rgba(7, 10, 20, 0.95);
}

body.customer-layout .page-header,
body.employee-layout .page-header {
    margin-bottom: 1.5rem;
}

/* Responsive tweaks ------------------------------------------------------- */
@media (max-width: 1023px) {
    .page-actions {
        width: 100%;
    }
}

/* Utility ---------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
