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

:root {
    --bg: #07090d;
    --bg-soft: #0c0f16;
    --panel: rgba(18, 22, 32, 0.88);
    --panel-2: rgba(22, 27, 39, 0.9);
    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --red: #ef4444;
    --red-dark: #dc2626;
    --green: #22c55e;
    --blue: #60a5fa;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.12), transparent 34%),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.08), transparent 30%),
        linear-gradient(180deg, #0b0e14 0%, #07090d 100%);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
    letter-spacing: -0.02em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

/* NAV */

nav {
    height: 78px;
    padding: 0 34px;
    background: rgba(9, 12, 18, 0.78);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

nav h2::before {
    content: "";
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 12px;
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.8);
}

nav a {
    color: #fecaca;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.06);
    transition: 0.2s ease;
}

nav a:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

main {
    padding: 34px;
    position: relative;
    z-index: 1;
}

/* LOGIN */

.login-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px;
}

.login-shell {
    width: 100%;
    max-width: 430px;
}

.login-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: linear-gradient(180deg, rgba(21, 25, 36, 0.94), rgba(13, 16, 24, 0.94));
    border: 1px solid var(--border-strong);
    border-radius: 30px;
    padding: 34px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: radial-gradient(circle at 20% 0%, rgba(239, 68, 68, 0.22), transparent 32%);
    pointer-events: none;
}

.login-logo {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--red), #991b1b);
    box-shadow: 0 18px 45px rgba(239, 68, 68, 0.3);
    margin-bottom: 22px;
}

.login-logo::after {
    content: "G";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 24px;
}

.login-card h1,
.login-card p,
.login-card input,
.login-card button,
.login-card .error {
    position: relative;
}

.login-card h1 {
    margin: 0;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.07em;
}

.login-card p {
    margin: 8px 0 28px;
    color: var(--muted);
    font-weight: 500;
}

.login-card button {
    width: 100%;
    margin-top: 8px;
}

/* CARDS */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}

.card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(22, 27, 39, 0.96), rgba(14, 18, 27, 0.96));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    min-height: 120px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.25);
    transition: 0.22s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(239, 68, 68, 0.28);
    box-shadow: 0 26px 70px rgba(0,0,0,0.35);
}

.card::after {
    content: "";
    position: absolute;
    right: -38px;
    top: -38px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    filter: blur(4px);
}

.card span {
    color: var(--muted);
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
}

.card strong {
    font-size: 31px;
    font-weight: 900;
    letter-spacing: -0.06em;
}

/* FORMS */

input,
textarea {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 16px;
    padding: 14px 15px;
    background: rgba(7, 10, 16, 0.86);
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    outline: none;
    font-family: inherit;
    font-weight: 600;
    transition: 0.18s ease;
}

input::placeholder,
textarea::placeholder {
    color: #64748b;
}

input:focus,
textarea:focus {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.11);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

button,
.btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 0;
    border-radius: 15px;
    padding: 13px 18px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.22);
    transition: 0.2s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(239, 68, 68, 0.32);
}

.danger {
    background: linear-gradient(135deg, #991b1b, #7f1d1d);
}

.error {
    background: rgba(127, 29, 29, 0.36);
    color: #fecaca;
    padding: 13px 14px;
    border-radius: 15px;
    margin: 18px 0;
    border: 1px solid rgba(248, 113, 113, 0.18);
    font-size: 14px;
    font-weight: 700;
}

/* FILTERS */

.filters {
    display: grid;
    grid-template-columns: 1fr 220px 130px 100px;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
    background: rgba(15, 18, 27, 0.58);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 22px;
    backdrop-filter: blur(14px);
}

.filters input {
    margin: 0;
}

.filters a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 800;
    text-align: center;
    transition: 0.18s ease;
}

.filters a:hover {
    color: white;
}

/* TABLE */

