/* assets/css/style.css - Modern UI Design System for AUN-CDR */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #1e293b;
    --secondary-color: #0f172a;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Layout Setup */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
}

#sidebar .sidebar-header {
    padding: 1.5rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar .sidebar-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

#sidebar .sidebar-brand i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

#sidebar ul.components {
    padding: 1rem 0;
}

#sidebar ul li a {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border-left: 4px solid transparent;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-left-color: var(--accent-color);
}

#sidebar ul li a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

#content {
    width: 100%;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
}

/* Top Navbar */
.main-navbar {
    background: #ffffff;
    padding: 0.85rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Page Content */
.main-body {
    padding: 1.75rem;
    flex-grow: 1;
}

.page-title-box {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Cards & Widgets */
.card-custom {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-stat {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.card-stat .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--primary-light); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success-color); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.1); color: var(--warning-color); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.1); color: var(--accent-color); }

.card-stat .stat-val {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.2;
}

.card-stat .stat-lbl {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Badges & Pills */
.badge-tqf {
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.78rem;
    display: inline-block;
}
.badge-tqf3 { background: #e0f2fe; color: #0369a1; }
.badge-tqf4 { background: #fef3c7; color: #b45309; }
.badge-tqf5 { background: #dcfce7; color: #15803d; }
.badge-tqf6 { background: #f3e8ff; color: #6b21a8; }

.badge-status-active { background: #d1fae5; color: #065f46; }
.badge-status-archived { background: #f1f5f9; color: #475569; }

/* DataTables Enhancement */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

table.dataTable thead th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 2px solid var(--border-color) !important;
    padding: 0.85rem 1rem !important;
}

table.dataTable tbody td {
    padding: 0.85rem 1rem !important;
    vertical-align: middle;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border-color) !important;
}

/* Login Page Styling */
.login-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand i {
    font-size: 3rem;
    color: var(--primary-light);
}

.login-brand h3 {
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 1.35rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.active {
        margin-left: 0;
    }
}
