/* ========== VARIABEL WARNA GLOBAL ========== */
:root {
    --primary: #0d5c2e;
    --primary-dark: #0a4a25;
    --primary-light: #e8f5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f0f2f5;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--light);
    padding-bottom: 70px;
}

/* Container */
.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Gradient */
.header-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.header-gradient h1 {
    font-size: 24px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-gradient p {
    font-size: 13px;
    opacity: 0.9;
}

/* Cards */
.card-form {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
}

.stat-info p {
    color: var(--gray);
    font-size: 12px;
    margin-top: 3px;
}

/* Action Bar */
.action-bar {
    background: var(--white);
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,92,46,0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--gray);
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-edit {
    background: #fef3c7;
    color: #d97706;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: #d97706;
    color: var(--white);
}

.btn-delete {
    background: #fee2e2;
    color: var(--danger);
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: var(--danger);
    color: var(--white);
}

/* Form Elements */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-group label i {
    margin-right: 5px;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,92,46,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 15px 10px 38px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: 260px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,92,46,0.1);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Table */
.table-container {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-responsive {
    overflow-x: auto;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom th {
    text-align: left;
    padding: 14px 16px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
}

.table-custom td {
    padding: 12px 16px;
    color: var(--dark);
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.table-custom tr:hover {
    background: var(--primary-light);
}

/* Badges */
.badge-success {
    background: var(--success);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-danger {
    background: var(--danger);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* Alerts */
.alert-error {
    background: #fee2e2;
    color: var(--danger);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid var(--danger);
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: var(--success);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid var(--success);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Required */
.required {
    color: var(--danger);
    margin-left: 3px;
}

.info-text {
    color: var(--gray);
    font-size: 11px;
    display: block;
    margin-top: 5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--gray);
}

/* Bottom Navigation - Simple */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 10px 16px 12px;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
    border-top: 1px solid #e2e8f0;
    z-index: 1000;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 10px;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-item:active {
    background: var(--primary-light);
}

.nav-item i {
    font-size: 22px;
    color: #94a3b8;
    display: block;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 11px;
    color: #94a3b8;
}

.nav-item.active i,
.nav-item.active span {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container-custom {
        padding: 15px;
    }
    
    .card-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-box input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}