/* assets/css/style.css */
:root {
    --primary-color: #4F46E5; /* Indigo 600 */
    --primary-hover: #4338CA;
    --secondary-color: #10B981; /* Emerald 500 */
    --background-color: #F3F4F6; /* Gray 100 */
    --surface-color: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --border-color: #E5E7EB;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.text-muted {
    color: var(--text-secondary);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--surface-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.alert-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #F87171;
}
.alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border: 1px solid #34D399;
}

/* Navbar */
.navbar {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 250px;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: #EEF2FF;
    color: var(--primary-color);
}

.main-content {
    flex: 1;
    padding: 2rem;
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tables */
.table-container {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #F9FAFB;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-process { background: #DBEAFE; color: #1E40AF; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }

/* Notifications */
.notif-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
}
.notif-icon {
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
}
.notif-icon:hover { color: var(--primary-color); }
.notif-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
}
.notif-dropdown {
    display: none;
    position: absolute;
    top: 35px;
    right: -10px;
    width: 320px;
    background: white;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}
.notif-dropdown.show {
    display: block;
}
.notif-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.9rem;
    background: #F9FAFB;
}
.notif-item {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}
.notif-item:hover { background: #F3F4F6; color: var(--text-primary); }
.notif-item.unread { background: #EEF2FF; }
.notif-item.unread:hover { background: #E0E7FF; }
.notif-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.25rem; }
.notif-text { font-size: 0.75rem; color: var(--text-secondary); }
.notif-time { font-size: 0.65rem; color: #9CA3AF; margin-top: 0.5rem; display: block; }
.notif-empty { padding: 1.5rem; text-align: center; color: var(--text-secondary); font-size: 0.85rem; }

/* ---- MODERN DASHBOARD UPGRADES ---- */

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 0.5s ease forwards; opacity: 0; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Gradient Backgrounds */
.bg-gradient-primary { background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%); color: white; border: none; }
.bg-gradient-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; border: none; }
.bg-gradient-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; border: none; }
.bg-gradient-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; border: none; }
.bg-gradient-royal { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); color: white; border: none; }

/* Dashboard Card Enhancements */
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}
.stat-card .card-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 5rem;
    opacity: 0.15;
    transform: rotate(-15deg);
    transition: transform 0.3s ease;
}
.stat-card:hover .card-icon {
    transform: rotate(0) scale(1.1);
}
.stat-card .card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}
.stat-card .card-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    position: relative;
    z-index: 1;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(120deg, #f8fafc 0%, #e0e7ff 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #c7d2fe;
}
.welcome-banner h2 { margin-bottom: 0.5rem; color: #1e293b; font-size: 1.75rem; }
.welcome-banner p { color: #475569; font-size: 1rem; margin: 0; }
.welcome-banner .banner-graphic { font-size: 4rem; opacity: 0.9; }
