/* Custom styles for blue-white elegant design - Mobile Friendly */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-light: #dbeafe;
    --white: #ffffff;
    --gray-light: #f3f4f6;
    --gray: #6b7280;
    --text-dark: #1f2937;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../etk.jpeg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Layout dengan sidebar */
.layout-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(37, 99, 235, 0.2);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
}

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

.sidebar-brand h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-logo {
    max-height: 40px;
    border-radius: 8px;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav li a {
    color: white;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: block;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    margin-left: 260px;
    transition: margin-left 0.3s ease-in-out;
}

/* Toggle Button */
.toggle-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    display: none;
}

.toggle-btn:hover {
    background: var(--primary-blue-dark);
}

/* Overlay untuk mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Responsive untuk mobile */
@media (max-width: 767px) {
    .toggle-btn {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding-top: 72px;
    }
}

/* Container lama untuk backward compatibility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Nav lama dihide */
nav {
    display: none;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-bottom: 2px solid var(--primary-blue-light);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.card-header h2 {
    margin: 0;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #22c55e;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.85rem;
}

table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
}

table th,
table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
    white-space: nowrap;
}

table tbody tr:hover {
    background: var(--primary-blue-light);
}

h3 {
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 0;
    font-size: 1.25rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dashboard-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.dashboard-card h3 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    color: white;
}

.dashboard-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Media query untuk desktop (768px ke atas) */
@media (min-width: 768px) {
    .container {
        padding: 20px;
    }

    .card {
        padding: 24px;
        border-radius: 16px;
        margin-bottom: 24px;
    }

    .card-header {
        padding-bottom: 16px;
        margin-bottom: 24px;
    }

    .card-header h2 {
        font-size: 1.75rem;
        text-align: left;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 1rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 0.875rem;
    }

    .alert {
        padding: 16px;
        font-size: 1rem;
    }

    table {
        font-size: 1rem;
    }

    table th,
    table td {
        padding: 14px 16px;
    }

    h3 {
        font-size: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .dashboard-card {
        padding: 24px;
        border-radius: 16px;
    }

    .dashboard-card h3 {
        font-size: 2.5rem;
    }
}
