/* Modern white-label task system UI */
:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --sidebar-width: 282px;
    --topbar-height: 74px;
    --body-bg: #f4f7fb;
    --card-bg: #ffffff;
    --text-main: #172033;
    --text-muted: #6b7280;
    --line: #e5e7eb;
    --shadow: 0 16px 35px rgba(15, 23, 42, .08);
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, .06);
    --radius: 18px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-main);
    background: var(--body-bg);
    overflow-x: hidden;
}
a { color: var(--primary-color); }
a:hover { color: color-mix(in srgb, var(--primary-color) 82%, #000); }
.app-shell { min-height: 100vh; display: flex; }
.app-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,.15), transparent 34%), linear-gradient(180deg, #111827 0%, #0b1220 100%);
    color: #fff;
    z-index: 1030;
    border-right: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-link { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand-logo-wrap {
    width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.18); flex: 0 0 auto; overflow: hidden;
}
.brand-logo-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text strong { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: rgba(255,255,255,.58); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.sidebar-scroll { height: calc(100vh - 88px); overflow-y: auto; padding: 14px 12px 22px; }
.sidebar-scroll::-webkit-scrollbar { width: 8px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 99px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-section { color: rgba(255,255,255,.42); text-transform: uppercase; letter-spacing: .09em; font-size: .68rem; font-weight: 700; margin: 18px 12px 8px; }
.sidebar-nav .nav-link {
    min-height: 44px; display: flex; align-items: center; gap: 12px; border-radius: 13px; padding: 10px 12px;
    color: rgba(255,255,255,.72); text-decoration: none; font-size: .92rem; font-weight: 600; transition: .18s ease;
}
.sidebar-nav .nav-link i { width: 22px; text-align: center; font-size: 1rem; color: rgba(255,255,255,.58); }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 72%, #7c3aed));
    color: #fff; box-shadow: 0 12px 28px color-mix(in srgb, var(--primary-color) 28%, transparent);
}
.sidebar-nav .nav-link.active i { color: #fff; }
.logout-link { margin-top: 8px; color: #fecaca !important; }
.app-main { margin-left: var(--sidebar-width); min-height: 100vh; width: calc(100% - var(--sidebar-width)); }
.app-topbar {
    min-height: var(--topbar-height); background: rgba(255,255,255,.88); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226,232,240,.9); position: sticky; top: 0; z-index: 1010;
}
.app-content { padding: 28px; max-width: 1580px; margin: 0 auto; }
.page-eyebrow { color: var(--text-muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.page-title-top { color: var(--text-main); font-weight: 800; font-size: 1.05rem; }
.btn-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; border: 1px solid var(--line); background: #fff; }
.user-menu { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px 5px 5px; font-weight: 700; }
.avatar-circle { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--primary-color) 14%, #fff); color: var(--primary-color); font-weight: 900; }
.card { border: 1px solid rgba(226,232,240,.9); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--card-bg); margin-bottom: 22px; }
.card-header { background: #fff; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0 !important; padding: 16px 20px; font-weight: 800; }
.card-body { padding: 20px; }
.h3, h1.h3 { font-weight: 900; letter-spacing: -.03em; }
.btn { border-radius: 12px; font-weight: 800; padding: .55rem .9rem; }
.btn-sm { border-radius: 10px; padding: .38rem .62rem; }
.btn-primary, .bg-primary, .badge.bg-primary { background-color: var(--primary-color) !important; border-color: var(--primary-color) !important; }
.btn-primary:hover { filter: brightness(.94); }
.btn-outline-primary { color: var(--primary-color) !important; border-color: color-mix(in srgb, var(--primary-color) 62%, #fff) !important; }
.btn-outline-primary:hover { color: #fff !important; background: var(--primary-color) !important; border-color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.form-control, .form-select { border-radius: 12px; border-color: #d9e0ea; padding: .62rem .78rem; }
.input-group-text { border-radius: 12px; border-color: #d9e0ea; background: #f8fafc; }
.form-control:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--primary-color) 16%, transparent); }
.table-responsive { border-radius: var(--radius); }
.table { margin: 0; }
.table th { border-top: none; border-bottom: 1px solid var(--line); color: #64748b; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 900; background: #f8fafc; padding: 13px 16px; }
.table td { vertical-align: middle; padding: 14px 16px; border-color: #edf2f7; font-size: .92rem; }
.table-hover tbody tr:hover { background: #f8fbff; }
.badge { border-radius: 999px; padding: .42rem .62rem; font-weight: 800; }
.alert { border: none; border-radius: 15px; box-shadow: var(--shadow-sm); }
.help-list { padding-left: 1.1rem; color: var(--text-main); }
.help-list li { margin-bottom: .55rem; line-height: 1.55; }
.help-list li:last-child { margin-bottom: 0; }
.pagination .page-link { border: 0; border-radius: 10px; margin: 0 2px; color: var(--primary-color); font-weight: 800; }
.pagination .active .page-link { background: var(--primary-color); }
.border-left-primary, .border-left-success, .border-left-info, .border-left-warning, .border-left-danger, .border-left-secondary { border-left: 0 !important; position: relative; overflow: hidden; }
.border-left-primary::before, .border-left-success::before, .border-left-info::before, .border-left-warning::before, .border-left-danger::before, .border-left-secondary::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; }
.border-left-primary::before { background: var(--primary-color); }
.border-left-success::before { background: #16a34a; }
.border-left-info::before { background: #0891b2; }
.border-left-warning::before { background: #f59e0b; }
.border-left-danger::before { background: #dc2626; }
.border-left-secondary::before { background: var(--secondary-color); }
.card .h5 { font-size: 1.75rem; font-weight: 900; letter-spacing: -.04em; }
.text-xs { font-size: .72rem; font-weight: 900 !important; letter-spacing: .07em; }
.text-gray-300 { color: #cbd5e1; }
.text-gray-800 { color: var(--text-main); }
.mobile-sidebar { background: #0b1220; color: #fff; }
.mobile-sidebar .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.08); }
.auth-body { min-height: 100vh; }
.login-card { overflow: hidden; }
@media (max-width: 991.98px) {
    .app-main { margin-left: 0; width: 100%; }
    .app-content { padding: 18px; }
    .page-title-top { font-size: .98rem; }
}
@media (max-width: 575.98px) {
    .app-content { padding: 14px; }
    .card-body { padding: 16px; }
    .table td, .table th { padding: 12px; }
    .h3, h1.h3 { font-size: 1.35rem; }
}
