* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #1e293b; /* Deep Navy / Slate Blue */
    --accent-color: #f59e0b; /* Amber / Gold */
    --bg-color: #f8fafc;
    --text-color: #334155;
    --sidebar-width: 250px;
    --white: #ffffff;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* --- Login Page --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: var(--primary-color);
}

.login-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: #0f172a;
}

.w-100 {
    width: 100%;
}

.alert {
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background-color: #dcfce3;
    color: #166534;
}

.demo-accounts {
    margin-top: 2rem;
    padding: 1rem;
    background: #f1f5f9;
    font-size: 0.875rem;
    border-radius: 4px;
}

/* --- Layout --- */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--accent-color);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-menu li a:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.content-area {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

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

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid var(--accent-color);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* --- Tables --- */
.table-container {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

th {
    background-color: #f8fafc;
    font-weight: 600;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
}
.badge-new { background: #dbeafe; color: #1e40af; }
.badge-progress { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce3; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        padding: 0.5rem;
    }
    .sidebar-menu li {
        flex: 1 1 50%;
    }
    .sidebar-menu li a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }
    .content-area {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .pro-form-section {
        padding: 1rem;
    }
    .table-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .sidebar-menu li {
        flex: 1 1 100%;
    }
}