.table-card,
.edit-card,
.detail-card {
    background: linear-gradient(180deg, rgba(21, 25, 36, 0.92), rgba(13, 16, 24, 0.94));
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.table-card h3,
.detail-card h3,
.edit-card h3 {
    margin: 0 0 22px;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-align: left;
    padding: 15px 14px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 900;
}

td {
    padding: 17px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-weight: 600;
}

tbody tr {
    transition: 0.16s ease;
}

tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

td:first-child {
    color: var(--muted);
}

.money {
    font-weight: 900;
    color: #f8fafc;
}

.pill {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(96, 165, 250, 0.1);
    color: #bfdbfe;
    border: 1px solid rgba(96, 165, 250, 0.18);
}

/* DETAIL */

.detail-card,
.edit-card {
    max-width: 920px;
    margin: auto;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.detail-title h3 {
    margin-bottom: 8px;
    font-size: 28px;
}

.detail-title span {
    color: var(--muted);
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 26px;
}

.info-item {
    background: rgba(7, 10, 16, 0.55);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

.info-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.info-item strong,
.info-item p {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.model-box,
.model-edit {
    background: rgba(7, 10, 16, 0.58);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    margin: 14px 0;
}

.model-box strong {
    display: block;
    font-size: 18px;
    margin-bottom: 14px;
}

.model-box p {
    margin: 9px 0;
    color: var(--muted);
    font-weight: 700;
}

.model-box p b {
    color: var(--text);
}

.actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* EDIT */

.edit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 16px;
}

.edit-card button[type="submit"] {
    margin-top: 10px;
    width: 100%;
    height: 50px;
}

/* RESPONSIVE */

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

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

@media (max-width: 800px) {
    nav {
        padding: 0 18px;
    }

    main {
        padding: 20px;
    }

    .cards,
    .filters,
    .info-grid,
    .edit-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 28px;
    }
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    box-shadow: none;
}

.secondary:hover {
    background: rgba(255,255,255,0.13);
}

.pay-form {
    margin-bottom: 22px;
}

.pay-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 24px;
}

.pay-breakdown div {
    background: rgba(7, 10, 16, 0.58);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
}

.pay-breakdown span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.pay-breakdown strong {
    font-size: 28px;
    font-weight: 900;
    display: block;
}

.pay-breakdown small {
    color: var(--muted-2);
    display: block;
    margin-top: 8px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .pay-breakdown {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 6px;
    }
}

.success {
    background: rgba(20, 83, 45, 0.36);
    color: #bbf7d0;
    padding: 13px 14px;
    border-radius: 15px;
    margin: 18px 0;
    border: 1px solid rgba(34, 197, 94, 0.22);
    font-size: 14px;
    font-weight: 700;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 18px;
    color: var(--text);
    font-weight: 700;
}

.checkbox input {
    width: auto;
    margin: 0;
}

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

.admin-user-card {
    background: rgba(7, 10, 16, 0.58);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
}

.admin-user-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-user-card-head h4 {
    margin: 0;
    font-size: 18px;
}


.pill-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.pill-muted {
    background: rgba(148, 163, 184, 0.08);
    color: var(--muted);
    border-color: rgba(148, 163, 184, 0.18);
}

.muted-text {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.admin-actions,
.admin-secondary-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.admin-secondary-actions form {
    margin: 0;
}

.danger-button {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0.08));
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}


.btn.secondary {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn.secondary:hover {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.profile-hero {
    margin-bottom: 26px;
}

.compact-breakdown {
    margin-top: 24px;
}

.empty-state-cell {
    text-align: center;
    color: var(--muted);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

@media (max-width: 720px) {
    nav {
        height: auto;
        padding: 18px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    main {
        padding: 20px;
    }

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

    .nav-links {
        flex-wrap: wrap;
    }
}


select {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 16px;
    padding: 14px 15px;
    background: rgba(7, 10, 16, 0.86);
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    outline: none;
    font-family: inherit;
    font-weight: 600;
    transition: 0.18s ease;
}

select:focus {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.11);
}

.profile-page,
.calculator-page {
    max-width: 1600px;
    margin: 0 auto;
}

.profile-shell {
    display: grid;
    gap: 24px;
}

.feature-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(21, 25, 36, 0.95), rgba(12, 16, 24, 0.96));
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.feature-card::after {
    content: "";
    position: absolute;
    right: -42px;
    top: -42px;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.08);
    filter: blur(3px);
    pointer-events: none;
}

.profile-hero-card {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 24px;
    align-items: stretch;
    background: linear-gradient(180deg, rgba(18, 23, 35, 0.98), rgba(10, 13, 20, 0.98));
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.profile-hero-main h1 {
    margin: 10px 0 8px;
    font-size: 46px;
    font-weight: 900;
    letter-spacing: -0.07em;
}

.profile-hero-main p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    font-weight: 700;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fecaca;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
}

.profile-hero-side {
    display: grid;
    gap: 18px;
}

.hero-period-chip {
    justify-self: flex-end;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.18);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-rate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.mini-stat {
    background: rgba(5, 8, 14, 0.74);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
}

.mini-stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.mini-stat strong {
    display: block;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.mini-stat.accent {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(59, 130, 246, 0.09));
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    min-height: 170px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card strong {
    display: block;
    font-size: 44px;
    font-weight: 900;
    letter-spacing: -0.07em;
    margin-bottom: 12px;
}

.stat-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-head h3 {
    margin: 0 0 8px;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.segmented-actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.segment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 122px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(6, 10, 16, 0.8);
    color: var(--muted);
    text-decoration: none;
    font-weight: 900;
    transition: 0.18s ease;
}

.segment-btn:hover,
.segment-btn.active {
    color: white;
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(220, 38, 38, 0.94));
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.22);
}

