@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --brand-blue: #1e293b;
    --brand-blue-light: #334155;
    --brand-red: #dc2626;
    --brand-red-light: #ef4444;
    
    /* Neutral Colors */
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    
    /* Components */
    --sidebar-bg: #0f172a;
    --sidebar-text: #ffffff;
    --sidebar-hover: #1e293b;
    --sidebar-active: #334155;
    
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.25s ease-in-out;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
}

a {
    text-decoration: none;
    color: var(--brand-blue-light);
    transition: var(--transition);
}

a:hover {
    color: var(--brand-blue);
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-header span {
    color: var(--brand-red-light);
}

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

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--sidebar-text);
    font-weight: 500;
    opacity: 0.85;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--sidebar-hover);
    opacity: 1;
    color: #fff;
    border-left: 4px solid var(--brand-red);
}

.nav-link i {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    height: 70px;
    background-color: #0284c7; /* Professional Blue */
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 32px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.top-header .btn-outline {
    color: white;
}

.top-header .user-profile span {
    color: white !important;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-profile .avatar {
    width: 36px;
    height: 36px;
    background-color: var(--brand-blue-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.page-content {
    padding: 32px;
    flex: 1;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--brand-blue);
}

/* Cards & Dashboards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    transition: var(--transition);
    border: none;
    color: white;
}

.stat-card:nth-child(1) { background: #1e293b; } /* Slate 800 */
.stat-card:nth-child(2) { background: #0f766e; } /* Teal 700 */
.stat-card:nth-child(3) { background: #b91c1c; } /* Red 700 */
.stat-card:nth-child(4) { background: #6d28d9; } /* Purple 700 */
.stat-card:nth-child(5) { background: #0369a1; } /* Sky 700 */

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
}

.stat-info h3 {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

/* Tables */
.card-panel {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background-color: #fafbfc;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
    color: var(--text-primary);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background-color: #f8fafc;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending { background-color: #fff3e0; color: #e65100; }
.badge-review { background-color: #e3f2fd; color: #1565c0; }
.badge-completed { background-color: #e8f5e9; color: #2e7d32; }
.badge-rejected { background-color: #ffebee; color: #c62828; }
.badge-active { background-color: #e8f5e9; color: #2e7d32; }
.badge-suspended { background-color: #ffebee; color: #c62828; }

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font-family);
    transition: var(--transition);
    background-color: #fcfcfc;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-blue-light);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
    background-color: #fff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: var(--brand-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 82, 204, 0.3);
}

.btn-danger {
    background-color: var(--brand-red);
    color: white;
}

.btn-danger:hover {
    background-color: #b71c1c;
    color: white;
    box-shadow: 0 4px 10px rgba(217, 48, 37, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--brand-blue-light);
    color: var(--brand-blue-light);
    background-color: rgba(0, 82, 204, 0.05);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--sidebar-hover) 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-header {
    background: white;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.auth-header h1 {
    font-size: 22px;
    color: var(--brand-blue);
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-body {
    padding: 30px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-error { background-color: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-success { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* File Upload */
.upload-area {
    border: 2px dashed var(--brand-blue-light);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background-color: rgba(0, 82, 204, 0.03);
    transition: var(--transition);
    cursor: pointer;
}

.upload-area:hover {
    background-color: rgba(0, 82, 204, 0.08);
}

.upload-icon {
    font-size: 48px;
    color: var(--brand-blue-light);
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.show { transform: translateX(0); box-shadow: 20px 0 30px rgba(0,0,0,0.5); }
    .main-content { margin-left: 0; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
}

.sidebar.hidden { transform: translateX(-100%); transition: transform 0.3s ease; }
.main-content.expanded { margin-left: 0; transition: margin-left 0.3s ease; }
