/* assets/css/style.css */

/* =========================================
   GLOBAL STYLES
========================================= */
body {
    background: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =========================================
   AUTH & LOGIN (GLASSMORPHISM)
========================================= */
.bg-auth {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.web-logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 12px;
}

/* =========================================
   LAYOUT CONTAINERS
========================================= */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding-top: 2rem;
    padding-bottom: 3rem;
}
.admin-container {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

/* =========================================
   DASHBOARD & CAMERA (KARYAWAN)
========================================= */
.time-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0d6efd;
    letter-spacing: -1px;
}
.btn-action {
    height: 60px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
}
#camera-container {
    display: none;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-top: 1rem;
}
#kamera-video {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}
#kamera-canvas { display: none; }

/* =========================================
   HISTORY CARDS
========================================= */
.card-history {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.card-history:hover { transform: translateY(-3px); }
.time-badge {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 8px;
}
.btn-history-action {
    font-size: 0.8rem;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
}

/* =========================================
   PROFILE STYLES
========================================= */
.card-profile {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}
.profile-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    height: 120px;
}
.profile-img-container {
    text-align: center;
    margin-top: -60px;
    position: relative;
}
.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    background: #fff;
}
.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    margin-top: -20px;
}
.upload-btn-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

/* =========================================
   TABLE RESPONSIVE MOBILE FIXES
========================================= */
.table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden; /* Mencegah sudut tabel tajam keluar dari wrapper */
}
.table th {
    white-space: nowrap; /* Mencegah header tabel turun ke bawah */
    font-size: 0.9rem;
}
.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}
/* Memaksa area tombol di tabel agar tidak menumpuk aneh di layar kecil */
.table td.action-cell {
    white-space: nowrap;
}

/* =========================================
   MEDIA QUERIES (SMARTPHONE)
========================================= */
@media (max-width: 576px) {
    .glass-card { padding: 1.5rem; }
    .time-display { font-size: 2rem; }
    .btn-action { font-size: 1rem; height: 55px; }
    .app-container { padding-top: 1rem; }
    .navbar-brand { font-size: 1rem; }
    .table td, .table th { font-size: 0.85rem; padding: 0.5rem; }
    .btn-sm { padding: 0.2rem 0.4rem; font-size: 0.75rem; }
}