/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    /* Brand Colors */
    --nws-blue: #185CAB;
    --nws-light-blue: #0E95D3;
    --nws-dark-blue: #002B49;
    --nws-orange: #ED6400;
    --nws-navy: #1B365D;
    --nws-light-gray: #E6E7E8;

    /* Status Colors */
    --status-draft: #6c757d;
    --status-approved: var(--nws-blue);
    --status-paid: #198754;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    background-color: var(--nws-dark-blue);
    padding: 1rem;
}

.navbar-brand img {
    height: 40px;
}

.navbar .btn-outline-light {
    color: white;
    border-color: white;
}

.navbar .btn-outline-light:hover {
    color: var(--nws-dark-blue);
    background-color: white;
}

/* ==========================================================================
   Period Filters
   ========================================================================== */
.period-filters .btn-outline-primary {
    color: white;
    border-color: var(--nws-blue);
    background-color: var(--nws-blue);
}

.period-filters .btn-outline-primary.active {
    color: white;
    background-color: var(--nws-orange);
    border-color: var(--nws-orange);
}

.period-filters .btn-outline-primary:hover {
    color: white;
    background-color: var(--nws-orange);
    border-color: var(--nws-orange);
}

/* Custom Date Range */
.custom-date-range {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Expense Summary Card
   ========================================================================== */
.expense-summary {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.expense-summary h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.expense-summary h6 {
    color: #6c757d;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   Expense Table
   ========================================================================== */
.table {
    background: white;
}

/* Status Badges */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

.badge.bg-secondary {
    background-color: var(--status-draft) !important;
    color: white;
}

.badge.bg-primary {
    background-color: var(--status-approved) !important;
    color: white;
}

.badge.bg-success {
    background-color: var(--status-paid) !important;
    color: white;
}

/* Table Action Buttons */
.table .btn-outline-primary {
    color: var(--nws-blue);
    border-color: var(--nws-blue);
    background-color: white;
}

.table .btn-outline-success {
    color: var(--status-paid);
    border-color: var(--status-paid);
    background-color: white;
}

.table .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background-color: white;
}

.table .btn-group .btn {
    margin: 0 0.25rem;
}

/* Sortable Headers */
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background-color: #f8f9fa;
}

/* ==========================================================================
   Expense Form Panel
   ========================================================================== */
.expense-form-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 400px;
    background: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 1040;
    padding-top: 56px;
    overflow-y: auto;
}

/* Main content - properly constrained */
.main-content {
    margin-right: 420px; /* Slightly more margin to ensure gap */
    padding-right: 20px;
    padding-left: 20px;
    width: auto;
    position: relative;
}

/* Table container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Ensure table stays within bounds */
.table {
    width: 100%;
    max-width: 100%;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-primary {
    color: var(--nws-blue) !important;
}

.bg-primary {
    background-color: var(--nws-blue) !important;
}

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

.bg-secondary {
    background-color: var(--status-draft) !important;
}

/* Autocomplete styles */
.autoComplete_wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.autoComplete_result {
    padding: 0.375rem 0.75rem;
}

.autoComplete_highlighted {
    color: var(--nws-blue);
    font-weight: bold;
}

.autoComplete_selected {
    background-color: var(--nws-light-gray);
    cursor: pointer;
}

.autoComplete_results {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1050;
}

/* Filter styles */
.filters-row {
    background: white;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters-row select {
    font-size: 0.875rem;
}