:root {
    --ts-red: #cc0000;
    --ts-red-light: #e60000;
    --ts-red-dark: #990000;
    --ts-black: #1a1a1a;
    --ts-dark: #111111;
    --ts-gray: #2a2a2a;
    --ts-white: #ffffff;
    --ts-text-muted: rgba(255,255,255,0.6);
}

body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f4f4f4; }

/* ═══ Language Switch ═══ */
.lang-switch { position: absolute; top: 15px; right: 20px; display: flex; gap: 5px; z-index: 10; }
.lang-switch a { color: rgba(255,255,255,0.5); text-decoration: none; padding: 4px 12px; border-radius: 4px; font-size: 0.85rem; font-weight: 600; transition: all 0.2s; }
.lang-switch a.active { color: white; background: var(--ts-red); }
.lang-switch a:hover:not(.active) { color: white; }

/* ═══ Clock Page — Main Terminal ═══ */
.clock-page {
    background: var(--ts-dark);
    min-height: 100vh;
    color: white;
}

.clock-container {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 20px;
    text-align: center;
    position: relative;
}

/* Logo */
.logo-section { margin-bottom: 15px; }
.logo-img { width: 100px; height: 100px; margin-bottom: 5px; }
.logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ts-white);
    letter-spacing: 2px;
    margin-bottom: 2px;
}
.logo-text span { color: var(--ts-red); }
.logo-tagline { font-size: 0.75rem; letter-spacing: 4px; text-transform: uppercase; color: var(--ts-text-muted); margin-bottom: 8px; }

.current-time { font-size: 2.6rem; font-weight: 700; letter-spacing: 2px; color: var(--ts-white); }
.current-date { font-size: 0.95rem; color: var(--ts-text-muted); margin-bottom: 20px; text-transform: capitalize; }

.state-panel { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }

/* PIN Section */
.pin-section {
    background: var(--ts-gray);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 20px;
}
.pin-label { font-size: 1.05rem; color: var(--ts-text-muted); margin-bottom: 15px; }

.pin-display { display: flex; justify-content: center; gap: 15px; margin-bottom: 15px; }
.pin-dot {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.2s;
}
.pin-dot.filled {
    background: var(--ts-red);
    border-color: var(--ts-red);
    box-shadow: 0 0 12px rgba(204,0,0,0.5);
}

.pin-error { color: var(--ts-red-light); font-weight: 600; margin-bottom: 10px; animation: fadeIn 0.3s; }

.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; margin: 0 auto; }
.pin-btn {
    width: 75px; height: 75px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: white; font-size: 1.7rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center; margin: 0 auto;
}
.pin-btn:hover { background: rgba(204,0,0,0.3); border-color: var(--ts-red); transform: scale(1.05); }
.pin-btn:active { transform: scale(0.95); background: var(--ts-red); }
.pin-btn-clear { border-color: rgba(204,0,0,0.4); font-size: 1.2rem; }
.pin-btn-clear:hover { background: rgba(204,0,0,0.5); }
.pin-btn-back { font-size: 1.2rem; }

/* Employee Card */
.employee-card {
    background: var(--ts-gray);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.08);
}
.emp-avatar { font-size: 4rem; color: var(--ts-red); margin-bottom: 10px; }
.employee-card h2 { font-size: 1.6rem; margin-bottom: 5px; }
.emp-position { font-size: 1.1rem; color: var(--ts-text-muted); margin-bottom: 3px; }
.emp-branch { font-size: 0.95rem; color: var(--ts-text-muted); margin-bottom: 15px; }
.emp-schedule {
    background: rgba(204,0,0,0.15);
    border: 1px solid rgba(204,0,0,0.3);
    padding: 10px 15px; border-radius: 10px; margin-bottom: 20px; font-size: 1rem;
}

