﻿body, .main-content, .content-panel, input, button, select, textarea {
    font-family: 'Archivo', sans-serif !important;
}

.page-title {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.15;
    color: #212529;
    margin-bottom: 2px;
}

/* This is a <p>, which carries a ~1em browser-default top/bottom margin unless
   reset — that leftover margin (not the header wrapper's own mb-*) was the
   biggest single source of the oversized gap under every page title. */
.page-subtitle {
    font-family: 'Archivo', sans-serif;
    font-weight: 400;
    color: #6c757d;
    font-size: 13.5px;
    margin: 0;
}

.form-label-brand {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    color: black;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-control {
    font-family: 'Archivo', sans-serif;
    font-weight: 400;
}

/* Password field with show/hide toggle */
.password-field {
    position: relative;
}

    .password-field input {
        padding-right: 40px;
    }

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
}

    .password-toggle-icon:hover {
        color: #212529;
    }

/* Local Fonts */
@font-face {
    font-family: 'Dunkin';
    src: url('/fonts/Dunkin Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Archivo';
    src: url('/fonts/Archivo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Archivo';
    src: url('/fonts/Archivo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --dunkin-orange: #ff671f;
    --dunkin-pink: #e11383;
    --dunkin-bg: #f4f6f9;
    --sidebar-width: 250px;
}

body {
    background-color: var(--dunkin-bg);
    font-family: 'Archivo', sans-serif;
    overflow-x: hidden;
}

/* Sidebar Styling */
#sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 1.25rem;
    right: -14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

    .sidebar-toggle-btn i {
        transition: transform 0.2s ease;
    }

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid #e0e0e0;
    padding: 8px 0;
}

.logout-link {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

/* Collapsed state: icon-only sidebar */
html.sidebar-collapsed #sidebar {
    width: 72px;
}

html.sidebar-collapsed #main-wrapper {
    margin-left: 72px;
}

html.sidebar-collapsed .nav-label {
    display: none;
}

html.sidebar-collapsed .brand-full {
    display: none;
}

html.sidebar-collapsed .brand-compact {
    display: flex;
}

html.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}

html.sidebar-collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebar-brand {
    padding: 1.5rem;
    text-align: center;
}

    .sidebar-brand h2 {
        color: var(--dunkin-orange);
        font-family: 'Dunkin', sans-serif;
        font-weight: 700;
        margin: 0;
        letter-spacing: 1px;
    }

.brand-compact {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--dunkin-orange);
    color: #ffffff;
    font-family: 'Dunkin', sans-serif;
    font-weight: 700;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

    .brand-compact .brand-apostrophe {
        color: #ffffff !important;
    }

.nav-link {
    color: #4a4a4a;
    padding: 12px 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0;
    text-decoration: none;
}

    .nav-link:hover {
        background-color: #f8f9fa;
        color: var(--dunkin-orange);
    }

    .nav-link.active {
        background-color: var(--dunkin-orange);
        color: #ffffff;
    }

.brand-text {
    color: var(--dunkin-orange);
}

.sidebar-brand h2 .brand-apostrophe {
    color: var(--dunkin-pink) !important;
}

/* Main Content Area */
#main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease;
}

.top-navbar {
    background-color: #ffffff;
    height: 70px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.topbar-datetime {
    font-weight: 600;
    color: #4a4a4a;
    font-size: 14px;
}

.topbar-user-name {
    font-weight: 700;
    text-align: right;
    font-size: 14px;
    color: #212529;
}

.topbar-user-username {
    font-size: 12px;
    color: #6c757d;
    text-align: right;
}

.main-content {
    padding: 20px 32px;
    flex-grow: 1;
}

/* Single Clean Dropzone Styling */
.dropzone-box {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

    /* Hover State: Changes border, icon, and text to Dunkin Orange */
.dropzone-box:hover {
        border-color: var(--dunkin-orange) !important;
    }

.dropzone-box:hover .bi-upload,
.dropzone-box:hover #FileNameDisplay,
.dropzone-box:hover .subtext-prompt {
color: var(--dunkin-orange) !important;
}


/* Content Panel Card Styling */
.content-panel {
    background-color: #ffffff;
    border: 1px solid #e2e5ea;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px;
}

/* Row selection & editing states */
#RecordsTableBody tr.table-active {
    background-color: #fff3ec !important;
}

#RecordsTableBody tr.editing {
    background-color: #ffffff !important;
}

/* Deposit Records layout: fixed-width sidebar pinned to the right, table
   panel grows to fill the rest — instead of Bootstrap's percentage-based
   columns, which left the table cramped and dead space beside the
   narrower sidebar cards. */
.deposit-records-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.deposit-records-main {
    flex: 1 1 0;
    min-width: 0;
}

.deposit-records-sidebar {
    flex: 0 0 300px;
    max-width: 300px;
}

@media (max-width: 991.98px) {
    .deposit-records-sidebar {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Calendar Heatmap Grid */
.calendar-day-header {
    font-size: 10px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
}

.calendar-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
justify-content: center;
font-size: 12px;
font-weight: 600;
border-radius: 6px;
color: #495057;
background-color: #f8f9fa;
}

.calendar-day-cell.has-deposit {
    background-color: var(--dunkin-orange) !important;
    color: #ffffff !important;
}

.calendar-day-cell.empty {
    background-color: transparent;
}

/* Table Row Selection & Focus Styles */
#SavedSlipsTableBody tr {
    outline: 2px solid transparent;
    outline-offset: -1px;
    cursor: pointer;
    transition: outline-color 0.1s ease-in-out;
}