.profile-pay-grid {
    margin-top: 12px;
}

.shifts-hero {
    margin-bottom: 22px;
}

.shifts-table-card {
    padding-top: 18px;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 24px;
    align-items: start;
}

.calculator-card,
.calculator-results,
.calculator-preview {
    min-width: 0;
}

.calculator-form {
    margin-top: 10px;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.full-span {
    grid-column: 1 / -1;
}

.calculator-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.calculator-stat-grid {
    grid-template-columns: 1fr;
    margin-bottom: 18px;
}

.stat-card.compact {
    min-height: auto;
}

.stat-card.compact strong {
    font-size: 34px;
}

.template-output {
    margin: 0;
    padding: 22px;
    border-radius: 20px;
    background: rgba(5, 8, 14, 0.84);
    border: 1px solid var(--border);
    color: #f8fafc;
    white-space: pre-wrap;
    font: 700 14px/1.7 Inter, Arial, sans-serif;
}

.empty-state-cell {
    text-align: center;
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 1280px) {
    .profile-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-hero-card,
    .calculator-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .hero-rate-grid,
    .profile-stat-grid,
    .calculator-grid,
    .pay-breakdown {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
    }

    .profile-hero-main h1 {
        font-size: 36px;
    }

    .stat-card strong {
        font-size: 34px;
    }
}


/* CALCULATOR REFRESH */

.calculator-layout.classic {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    align-items: start;
}

.calculator-meta-grid {
    margin-bottom: 24px;
}

.calculator-model-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 26px 0 18px;
}

.calculator-model-toolbar h4 {
    margin: 0 0 4px;
    font-size: 18px;
}

.calculator-model-toolbar p {
    margin: 0;
    color: var(--muted);
}

.model-sections {
    display: grid;
    gap: 18px;
}

.model-section {
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(15, 19, 29, 0.9), rgba(9, 12, 19, 0.92));
}

.model-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.model-section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.ghost-danger {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.16);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.ghost-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

.model-totals-list {
    display: grid;
    gap: 14px;
    margin: 22px 0;
}

.model-total-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
}

.model-total-card span,
.model-total-card small {
    display: block;
}

.model-total-card span {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.model-total-card strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.model-total-card small {
    color: var(--muted);
    margin-top: 4px;
}

.calculator-preview {
    margin-top: 0;
}

@media (max-width: 1100px) {
    .calculator-layout.classic {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .calculator-model-toolbar,
    .model-section-head,
    .model-total-card {
        flex-direction: column;
        align-items: stretch;
    }
}


.flash-banner {
    border-radius: 16px;
    padding: 14px 16px;
    font-weight: 800;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}

.flash-banner.error {
    background: rgba(127, 29, 29, 0.32);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.18);
}

.flash-banner.success {
    background: rgba(20, 83, 45, 0.32);
    color: #bbf7d0;
    border-color: rgba(74, 222, 128, 0.18);
}

.admin-action-row {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
}

.payment-history-panel {
    margin-top: 28px;
}

.confirm-payment-card {
    max-width: 1180px;
    margin: 0 auto;
}

.confirm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.payment-label-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    background: rgba(96, 165, 250, 0.08);
    color: #bfdbfe;
    font-weight: 900;
}

.warning-box {
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(127, 29, 29, 0.24);
    border: 1px solid rgba(248, 113, 113, 0.16);
    color: #fecaca;
    font-weight: 700;
}

.confirm-actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.confirm-actions form {
    margin: 0;
}

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


/* MINIGAME */

.minigame-page {
    padding-top: 28px;
}

.minigame-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.minigame-panel,
.leaderboard-panel {
    background: linear-gradient(180deg, rgba(20, 24, 34, 0.94), rgba(11, 14, 21, 0.96));
    border: 1px solid var(--border-strong);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.minigame-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.minigame-head h1 {
    margin: 6px 0 8px;
    font-size: clamp(30px, 3vw, 42px);
    letter-spacing: -0.05em;
}

.muted-copy {
    margin: 0;
    color: var(--muted);
    max-width: 620px;
}

.minigame-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.minigame-actions button,
.secondary-button {
    border: 1px solid rgba(239, 68, 68, 0.24);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.22), rgba(127, 29, 29, 0.18));
    color: #fff1f2;
    padding: 12px 18px;
    border-radius: 16px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.minigame-actions button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
    border-color: rgba(248, 113, 113, 0.45);
}

