:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --accent-color: #bb86fc;
    --surface-color: #1e1e1e;
    --border-color: #333;
    --today-color: #4fc3f7;
    /* Blue for today */
    --yesterday-color: #ffd54f;
    /* Yellow for yesterday */
    --recent-color: #69f0ae;
    /* Green for last hour */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Login Overlay */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#login-box {
    background-color: var(--surface-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    text-align: center;
    width: 300px;
}

#login-box h2 {
    margin-top: 0;
    color: var(--accent-color);
    margin-bottom: 25px;
}

#login-box input {
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #2a2a2a;
    color: #fff;
    margin-bottom: 20px;
    width: 85%;
    outline: none;
    transition: border-color 0.3s;
}

#login-box input:focus {
    border-color: var(--accent-color);
}

#login-box button {
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s;
}

#login-box button:hover {
    background-color: #9965f4;
}

/* Dashboard Layout */
#dashboard {
    display: none;
    flex-direction: column;
    height: 100vh;
}

header {
    background-color: var(--surface-color);
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 24px;
    color: var(--accent-color);
    font-weight: 600;
}

/* Tabs */
.tabs {
    display: flex;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
}

.tab-btn {
    background-color: transparent;
    color: var(--text-color);
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    outline: none;
    font-weight: 500;
}

.tab-btn.active {
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

.tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Content */
.tab-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: none;
}

.tab-content.active {
    display: block;
}

/* Table Styles */
.table-container {
    background-color: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:last-child td {
    border-bottom: none;
}

th {
    background-color: #252525;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    color: #aaa;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Indicators */
.text-today {
    color: var(--today-color) !important;
    font-weight: 500;
}

.text-yesterday {
    color: var(--yesterday-color) !important;
    font-weight: 500;
}

.icon-recent {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--recent-color);
    border-radius: 50%;
    margin-left: 10px;
    box-shadow: 0 0 8px var(--recent-color);
    vertical-align: middle;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

.logout-btn {
    background: rgba(255, 82, 82, 0.1);
    color: #ff5252;
    border: 1px solid #ff5252;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #ff5252;
    color: white;
}

.info-text {
    color: #aaa;
    margin-bottom: 20px;
    font-size: 14px;
}

.tab-title {
    margin-top: 0;
    color: #fff;
    margin-bottom: 10px;
}

/* ── HEADER ── */
header {
    background-color: #1f1f1f;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #60388e;
    text-decoration: none;
}

.nav-links a {
    color: #aaa;
    text-decoration: none;
    margin-left: 14px;
    font-size: 13px;
    transition: color 0.3s;
}

.nav-links a:hover { color: #fff; }

/* ── MAIN ── */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    background: radial-gradient(circle at center, #1a1a1a 0%, #121212 100%);
}

/* ── CARD ── */
.container {
    background-color: #1e1e1e;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid #333;
    position: relative;
}

.legal-page {
    max-width: 760px;
    text-align: left;
}

.legal-page h2 {
    text-align: center;
}

.legal-page h3 {
    color: #e0e0e0;
    font-size: 1rem;
    margin: 1.4rem 0 0.4rem;
}

.legal-page p {
    margin-bottom: 0.8rem;
}

.legal-page a {
    color: #bb86fc;
}

/* ── LANG SWITCHER ── */
.lang-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 4px;
    background-color: #2c2c2c;
    border-radius: 6px;
    padding: 3px;
    border: 1px solid #444;
}

.lang-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    width: auto;
    -webkit-tap-highlight-color: transparent;
}

.lang-btn.active {
    background-color: #60388e;
    color: #fff;
}

.lang-btn:hover:not(.active) {
    color: #ccc;
    background-color: #3a3a3a;
}

/* ── TYPOGRAPHY ── */
h2 {
    margin: 0.5rem 0 1rem;
    color: #7c4cb2;
    font-size: 1.3rem;
}

p {
    color: #aaa;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ── FORM ── */
input[type="email"] {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 1rem;
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 16px; /* prevents iOS zoom */
    -webkit-appearance: none;
    appearance: none;
}

input[type="email"]:focus {
    outline: none;
    border-color: #7c4cb2;
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background-color: #7c4cb2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button[type="submit"]:hover  { background-color: #bf43ca; }
button[type="submit"]:active { background-color: #7c4cb2; }
button[type="submit"]:disabled { opacity: 0.7; cursor: not-allowed; }

/* ── MESSAGE ── */
.message {
    margin-top: 1rem;
    font-size: 0.875rem;
    display: none;
}

.success { color: #4caf50; }
.error   { color: #f44336; }

/* ── FOOTER ── */
footer {
    background-color: #1f1f1f;
    padding: 16px;
    text-align: center;
    font-size: 11px;
    color: #666;
    border-top: 1px solid #2a2a2a;
}

.footer-links {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    margin: 0 8px;
    white-space: nowrap;
}

.footer-links a:hover { color: #aaa; }

/* ── MOBILE (≤ 480px) ── */
@media (max-width: 480px) {
    header {
        padding: 12px 16px;
    }

    .logo { font-size: 18px; }

    .nav-links a {
        margin-left: 10px;
        font-size: 12px;
    }

    main {
        padding: 20px 12px;
    }

    .container {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 10px;
    }

    h2 {
        font-size: 1.2rem;
        margin-top: 0.75rem;
    }

    p { font-size: 0.84rem; }

    footer { font-size: 10px; }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
}
