:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    color: #111827;
    margin-top: 0;
}

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

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

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

.card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

button, .btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
}

button:hover, .btn:hover {
    background-color: var(--primary-hover);
}

button:active, .btn:active {
    transform: translateY(1px);
}

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

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

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--text-light);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }

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

.auth-box {
    max-width: 400px;
    margin: 4rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Dashboard Layout (Robust Unified System) */
.db-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: 100vh;
    background: #f9fafb;
}

.db-main {
    padding: 2rem;
    overflow-y: auto;
    background: #f9fafb;
    min-width: 0; /* Prevent grid blowouts */
}

/* User Sidebar Styling */
.db-sidebar {
    background: white;
    border-right: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    display: flex !important;
    flex-direction: column !important;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.db-sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 3rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.db-sidebar-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem;
}

.db-sidebar-menu a {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.db-sidebar-menu a:hover, .db-sidebar-menu a.active {
    background: #f3f4f6;
    color: var(--primary);
    transform: translateX(4px);
}

.db-sidebar-menu a.active {
    background: #ecfdf5;
    color: var(--primary);
    font-weight: 700;
    box-shadow: inset 4px 0 0 var(--primary);
}

/* Responsive Dashboard */
@media (max-width: 991px) {
    .db-layout {
        grid-template-columns: 1fr;
    }
    .db-sidebar {
        height: auto;
        position: relative;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .db-sidebar-brand {
        margin-bottom: 1.5rem;
    }
    .db-sidebar-menu {
        flex-direction: row !important;
        flex-wrap: wrap;
    }
    .db-sidebar-menu a {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}


