:root {
    --bg-page: #f1f3f5;
    --bg-soft: #e9edf1;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #dbe2ea;
    --text: #111827;
    --muted: #6b7280;
    --primary: #111827;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(180deg, #f4f5f7 0%, #eceff3 100%);
    color: var(--text);
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(148,163,184,0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(203,213,225,0.22), transparent 30%),
        #f4f5f7;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}

.auth-hero {
    padding: 72px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #111827;
}

.auth-hero-badge {
    display: inline-flex;
    width: fit-content;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15,23,42,0.06);
    color: #374151;
    font-weight: 700;
    margin-bottom: 24px;
}

.auth-hero h1 {
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.05;
    margin: 0 0 18px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-hero p {
    font-size: 18px;
    color: #4b5563;
    max-width: 620px;
    line-height: 1.6;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
}

.auth-card-modern {
    width: 100%;
    max-width: 430px;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(219,226,234,0.95);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #111827;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 18px;
}

.auth-card-modern h2,
.hero-heading,
.panel-head h2,
.modern-modal h3,
.floating-finish-title,
.page-title {
    font-family: 'Inter', Arial, sans-serif;
    font-style: normal;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-card-modern h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.auth-muted {
    color: var(--muted);
    margin: 0 0 18px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr;
}

.sidebar {
    background: #111827;
    color: #fff;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 10px 8px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #fff;
    color: #111827;
    font-weight: 800;
    font-size: 22px;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
}

.brand-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.70);
    margin-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav a {
    color: rgba(255,255,255,0.86);
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 14px;
    font-weight: 600;
    transition: 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.10);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.sidebar-footer-text {
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    line-height: 1.5;
}

.main-shell {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    background: rgba(245,247,250,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(219,226,234,0.95);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user-block {
    text-align: center;
}

.page-title {
    font-size: 30px;
    line-height: 1.05;
    color: #111827;
}

.page-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.header-action {
    display: inline-flex;
    padding: 12px 16px;
    border-radius: 14px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #e5e7eb;
    font-size: 20px;
    cursor: pointer;
}

.page-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background: #ffffff;
    color: var(--text);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.compact-hero {
    padding: 22px 24px;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-heading {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
}

.hero-text {
    margin: 10px 0 0;
    max-width: 700px;
    color: var(--muted);
    line-height: 1.6;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 22px;
}

.content-grid.single-col {
    grid-template-columns: 1fr;
}

.panel-card {
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(219,226,234,0.95);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.panel-head h2 {
    margin: 4px 0 0;
    font-size: 24px;
}

.panel-kicker {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-inline-wrap {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 14px;
    align-items: end;
}

.field-grow,
.field-fixed {
    min-width: 0;
}

label {
    display: block;
    margin: 8px 0 6px;
    font-weight: 700;
    color: #111827;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    font-size: 15px;
    background: #fff;
    color: #111827;
    outline: none;
    transition: 0.2s ease;
}

input:focus, select:focus {
    border-color: rgba(17,24,39,0.25);
    box-shadow: 0 0 0 4px rgba(17,24,39,0.05);
}

.time-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.primary-btn,
.secondary-btn,
.primary-link-btn,
.mini-action {
    appearance: none;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.primary-btn,
.primary-link-btn {
    width: 100%;
    padding: 15px 18px;
    border-radius: 16px;
    background: #111827;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.secondary-btn {
    padding: 14px 16px;
    border-radius: 16px;
    background: #eef1f4;
    color: #111827;
    font-weight: 700;
    white-space: nowrap;
}

.link-btn {
    margin-top: 4px;
    padding: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.choice-box {
    display: grid;
    gap: 12px;
}

.choice-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    margin: 0;
    font-weight: 700;
}

.choice-option input {
    width: auto;
    margin: 0;
}

.alert {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 2px;
    border: 1px solid transparent;
    font-weight: 600;
}

.alert.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #bbf7d0;
}

.alert:not(.success) {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: #fecaca;
}

.entry-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.entry-card {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
    background: #fff;
}

.entry-card-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.entry-time {
    font-size: 26px;
    font-weight: 800;
    margin-top: 8px;
}

.entry-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.entry-tags span {
    display: inline-flex;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eef1f4;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
}

.history-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.history-item span {
    font-size: 18px;
    font-weight: 700;
}

.history-item small, .muted {
    color: var(--muted);
}

.history-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.mini-action {
    display: inline-flex;
    padding: 9px 12px;
    border-radius: 12px;
    background: #eef1f4;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}

.mini-action.danger {
    background: #fee2e2;
    color: #991b1b;
}

.preview-list {
    display: grid;
    gap: 10px;
    color: #334155;
}

.action-stack {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.checkbox-line input {
    width: auto;
    margin: 0;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 40;
}

.modal.show { display: flex; }

.modal-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255,255,255,0.98);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(15,23,42,0.18);
}

.modern-modal h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 24px;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.floating-finish-message {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 80;
    animation: fadeOverlay 3.2s ease forwards;
}

.floating-finish-card {
    background: rgba(255,255,255,0.98);
    border-radius: 28px;
    padding: 28px 26px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15,23,42,0.20);
    animation: popIn 0.25s ease;
}

.floating-finish-title {
    font-size: 26px;
    margin-bottom: 8px;
}

.floating-finish-text {
    color: #475569;
    font-size: 16px;
    line-height: 1.5;
}

.app-footer {
    margin-top: auto;
    padding: 18px 28px 24px;
    border-top: 1px solid rgba(219,226,234,0.95);
    display: flex;
    gap: 12px;
    color: #6b7280;
    font-size: 14px;
}

.app-footer-centered {
    justify-content: center;
    text-align: center;
}

.footer-signature {
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 5px;
    letter-spacing: 0.02em;
    color: #374151;
    width: 100%;
    text-align: center;
}

.mobile-backdrop {
    display: none;
}

.report-page { background: #e5e7eb; }
.report-wrap { padding: 16px; overflow-x: auto; }

.monthly-sheet {
    width: 1400px;
    max-width: none;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #222;
    padding: 8px;
}

.sheet-title {
    text-align: center;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 8px;
}

.sheet-head {
    display: grid;
    grid-template-columns: 220px 1fr 1fr;
    gap: 16px;
    border: 1px solid #222;
    padding: 10px;
    margin-bottom: 8px;
    align-items: start;
}

.sheet-brand {
    font-size: 34px;
    font-weight: 700;
    color: #c1121f;
    align-self: center;
}

.sheet-head-block {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 4px 8px;
    font-size: 14px;
}

.sheet-table-wrap { overflow-x: auto; }

.sheet-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.sheet-table th,
.sheet-table td {
    border: 1px solid #222;
    padding: 4px 5px;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
}

.sheet-table thead th {
    background: #f3f4f6;
    font-weight: 700;
}

.sheet-table td:nth-child(8),
.sheet-table td:nth-child(9) { text-align: left; }

/* operação */
.operation-simple-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 220px);
}

.centered-op-wrap {
    width: 100%;
}

.operation-simple-card {
    width: 100%;
    max-width: 640px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.centered-op-card {
    margin: 0 auto;
    text-align: center;
}

.centered-op-topline {
    justify-content: center;
    align-items: center;
    gap: 48px;
    margin-bottom: 24px;
}

.no-box-topline {
    display: flex;
}

.no-box-block {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.operation-date-label,
.operation-time-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 10px;
}

.fancy-date {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
}

.fancy-time {
    font-size: 56px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.centered-status {
    max-width: 460px;
    margin: 0 auto 22px;
    font-size: 16px;
    color: #4b5563;
}

.centered-form-stack {
    text-align: left;
}

.centered-link {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 4px;
}

.clean-time-row {
    grid-template-columns: 1fr auto;
}

.clean-secondary-btn {
    background: #eef1f4;
    border: 1px solid var(--border);
}

.clean-primary-btn {
    background: #111827;
    box-shadow: none;
}

.simple-choice-box {
    gap: 10px;
}

.simple-choice-option {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
}

@keyframes popIn {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeOverlay {
    0% { opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@media (max-width: 1100px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        z-index: 60;
        width: 300px;
        transition: left 0.25s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,0.45);
        z-index: 50;
        display: none;
    }

    .mobile-backdrop.show {
        display: block;
    }

    .mobile-menu-btn {
        display: inline-grid;
        place-items: center;
    }

    .page-content {
        padding: 18px;
    }

    .app-header {
        padding: 16px 18px;
    }

    .app-footer {
        padding: 16px 18px 22px;
        flex-direction: column;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        padding: 48px 24px 18px;
    }

    .auth-panel {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .hero-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-inline-wrap {
        grid-template-columns: 1fr;
    }

    .time-row,
    .clean-time-row {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }

    .entry-card-top {
        flex-direction: column;
    }

    .entry-tags {
        align-items: flex-start;
    }

    .centered-op-topline,
    .no-box-topline {
        flex-direction: column;
        gap: 18px;
    }

    .fancy-time {
        font-size: 44px;
    }

    .fancy-date {
        font-size: 22px;
    }

    .operation-simple-card {
        padding: 22px 18px;
    }
}

.auth-card-auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.auth-links.single {
    justify-content: center;
}

.auth-links a {
    color: #374151;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 12px 0 4px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #e5e7eb;
    z-index: 0;
}

.auth-divider span {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.94);
    padding: 0 10px;
}

.dev-reset-box {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-wrap: anywhere;
}

.dev-reset-box a {
    color: #111827;
    font-weight: 700;
    text-decoration: none;
}

.soft-separator {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 18px 0 10px;
}

/* =========================
   Auth password toggle UX
   ========================= */

.password-field {
    position: relative;
    width: 100%;
}

.password-field .password-input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #6b7280;
    cursor: pointer;
    border-radius: 999px;
    line-height: 1;
}

.password-toggle:hover {
    color: #111827;
    background: rgba(17,24,39,0.05);
}

.password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(17,24,39,0.08);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
}

.auth-card-auth .form-stack > .password-field {
    margin-bottom: 2px;
}

.password-help {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.45;
}

.auth-logo-image-wrap {
    width: 92px;
    height: 92px;
    border-radius: 22px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.auth-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =========================
   Auth centered upgrade
   ========================= */

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-layout {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-hero {
    display: none;
}

.auth-panel {
    width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card-modern.auth-card-auth {
    width: 100%;
    max-width: 560px;
    padding: 44px 36px 28px;
    gap: 12px;
}

.auth-logo-image-wrap {
    width: 190px;
    height: auto;
    min-height: 72px;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
    margin: 0 auto 10px;
}

.auth-logo-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.auth-card-auth h2,
.auth-card-auth .auth-muted,
.auth-card-auth .auth-links,
.auth-card-auth .auth-divider {
    text-align: center;
}

.auth-card-auth h2 {
    margin-top: 2px;
}

.auth-muted {
    margin-bottom: 22px;
}

.auth-links {
    justify-content: center;
    gap: 28px;
}

.form-stack {
    gap: 8px;
}

.password-field {
    position: relative;
    width: 100%;
}

.password-field .password-input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #6b7280;
    cursor: pointer;
    border-radius: 999px;
    line-height: 1;
}

.password-toggle:hover {
    color: #111827;
    background: rgba(17,24,39,0.05);
}

.password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(17,24,39,0.08);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
}

.password-toggle .eye-open {
    display: none;
}

.password-toggle .eye-closed {
    display: block;
}

.password-toggle.is-visible .eye-open {
    display: block;
}

.password-toggle.is-visible .eye-closed {
    display: none;
}

@media (max-width: 640px) {
    .auth-layout {
        padding: 18px 14px;
    }

    .auth-card-modern.auth-card-auth {
        max-width: 100%;
        padding: 30px 20px 22px;
        border-radius: 24px;
    }

    .auth-logo-image-wrap {
        width: 160px;
    }

    .auth-links {
        gap: 16px;
    }
}

/* =========================
   Startup splash
   ========================= */

body.has-startup-splash::before {
    content: "";
    position: fixed;
    inset: 0;
    background: #f4f5f7;
    z-index: 9998;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

body.has-startup-splash::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    background-image: url("/auditor-app/public/assets/img/timeclock-splash-logo.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: min(74vw, 760px) auto;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

body.has-startup-splash.startup-splash-hide::before,
body.has-startup-splash.startup-splash-hide::after {
    opacity: 0;
    visibility: hidden;
}

@media (max-width: 768px) {
    body.has-startup-splash::after {
        background-size: min(84vw, 520px) auto;
    }
}

/* =========================
   Google sign-in button
   ========================= */

.google-signin-btn {
    width: 100%;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(17,24,39,0.18);
    background: #111111;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 14px rgba(17,24,39,0.12);
}

.google-signin-btn:hover {
    background: #1a1a1a;
    border-color: rgba(17,24,39,0.28);
    box-shadow: 0 8px 22px rgba(17,24,39,0.16);
    transform: translateY(-1px);
}

.google-signin-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(17,24,39,0.12);
}

.google-signin-btn[aria-disabled="true"],
.google-signin-btn.is-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.google-signin-btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    overflow: hidden;
}

.google-signin-btn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.google-signin-btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .google-signin-btn {
        min-height: 54px;
        font-size: 14px;
    }
}

/* =========================
   Report UX enhanced
   ========================= */

.report-page-enhanced {
    background: #eef1f5;
    color: #111827;
}

.report-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 24px;
    background: #ffffff;
    border-bottom: 1px solid #d9e1ea;
    position: sticky;
    top: 0;
    z-index: 20;
}

.report-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.report-topbar-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.report-topbar-title strong {
    font-size: 18px;
}

.report-topbar-title small {
    color: #6b7280;
    font-size: 13px;
}

.report-back-btn,
.report-action-btn,
.report-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 14px;
    transition: 0.2s ease;
}

.report-back-btn,
.report-secondary-link {
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #d7dee8;
    color: #111827;
}

.report-action-btn {
    padding: 12px 16px;
    background: #111827;
    color: #ffffff;
    border: 1px solid #111827;
}

.report-back-btn:hover,
.report-secondary-link:hover {
    background: #f7f8fa;
}

.report-action-btn:hover {
    background: #1f2937;
}

.report-wrap-enhanced {
    padding: 26px;
}

.monthly-sheet-enhanced {
    background: #ffffff;
    border: 1px solid #d9e1ea;
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
    padding: 22px 22px 18px;
    max-width: 1320px;
    margin: 0 auto;
}

.sheet-head-enhanced {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 18px;
    border: 1px solid #1f2937;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.sheet-brand-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
}

.sheet-brand-logo {
    max-width: 220px;
    max-height: 78px;
    object-fit: contain;
    display: block;
}

.sheet-brand-text {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.05;
    text-align: center;
    word-break: break-word;
}

.sheet-head-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 22px;
    align-items: start;
}

.sheet-meta-pair {
    display: grid;
    grid-template-columns: 155px 1fr;
    gap: 8px;
    font-size: 14px;
    align-items: start;
}

.sheet-meta-pair strong {
    white-space: nowrap;
}

.sheet-table-enhanced th,
.sheet-table-enhanced td {
    font-size: 12px;
    padding: 5px 6px;
}

.sheet-table-enhanced thead th {
    background: #f3f4f6;
}

.sheet-row-saturday td,
.sheet-row-sunday td {
    background: #fff36a;
}

.sheet-row-holiday td {
    background: #d8e56a;
    font-weight: 700;
}

.cell-left {
    text-align: left !important;
}

.sheet-signature-area {
    display: flex;
    justify-content: flex-start;
    margin-top: 18px;
}

.sheet-signature-block {
    width: 320px;
    text-align: center;
}

.sheet-signature-image {
    max-width: 200px;
    max-height: 72px;
    object-fit: contain;
    display: block;
    margin: 0 auto 4px;
}

.sheet-signature-line {
    border-top: 1px solid #111827;
    margin-top: 4px;
}

.sheet-signature-label {
    margin-top: 4px;
    font-size: 12px;
    color: #374151;
}

.sheet-footer-signature {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.report-actions-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.report-actions-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 960px) {
    .sheet-head-enhanced {
        grid-template-columns: 1fr;
    }

    .sheet-head-grid {
        grid-template-columns: 1fr;
    }

    .sheet-meta-pair {
        grid-template-columns: 140px 1fr;
    }
}

/* =========================
   Signature builder
   ========================= */

.signature-builder-choice {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid #d7dee8;
    border-radius: 18px;
    background: #f8fafc;
    margin-top: 8px;
}

.signature-builder-choice-title {
    font-weight: 800;
    color: #111827;
}

.signature-builder-panel {
    margin-top: 12px;
    padding: 16px 18px;
    border: 1px solid #d7dee8;
    border-radius: 20px;
    background: #ffffff;
}

.signature-builder-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.signature-builder-head small {
    color: #6b7280;
}

.signature-canvas-wrap {
    width: 100%;
    border: 1px dashed #c7d2de;
    border-radius: 18px;
    background: #ffffff;
    padding: 10px;
}

.signature-canvas {
    width: 100%;
    height: 220px;
    display: block;
    background: #ffffff;
    border-radius: 14px;
    touch-action: none;
    cursor: crosshair;
}

.signature-builder-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.signature-builder-actions .primary-btn,
.signature-builder-actions .secondary-btn {
    width: auto;
    min-width: 180px;
}

.signature-status {
    margin-top: 10px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 600;
}

/* =========================
   Menu / header redesign
   ========================= */

.app-shell-modern {
    grid-template-columns: 290px 1fr;
    background:
        radial-gradient(circle at top left, rgba(148,163,184,0.10), transparent 24%),
        radial-gradient(circle at bottom right, rgba(203,213,225,0.14), transparent 28%),
        #f5f7fb;
}

.sidebar {
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(18px);
    color: #111827;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    min-height: 100vh;
    border-right: 1px solid rgba(209, 218, 230, 0.85);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.65);
}

.sidebar-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 8px 6px 18px;
    border-bottom: 1px solid rgba(209, 218, 230, 0.8);
}