.secondary-button {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.24);
    color: #dbeafe;
}

.minigame-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.status-chip {
    min-width: 140px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid var(--border);
}

.status-chip span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.status-chip strong {
    font-size: 24px;
}

.hearts-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid var(--border);
    min-height: 74px;
}

.hearts-bar img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.5));
    transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.hearts-bar img.lost {
    opacity: 0.22;
    transform: scale(0.88);
    filter: grayscale(1);
}

.minigame-stage-card {
    background: rgba(5, 8, 13, 0.8);
    border: 1px solid rgba(248, 113, 113, 0.12);
    border-radius: 26px;
    padding: 16px;
}

.game-stage {
    position: relative;
    min-height: 520px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(248, 113, 113, 0.18);
    background:
        radial-gradient(circle at 20% 15%, rgba(96, 165, 250, 0.1), transparent 18%),
        radial-gradient(circle at 82% 28%, rgba(239, 68, 68, 0.14), transparent 16%),
        linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(3, 7, 18, 0.98));
    cursor: none;
}

.game-stage.live {
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.12), 0 24px 60px rgba(0, 0, 0, 0.4);
}

.game-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.game-stage-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 30px;
    background: rgba(5, 8, 13, 0.56);
    backdrop-filter: blur(12px);
}

.game-stage-overlay.hidden {
    display: none;
}

.game-stage-overlay h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -0.05em;
}

.game-stage-overlay p {
    margin: 0;
    max-width: 460px;
    color: var(--muted);
}

.crosshair-indicator {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: url('/minigame/crosshair.png') center center / 52px 52px no-repeat;
    mix-blend-mode: screen;
    opacity: 0;
    transform: translate(-50%, -50%);
    will-change: transform;
    z-index: 4;
}

.game-stage.live .crosshair-indicator {
    opacity: 1;
}

.minigame-target {
    position: absolute;
    z-index: 2;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.42));
    animation: targetFloat 1.2s ease-in-out infinite alternate;
}

@keyframes targetFloat {
    from { transform: translateY(0) rotate(-2deg); }
    to { transform: translateY(-5px) rotate(2deg); }
}

.impact-burst {
    position: absolute;
    width: 22px;
    height: 22px;
    margin-left: -11px;
    margin-top: -11px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(254, 242, 242, 0.95) 0%, rgba(248, 113, 113, 0.85) 42%, rgba(248, 113, 113, 0) 72%);
    box-shadow: 0 0 28px rgba(248, 113, 113, 0.72);
    animation: burstPop 0.38s ease-out forwards;
    z-index: 5;
}

@keyframes burstPop {
    from { transform: scale(0.4); opacity: 0.95; }
    to { transform: scale(3.4); opacity: 0; }
}

.floating-score {
    position: absolute;
    transform: translate(-50%, 0);
    color: #fde68a;
    font-weight: 900;
    font-size: 20px;
    text-shadow: 0 12px 20px rgba(0, 0, 0, 0.6);
    animation: scoreFloat 0.45s ease-out forwards;
    z-index: 6;
    pointer-events: none;
}

@keyframes scoreFloat {
    from { opacity: 0.98; transform: translate(-50%, 0); }
    to { opacity: 0; transform: translate(-50%, -36px); }
}

.minigame-footer-note {
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.leaderboard-panel {
    position: sticky;
    top: 102px;
}

.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.leaderboard-entry,
.leaderboard-empty {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.76);
}

.leaderboard-empty {
    grid-template-columns: 1fr;
    text-align: center;
    color: var(--muted);
}

.leaderboard-rank {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    font-weight: 900;
}

.leaderboard-entry strong,
.leaderboard-entry small {
    display: block;
}

.leaderboard-entry small {
    margin-top: 4px;
    color: var(--muted);
}

.leaderboard-score {
    font-weight: 900;
    color: #fef08a;
}

@media (max-width: 1180px) {
    .minigame-shell {
        grid-template-columns: 1fr;
    }

    .leaderboard-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .minigame-head {
        flex-direction: column;
    }

    .game-stage {
        min-height: 440px;
    }

    .leaderboard-entry {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .leaderboard-score {
        grid-column: 2;
    }
}


.overlay-stack {
    display: grid;
    justify-items: center;
    gap: 16px;
}

.overlay-start-button {
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.26), rgba(127, 29, 29, 0.18));
    color: #fff1f2;
    padding: 14px 22px;
    border-radius: 16px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.overlay-start-button:hover {
    transform: translateY(-1px);
    border-color: rgba(248, 113, 113, 0.45);
}

