/* assets/css/style.css */
/* Premium Dark Mode Design System for Camp Al-Fatihah */

:root {
    --bg-dark: #0B0F19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    /* Emerald Gradient */
    --emerald-primary: #059669;
    --emerald-light: #10B981;
    --emerald-dark: #047857;
    --emerald-grad: linear-gradient(135deg, var(--emerald-light) 0%, var(--emerald-dark) 100%);
    
    /* Gold/Amber Gradient */
    --gold-primary: #D97706;
    --gold-light: #F59E0B;
    --gold-dark: #B45309;
    --gold-grad: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-dark) 100%);
    
    /* Dark Gradients */
    --bg-gradient: linear-gradient(135deg, #0B0F19 0%, #111827 50%, #0F172A 100%);
    --card-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

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

body {
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Glassmorphism utility classes */
.glass-card {
    background: var(--bg-card);
    background-image: var(--card-gradient);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.glass-card-emerald {
    border-left: 4px solid var(--emerald-primary) !important;
}

.glass-card-gold {
    border-left: 4px solid var(--gold-primary) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.text-gradient-emerald {
    background: var(--emerald-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
}

.btn-emerald {
    background: var(--emerald-grad);
    color: #FFFFFF;
    box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.3);
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(5, 150, 105, 0.4);
}

.btn-gold {
    background: var(--gold-grad);
    color: #FFFFFF;
    box-shadow: 0 4px 14px 0 rgba(217, 119, 6, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(217, 119, 6, 0.4);
}

.btn-dark {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-dark:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.4);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--emerald-light);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23F3F4F6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

select.form-control option {
    background-color: #1f2937; /* Abu-abu tua (Gray 800) */
    color: #f3f4f6; /* Teks terang */
}

/* Layout header & navigation */
.navbar {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 24px;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.navbar-brand i {
    color: var(--emerald-primary);
}

.navbar-menu {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--emerald-primary);
}

/* Grid layout for Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Stats Card */
.stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon-emerald {
    background: rgba(5, 150, 105, 0.15);
    color: var(--emerald-light);
}

.stat-icon-gold {
    background: rgba(217, 119, 6, 0.15);
    color: var(--gold-light);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Dashboard Tabs Layout */
.tabs-container {
    margin-top: 20px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 10px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #FFFFFF;
    background: var(--emerald-grad);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Audio Player Card & Record Controls */
.recorder-container {
    text-align: center;
    padding: 30px 10px;
}

.record-btn-wrapper {
    position: relative;
    display: inline-block;
    margin: 20px 0;
}

.record-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    border: 5px solid rgba(239, 68, 68, 0.3);
    color: white;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.record-btn:hover {
    transform: scale(1.05);
}

.record-btn.recording {
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
    border-color: rgba(156, 163, 175, 0.3);
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 20px rgba(156, 163, 175, 0.4);
}

.record-timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 10px 0;
}

.waveform-visualizer {
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin: 15px 0;
}

/* Custom Table Design */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95rem;
    text-align: left;
}

.custom-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-glass);
}

.custom-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

/* Audio Player */
.audio-player-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.audio-player-wrapper audio {
    width: 100%;
}

/* Skeleton loader for tables/dashboards */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 37%, rgba(255, 255, 255, 0.05) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Custom Modal styling */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.custom-modal.show {
    display: flex;
}

.modal-dialog {
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.3s ease;
}

/* Responsive constraints */
@media (max-width: 768px) {
    .navbar-menu {
        gap: 10px;
    }
    .tab-buttons {
        gap: 6px;
    }
    .tab-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    .glass-card {
        padding: 16px;
    }
}
