/* =========================
   GLOBAL
========================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #f5f6f8;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
}


/* =========================
   INDEX / LOGIN PAGE
========================= */

.login-box {
    width: 100%;
    max-width: 360px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-box h1 {
    margin: 0 0 8px;
    font-size: 24px;
}

.subtitle {
    margin: 0 0 25px;
    color: #777;
    font-size: 14px;
}

.pin-input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    outline: none;
}

.pin-input:focus {
    border-color: #1769e0;
    box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

button {
    width: 100%;
    margin-top: 18px;
    padding: 13px;
    border: 0;
    border-radius: 8px;
    background: #1769e0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background: #1258bd;
}

.login-box .error {
    margin-top: 15px;
    padding: 10px;
    border-radius: 7px;
    background: #fff0f0;
    color: #b00020;
    font-size: 14px;
}


/* =========================
   SHARED STATS PAGES
========================= */

.stats-page,
.daily-stats-page {
    padding: 30px;
}

.stats-container {
    margin: 0 auto;
}


/* =========================
   MAIN STATS PAGE
========================= */

.stats-page .stats-container {
    max-width: 1100px;
}

.stats-page h1 {
    margin: 0 0 25px;
    font-size: 28px;
}


/* =========================
   DAILY STATS PAGE
========================= */

.daily-stats-page .stats-container {
    max-width: 1300px;
}

.daily-stats-page h1 {
    margin: 0;
    font-size: 28px;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.back {
    display: inline-block;
    padding: 9px 14px;
    background: #fff;
    color: #1769e0;
    text-decoration: none;
    border-radius: 7px;
    border: 1px solid #ddd;
    font-size: 14px;
    font-weight: 600;
}

.back:hover {
    background: #f0f3f8;
}


/* =========================
   SHARED TABLE
========================= */

.table-wrapper {
    background: #fff;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

.stats-page table {
    min-width: 750px;
}

.daily-stats-page table {
    min-width: 1050px;
}

th,
td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid #e5e5e5;
    white-space: nowrap;
}

th:first-child,
td:first-child {
    text-align: left;
}

th {
    background: #f0f1f3;
    font-size: 13px;
    font-weight: 700;
    color: #555;
}

td {
    font-size: 14px;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}


/* =========================
   MAIN STATS
========================= */

.date {
    font-weight: 600;
}


/* =========================
   DAILY STATS
========================= */

.uid {
    font-family: monospace;
    font-weight: 600;
}

.duration {
    font-variant-numeric: tabular-nums;
}

.timestamp {
    color: #555;
    font-size: 13px;
}


/* =========================
   STATUS BOXES
========================= */

.stats-page .error,
.daily-stats-page .error,
.stats-page .empty,
.daily-stats-page .empty {
    background: #fff;
    border-radius: 10px;
}

.stats-page .error {
    padding: 20px;
    color: #b00020;
}

.daily-stats-page .error {
    padding: 30px;
    color: #b00020;
}

.stats-page .empty,
.daily-stats-page .empty {
    padding: 30px;
    color: #777;
    text-align: center;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .stats-page,
    .daily-stats-page {
        padding: 15px;
    }

    .stats-page h1,
    .daily-stats-page h1 {
        font-size: 22px;
    }

    th,
    td {
        padding: 11px 12px;
    }

    .top {
        align-items: flex-start;
        flex-direction: column;
    }
}