.emp-actions { display: flex; gap: 15px; justify-content: center; margin-bottom: 15px; }
.btn-action {
    padding: 15px 30px; border-radius: 12px; border: none;
    font-size: 1.1rem; font-weight: 600; cursor: pointer;
    color: white; transition: all 0.2s;
}
.btn-start { background: #27ae60; }
.btn-start:hover { background: #2ecc71; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(39,174,96,0.4); }
.btn-end { background: var(--ts-red); }
.btn-end:hover { background: var(--ts-red-light); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(204,0,0,0.4); }
.btn-back { background: none; border: none; color: var(--ts-text-muted); cursor: pointer; font-size: 0.9rem; }
.btn-back:hover { color: white; }

/* Camera */
.camera-section { padding: 20px; }
.camera-label { font-size: 1.2rem; margin-bottom: 15px; color: var(--ts-text-muted); }
#cameraVideo { width: 100%; max-width: 400px; border-radius: 15px; border: 3px solid var(--ts-red); }

/* Success */
.success-section { padding: 50px 20px; }
.success-icon { font-size: 5rem; margin-bottom: 20px; }
.success-section h2 { font-size: 1.5rem; margin-bottom: 10px; }

.admin-link { margin-top: 15px; }
.admin-link a { color: rgba(255,255,255,0.25); text-decoration: none; font-size: 0.8rem; }
.admin-link a:hover { color: rgba(255,255,255,0.5); }

/* ═══ Login Page ═══ */
.login-page {
    background: var(--ts-dark);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
}
.login-container { width: 100%; max-width: 400px; padding: 20px; position: relative; }
.login-card {
    background: var(--ts-black);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px; padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); text-align: center;
    color: white;
}
.login-card h2 { color: var(--ts-text-muted); margin-bottom: 25px; font-size: 1.2rem; }
.login-card .form-label { color: var(--ts-text-muted); text-align: left; display: block; }
.login-card .form-control {
    background: var(--ts-gray); border: 1px solid rgba(255,255,255,0.1);
    color: white; border-radius: 10px;
}
.login-card .form-control:focus { border-color: var(--ts-red); box-shadow: 0 0 0 0.2rem rgba(204,0,0,0.25); background: var(--ts-gray); color: white; }
.login-card .btn-primary {
    background: var(--ts-red); border-color: var(--ts-red); border-radius: 10px;
    font-weight: 600; padding: 12px;
}
.login-card .btn-primary:hover { background: var(--ts-red-light); border-color: var(--ts-red-light); }
.back-link { display: inline-block; margin-top: 20px; color: var(--ts-text-muted); text-decoration: none; }
.back-link:hover { color: white; }
.login-card .alert { text-align: left; }

/* ═══ Admin Navbar ═══ */
.navbar { background: var(--ts-black) !important; border-bottom: 2px solid var(--ts-red); }
.navbar-brand { font-weight: 800; font-size: 1.3rem; color: var(--ts-white) !important; display: flex; align-items: center; gap: 8px; }
.navbar-brand img { height: 32px; width: 32px; }
.navbar-brand .brand-ta { color: var(--ts-white); }
.navbar-brand .brand-sushi { color: var(--ts-red); }
.navbar .nav-link { transition: color 0.2s; }
.navbar .nav-link:hover { color: var(--ts-red) !important; }
.navbar .nav-link.active { color: var(--ts-red) !important; font-weight: 600; border-bottom: 2px solid var(--ts-red); }

/* ═══ Admin Cards & Tables ═══ */
.stat-card { border: none; border-radius: 14px; transition: transform 0.2s; overflow: hidden; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.stat-card h5 { font-size: 0.9rem; opacity: 0.9; }
.stat-card h2 { font-size: 2.5rem; font-weight: 700; }

.card { border: none; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.card-header { border-radius: 14px 14px 0 0 !important; }

.btn-primary { background: var(--ts-red); border-color: var(--ts-red); }
.btn-primary:hover { background: var(--ts-red-light); border-color: var(--ts-red-light); }
.btn-outline-primary { color: var(--ts-red); border-color: var(--ts-red); }
.btn-outline-primary:hover { background: var(--ts-red); border-color: var(--ts-red); color: white; }

.report-employee { border-bottom: 3px solid #f0f0f0; }
.report-employee:last-child { border-bottom: none; }
.report-employee-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; background: #f8f9fa; flex-wrap: wrap; gap: 10px;
}

.table th { font-weight: 600; font-size: 0.85rem; }
.table-dark { background-color: var(--ts-black) !important; }
.table-dark th { background-color: var(--ts-black) !important; }

.badge.bg-primary { background-color: var(--ts-red) !important; }

/* ═══ Photo gallery cards ═══ */
.card img { transition: transform 0.2s; }
.card img:hover { transform: scale(1.02); }

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
    .pin-btn { width: 60px; height: 60px; font-size: 1.4rem; }
    .current-time { font-size: 2rem; }
    .stat-card h2 { font-size: 1.8rem; }
    .emp-actions { flex-direction: column; }
    .btn-action { width: 100%; }
    .logo-img { width: 70px; height: 70px; }
    .logo-text { font-size: 1.5rem; }
}
