/* Custom CSS for Kegiatan App */

:root {
    --primary-color: #2d9e44;
    --primary-dark:  #1a7030;
    --accent-color:  #f5a623;
    --accent-dark:   #d4881a;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;

    /* Override Bootstrap primary color */
    --bs-primary:           #2d9e44;
    --bs-primary-rgb:       45, 158, 68;
    --bs-link-color:        #2d9e44;
    --bs-link-hover-color:  #1a7030;
}

/* Bootstrap component overrides */
.bg-primary                         { background-color: #2d9e44 !important; }
.text-primary                       { color: #2d9e44 !important; }
.border-primary                     { border-color: #2d9e44 !important; }
.btn-primary                        { background-color: #2d9e44 !important; border-color: #2d9e44 !important; }
.btn-primary:hover                  { background-color: #1a7030 !important; border-color: #1a7030 !important; }
.btn-outline-primary                { color: #2d9e44 !important; border-color: #2d9e44 !important; }
.btn-outline-primary:hover          { background-color: #2d9e44 !important; border-color: #2d9e44 !important; color: #fff !important; }
.btn-check:checked + .btn-outline-primary { background-color: #2d9e44 !important; border-color: #2d9e44 !important; color: #fff !important; }
a                                   { color: #2d9e44; }
a:hover                             { color: #1a7030; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

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

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

.sidebar {
    background: linear-gradient(180deg, var(--primary-color), var(--primary-dark));
    min-height: 100vh;
    color: white;
    width: 250px;
    min-width: 250px;
    overflow: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
    flex-shrink: 0;
}

/* ── Collapsed sidebar ── */
.sidebar.sidebar-collapsed {
    width: 65px;
    min-width: 65px;
}

/* Hide text nodes by zeroing font-size; restore on icon elements */
.sidebar.sidebar-collapsed .nav-link {
    font-size: 0;
    justify-content: center;
    padding: 0.75rem 0;
}
.sidebar.sidebar-collapsed .nav-link i {
    font-size: 1rem;
    margin-right: 0;
    width: auto;
    display: block;
    text-align: center;
}
.sidebar.sidebar-collapsed h5 {
    font-size: 0;
    padding: 0.5rem 0;
    text-align: center;
}
.sidebar.sidebar-collapsed h5 i {
    font-size: 1.25rem;
    display: block;
    text-align: center;
}
.sidebar.sidebar-collapsed hr { margin: 0.5rem 0; }

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin: 0.25rem 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
}

.main-content {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #155722);
    transform: translateY(-1px);
}

.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
}

.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(45, 158, 68, 0.25);
}

.dashboard-stats .card {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
    border: none;
}

.dashboard-stats .card-body {
    padding: 1.5rem;
}

.dashboard-stats .card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(45, 158, 68, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(45, 158, 68, 0.1);
}

.status-pending { color: var(--warning-color); }
.status-approved { color: var(--success-color); }
.status-revision { color: var(--info-color); }
.status-rejected { color: var(--danger-color); }

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

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