/* Custom CSS for SaaS Platform */

/* Aptos Light Font
 * To use this font, you need to add the font files to static/fonts/:
 * - Aptos-Light.woff2 (preferred)
 * - Aptos-Light.woff (fallback)
 * - Aptos-Light.ttf (fallback)
 * 
 * The font files can be found on Windows systems at:
 * C:\Windows\Fonts\aptosl.ttf (or similar)
 * Or download from Microsoft's font repository
 */
@font-face {
    font-family: 'Aptos Light';
    src: url('/static/fonts/aptos-light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #0A0A33;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* ── Font size scaling ──────────────────────────────────────────── */
html                        { font-size: 16px; }
html[data-font-size="small"]  { font-size: 13px; }
html[data-font-size="medium"] { font-size: 16px; }
html[data-font-size="large"]  { font-size: 19px; }
.plena-title {
    font-family: 'Aptos Light', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 300;
}
/* Override Bootstrap primary color */
.bg-primary {
    background-color: var(--primary-color) !important;
}

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

.border-primary {
    border-color: var(--primary-color) !important;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.35rem; /* 10% smaller: 1.5 * 0.9 */
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Navbar dropdown active state */
#navbarDropdown + .dropdown-menu .dropdown-item.active {
    background-color: #0d6efd;
    color: white;
}

#navbarDropdown + .dropdown-menu .dropdown-item.active:hover {
    background-color: #0b5ed7;
    color: white;
}

#navbarDropdown + .dropdown-menu .dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    padding: 0.5rem 1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Stats Cards */
.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-info {
    border-left: 4px solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}


/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #05052a);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #05052a, var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(10, 10, 51, 0.3);
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(10, 10, 51, 0.2);
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(10, 10, 51, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: var(--dark-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(10, 10, 51, 0.05);
}

/* Progress bars */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Avatar placeholders */
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Login/Register forms */
.card.shadow-lg {
    border-radius: 15px;
}

.card.shadow-lg .card-body {
    padding: 3rem;
}

/* Dashboard tabs */
.btn-group .btn {
    border-radius: 6px;
    margin-right: 5px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card.shadow-lg .card-body {
        padding: 2rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Google Calendar Style Week View */
.calendar-week-container {
    display: flex;
    height: 650px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.calendar-time-column {
    width: 60px;
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    flex-shrink: 0;
    position: relative;
}

.time-header {
    height: 60px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f1f3f4;
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-slots {
    height: 540px; /* 600px - 60px header = 540px */
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-top: 40px; /* Push time slots down to align with appointment grid */
}

.time-slots::-webkit-scrollbar {
    display: none;
}

.time-slot {
    height: 30px;
    padding: 2px 8px;
    font-size: 12px;
    color: #5f6368;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    position: relative;
}

.calendar-days-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.calendar-day-header {
    display: flex;
    height: 30px;
    background-color: #f1f3f4;
    border-bottom: 1px solid #e0e0e0;
}

.day-header {
    flex: 1;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.day-header:last-child {
    border-right: none;
}

.calendar-day-dates {
    display: flex;
    height: 30px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.day-date {
    flex: 1;
    padding: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    border-right: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-date:last-child {
    border-right: none;
}

.day-date.today {
    font-weight: 600;
    color: var(--primary-color);
}

.calendar-grid {
    flex: 1;
    display: flex;
    position: relative;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 540px; /* Match time-slots height */
}

.calendar-grid::-webkit-scrollbar {
    display: none;
}

.day-column {
    flex: 1;
    border-right: 1px solid #e0e0e0;
    position: relative;
    min-height: calc(30px * 48); /* 48 time slots (6 AM to 5:30 AM next day) * 30px each = 1440px - same as time-grid */
}

.day-column:last-child {
    border-right: none;
}

.day-column::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background-color: #e0e0e0;
    pointer-events: none;
    z-index: 1;
}

.day-column:last-child::after {
    display: none;
}

.day-column.today {
    background-color: rgba(10, 10, 51, 0.05);
    position: relative;
}

.day-column.today::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 10, 51, 0.08);
    pointer-events: none;
    z-index: 1;
}

.time-grid {
    position: relative;
    background-color: #fff;
    height: 100%; /* Fill the entire day-column height */
    min-height: calc(30px * 48); /* 48 time slots (6 AM to 5:30 AM next day) * 30px each = 1440px - same as day-column */
    overflow: visible;
}

.time-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 29px,
            #f0f0f0 29px,
            #f0f0f0 30px
        );
    pointer-events: none;
}

.time-grid::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #f0f0f0;
    pointer-events: none;
}

.calendar-event {
    position: absolute;
    left: 2px;
    right: 2px;
    background-color: #4285f4;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    z-index: 2;
}

.calendar-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.event-title {
    font-size: 12px;
    font-weight: 500;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1px;
}

.event-type {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Month View Styles */
.calendar-month-container {
    padding: 20px;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.month-day-header {
    display: contents;
}

.month-day {
    background-color: #f1f3f4;
    padding: 12px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
}

.month-days {
    display: contents;
}

.month-day-cell {
    background-color: #fff;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    position: relative;
}

.month-day-cell.today {
    background-color: #e8f0fe;
}

.month-day-number {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 4px;
}

.month-day-number.today {
    background-color: #1a73e8;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Calendar Navigation */
.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.calendar-navigation h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    color: #202124;
    min-width: 200px;
}

/* View Toggle Buttons */
.view-toggle-group {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dadce0;
}

.view-toggle-group .btn {
    border: none;
    border-radius: 0;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    background-color: #fff;
    color: #5f6368;
    transition: all 0.2s ease;
}

.view-toggle-group .btn:hover {
    background-color: #f8f9fa;
    color: #202124;
}

.view-toggle-group .btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .calendar-week-container {
        height: 400px;
    }
    
    .calendar-time-column {
        width: 50px;
    }
    
    .time-slot {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .day-header, .day-date {
        font-size: 11px;
        padding: 4px;
    }
    
    .calendar-event {
        padding: 2px 4px;
    }
    
    .event-title {
        font-size: 10px;
    }
    
    .event-time, .event-type {
        font-size: 9px;
    }
    
    .calendar-navigation {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .calendar-navigation h5 {
        font-size: 16px;
        min-width: auto;
    }
    
    .view-toggle-group {
        width: 100%;
    }
    
    .view-toggle-group .btn {
        flex: 1;
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* Settings Page Styles */
.settings-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.settings-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.settings-card-header {
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.settings-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color), #05052a);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.625rem;
}

.settings-card-icon i {
    font-size: 1rem;
    color: #ffffff;
}

.settings-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.settings-card-description {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0;
    line-height: 1.45;
}

.settings-card-body {
    padding: 0.875rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
}

.settings-list::-webkit-scrollbar {
    width: 6px;
}

.settings-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.settings-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.settings-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.settings-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.settings-input-group:hover {
    background: #ffffff;
    border-color: #d1d5db;
}

.settings-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #111827;
    outline: none;
}

.settings-input-group input:focus {
    background: #ffffff;
}

.settings-input-group .input-badge {
    background: #e5e7eb;
    color: #6b7280;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.settings-input-group .delete-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.settings-input-group .delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.settings-input-group .delete-btn i {
    font-size: 0.875rem;
}

/* Convênio row: name + price + delete */
.settings-input-group-convenio .input-group {
    flex-shrink: 0;
    min-width: 100px;
}

/* Color picker styling for status options */
.settings-input-group.status-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}

.color-picker-wrapper input[type="color"] {
    width: 40px;
    height: 38px;
    padding: 2px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.color-picker-wrapper input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 3px;
}

.color-picker-wrapper .form-control-color {
    width: 40px;
    height: 38px;
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    display: inline-block;
    flex-shrink: 0;
}

/* Responsive adjustments for settings */
@media (max-width: 991.98px) {
    .settings-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .settings-card-header {
        padding: 0.875rem;
    }
    
    .settings-card-body {
        padding: 0.875rem;
    }
    
    .settings-card-icon {
        width: 32px;
        height: 32px;
    }
    
    .settings-card-icon i {
        font-size: 0.875rem;
    }
}

/* View Mode Toggle Styles */
.btn-group.administrator-tabs,
.btn-group.doctor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* Ensure hidden tab groups don't take up space */
.btn-group.administrator-tabs[style*="display: none"],
.btn-group.doctor-tabs[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

@media (max-width: 991.98px) {
    .btn-group.administrator-tabs,
    .btn-group.doctor-tabs {
        width: 100%;
    }
    
    .btn-group.administrator-tabs .btn,
    .btn-group.doctor-tabs .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ── Settings: Add button ──────────────────────────────────────── */
.settings-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border: 1.5px dashed #c7d2fe;
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: all 0.18s ease;
    width: 100%;
    justify-content: center;
}

.settings-add-btn:hover {
    background: #eef2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ── Reports: KPI Cards ────────────────────────────────────────── */
.report-kpi-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    padding: 1.125rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s ease;
}

.report-kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.report-kpi-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.125rem;
}

.report-kpi-content {
    flex: 1;
    min-width: 0;
}

.report-kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.report-kpi-value {
    font-size: 1.625rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.report-kpi-sub {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ── Reports: Type Pill Buttons ────────────────────────────────── */
.report-type-pill {
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    border-radius: 20px !important;
    padding: 0.375rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.18s ease;
}

.report-type-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #eef2ff;
}

.btn-check:checked + .report-type-pill {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

/* ── Navbar font-size control ──────────────────────────────────── */
.font-size-controls {
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 2px 6px;
}

.font-size-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 12px;
    transition: background 0.15s, color 0.15s;
}

.font-size-btn:first-child { font-size: 0.75rem; }
.font-size-btn:nth-child(2) { font-size: 0.9375rem; }
.font-size-btn:last-child  { font-size: 1.125rem; }

.font-size-btn:hover,
.font-size-btn.active {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
}

.font-size-btn.active {
    background: rgba(255,255,255,0.3);
}

/* ── Required fields legend ─────────────────────────────────────── */
.required-legend {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 1rem;
    margin-bottom: 0;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

/* ── Custom file input ───────────────────────────────────────────── */
.custom-file-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.custom-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    background: #f9fafb;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.custom-file-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.custom-file-name {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-file-name.has-file {
    color: #374151;
    font-style: normal;
}

/* ── Nav tabs — consistent styling ──────────────────────────────── */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
    gap: 2px;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-bottom: -2px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    transition: color 0.15s, border-color 0.15s;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: #c7d2fe;
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
    font-weight: 600;
}

.nav-tabs .nav-link i {
    opacity: 0.75;
}

.nav-tabs .nav-link.active i {
    opacity: 1;
}

/* ── Working day chip selectors ──────────────────────────────────── */
.work-day-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    border: 1.5px solid #d1d5db;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.work-day-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #eef2ff;
}

.work-day-chip input[type="checkbox"] {
    display: none;
}

.work-day-chip:has(input:checked) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}