.brand-mark-modern {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #eef3f8);
    border: 1px solid rgba(209, 218, 230, 0.9);
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-mark-logo {
    width: 90%;
    height: 90%;
    object-fit: contain;
    display: block;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.brand-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
    font-weight: 600;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a {
    position: relative;
    color: #334155;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    background: transparent;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.78);
    color: #0f172a;
    transform: translateX(2px);
    box-shadow: 0 8px 20px rgba(15,23,42,0.05);
}

.sidebar-nav a.active {
    background: linear-gradient(180deg, #ffffff, #eef3f8);
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
    border: 1px solid rgba(209, 218, 230, 0.9);
}

.sidebar-nav a.active::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 999px;
    background: #94a3b8;
}

.sidebar-footer-modern {
    margin-top: auto;
    padding: 16px 16px 17px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #eff4f8);
    border: 1px solid rgba(209, 218, 230, 0.9);
    box-shadow: 0 10px 24px rgba(15,23,42,0.05);
}

.sidebar-footer-title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.sidebar-footer-text {
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 500;
}

.main-shell {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-header-modern {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 26px;
    background: rgba(245,247,251,0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(217,225,234,0.85);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user-block {
    text-align: left;
}

.page-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.page-subtitle {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin-top: 3px;
}

.header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #eef3f8);
    border: 1px solid rgba(209, 218, 230, 0.9);
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(15,23,42,0.05);
}

.mobile-menu-btn {
    display: none;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(209, 218, 230, 0.9);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #eef3f8);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
    padding: 0;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mobile-menu-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15,23,42,0.09);
}

.mobile-menu-btn span {
    position: absolute;
    left: 13px;
    right: 13px;
    height: 2.5px;
    border-radius: 999px;
    background: #0f172a;
    transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.mobile-menu-btn span:nth-child(1) { top: 16px; }
.mobile-menu-btn span:nth-child(2) { top: 23px; }
.mobile-menu-btn span:nth-child(3) { top: 30px; }

.mobile-menu-btn.is-active span:nth-child(1) {
    top: 23px;
    transform: rotate(45deg);
}

.mobile-menu-btn.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.is-active span:nth-child(3) {
    top: 23px;
    transform: rotate(-45deg);
}

.mobile-backdrop {
    display: none;
}

@media (max-width: 960px) {
    .app-shell-modern {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 60;
        width: min(86vw, 320px);
        min-height: 100vh;
        transform: translateX(-104%);
        transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
        border-right: 1px solid rgba(209, 218, 230, 0.9);
        box-shadow: 18px 0 50px rgba(15,23,42,0.16);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,0.18);
        backdrop-filter: blur(4px);
        z-index: 50;
        display: none;
        opacity: 0;
        transition: opacity 0.22s ease;
    }

    .mobile-backdrop.show {
        display: block;
        opacity: 1;
    }

    .mobile-menu-btn {
        display: inline-block;
    }

    .app-header-modern {
        padding: 16px 18px;
    }

    .page-content {
        padding: 18px;
    }
}

/* =========================
   Install app button
   ========================= */

.install-app-btn {
    appearance: none;
    border: 1px solid rgba(209, 218, 230, 0.95);
    background: linear-gradient(180deg, #ffffff, #eef3f8);
    color: #0f172a;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15,23,42,0.05);
    transform: translateY(6px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.install-app-btn.show {
    transform: translateY(0);
    opacity: 1;
}

.install-app-btn:hover {
    background: linear-gradient(180deg, #ffffff, #e8eef5);
    box-shadow: 0 14px 30px rgba(15,23,42,0.08);
}

.install-app-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(148,163,184,0.2);
}

@media (max-width: 640px) {
    .header-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .install-app-btn {
        padding: 11px 14px;
        font-size: 13px;
    }
}
