/* assets/css/style.css */
:root {
    --primary: #4e73df;
    --primary-dark: #224abe;
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --dark: #5a5c69;
    --light: #f8f9fc;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    --gradient-danger: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 0.125rem 0.25rem 0 rgba(58, 59, 69, 0.2);
    --shadow-md: 0 0.25rem 0.5rem 0 rgba(58, 59, 69, 0.12);
    --shadow-lg: 0 0.5rem 1rem 0 rgba(58, 59, 69, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* =====================================================
   SIDEBAR STYLES
   ===================================================== */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--gradient-primary);
    color: white;
    transition: var(--transition);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.7;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    gap: 12px;
}

.sidebar-menu li a i {
    width: 24px;
    font-size: 18px;
}

.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu li.active a {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left: 3px solid white;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
}

.system-status i {
    font-size: 10px;
    margin-right: 5px;
}

/* =====================================================
   MAIN CONTENT STYLES
   ===================================================== */
.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    transition: var(--transition);
}

.wrapper.sidebar-collapsed .sidebar {
    margin-left: -280px;
}

.wrapper.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}

.top-header {
    background: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 99;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
}

.header-title h4 {
    margin: 0;
    font-weight: 600;
}

.header-title p {
    font-size: 13px;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 10px;
    padding: 2px 5px;
}

.content-container {
    padding: 25px 30px;
}

/* =====================================================
   CARD STYLES
   ===================================================== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: white;
    margin-bottom: 25px;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e3e6f0;
    padding: 15px 20px;
    font-weight: 600;
    border-radius: 12px 12px 0 0;
}

.card-body {
    padding: 20px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    margin: 10px 0 5px;
}

.stat-card .stat-label {
    color: var(--secondary);
    font-size: 13px;
    margin: 0;
}

/* Applicant Card */
.applicant-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.applicant-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.applicant-card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 18px 20px;
}

.applicant-card-header h5 {
    margin: 0;
    font-weight: 600;
}

.applicant-card-header code {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 6px;
    color: white;
}

.applicant-card-body {
    padding: 20px;
}

/* Badge Styles */
.badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 20px;
    background: #f0f0f0;
    color: #333;
}

.badge-sm i {
    font-size: 11px;
}

/* Progress Bar */
.progress-custom {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar-custom {
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Payment Countdown */
.payment-countdown {
    font-size: 18px;
    font-weight: 700;
}

.payment-countdown.danger { color: var(--danger); }
.payment-countdown.warning { color: var(--warning); }
.payment-countdown.success { color: var(--success); }
.payment-countdown.secondary { color: var(--secondary); }

/* Buttons */
.btn-custom {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-custom-primary {
    background: var(--primary);
    color: white;
}

.btn-custom-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fc;
    border-radius: 10px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        margin-left: -280px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .wrapper.sidebar-collapsed .sidebar {
        margin-left: 0;
    }
    
    .content-container {
        padding: 15px;
    }
    
    .top-header {
        padding: 12px 15px;
    }
}

@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 22px;
    }
    
    .applicant-card-header {
        padding: 12px 15px;
    }
    
    .applicant-card-body {
        padding: 15px;
    }
    
    .header-title h4 {
        font-size: 18px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.applicant-card {
    animation: fadeInUp 0.5s ease;
}

/* Loading Spinner */
.spinner-custom {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-custom {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}