/* ==========================================
   MODERN COMPONENTS STYLESHEET
   Reusable components untuk seluruh aplikasi
   ========================================== */

:root {
    /* Color Palette - Nature Theme */
    /* Color Palette - Nature Theme */
    --primary: #036b4b;
    /* Custom Green */
    --secondary: #475569;
    /* Slate 600 */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0891b2;
    /* Cyan 600 */

    /* Gradient Colors */
    --gradient-nature: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    /* Emerald to Teal */
    --gradient-sun: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    /* Amber to Orange */
    --gradient-green: linear-gradient(135deg, #059669 0%, #34d399 100%);
    --gradient-blue: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);

    /* Legacy/Other Gradients */
    --gradient-purple: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    /* Override Purple with Nature */
    --gradient-orange: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
    --gradient-red: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-pink: linear-gradient(135deg, #db2777 0%, #a21caf 100%);

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Spacing */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   PAGE HEADER
   ========================================== */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--primary);
    font-size: 1.75rem;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin: 0;
}

/* ==========================================
   MODERN CARD
   ========================================== */
.card-modern {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    background: white;
}

.card-modern:hover {
    box-shadow: var(--shadow-lg);
}

.card-modern .card-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.card-modern .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-modern .card-title i {
    color: var(--primary);
}

.card-modern .card-body {
    padding: 1.5rem;
}

.card-modern .card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* ==========================================
   STATISTIC CARDS
   ========================================== */
.stat-card {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    color: white;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-card-purple {
    background: var(--gradient-purple);
}

.stat-card-green {
    background: var(--gradient-green);
}

.stat-card-orange {
    background: var(--gradient-orange);
}

.stat-card-red {
    background: var(--gradient-red);
}

.stat-card-blue {
    background: var(--gradient-blue);
}

.stat-card-pink {
    background: var(--gradient-pink);
}

.stat-card-body {
    padding: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 0.5rem;
}

.stat-pulse {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.stat-card-footer {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.875rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* ==========================================
   MODERN BUTTONS
   ========================================== */
.btn-modern {
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-modern i {
    font-size: 0.9rem;
}

.btn-primary.btn-modern {
    background: var(--primary);
}

.btn-primary.btn-modern:hover {
    background: #4338ca;
}

.btn-success.btn-modern {
    background: var(--success);
}

.btn-success.btn-modern:hover {
    background: #059669;
}

.btn-info.btn-modern {
    background: var(--info);
}

.btn-info.btn-modern:hover {
    background: #2563eb;
}

.btn-danger.btn-modern {
    background: var(--danger);
}

.btn-danger.btn-modern:hover {
    background: #dc2626;
}

.btn-outline-primary.btn-modern {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: white;
}

.btn-outline-primary.btn-modern:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-secondary.btn-modern {
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
    background: white;
}

.btn-outline-secondary.btn-modern:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
}

.btn-action:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-900);
    transform: scale(1.05);
}

/* ==========================================
   MODERN TABLE
   ========================================== */
.table-modern {
    margin: 0;
}

.table-modern thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.table-modern thead th {
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    border: none;
}

.table-modern tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.table-modern tbody tr:hover {
    background: var(--gray-50);
}

.table-modern tbody td {
    padding: 1.25rem;
    vertical-align: middle;
    color: var(--gray-700);
}

.table-modern tfoot {
    background: var(--gray-50);
    border-top: 2px solid var(--gray-200);
}

.table-modern tfoot td {
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* ==========================================
   FORM CONTROLS
   ========================================== */
.form-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--gray-300);
    border-radius: 0.25rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ==========================================
   BADGES
   ========================================== */
.badge-modern {
    padding: 0.5rem 0.875rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border: 2px solid transparent;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-light {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-200);
}

/* ==========================================
   AVATAR
   ========================================== */
.avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    position: relative;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.avatar-circle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.avatar-blue {
    background: var(--gradient-blue);
}

.avatar-pink {
    background: var(--gradient-pink);
}

.avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-active {
    background: var(--success);
}

.status-inactive {
    background: var(--gray-400);
}

/* ==========================================
   ALERTS
   ========================================== */
.alert-modern {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.alert-modern i {
    font-size: 1.25rem;
}

.alert-modern.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-left: 4px solid var(--success);
}

.alert-modern.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid var(--danger);
}

.alert-modern .btn-close {
    filter: none;
    opacity: 0.5;
}

.alert-modern .btn-close:hover {
    opacity: 1;
}

/* ==========================================
   DROPDOWN
   ========================================== */
.dropdown-menu-modern {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 200px;
}

.dropdown-menu-modern .dropdown-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--gray-500);
    padding: 0.5rem 1rem;
}

.dropdown-menu-modern .dropdown-item {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    color: var(--gray-700);
}

.dropdown-menu-modern .dropdown-item i {
    width: 1.25rem;
    text-align: center;
}

.dropdown-menu-modern .dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.dropdown-menu-modern .dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--gray-200);
}

/* ==========================================
   MODAL
   ========================================== */
.modal-modern {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-modern .modal-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-modern .modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-modern .modal-body {
    padding: 1.5rem;
}

.modal-modern .modal-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .card-modern .card-body {
        padding: 1rem;
    }

    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

/* ==========================================
   UTILITIES
   ========================================== */
.hover-primary:hover {
    color: var(--primary) !important;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 1rem !important;
}

.gap-4 {
    gap: 1.5rem !important;
}