/* EARNINGS */

.earnings-page {
    max-width: 1600px;
    margin: 0 auto;
}

.earnings-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr);
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
}

.earnings-hero h1 {
    margin: 8px 0 10px;
    font-size: 44px;
    line-height: 1;
}

.earnings-hero p {
    margin: 0;
    color: var(--muted);
}

.eyebrow {
    color: #93c5fd;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.earnings-period-form,
.conversion-form,
.earnings-entry-form {
    background: rgba(7, 10, 16, 0.58);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

.earnings-period-form {
    display: grid;
    grid-template-columns: 1fr 0.8fr auto;
    gap: 12px;
    align-items: end;
}

.earnings-period-form select,
.conversion-form input,
.earnings-entry-form input,
.earnings-entry-form textarea {
    margin-bottom: 0;
}

.earnings-period-form button {
    height: 48px;
}

.earnings-stat-grid,
.earnings-chart-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.earnings-stat-card span,
.earnings-insights span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.earnings-stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
    line-height: 1.1;
}

.earnings-stat-card small,
.earnings-insights small {
    display: block;
    margin-top: 8px;
    color: #cbd5e1;
}

.earnings-stat-card.profit strong {
    color: #86efac;
}

.earnings-stat-card.expense strong {
    color: #fca5a5;
}

.earnings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

.earnings-panel {
    min-width: 0;
}

.earnings-entry-form + .earnings-entry-form {
    margin-top: 18px;
}

.entry-form-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.entry-form-title span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.entry-form-title.positive span,
.pill-earning {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

.entry-form-title.negative span,
.pill-cost {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
}

.cost-form button {
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.conversion-form {
    margin-bottom: 18px;
}

.earnings-insights {
    display: grid;
    gap: 12px;
}

.earnings-insights > div {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.54);
}

.earnings-insights strong {
    display: block;
    margin-top: 8px;
    font-size: 18px;
}

.earnings-chart-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
}

.earnings-chart-card {
    min-width: 0;
}

.earnings-chart-card canvas {
    display: block;
    width: 100%;
    height: 320px;
}

.section-head.compact h3 {
    font-size: 24px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    margin-right: -8px;
}

.legend-dot.revenue {
    background: #22c55e;
}

.legend-dot.cost {
    background: #ef4444;
}

.legend-dot.net {
    background: #60a5fa;
}

.earnings-table-card form {
    margin: 0;
}

.compact-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .earnings-hero,
    .earnings-layout,
    .earnings-chart-grid {
        grid-template-columns: 1fr;
    }

    .earnings-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .earnings-hero h1 {
        font-size: 34px;
    }

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

    .earnings-stat-grid {
        grid-template-columns: 1fr;
    }
}

.game-stage-overlay p {
    margin: 0;
    max-width: 500px;
    color: var(--muted);
}


.leaderboard-panel {
    top: 88px;
    max-height: calc(100vh - 124px);
    overflow: hidden;
}

#leaderboardContent {
    max-height: calc(100vh - 210px);
    overflow: hidden;
}

.leaderboard-list {
    gap: 10px;
}

.leaderboard-entry,
.leaderboard-empty {
    padding: 12px 14px;
}

.leaderboard-rank {
    width: 40px;
    height: 40px;
}

.game-stage-overlay[data-variant="dipped"] {
    background:
        radial-gradient(circle at center, rgba(220, 38, 38, 0.14), rgba(5, 8, 13, 0.86) 58%),
        rgba(5, 8, 13, 0.84);
}

.game-stage-overlay[data-variant="dipped"] h2 {
    color: #fca5a5;
    letter-spacing: -0.06em;
    text-transform: uppercase;
    text-shadow: 0 0 22px rgba(239, 68, 68, 0.38);
    animation: dippedPulse 1.35s ease-in-out infinite;
}

.game-stage-overlay[data-variant="dipped"] p {
    color: #fecaca;
}

@keyframes dippedPulse {
    0%, 100% { transform: scale(1); opacity: 0.92; }
    50% { transform: scale(1.04); opacity: 1; }
}


.escape-phrase {
    position: absolute;
    z-index: 8;
    transform: translate(-50%, -50%);
    pointer-events: none;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 95, 95, 0.32);
    background: rgba(12, 17, 34, 0.88);
    color: #ffb3b3;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(255, 70, 70, 0.16);
    animation: escapePhraseIn 2s ease forwards;
}

@keyframes escapePhraseIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -35%) scale(0.9);
    }
    12% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    72% {
        opacity: 1;
        transform: translate(-50%, -64%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -82%) scale(0.96);
    }
}
