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

:root {
    --primary: #6B46C1;
    --primary-hover: #553C9A;
    --secondary: #38B2AC;
    --secondary-hover: #319795;
    --danger: #E53E3E;
    --danger-hover: #C53030;
    --background: #F4F7F6;
    --surface: #FFFFFF;
    --text: #2D3748;
    --text-muted: #718096;
    --border: #E2E8F0;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --sidebar-bg: #4B4E6D;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-container {
    max-width: 1100px;
    justify-content: flex-start;
    padding-top: 30px;
}

.card {
    background-color: var(--surface);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    animation: slideUp 0.4s ease-out forwards;
}

.title {
    text-align: left;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.subtitle {
    text-align: left;
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: #F9FAFB;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--surface);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.15);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--secondary);
    color: white;
}

.btn-success:hover {
    background-color: var(--secondary-hover);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background-color: var(--background);
}

.clock-display {
    text-align: center;
    font-size: 4rem;
    font-weight: 600;
    margin: 30px 0;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.status-in { background-color: #D1FAE5; color: #065F46; }
.status-out { background-color: #FEE2E2; color: #991B1B; }
.status-neutral { background-color: #F1F5F9; color: #475569; }

.info-box {
    background-color: #F8FAFC;
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.info-row:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.info-label { font-weight: 500; color: var(--text); }

.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid;
}

.alert-error { background-color: #FEF2F2; border-left-color: var(--danger); color: #991B1B; }
.alert-success { background-color: #ECFDF5; border-left-color: var(--secondary); color: #065F46; }

/* Admin table styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}
th, td {
    padding: 14px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #F8FAFC;
}
th:first-child { border-top-left-radius: var(--radius); }
th:last-child { border-top-right-radius: var(--radius); }

td { font-size: 0.95rem; color: var(--text); }
tr:hover td { background-color: #F8FAFC; cursor: default; }

.clickable-row:hover td {
    background-color: #EFF6FF;
    cursor: pointer;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.nav-brand { font-weight: 600; font-size: 1.2rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.nav-links a { color: var(--text-muted); text-decoration: none; margin-left: 20px; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

.tabs {
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
}
.tab-btn {
    padding: 12px 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
    color: var(--primary);
    font-weight: 600;
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px 3px 0 0;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .tabs { overflow-x: auto; white-space: nowrap; padding-bottom: 5px; }
    .nav-bar { padding: 15px; flex-direction: column; gap: 15px; }
    .nav-links { width: 100%; display: flex; justify-content: center; }
}

@media (max-width: 480px) {
    .container { padding: 15px; }
    .card { padding: 20px; }
    .clock-display { font-size: 3rem; }
    th, td { padding: 10px; font-size: 0.85rem; }
}
