html {
    font-size: 16px;
}

@media (min-width: 768px) {
    html { font-size: 18px; }
}

body {
    background: #f4f6f8;
}

.navbar-brand {
    font-weight: 700;
}

.navbar-user-nav {
    align-items: center;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.5rem;
    }

    .navbar-user-nav {
        align-items: flex-start;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 0.5rem;
    }

    .navbar-user-nav .nav-link,
    .navbar-user-nav .btn-logout {
        padding-left: 0;
    }
}

.navbar-user-nav .nav-link,
.navbar-user-nav .btn-logout {
    display: flex;
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    line-height: 1.5;
    white-space: nowrap;
}

.navbar-user-nav .user-display-name {
    cursor: default;
    pointer-events: none;
}

.navbar-user-nav form {
    margin: 0;
    display: flex;
    align-items: center;
}

.navbar-user-nav .btn-logout {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border: 0;
    background: transparent;
}

.navbar-user-nav .btn-logout:hover,
.navbar-user-nav .btn-logout:focus {
    color: #fff;
}

.summary-card .display-6 {
    font-weight: 700;
    line-height: 1;
}

.wizard-card {
    max-width: 900px;
    margin: 0 auto;
    border: none;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}

.wizard-card-wide {
    max-width: 980px;
}

.agreement-preview {
    font-family: Georgia, "Times New Roman", serif;
}

.wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wizard-steps li {
    flex: 1 1 auto;
    min-width: 80px;
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
}

.wizard-steps li span {
    display: block;
    font-weight: 700;
    font-size: 1rem;
}

.wizard-steps li.active {
    border-color: #198754;
    color: #198754;
    background: #e8f5ee;
}

.wizard-steps li.done {
    border-color: #adb5bd;
    background: #f8f9fa;
}

.cart-select-btn {
    min-height: 4rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-select-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    margin-bottom: 0;
    min-height: auto;
    cursor: pointer;
}

.cart-select-check .form-check-input {
    float: none;
    margin-left: 0;
    margin-top: 0;
    flex-shrink: 0;
}

.cart-select-check .form-check-label {
    flex: 1;
    margin-bottom: 0;
}

.signature-pad {
    width: 100%;
    height: 180px;
    touch-action: none;
    background: #fff;
}

.scanner-video {
    display: block;
    width: 100%;
    max-width: 640px;
    border-radius: 0.5rem;
    background: #000;
}

.scanner-viewport {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin-top: 1rem;
}

.scanner-viewport .scanner-video {
    margin-top: 0;
}

.scanner-guide-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1rem 1.25rem;
}

.scanner-guide-frame {
    width: 92%;
    height: 52%;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 0.5rem;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
}

.scanner-tips li {
    margin-bottom: 0.35rem;
}

.scanner-tips li::before {
    content: "• ";
}

.scanner-guide-label {
    margin: 0.75rem 0 0;
    padding: 0.25rem 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.45);
    border-radius: 999px;
}

.scanner-viewport-capture {
    position: absolute;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    z-index: 2;
    min-width: 12rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.scanner-active-actions .btn-success {
    min-width: 12rem;
}

.photo-capture-video {
    width: 100%;
    max-width: 480px;
    border-radius: 0.5rem;
    background: #000;
}

.photo-capture-preview {
    margin-top: 0.75rem;
}

.photo-capture-thumb {
    position: relative;
    width: 7rem;
}

.photo-capture-thumb img {
    width: 100%;
    height: 7rem;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

.photo-capture-remove {
    width: 100%;
    margin-top: 0.25rem;
}

.inspection-photo-thumb {
    display: block;
    width: 8rem;
}

.inspection-photo-thumb img {
    width: 100%;
    height: 8rem;
    object-fit: cover;
}

.status-available { background: #198754; }
.status-rented { background: #0d6efd; }
.status-reserved { background: #6f42c1; }
.status-maintenance { background: #fd7e14; }

/* Availability Manager — spreadsheet-style layout */
.calendar-manager-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

.calendar-manager-main {
    flex: 1 1 520px;
    min-width: 0;
}

.calendar-manager-side {
    flex: 0 0 280px;
    max-width: 100%;
}

.calendar-matrix-scroll {
    overflow-x: auto;
}

.calendar-matrix {
    table-layout: fixed;
    min-width: max-content;
    font-size: 0.78rem;
    background: #fff;
}

.calendar-matrix th,
.calendar-matrix td {
    text-align: center;
    vertical-align: middle;
    padding: 0.2rem 0.15rem;
    border-color: #b8b8b8 !important;
}

.calendar-matrix thead th {
    background: #c4a574;
    color: #1a1a1a;
    font-weight: 700;
    white-space: nowrap;
}

.calendar-matrix-type-col {
    text-align: left !important;
    min-width: 4.5rem;
    max-width: 4.5rem;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #c4a574;
}

.calendar-matrix tbody .calendar-matrix-type-col {
    background: #f5f0e6;
    font-weight: 600;
}

.calendar-matrix-date-col {
    min-width: 3.1rem;
    max-width: 3.1rem;
}

.calendar-matrix-total-col {
    min-width: 2.75rem;
    background: #ebe4d6;
    font-weight: 600;
}

.calendar-matrix-total-row th,
.calendar-matrix-total-row td {
    background: #ebe4d6;
}

.calendar-matrix-cell {
    min-width: 3.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.calendar-heat-0 {
    background: #fff;
}

.calendar-heat-1 {
    background: #fde8e8;
}

.calendar-heat-2 {
    background: #f5b4b4;
}

.calendar-heat-3 {
    background: #e87878;
}

.calendar-heat-4 {
    background: #d04040;
}

.calendar-matrix-cell,
.calendar-matrix-total-row .calendar-matrix-cell {
    color: #1a1a1a !important;
}

.calendar-financial-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.calendar-financial-cc {
    color: #dc3545;
}

.calendar-financial-cash {
    color: #198754;
}

.calendar-financial-total {
    color: #212529;
}

.calendar-side-table {
    font-size: 0.78rem;
    background: #fff;
}

.calendar-side-table th,
.calendar-side-table td {
    border-color: #b8b8b8 !important;
    padding: 0.25rem 0.35rem;
}

.calendar-side-table thead th {
    background: #c4a574;
    font-weight: 700;
}

.calendar-available-col {
    background: #fff3cd !important;
}

.calendar-sent-home-title {
    background: #c4a574;
    border: 1px solid #b8b8b8;
    border-bottom: none;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}

.calendar-detail-panel summary {
    cursor: pointer;
    list-style: none;
}

.calendar-detail-panel summary::-webkit-details-marker {
    display: none;
}

.calendar-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.calendar-grid {
    table-layout: fixed;
    min-width: max-content;
    font-size: 0.75rem;
}

.calendar-grid th,
.calendar-grid td {
    vertical-align: middle;
    text-align: center;
    min-width: 4.5rem;
    padding: 0.25rem;
}

.calendar-date-header {
    white-space: nowrap;
    font-size: 0.7rem;
}

.calendar-cell {
    height: 2rem;
}

.calendar-cell-available {
    background-color: #d1e7dd;
}

.calendar-cell-out {
    background-color: #cfe2ff;
}

.calendar-cell-due-back {
    background-color: #fff3cd;
}

.calendar-cell-maintenance {
    background-color: #ffe5d0;
}

.calendar-cell-link {
    display: block;
    color: inherit;
    text-decoration: none;
    font-size: 0.65rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-cell-link:hover {
    text-decoration: underline;
}

.confirm-summary {
    max-width: 420px;
}

.pricing-summary dd,
.pricing-summary dt {
    margin-bottom: 0.25rem;
}
