/* ---------------------------------------- */
/* 1. Global Reset & Variables */
/* ---------------------------------------- */
:root {
    --color-primary-dark: #0f172a;
    --color-secondary-dark: #1e293b;
    --color-background: #f8fafc;
    --color-surface: rgba(255, 255, 255, 0.95);
    --color-accent: #6366f1;
    --color-accent-hover: #4f46e5;
    --color-text-main: #1e293b;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-success: #10b981;
    --color-error: #ef4444;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------------------------------------- */
/* 2. Main Layout Structure */
/* ---------------------------------------- */
.dashboard-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ---------------------------------------- */
/* 3. Sidebar Styling */
/* ---------------------------------------- */
.sidebar {
    width: 280px;
    background: var(--color-primary-dark);
    color: white;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    padding: 0 12px;
    margin-bottom: 48px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #818cf8, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex-grow: 1;
}

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

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a, .logout-button {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1rem;
    font-family: inherit;
    text-align: left;
}

.sidebar-nav a:hover, .logout-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav a.active {
    color: white;
    background: var(--color-accent);
}

.accent-link {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--color-accent) !important;
}

.accent-link:hover {
    background: var(--color-accent) !important;
    color: white !important;
}

.logout-item {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-button:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

.user-info {
    margin-top: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    font-size: 0.85rem;
}

.user-info span {
    display: block;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.user-info strong {
    display: block;
    color: white;
    font-size: 1rem;
}

/* ---------------------------------------- */
/* 4. Main Content Area */
/* ---------------------------------------- */
.main-content {
    flex-grow: 1;
    padding: 40px;
    background: var(--color-background);
}

.main-header {
    margin-bottom: 32px;
}

.header-breadcrumb {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ---------------------------------------- */
/* 5. Content Styling */
/* ---------------------------------------- */
.content-wrapper {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
}

.messages {
    margin-bottom: 24px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ---------------------------------------- */
/* 6. Typography & Common Elements */
/* ---------------------------------------- */
h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

p {
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 16px;
    background: #f8fafc;
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-border);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

tr:hover td {
    background: #f8fafc;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-draft { background: #f1f5f9; color: #475569; }
.status-submitted { background: #e0f2fe; color: #0369a1; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* ---------------------------------------- */
/* 7. Forms */
/* ---------------------------------------- */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-main);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* ---------------------------------------- */
/* 8. Responsiveness */
/* ---------------------------------------- */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 32px 12px;
    }
    .logo h1, .user-info, .sidebar-nav span {
        display: none;
    }
    .main-content {
        padding: 24px;
    }
}
