:root {
    /* Colors - Adopting Inspec Slate/Blue Theme */
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --bg-secondary: #f8fafc;
    
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    
    --brand-primary: #007ACC;
    --brand-dark: #003A73;
    --brand-gradient: linear-gradient(135deg, #003A73 0%, #007ACC 100%);
    
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    
    --sidebar-bg: #003A73;
    --sidebar-text: #e2e8f0;
    --sidebar-active: #ffffff;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

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

.main-container {
    flex-grow: 1;
    padding: 30px;
    margin-left: 240px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Styling - Dark Blue Inspec style */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-logo {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 700;
    color: #fff;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 15px;
}

.menu-list {
    list-style: none;
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-right: 4px solid transparent;
}

.menu-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.menu-item.active {
    background-color: rgba(255,255,255,0.15);
    color: var(--sidebar-active);
    border-right-color: var(--sidebar-active);
    font-weight: 600;
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Cards - White Slate style */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    background-color: #fff;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 58, 115, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 58, 115, 0.3);
    opacity: 0.95;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}

.data-table th {
    text-align: left;
    padding: 12px 15px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--card-border);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
}

.data-table tr:hover td {
    background-color: var(--bg-secondary);
}

/* Badge Status Styles (Adapting from Dashboard) */
.badge {
    padding: 4px 10px;
    border_radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-status-A { background: #dbeafe; color: #1e40af; }
.badge-status-EX { background: #dcfce7; color: #166534; }
.badge-status-F { background: #f1f5f9; color: #475569; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    margin: 10vh auto;
    width: 95%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: var(--brand-gradient);
    padding: 20px 24px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-modal {
    cursor: pointer;
    font-size: 1.5rem;
    color: rgba(255,255,255,0.8);
}

.close-modal:hover { color: #fff; }

form { padding: 24px; }

/* Dashboard Row Grid */
.row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 24px;
    margin-bottom: 24px;
}
