/* Custom CSS to fix the sidebar and allow content scrolling */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700&display=swap');

:root {
    /* === COLOR VARIABLES === */
    --bg-color: #FBEFE0;
    --text-color: #212529;
    --text-color-secondary: #6c757d;
    --text-color-muted: #6c757d;
    --text-color-danger: #dc3545;
    --sidebar-bg: #E9DCCB;
    --sidebar-text: #212529;
    --link-color: #0d6efd;
    --link-hover-color: #0a58ca;
    
    /* === TYPOGRAPHY VARIABLES === */
    /* --font-family-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; */
    --font-family-base: 'Inter', sans-serif;
    --font-family-heading: 'Inter', sans-serif;
    
    /* Font Sizes */
    --font-size-h1: 2.5rem;
    --font-size-h2: 2rem;
    --font-size-h3: 1.75rem;
    --font-size-h4: 1.5rem;
    --font-size-h5: 1.25rem;
    --font-size-h6: 1rem;
    --font-size-body: 1rem;
    --font-size-small: 0.875rem;
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
    
    /* Line Heights */
    --line-height-base: 1.5;
    --line-height-heading: 1.2;
}

/* === BASE TYPOGRAPHY === */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* === HEADINGS === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-heading);
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

h1 { 
    font-size: var(--font-size-h1); 
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
}
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }
h6 { font-size: var(--font-size-h6); }

/* === PARAGRAPH & TEXT === */
p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

span {
    color: var(--text-color);
}

/* === LABELS === */
label, .form-label {
    color: var(--text-color);
    font-weight: var(--font-weight-medium);
}

/* === TEXT UTILITIES === */
.text-muted {
    color: var(--text-color-muted) !important;
}

.text-secondary {
    color: var(--text-color-secondary) !important;
}

.text-danger {
    color: var(--text-color-danger) !important;
}

.fw-bold {
    font-weight: var(--font-weight-bold) !important;
}

.fw-medium {
    font-weight: var(--font-weight-medium) !important;
}

/* === LINKS === */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover-color);
}

/* === LAYOUT === */
#main-container {
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
}

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    padding: 20px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: background-color 0.3s;
}

#sidebar .nav-link {
    color: var(--sidebar-text);
    border-radius: 20px; /* Apply to all nav-links to prevent flickering */
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Active nav link highlight - Light mode only */
body:not(.dark-theme) #sidebar .nav-link.active {
    background-color: #D4744F;
    color: #ffffff;
}

#page-content-wrapper {
    margin-left: 250px; /* Offset for the sidebar width */
    padding: 20px;
    transition: background-color 0.3s;
}

/* === HEADER BORDER === */
/* Only apply stronger border in light mode (not dark-theme) */
body:not(.dark-theme) #page-content-wrapper .border-bottom {
    border-bottom-color: #c4b5a6 !important; /* Stronger border for light mode */
}

/* === FORM ELEMENTS === */
.form-control, .form-select {
    color: var(--text-color);
}

.form-control::placeholder {
    color: var(--text-color-muted);
}

/* === TAB STYLES === */
/* Bootstrap/Dash Tabs - Light Mode */
.nav-tabs {
    border-bottom: 2px solid var(--color-beige-dark, #BBA998);
}

.nav-tabs .nav-link {
    color: var(--text-color, #212529);
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
    color: var(--color-brown, #8B7969);
    border-bottom-color: var(--color-brown-light, #BBA998);
    background-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--color-slate-dark, #6E868D);
    background-color: rgba(146, 183, 194, 0.15);
    border: none;
    border-bottom: 3px solid var(--color-slate-dark, #6E868D);
    border-radius: 16px 16px 0 0;
    font-weight: 600;
}

/* Tab content area */
.tab-content {
    padding: 1rem 0;
}

/* NOTE: Table styles are now in tables.css */
/* NOTE: Modal styles and file upload styles are now in modals.css */