/* SentraCore Design Language System (DLS) - Spacious & Rounded */

:root {
    /* ========== BOOTSTRAP OVERRIDES ========== */
    --bs-body-bg: #0f172a;
    --bs-body-color: #e2e8f0;
    --bs-border-color: #2d3a4e;
    --bs-border-color-translucent: rgba(255, 255, 255, 0.08);
    --bs-card-border-color: #2d3a4e;
    --bs-card-bg: #1e293b;
    --bs-secondary-bg: #1e293b;
    --bs-tertiary-bg: #283548;

    /* ========== BACKGROUNDS & SURFACES ========== */
    --bg-body: #0f172a;            /* Main page background — darkest navy */
    --bg-primary: #0f172a;         /* Alias for body */
    --bg-secondary: #1e293b;       /* Cards, sidebar, elevated surfaces */
    --bg-tertiary: #283548;        /* Nested surfaces, hover states */
    --bg-quaternary: #334155;      /* Active states, deeper nesting */
    --bg-input: #1e293b;           /* Form inputs, selects */
    --bg-hover: #283548;           /* Generic hover background */
    --bg-active: #334155;          /* Generic active/pressed background */
    --bg-disabled: #0c1322;        /* Disabled elements */
    --bg-overlay: rgba(0, 0, 0, 0.5);    /* Modal/dropdown overlays */
    --bg-backdrop: rgba(0, 0, 0, 0.75);  /* Full-screen backdrops */

    /* ========== TYPOGRAPHY COLORS ========== */
    --text-primary: #e2e8f0;       /* Main body text */
    --text-secondary: #94a3b8;     /* Labels, descriptions, metadata */
    --text-muted: #64748b;         /* Placeholders, disabled labels */
    --text-disabled: #475569;      /* Fully disabled text */
    --text-inverse: #0f172a;       /* Text on light backgrounds */
    --text-link: #60a5fa;          /* Link color */
    --text-link-hover: #93c5fd;    /* Link hover color */

    /* ========== THEME COLORS ========== */
    /* Primary — actions, buttons, active states */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    --primary-subtle: rgba(37, 99, 235, 0.15);
    --primary-border-subtle: rgba(37, 99, 235, 0.4);

    /* Accent — highlights, special elements */
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-subtle: rgba(124, 58, 237, 0.15);

    /* Secondary — less prominent actions */
    --secondary: #64748b;
    --secondary-hover: #475569;
    --secondary-active: #334155;
    --secondary-subtle: rgba(100, 116, 139, 0.15);
    --secondary-border-subtle: rgba(100, 116, 139, 0.4);

    /* Success — confirmations, positive states */
    --success: #10b981;
    --success-hover: #059669;
    --success-active: #047857;
    --success-subtle: rgba(16, 185, 129, 0.15);
    --success-border-subtle: rgba(16, 185, 129, 0.4);

    /* Warning — caution states */
    --warning: #f59e0b;
    --warning-hover: #fbbf24;
    --warning-active: #f59e0b;
    --warning-subtle: rgba(245, 158, 11, 0.15);
    --warning-border-subtle: rgba(245, 158, 11, 0.4);
    --warning-text: #0f172a;

    /* Danger — destructive actions, errors */
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-active: #b91c1c;
    --danger-subtle: rgba(239, 68, 68, 0.15);
    --danger-border-subtle: rgba(239, 68, 68, 0.4);

    /* Info — informational states */
    --info: #06b6d4;
    --info-hover: #22d3ee;
    --info-active: #67e8f9;
    --info-subtle: rgba(6, 182, 212, 0.15);
    --info-border-subtle: rgba(6, 182, 212, 0.4);
    --info-text: #0f172a;

    /* Light / Dark utility */
    --light: #f1f5f9;
    --light-hover: #f8fafc;
    --light-active: #f8fafc;
    --light-subtle: rgba(241, 245, 249, 0.1);

    --dark: #0f172a;
    --dark-hover: #0c1322;
    --dark-active: #0a0f1d;
    --dark-subtle: rgba(15, 23, 42, 0.5);

    /* ========== BORDERS ========== */
    --border-color: #2d3a4e;       /* Default border */
    --border-subtle: #1e293b;      /* Subtle/divider borders */
    --border-muted: #3b4c63;       /* Medium emphasis borders */
    --border-strong: #475569;      /* High emphasis borders */
    --border-radius: 0.375rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 1rem;
    --border-radius-pill: 50rem;

    /* ========== SHADOWS ========== */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
    --shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.3);

    /* ========== FOCUS STATES ========== */
    --focus-ring-color: rgba(37, 99, 235, 0.5);
    --focus-ring-width: 0.25rem;

    /* ========== TRANSITIONS ========== */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* ========== TYPOGRAPHY ========== */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-family-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* ========== MAESTRO SPACING ========== */
    --spacing-card: 1.5rem;        /* More breathing room inside cards */
}

