:root {
    --primary: #1e40af;
    --primary-hover: #1e3a8a;
    --secondary: #10b981;
    --accent: #f59e0b;
    --bg-color: #f9fafb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-bold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.navbar-nav {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
}
.nav-link {
    color: var(--text-main);
    font-weight: 500;
}
.nav-link:hover { color: var(--primary); }
.user-greeting {
    font-weight: 500;
    color: var(--secondary);
}

/* Layout */
.main-container {
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem;
}
.footer {
    text-align: center;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

/* Utilities */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.my-4 { margin: 1.5rem 0; }
.mr-2 { margin-right: 0.5rem; }
.bg-primary { background-color: var(--primary); }
.bg-white { background-color: var(--white); }

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
    font-size: 1rem;
}
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--white);
}
.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background-color: var(--bg-color);
    border-color: var(--text-muted);
}
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}
.btn-block {
    display: block;
    width: 100%;
}
.btn-nav { border: none; background: transparent; cursor: pointer; font-weight: 500; }
.btn-login {
    background-color: var(--bg-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
}
.inline-form { display: inline; }
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Modals */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show {
    opacity: 1;
}
.modal-content {
    background-color: var(--white);
    margin: 10% auto; 
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.modal.show .modal-content {
    transform: translateY(0);
}
.close-modal {
    color: var(--text-muted);
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}
.close-modal:hover { color: var(--text-main); }
.modal-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
.modal-header h3 { margin: 0; font-size: 1.25rem; color: var(--primary); }
.modal-body p { margin-bottom: 0.5rem; }
.modal-desc { margin-top: 1rem; background-color: var(--bg-color); padding: 1rem; border-radius: 0.375rem; }

/* Dashboard specific */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; }
.page-header { display: flex; justify-content: space-between; align-items: center; }
.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}
.dashboard-sidebar, .dashboard-content {
    background-color: var(--white);
    border-radius: 0.5rem;
    padding: 1.5rem;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 0.5rem;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-details { display: flex; flex-direction: column; }
.stat-title { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-color); }
th { background-color: var(--bg-color); font-weight: 600; color: var(--text-muted); font-size: 0.875rem; text-transform: uppercase; }
.hover-table tbody tr:hover { background-color: rgba(249, 250, 251, 0.5); }
.actions-cell { display: flex; gap: 0.5rem; }

.badge {
    padding: 0.25em 0.5em;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-secondary { background-color: #e5e7eb; color: #374151; }
.badge-info { background-color: #dbeafe; color: #1e40af; }
.badge-warning { background-color: #fef3c7; color: #d97706; }
.badge-primary { background-color: #ecfdf5; color: #065f46; }

/* Toasts */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: var(--white);
    z-index: 1050;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease;
}
.alert-success { background-color: var(--secondary); }
.alert-danger { background-color: var(--danger); padding: 1rem; border-radius: 0.5rem; color: #fff; margin-bottom: 1rem; }

@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .navbar-nav { gap: 0.75rem; }
    .nav-link { font-size: 0.875rem; }
}
