/* Style Utama SIMOGU - Sistem Monitoring Guru (MIN 1 Wakatobi) */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@800;900&family=Syne:wght@700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(135deg, #0f766e 0%, #0d5c56 100%);
    --primary: #0f766e;
    --primary-hover: #0d615a;
    --primary-light: #d1fae5;
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.15);
    
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #f3f4f6;
    --border-color: #e5e7eb;
    
    --status-hadir: #10b981;
    --status-terlambat: #f59e0b;
    --status-izin: #3b82f6;
    --status-sakit: #8b5cf6;
    --status-dl: #06b6d4;
    --status-alfa: #ef4444;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    
    --border-radius: 12px;
    --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body.dark-mode {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: linear-gradient(135deg, #030712 0%, #0f172a 100%);
    --primary: #0d9488;
    --primary-hover: #0f766e;
    --primary-light: rgba(13, 148, 136, 0.2);
    --accent: #34d399;
    --accent-glow: rgba(52, 211, 153, 0.15);
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #e2e8f0;
    --border-color: #334155;
    
    --status-hadir: #34d399;
    --status-terlambat: #fbbf24;
    --status-alfa: #f87171;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Logo & Brand Typography */
.simogu-logo-text {
    font-family: 'Outfit', 'Syne', 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
    font-size: 3.2rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #0f766e 0%, #10b981 50%, #06b6d4 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 8px rgba(15, 118, 110, 0.15));
    animation: simogu-glow-shine 4s ease infinite;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.simogu-logo-text:hover {
    transform: scale(1.06) rotate(-1deg);
    cursor: default;
}

@keyframes simogu-glow-shine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Auth Page Customizations */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1) 0%, rgba(15, 118, 110, 0.05) 100%), var(--bg-main);
    position: relative;
    padding: 20px;
}

.auth-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 36px;
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.auth-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 20px;
}

/* Master Layout (Sidebar & Main content) */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: var(--text-light);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: white;
    padding: 4px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.5px;
    margin: 0;
}

.sidebar-subtitle {
    font-size: 0.65rem;
    opacity: 0.7;
    margin: 0;
}

.sidebar-menu {
    padding: 20px 12px;
    list-style: none;
    margin: 0;
}

.menu-item {
    margin-bottom: 4px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.925rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
}

.menu-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--accent);
}

.main-content {
    flex-grow: 1;
    min-width: 0; /* Prevents flex items from breaking with table element */
    display: flex;
    flex-direction: column;
}

.topnav {
    background-color: var(--bg-card);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.page-container {
    padding: 300;
    padding: 24px;
    flex-grow: 1;
}

/* Collapse Sidebar on Mobile */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
    }
    .sidebar.open {
        left: 0;
    }
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
        display: none;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

/* Beautiful Cards & Custom Elements */
.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Score Circle Indicator */
.score-circle-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
}

.score-circle {
    transform: rotate(-90deg);
}

.score-circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.score-circle-val {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease-out;
}

.score-text-inside {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
}

.score-label-inside {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: uppercase;
}

/* Form Styling Customizations */
.form-control, .form-select {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-card);
    color: var(--text-main);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

/* Interactive Tabs custom */
.nav-pills-custom .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-pills-custom .nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-pills-custom .nav-link.active {
    background-color: var(--primary);
    color: white;
}

/* Custom Table View */
.custom-table-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table {
    color: var(--text-main);
    margin-bottom: 0;
}

.table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 14px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

/* Badges Statuses */
.badge-status {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-hadir { background-color: rgba(16, 185, 129, 0.1); color: var(--status-hadir); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-terlambat { background-color: rgba(245, 158, 11, 0.1); color: var(--status-terlambat); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-izin { background-color: rgba(59, 130, 246, 0.1); color: var(--status-izin); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-sakit { background-color: rgba(139, 92, 246, 0.1); color: var(--status-sakit); border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-dld { background-color: rgba(6, 182, 212, 0.1); color: var(--status-dl); border: 1px solid rgba(6, 182, 212, 0.2); }
.badge-alfa { background-color: rgba(239, 68, 68, 0.1); color: var(--status-alfa); border: 1px solid rgba(239, 68, 68, 0.2); }

/* Rating Bintang */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 1.5rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.15s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #eab308;
}

/* Toast Notification system container */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-toast {
    background-color: var(--bg-card);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-toast.show {
    transform: translateX(0);
}

.custom-toast-success { border-left-color: #10b981; }
.custom-toast-danger { border-left-color: #ef4444; }
.custom-toast-warning { border-left-color: #f59e0b; }

/* Camera / GPS Styling */
.camera-box {
    background-color: #000;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

.camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
