/* ==========================================================================
   Premium Design System for Mentoring App
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --dark: #0F172A;
    --dark-light: #1E293B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --danger: #EF4444;
    --warning: #F59E0B;
    --text-main: #334155;
    --text-muted: #64748B;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html, body {
    background-color: var(--light);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Mencegah layar tergeser ke kanan */
    width: 100%;
    max-width: 100vw;
}

/* Background Animations */
.bg-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

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

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 600;
}
h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 2rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    text-decoration: none;
}
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.4);
}
.btn-success {
    background-color: var(--secondary);
    color: var(--white);
}
.btn-success:hover {
    background-color: #059669;
    transform: translateY(-2px);
}
.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-light);
}
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.9);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
input[type="file"].form-control {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Login Page Layout */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}
.login-card {
    width: 100%;
    max-width: 450px;
    padding: 3rem 2rem;
}

/* Dashboard Layout */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E2E8F0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover {
    color: var(--primary);
}

/* Grids & Cards */
.grid {
    display: grid;
    gap: 1.5rem;
}
.grid > * {
    min-width: 0; /* Mencegah grid blowout dari tabel/konten lebar */
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .container { max-width: 95%; padding: 1.5rem; }
    
    .navbar { flex-direction: column; gap: 1rem; padding: 1rem; text-align: center; }
    .navbar-brand { justify-content: center; width: 100%; }
    .nav-links { flex-wrap: wrap; justify-content: center; width: 100%; gap: 0.5rem; }
    .nav-links > * { white-space: nowrap; }
    .nav-links a, .nav-links .btn { flex: 1 1 auto; font-size: 0.95rem; padding: 0.6rem 1rem; text-align: center; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .container { padding: 1rem; max-width: 100%; }
    th, td { padding: 0.6rem; font-size: 0.85rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    .menu-tabs { flex-direction: column; gap: 0.5rem; border-bottom: none; }
    .tab-btn { width: 100%; text-align: center; font-size: 1rem; }
    .btn { padding: 0.6rem 1rem; font-size: 0.9rem; }
    .card { padding: 1rem; }
}

@media (max-width: 480px) {
    .nav-links { flex-direction: column; }
    .nav-links a, .nav-links .btn { width: 100%; }
    .checkin-circle { width: 100px; height: 100px; font-size: 1.5rem; }
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #F1F5F9;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #F1F5F9;
}
th {
    background-color: #F8FAFC;
    font-weight: 600;
    color: var(--dark-light);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}
tbody tr:hover {
    background-color: #F8FAFC;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-primary { background: #E0E7FF; color: #3730A3; }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 500;
}
.alert-error {
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}
.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

/* Checkin Widget */
.checkin-widget {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.checkin-widget h3 {
    color: var(--white);
}
.checkin-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    font-size: 2rem;
    font-weight: bold;
    border: 4px solid rgba(255,255,255,0.4);
    transition: all 0.3s;
}
.checkin-circle:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.3);
    cursor: pointer;
}