#SavedSlipsTableBody tr.table-active,
#SavedSlipsTableBody tr:focus,
#SavedSlipsTableBody tr:focus-within {
    outline: 2px solid var(--dunkin-orange) !important;
    background-color: #ffffff !important;
}

#SavedSlipsTableBody tr.table-active td,
#SavedSlipsTableBody tr:focus td,
#SavedSlipsTableBody tr:focus-within td {
    background-color: rgba(255, 103, 31, 0.05) !important;
}

/* Trash button highlight when focused via keyboard navigation */
#SavedSlipsTableBody .btn-delete:focus {
    color: var(--dunkin-orange) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Main form inputs highlight on focus (matching brand orange) */
.content-panel input.form-control:focus,
.content-panel select.form-control:focus,
.content-panel textarea.form-control:focus {
    border-color: var(--dunkin-orange) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 103, 31, 0.15) !important;
}

.reports-tab-btn {
    color: #6c757d;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -1px;
}

    .reports-tab-btn.active {
        color: var(--dunkin-orange) !important;
        border-bottom: 2px solid var(--dunkin-orange) !important;
        background-color: transparent !important;
    }

.btn-export-hover {
    transition: all 0.2s ease-in-out;
}

    .btn-export-hover:hover {
        border-color: var(--dunkin-orange) !important;
        color: var(--dunkin-orange) !important;
        background-color: #ffffff !important;
    }

/* Table Row Selection & Focus Styles matching Deposit Encoding */
#RecordsTableBody tr {
    outline: 2px solid transparent;
    outline-offset: -1px;
    cursor: pointer;
    transition: outline-color 0.1s ease-in-out;
}

    #RecordsTableBody tr.table-active,
    #RecordsTableBody tr:focus,
    #RecordsTableBody tr:focus-within {
        outline: 2px solid var(--dunkin-orange) !important;
        background-color: #ffffff !important;
    }

        #RecordsTableBody tr.table-active td,
        #RecordsTableBody tr:focus td,
        #RecordsTableBody tr:focus-within td {
            background-color: rgba(255, 103, 31, 0.05) !important;
        }

/* Button action icon highlights */
#RecordsTableBody .btn-edit:hover,
#RecordsTableBody .btn-edit:focus {
    color: var(--dunkin-orange) !important;
    outline: none !important;
    box-shadow: none !important;
}

#RecordsTableBody .btn-delete:hover,
#RecordsTableBody .btn-delete:focus {
    color: var(--dunkin-orange) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Below: restyles Bootstrap's own component classes (buttons, tables, modals,
   form controls, badges) to match the prototype's look — brand orange instead
   of Bootstrap's default blue, tighter/cleaner spacing, thin single-line table
   borders instead of Bootstrap's heavier default. Every view already uses
   these Bootstrap class names directly, so this cascades everywhere with no
   per-view markup changes needed.
   ========================================================================== */

/* ---- Buttons: brand orange as the primary action color ---- */
.btn {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 16px;
}

.btn-primary {
    --bs-btn-bg: var(--dunkin-orange);
    --bs-btn-border-color: var(--dunkin-orange);
    --bs-btn-hover-bg: #e6591a;
    --bs-btn-hover-border-color: #e6591a;
    --bs-btn-active-bg: #cc4f17;
    --bs-btn-active-border-color: #cc4f17;
    --bs-btn-disabled-bg: var(--dunkin-orange);
    --bs-btn-disabled-border-color: var(--dunkin-orange);
    --bs-btn-focus-shadow-rgb: 255, 103, 31;
}

.btn-outline-primary,
.btn-outline-secondary {
    --bs-btn-color: #212529;
    --bs-btn-border-color: #e2e5ea;
    --bs-btn-hover-bg: #ffffff;
    --bs-btn-hover-color: var(--dunkin-orange);
    --bs-btn-hover-border-color: var(--dunkin-orange);
    --bs-btn-active-bg: #ffffff;
    --bs-btn-active-color: var(--dunkin-orange);
    --bs-btn-active-border-color: var(--dunkin-orange);
}

.btn-link {
    font-weight: 600;
}

/* ---- Tables: prototype's clean, thin single-line style instead of Bootstrap's default ---- */
.table {
    font-size: 13px;
}

.table thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    border-bottom: 1px solid #e2e5ea;
    background: transparent;
}

.table td {
    border-bottom-color: #e2e5ea;
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: #f8f9fa;
}

/* ---- Modals: match the panel's rounded, borderless-header look ---- */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(20, 20, 30, 0.15);
}

.modal-header,
.modal-footer {
    border-color: #e2e5ea;
}

/* ---- Form controls: brand-colored focus ring everywhere, not just inside panels ---- */
.form-control,
.form-select {
    border-radius: 8px;
    border-color: #e2e5ea;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--dunkin-orange);
    box-shadow: 0 0 0 0.25rem rgba(255, 103, 31, 0.15);
}

.form-check-input:checked {
    background-color: var(--dunkin-orange);
    border-color: var(--dunkin-orange);
}

.form-check-input:focus {
    border-color: var(--dunkin-orange);
    box-shadow: 0 0 0 0.25rem rgba(255, 103, 31, 0.15);
}

/* ---- Links and misc brand-colored bits ---- */
a {
    color: var(--dunkin-orange);
}

a:hover {
    color: #e6591a;
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
    color: var(--dunkin-orange);
}