/* CSS Admin Panel BUMDes Artha Manunggal */

:root {
    --admin-primary: #667eea;
    --admin-secondary: #764ba2;
    --admin-success: #28a745;
    --admin-danger: #dc3545;
    --admin-warning: #ffc107;
    --admin-dark: #343a40;
    --admin-light: #f8f9fa;
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--admin-light);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-secondary));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 4rem;
    color: var(--admin-primary);
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--admin-dark);
    margin-bottom: 5px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--admin-dark);
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.login-footer a:hover {
    color: var(--admin-primary);
}

.login-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255,255,255,0.95);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.login-info p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--admin-dark);
    color: white;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
}

.menu-section {
    padding: 15px 20px 10px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    font-weight: bold;
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Top Header */
.top-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--admin-dark);
}

.page-title {
    font-size: 1.3rem;
    color: var(--admin-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-btn {
    padding: 8px 16px;
    background: var(--admin-primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.header-btn:hover {
    background: var(--admin-secondary);
}

.user-menu {
    position: relative;
}

.user-toggle {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s;
}

.user-toggle:hover {
    background: var(--admin-light);
}

.user-toggle i:first-child {
    font-size: 1.5rem;
    color: var(--admin-primary);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-width: 200px;
    display: none;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--admin-dark);
    text-decoration: none;
    transition: all 0.3s;
}

.user-dropdown a:hover {
    background: var(--admin-light);
}

/* Content Wrapper */
.content-wrapper {
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--admin-dark);
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.stat-card.blue .stat-icon { background: #3498db; }
.stat-card.green .stat-icon { background: var(--admin-success); }
.stat-card.orange .stat-icon { background: #f39c12; }
.stat-card.red .stat-icon { background: var(--admin-danger); }

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Content Card */
.content-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.content-card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--admin-light);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--admin-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--admin-dark);
    transition: all 0.3s;
}

.quick-action-btn:hover {
    background: var(--admin-primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.quick-action-btn i {
    font-size: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-success { background: var(--admin-success); color: white; }
.btn-danger { background: var(--admin-danger); color: white; }
.btn-warning { background: var(--admin-warning); color: white; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--admin-primary);
    color: var(--admin-primary);
}

.btn-sm { padding: 6px 12px; font-size: 0.9rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }

/* Forms */
.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--admin-dark);
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    border-left: 4px solid var(--admin-success);
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-left: 4px solid var(--admin-danger);
    color: #721c24;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: var(--admin-light);
    font-weight: 600;
}

.data-table tbody tr:hover {
    background: var(--admin-light);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success { background: var(--admin-success); color: white; }
.badge-danger { background: var(--admin-danger); color: white; }
.badge-warning { background: var(--admin-warning); color: #333; }
.badge-secondary { background: #6c757d; color: white; }

/* List Group */
.list-group {
    list-style: none;
}

.list-item {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    text-decoration: none;
    color: var(--admin-dark);
    transition: all 0.3s;
}

.list-item:hover {
    background: var(--admin-light);
}

.list-item:last-child {
    border-bottom: none;
}

/* Grid System */
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.col-md-6 { grid-column: span 6; }
.col-md-4 { grid-column: span 4; }
.col-md-3 { grid-column: span 3; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        left: -100%;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .form-row,
    .row {
        grid-template-columns: 1fr;
    }
    
    .col-md-6,
    .col-md-4,
    .col-md-3 {
        grid-column: span 12;
    }
}
