:root {
    --tt-border: #ddd6c2;
    --tt-ink: #111111;
    --tt-muted: #6d6658;
    --tt-bg: #f7f5ef;
    --tt-black: #111111;
    --tt-gold: #b68b2c;
    --tt-red: #b42318;
}

body {
    background: var(--tt-bg);
    color: var(--tt-ink);
}

.navbar,
.card,
.table {
    border-color: var(--tt-border);
}

.navbar,
.card,
.calendar-cell,
.calendar-head,
.clock-panel,
.sequence-step,
.next-action-panel {
    background: #ffffff;
}

.brand-mark {
    align-items: center;
    background: var(--tt-black);
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.btn {
    border-radius: 6px;
}

.btn-primary {
    background: var(--tt-black);
    border-color: var(--tt-black);
}

.btn-primary:hover {
    background: #000000;
    border-color: #000000;
}

.btn-outline-primary {
    border-color: var(--tt-black);
    color: var(--tt-black);
}

.btn-outline-primary:hover {
    background: var(--tt-black);
    border-color: var(--tt-black);
}

.text-muted {
    color: var(--tt-muted) !important;
}

.auth-shell {
    margin: 0 auto;
    max-width: 440px;
    padding: 56px 16px;
}

.app-shell {
    padding-bottom: 48px;
}

.view-wrap {
    margin: 0 auto;
    max-width: 1280px;
    padding: 0 16px;
}

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

.table-search {
    max-width: 240px;
}

.kiosk-shell {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 16px 48px;
}

.kiosk-topbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 20px 0;
}

.clock-panel {
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    padding: 28px;
}

.clock-face {
    aspect-ratio: 1;
    border: 10px solid var(--tt-black);
    border-radius: 50%;
    margin: 0 auto;
    max-width: 280px;
    position: relative;
}

.clock-face::after {
    border: 2px solid var(--tt-gold);
    border-radius: 50%;
    content: "";
    inset: 12px;
    position: absolute;
}

.clock-center {
    background: var(--tt-red);
    border-radius: 50%;
    height: 16px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    z-index: 4;
}

.clock-hand {
    background: var(--tt-black);
    border-radius: 999px;
    bottom: 50%;
    left: calc(50% - 3px);
    position: absolute;
    transform-origin: bottom center;
    width: 6px;
    z-index: 3;
}

.hour-hand {
    height: 26%;
}

.minute-hand {
    height: 34%;
}

.second-hand {
    background: var(--tt-red);
    height: 39%;
    left: calc(50% - 1px);
    width: 2px;
}

.clock-mark {
    color: var(--tt-black);
    font-weight: 800;
    position: absolute;
    z-index: 2;
}

.mark-12 { left: 50%; top: 24px; transform: translateX(-50%); }
.mark-3 { right: 28px; top: 50%; transform: translateY(-50%); }
.mark-6 { bottom: 22px; left: 50%; transform: translateX(-50%); }
.mark-9 { left: 30px; top: 50%; transform: translateY(-50%); }

.kiosk-time {
    color: var(--tt-black);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
}

.recognition-row,
.time-sequence-grid {
    display: grid;
    gap: 12px;
}

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

.time-sequence-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recognition-tile,
.sequence-step,
.next-action-panel {
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    padding: 14px;
}

.recognition-icon {
    align-items: center;
    background: var(--tt-gold);
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    margin-bottom: 10px;
    width: 38px;
}

.next-action-panel {
    border-left: 6px solid var(--tt-gold);
}

.next-action-panel strong {
    display: block;
    font-size: 1.35rem;
}

.sequence-step {
    align-items: center;
    display: flex;
    gap: 12px;
    min-height: 88px;
}

.sequence-step span,
.sequence-step strong {
    display: block;
}

.sequence-step span {
    color: var(--tt-muted);
}

.sequence-number {
    align-items: center;
    border: 1px solid var(--tt-border);
    border-radius: 50%;
    color: var(--tt-black) !important;
    display: inline-flex !important;
    flex: 0 0 auto;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.sequence-step.is-complete {
    border-color: var(--tt-gold);
}

.sequence-step.is-complete .sequence-number {
    background: var(--tt-gold);
    border-color: var(--tt-gold);
    color: #ffffff !important;
}

.sequence-step.is-next {
    border-color: var(--tt-red);
}

.sequence-step.is-next .sequence-number {
    background: var(--tt-red);
    border-color: var(--tt-red);
    color: #ffffff !important;
}

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

.calendar-cell,
.calendar-head {
    border: 1px solid var(--tt-border);
    min-height: 118px;
    padding: 10px;
}

.calendar-head {
    color: var(--tt-muted);
    font-size: 0.82rem;
    font-weight: 700;
    min-height: auto;
    text-transform: uppercase;
}

.log-chip {
    border: 1px solid var(--tt-border);
    border-radius: 5px;
    display: block;
    font-size: 0.78rem;
    margin-top: 6px;
    padding: 4px 6px;
}

@media (max-width: 768px) {
    .navbar-brand span:last-child {
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-nav {
        gap: 4px;
        padding-top: 10px;
    }

    .navbar-nav .nav-link {
        border: 1px solid var(--tt-border);
        border-radius: 6px;
        padding: 10px 12px;
    }

    .table-search {
        max-width: none;
        width: 100% !important;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        border-bottom: 1px solid var(--tt-border);
        padding: 10px 12px;
    }

    .admin-table td {
        border: 0;
        display: flex;
        gap: 12px;
        justify-content: space-between;
        padding: 6px 0;
        text-align: right;
    }

    .admin-table td::before {
        color: var(--tt-muted);
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
    }

    .kiosk-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .clock-panel {
        padding: 18px;
    }

    .clock-face {
        max-width: 230px;
    }

    .recognition-row,
    .time-sequence-grid {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        display: block;
    }

    .calendar-head {
        display: none;
    }

    .calendar-cell {
        margin-bottom: 8px;
        min-height: auto;
    }
}