/* 1. Core Backgrounds & Typography */
body {
    background-color: var(--bg-body);
    color: #f0f0f0;
    font-family: var(--font-family-sans);
    display: block;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.5px;
}

p, span, div { color: inherit; }

a {
    color: #3d8bfd;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #6ea8fe;
    text-decoration: none;
}

/* 2. Status & Metric Cards */
.metric-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: var(--spacing-card);
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.metric-card:hover {
    transform: translateY(-4px);
}

.metric-value {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.metric-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-top: 5px;
    width: 100%;
    text-align: center;
    font-weight: 600;
}

/* 3. Data Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-color: #f0f0f0;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-active-color: #ffffff;
    --bs-table-active-bg: rgba(255, 255, 255, 0.08);
    --bs-table-hover-color: #ffffff;
    --bs-table-hover-bg: #283548;

    color: #f0f0f0;
    border-color: #2d3a4e;
}

.table > :not(caption) > * > * {
    color: #f0f0f0 !important;
    background-color: transparent !important;
    border-bottom-width: 1px;
    border-color: #2d3a4e !important;
    padding: 1rem;
}

.table-responsive {
    border-radius: var(--border-radius-xl);
}

.table thead th {
    background-color: #172033 !important;
    color: #ced4da !important;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid #2d3a4e !important;
    padding: 1.25rem 1rem;
}

/* 4. Forms & Inputs */
.form-control, .form-select {
    background-color: var(--bg-input);
    border: 1px solid #2d3a4e;
    color: #ffffff;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-tertiary);
    color: #ffffff;
    border-color: #3d8bfd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-label {
    color: #ced4da;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* 5. Cards & Containers */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid #2d3a4e;
    border-radius: var(--border-radius-xl);
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #2d3a4e;
    font-weight: 700;
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    border-top-left-radius: var(--border-radius-xl) !important;
    border-top-right-radius: var(--border-radius-xl) !important;
}

.card-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid #2d3a4e;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    border-bottom-left-radius: var(--border-radius-xl) !important;
    border-bottom-right-radius: var(--border-radius-xl) !important;
}

/* 6. Navigation (COMPACT & RESTORED) */
.navbar {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid #2d3a4e;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Updated Brand Styling */
.navbar-brand {
    color: #ffffff !important;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px; /* Tighter letter spacing like login page */
}

/* New Utility Class for Brand Accent */
.brand-accent {
    color: var(--primary) !important;
}

.navbar-nav .nav-link {
    color: #ced4da !important;
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem !important;
    transition: all 0.2s;
    font-weight: 500;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05);
}

.dropdown-menu {
    background-color: var(--bg-input);
    border: 1px solid #2d3a4e;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 2px;
}

.dropdown-item:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* 7. Buttons */
.btn {
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.6rem 1.2rem;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-sm {
    border-radius: var(--border-radius-sm);
    padding: 0.4rem 0.8rem;
}

.btn-primary { background-color: var(--primary); color: #fff; }
.btn-secondary { background-color: #495057; color: #fff; }
.btn-success { background-color: var(--success); color: #fff; }
.btn-danger { background-color: var(--danger); color: #fff; }
.btn-warning { background-color: var(--warning); color: #000; }
.btn-info { background-color: var(--info); color: #000; }

.btn:hover {
    filter: brightness(115%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn:active {
    transform: translateY(0);
}

/* 8. Utilities & Badges */
.text-muted { color: var(--text-secondary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.small, small { color: var(--text-secondary) !important; }

.badge {
    border-radius: 50px !important;
    padding: 0.5em 0.8em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 9. Maestro Component Overrides */
.modal-content {
    background-color: var(--bg-secondary);
    color: #f0f0f0;
    border: 1px solid #2d3a4e;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-header {
    border-bottom: 1px solid #2d3a4e;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #2d3a4e;
    padding: 1.5rem;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
}

.list-group-item {
    background-color: transparent;
    color: #f0f0f0;
    border: none;
    border-bottom: 1px solid #2d3a4e;
    padding: 1rem 1.25rem;
    transition: background-color 0.2s;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item-action:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.column, .kanban-column, .roadmap-column {
    background-color: transparent;
    border-radius: var(--border-radius-xl);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
    background: #2d3a4e;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}
