body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f9f6f4;
    color: #333;
}

/* Main container */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* Headings */
h1 {
    color: #7a5c61;
    margin-top: 0;
}

h2 {
    color: #7a5c61;
}

/* Navigation buttons */
.nav-links {
    margin-bottom: 20px;
}

.nav-links a {
    display: inline-block;
    text-decoration: none;
    background-color: #b88c94;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    margin-right: 10px;
    font-weight: bold;
}

.nav-links a:hover {
    background-color: #9f747c;
}

.nav-links {
    margin-bottom: 20px;
}


/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f1e7e9;
    color: #5d4348;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

tr:hover {
    background-color: #f6eef0;
}

/* Buttons */
.btn {
    display: inline-block;
    text-decoration: none;
    background-color: #6f9b7d;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
}

.btn:hover {
    background-color: #5b8468;
}

/* Info box */
.info-box {
    background-color: #f8f1f2;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* No data message */
.no-data {
    padding: 15px;
    background-color: #fff8e1;
    border: 1px solid #f0d98c;
    border-radius: 8px;
}

/* MAIN NAV */
.nav-links {
    margin-bottom: 15px;
}

.page-nav {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.page-nav .btn,
.page-nav a.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.page-nav .btn {
    min-height: 40px;
    display: flex;
    align-items: center;
}

/* BUTTON BASE */
.nav-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    color: white;
}

/* NEXT BUTTON */
.nav-btn.primary {
    background-color: #125e65; /* your spa color */
}

/* PREVIOUS BUTTON */
.nav-btn.secondary {
    background-color: #888; /* softer gray */
}

/* Secondary (less important actions) */
.nav-links a.secondary {
    background-color: #e5d6d9;
    color: #7a5c61;
}

/* Danger (delete buttons later) */
.nav-links a.danger {
    background-color: #c94c4c;
}

/* Success (save/confirm later) */
.nav-links a.success {
    background-color: #6f9b7d;
}

.page-nav {
    margin-top: 35px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f3eadf;
    color: #f3ead;
}

#  -----------------
#  background  colors for above 
#
#   soft beige       #f3eadf
#   warmer geige     #efe4d6
#   light brown/beige #e8dccb
#
#  ------------------

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f3eadf; /* soft beige */
    color: #333;
}

/* Banner */
.banner {
    text-align: center;
    background-color: #e6d6c3;
    padding: 10px 0;
}

.banner img {
    max-width: 100%;
    max-height: 160px;
}

/* Main container (you already use this) */
.container {
    max-width: 1000px;
    margin: 30px auto;
    background: #fffaf5;
    padding: 25px;
    border-radius: 10px;
}

/* Navigation links (styled like buttons) */
.nav-links {
    margin-bottom: 20px;
}

.nav-links a {
    display: inline-block;
    margin-right: 10px;
    padding: 8px 14px;
    background-color: #b8a28a;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.nav-links a:hover {
    background-color: #9e8871;
}

/* Buttons */
.btn {
    background-color: #8b6b4a;
    color: white;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
}

.btn:hover {
    background-color: #73563b;
}


.form-buttons {
    margin-top: 30px;
}

.form-buttons .btn,
.form-buttons button {
    margin-right: 12px;
}

.cancel-btn {
    background-color: #999;
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    display: inline-block;
}

.cancel-btn:hover {
    background-color: #777;
}

.form-buttons {
    margin-top: 30px;
}

.form-buttons button,
.form-buttons .btn {
    margin-right: 12px;
}

.cancel-btn {
    text-decoration: none;
    display: inline-block;
}

.form-buttons {
    margin-bottom: 20px;
}

.form-buttons button,
.form-buttons .btn {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 6px;
    margin-right: 12px;
    cursor: pointer;
}

.admin-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-form input,
.admin-form select {
    padding: 8px;
}

.admin-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.return-btn {
    background-color: #2e7d32; /* green */
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.return-btn:hover {
    background-color: #1b5e20;
}


button[type="submit"] {
    background-color: #125e65;
    color: white;
    border: none;
}

button[type="submit"]:hover {
    background-color: #0e4c52;
}

button[type="reset"] {
    background-color: #ccc;
    border: none;
}

button[type="reset"]:hover {
    background-color: #aaa;
}

.cancel-btn {
    background-color: #999;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 6px;
    display: inline-block;
}

.cancel-btn:hover {
    background-color: #777;
}


.delete-btn {
    background-color: #b22222;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}

.delete-btn:hover {
    background-color: #8b1a1a;
}

.flash-messages {
    max-width: 1100px;
    margin: 15px auto;
}

.flash {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #c3e6cb;
}

.admin-links {
    margin-top: 20px;
}

.admin-links .btn {
    margin-right: 12px;
    margin-bottom: 12px;
}


table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #125e65;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Allow text to wrap instead of squeezing */
td {
    white-space: normal;
}

/* Prevent table from squishing */
table {
    table-layout: auto;
}

.table-container {
    overflow-x: auto;
}

.notes-cell {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn {
    padding: 6px 10px;
    margin: 2px;
    font-size: 14px;
}

.btn-danger {
    background-color: #c0392b;
    color: white;
}

.notes-cell {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-cell {
    max-width: 260px;
}

.note-wrapper {
    position: relative;
    cursor: pointer;
}

/* Hidden popup */
.note-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #ccc;
    padding: 10px;
    width: 300px;
    z-index: 1000;
    white-space: normal;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 6px;
}

/* Show on hover */
.note-wrapper:hover .note-popup {
    display: block;
}

.notes-cell {
    min-width: 120px;
}

.note-btn {
    white-space: nowrap;
}

.note-popup-box {
    display: none;
    position: fixed;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0;
    z-index: 5000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    width: 350px;
    max-width: 90%;
}

.note-popup-content {
    padding: 18px;
    white-space: normal;
    word-wrap: break-word;
}

.container {
    width: 95%;
    max-width: 1400px;   /* or 1600px if you want wider */
    margin: 0 auto;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.appointments-table {
    width: 100%;
    min-width: 1400px;
}

.notes-cell {
    max-width: 350px;
    white-space: normal;   /* allow wrapping */
}

.dashboard-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    padding: 20px;
    min-width: 200px;
    flex: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-align: center;
}

.dashboard-card h3 {
    margin-bottom: 10px;
    color: #125e65;
    font-size: 18px;
}

.dashboard-card p {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.dashboard-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.status {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}

.status.booked {
    background-color: #e6f4ea;
    color: #2e7d32;
}

.status.completed {
    background-color: #e3f2fd;
    color: #1565c0;
}

.status.cancelled {
    background-color: #fdecea;
    color: #c62828;
}

.dashboard-actions {
    margin-bottom: 20px;
}

.dashboard-actions .btn {
    margin-right: 10px;
}

.next-appointment {
    background: #fdecea;      /* light red background */
    color: #c62828;           /* dark red text */
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    font-weight: bold;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
}

.calendar-day {
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    min-height: 200px;
}

.calendar-day h3 {
    margin: 0;
    font-size: 16px;
    color: #125e65;
}

.calendar-event {
    margin-top: 10px;
    padding: 8px;
v    border-radius: 6px;
    font-size: 13px;
    background: #f1f1f1;
}

/* status colors */
.calendar-event.booked {
    background: #e6f4ea;
}

.calendar-event.completed {
    background: #e3f2fd;
}

.calendar-event.cancelled {
    background: #fdecea;
}

.calendar-nav {
    margin-bottom: 15px;
}

.calendar-nav .btn {
    margin-right: 10px;
}

.next-appointment {
    background-color: #f4fdfb;
    border-left: 5px solid #2e8b57;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 16px;
}

.calendar-day.today {
    background-color: #e6f7ff;
    border: 2px solid #4da6ff;
}

.calendar-day.has-appt {
    background-color: #f3fff3;
}

.calendar-day.today.has-appt {
    background-color: #e8fff0;
    border: 2px solid #2e8b57;
}

<div class="calendar-nav" style="margin-bottom: 20px;">
    <a class="btn" href="{{ url_for('calendar', week=week-1) }}">Previous</a>
    <a class="btn" href="{{ url_for('calendar', week=0) }}">Today</a>
    <a class="btn" href="{{ url_for('calendar', week=week+1) }}">Next</a>
</div>

.calendar-day-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.calendar-day-link:hover .calendar-day {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    transition: 0.2s ease;
    cursor: pointer;
}

.calendar-event.booked {
    background-color: #e6f7ff;
    border-left: 4px solid #4da6ff;
}

.calendar-event.completed {
    background-color: #e8fff0;
    border-left: 4px solid #2e8b57;
}

.calendar-event.cancelled {
    background-color: #ffeaea;
    border-left: 4px solid #cc0000;
}

.calendar-day {
    min-height: 180px;
    padding: 12px;
    border-radius: 10px;
    background: #ffffff;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.form-row label {
    min-width: 140px;
    font-weight: bold;
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;
    max-width: 400px;
}

.short-input {
    max-width: 120px !important;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.form-row label {
    min-width: 140px;
    font-weight: bold;
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;
    max-width: 400px;
}

.short-input {
    max-width: 120px !important;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.form-row label {
    width: 140px;
    font-weight: bold;
}

/* Default inputs */
.form-row input,
.form-row select {
    max-width: 300px;
}

/* Room number specifically */
#room_number {
    width: 100px;
}

#room_number {
    width: 90px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.form-row label {
    width: 140px;
    font-weight: bold;
}

/* General inputs */
.form-row input {
    max-width: 300px;
}

/* Room number specifically (override) */
#room_number {
    width: 90px;
}

#room_number {
    width: 70px;
    text-align: center;
}

.room-input {
    width: 70px !important;
    max-width: 70px !important;
    display: inline-block;
}

/* Remove arrows (Chrome, Safari, Edge) */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove arrows (Firefox) */
input[type=number] {
    -moz-appearance: textfield;
}\\#duration_minutes {
    width: 90px;
    text-align: center;
}

.calendar-event.booked {
    background-color: #dbeafe;
    border-left: 4px solid #3b82f6;
}

.calendar-event.completed {
    background-color: #dcfce7;
    border-left: 4px solid #22c55e;
}

.calendar-event.cancelled {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
}

.calendar-day-actions {
    margin: 10px 0;
}

.btn-sm {
    display: inline-block;
    padding: 6px 10px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
}

.calendar-event.overdue {
    border: 2px solid #cc0000;
    background-color: #ffe5e5;
}


.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.calendar-day {
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    padding: 12px;
    min-height: 220px;
    box-sizing: border-box;
}

.calendar-day.today {
    border: 2px solid #125e65;
    background-color: #eef9f9;
}

.calendar-day.has-appointment {
    box-shadow: 0 0 0 2px rgba(18, 94, 101, 0.12);
}

.calendar-day-actions {
    margin: 10px 0 12px 0;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-event-link {
    text-decoration: none;
    color: inherit;
}

.calendar-event {
    background: #f6f6f6;
    border-left: 4px solid #125e65;
    border-radius: 8px;
    padding: 8px;
    font-size: 14px;
}

.calendar-event.overdue {
    background-color: #ffe5e5;
    border-left: 4px solid #cc0000;
}

.btn-sm {
    display: inline-block;
    padding: 6px 10px;
    font-size: 14px;
}

.calendar-event.booked {
    background: #f6f6f6;
    border-left: 4px solid #125e65;
}

.calendar-event.completed {
    background-color: #e8f5e9;
    border-left: 4px solid #2e7d32;
}

.calendar-event.cancelled {
    background-color: #f3f3f3;
    border-left: 4px solid #888888;
    opacity: 0.8;
}

.calendar-event.overdue {
    background-color: #ffe5e5;
    border-left: 4px solid #cc0000;
}

.dashboard-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.dashboard-card h3 {
    margin-bottom: 10px;
}

.dashboard-card p {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

@media print {
    nav,
    .nav,
    .btn,
    form,
    .flash-messages,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        margin: 0;
        padding: 20px;
        font-size: 12pt;
    }

    h1, h2, h3 {
        color: #000;
    }

    .dashboard-cards {
        display: block;
    }

    .dashboard-card {
        display: inline-block;
        width: 30%;
        min-width: 180px;
        vertical-align: top;
        margin: 0 10px 15px 0;
        border: 1px solid #999;
        box-shadow: none;
        background: #fff;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    table, th, td {
        border: 1px solid #999;
    }

    th, td {
        padding: 8px;
        text-align: left;
    }
}

.footer-note {
    font-size: 9px;
    color: #bbb;
    text-align: center;
    margin-top: 50px;
}

.footer-note {
    position: fixed;
    bottom: 5px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 9px;
    color: #bbb;
    pointer-events: none; /* prevents blocking clicks */
}

form label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

form input,
form select,
form textarea {
    width: 300px;
    max-width: 100%;
    padding: 8px;
    margin-top: 4px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 8px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: bold;
    padding: 8px 0;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* =========================
   INCOME REPORT
========================= */

.report-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.report-header h1 {
    margin: 0;
    font-size: 2rem;
    color: #1f2937;
}

.report-subtitle {
    margin-top: 6px;
    color: #6b7280;
    font-size: 1rem;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.btn-print {
    background-color: #1f4e79;
    color: white;
    border: none;
}

.btn-print:hover {
    background-color: #163a59;
}

.report-filter-card {
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    margin-bottom: 18px;
}

.report-filter-form {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.filter-group input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.report-period {
    margin: 10px 0 20px 0;
    font-size: 1rem;
    color: #374151;
    background: #f8fafc;
    padding: 12px 14px;
    border-left: 5px solid #1f4e79;
    border-radius: 8px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.summary-card {
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    border: 1px solid #d9e4ef;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.summary-card h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #475569;
    font-weight: 600;
}

.summary-card p {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 700;
    color: #0f172a;
}

.report-section {
    margin-bottom: 30px;
}

.report-section h2 {
    margin-bottom: 14px;
    color: #1f2937;
    font-size: 1.35rem;
}

.table-wrap {
    overflow-x: auto;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    border: 1px solid #dbe3ea;
}

.styled-report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.compact-table {
    min-width: 500px;
}

.styled-report-table thead {
    background: #1f4e79;
    color: white;
}

.styled-report-table th,
.styled-report-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e5e7eb;
}

.styled-report-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.styled-report-table tbody tr:hover {
    background-color: #eef6ff;
}

.amount-cell {
    font-weight: 700;
    color: #0f5132;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    padding: 24px;
    color: #6b7280;
    font-style: italic;
}

.muted-text {
    color: #9ca3af;
}

/* PRINT FORMAT */
@media print {
    .no-print,
    nav,
    .navbar,
    .btn,
    footer {
        display: none !important;
    }

    body {
        background: white;
    }

    .report-page {
        max-width: 100%;
        padding: 0;
    }

    .summary-card,
    .report-filter-card,
    .table-wrap {
        box-shadow: none;
    }

    .detail-section {
        page-break-before: always;
    }

    .styled-report-table th,
    .styled-report-table td {
        font-size: 11px;
        padding: 8px 10px;
    }

    .summary-card p {
        font-size: 1.4rem;
    }
}

/* =========================
   GENERAL INCOME FORM
========================= */

.form-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.form-header h1 {
    margin-bottom: 6px;
    color: #1f2937;
}

.form-subtitle {
    color: #6b7280;
    margin-bottom: 20px;
}

.form-card {
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.general-income-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
}

.form-group textarea {
    resize: vertical;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: #6b7280;
    color: #fff;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

@media (max-width: 800px) {
    .general-income-form .form-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   SECTION HOME PAGES
========================= */

.section-page {
			    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.section-header h1 {
    margin-bottom: 6px;
    color: #1f2937;
}

.section-subtitle {
    color: #6b7280;
    margin-bottom: 24px;
}

.section-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.section-card {
    display: block;
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.section-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1f2937;
}

.section-card p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.inactive-card {
    opacity: 0.75;
    cursor: default;
}

/* =========================
   MAIN NAVIGATION
========================= */

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0 20px 0;
}

.nav-btn {
    display: inline-block;
    padding: 10px 16px;
    background-color: #1f4e79;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.nav-btn:hover {
    background-color: #163a59;
}

@media print {
    .no-print,
    .btn,
    form,
    nav,
    .sidebar {
        display: none !important;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th, td {
        border: 1px solid #999;
        padding: 6px;
        text-align: left;
    }

    body {
        background: white;
        color: black;
    }
}


.money-summary {
    display: flex;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.summary-card {
    flex: 1;
    min-width: 220px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.summary-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #444;
}

.summary-card p {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    color: #222;
}

.flash {
    padding: 12px;
    margin: 10px 0 15px 0;
    border-radius: 6px;
    font-weight: bold;
}

.flash.success {
    background-color: #e6ffe6;
    border-left: 5px solid #008000;
}

.flash.error {
    background-color: #ffe5e5;
    border-left: 5px solid #cc0000;
}

.flash.warning {
    background-color: #fff8e1;
    border-left: 5px solid #cc9900;
}

.flash {
    padding: 12px;
    margin: 10px 0 15px 0;
    border-radius: 6px;
    font-weight: bold;
}

.flash.success {
    background-color: #e6ffe6;
    border-left: 5px solid #008000;
}

.flash.error {
    background-color: #ffe5e5;
    border-left: 5px solid #cc0000;
}

.flash.warning {
    background-color: #fff8e1;
    border-left: 5px solid #cc9900;
}

.help-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fafafa;
}

.help-section h2 {
    color: #125e65;
    margin-bottom: 10px;
}

.help-section h3 {
    margin-top: 15px;
    color: #333;
}

.help-section ul {
    margin-left: 20px;
    line-height: 1.7;
}

.help-section p {
    line-height: 1.7;
}

.btn {
    background-color: #1f4e79;
    color: white;
    padding: 10px 14px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
}

.compensation-row {
    display: flex;
    align-items: end;
    gap: 50px;
    margin-bottom: 10px;
}

.comp-type-group {
    width: 260px;
    flex: none;
}

.amount-group {
    width:110px;
    flex: none;
}

.compensation-row select,
.compensation-row input {
    height: 38px;
    padding: 6px 10px;
    box-sizing: border-box;
}

.narrow-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
    gap: 40px;
    justify-content: center;
}

.narrow-cards .section-card {
    width: 220px;
    max-width: 220px;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

.footer-note {
    text-align: center;
    padding: 10px 0;
    background: transparent;
    border-top: none;
    font-size: 13px;
    color: #666;
}


table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}




.table-container {
    max-height: 500px;
    overflow: auto;
    border: 1px solid #ccc;
}

.table-container table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-container thead th {
    position: sticky;
    top: 0;
    background: #034F3B;
    z-index: 10;
    border-bottom: 2px solid #999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.table-container th:first-child,
.table-container td:first-child {
    position: sticky;
    left: 0;
    background: #f1e1e90;
;
    z-index: 6;
    border-right: 2px solid #ccc;
}

.table-container thead th:first-child {
    z-index: 15;
}


.alert-banner {
    background-color: #ffe5e5;
    border-left: 6px solid #cc0000;
    padding: 12px;
    margin-bottom: 15px;
    font-weight: bold;
}

.alert-card {
    background-color: #ffe5e5;
    border: 2px solid #cc0000;
}


.summary-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.summary-label {
    display: block;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 6px;
}

.summary-value {
    font-size: 1.3rem;
    font-weight: 600;
}

@media (max-width: 600px) {
    .summary-bar {
        grid-template-columns: 1fr;
    }
}

.history-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 22px;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.history-table th,
.history-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #efefef;
    text-align: left;
    vertical-align: top;
}

.history-table th {
    background: #fafafa;
    font-weight: 700;
    color: #444;
}

.history-table tr:hover {
    background: #fcfcfc;
}

.notes-cell {
    max-width: 260px;
    white-space: normal;
    color: #555;
}

.table-link {
    font-weight: 600;
    text-decoration: none;
}

.status-pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid #ddd;
    background: #f7f7f7;
}

.status-booked {
    background: #f3f8ff;
}

.status-completed {
    background: #f3fcf4;
}

.status-cancelled {
    background: #fff4f4;
}

.status-no-show {
    background: #fff8ef;
}

.empty-state {
    margin: 0;
    color: #666;
}

<style>
.feedback-float-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: #d97b2d;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}
.feedback-float-btn:hover {
    opacity: 0.9;
}
</style>

.placeholder-grid {
    display: grid;
    grid-template-columns: 220px 80px; /* fixed widths */
    gap: 26px 30px;
    align-items: center;
}

.btn-copy {
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
}

<style>
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.calendar-appointment {
    border: none;
    background: #f6d6c8;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
</style>

<style>
.calendar-event-link {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.calendar-event-link:hover {
    text-decoration: underline;
}
</style>

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.status-badge.booked { background: #d9edf7; }
.status-badge.completed { background: #d4edda; }
.status-badge.cancelled { background: #f8d7da; }


.client-management-page .btn {
    padding: 3px 8px;
    font-size: 13px;
    line-height: 1.1;
}

.client-management-page .btn {
    border-radius: 6px;
    cursor: pointer;
}

.client-management-page .badge {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.badge-success {
    background-color: #28a745;   /* strong green */
    color: #fff;
}

.badge-danger {
    background-color: #dc3545;   /* strong red */
    color: #fff;
}

.badge-warning {
    background-color: #ffc107;   /* yellow */
    color: #212529;
}

td {
    vertical-align: top;
}

td:nth-child(3) {
    line-height: 1.4;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}



.conversation-page {
    max-width: 900px;
    margin: 0 auto;
}

.conversation-box {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 20px;
    margin-top: 20px;
    min-height: 400px;
}

.message-row {
    display: flex;
    margin-bottom: 14px;
}

.message-row.inbound {
    justify-content: flex-start;
}

.message-row.outbound {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 14px;
    border-radius: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.message-row.inbound .message-bubble {
    background: #ffffff;
    border-bottom-left-radius: 4px;
}

.message-row.outbound .message-bubble {
    background: #dff3ff;
    border-bottom-right-radius: 4px;
}

.message-body {
    white-space: pre-wrap;
    line-height: 1.4;
    font-size: 15px;
}

.message-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

.sms-status {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    background: #ddd;
    color: #333;
}

.status-sent,
.status-delivered {
    background: #d7f5df;
    color: #217a35;
}

.status-queued {
    background: #fff3cd;
    color: #856404;
}

.status-failed,
.status-undelivered {
    background: #f8d7da;
    color: #842029;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #777;
}

.sms-reply-box {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.sms-reply-box textarea {
    flex: 1;
    resize: vertical;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: inherit;
}

.sms-error {
    font-size: 11px;
    color: #c00;
    margin-top: 4px;
}


.styled-report-table th {
    width: 220px;
    white-space: nowrap;
}


.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    min-width: 85px;
}

.badge.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.badge.missing {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.styled-table thead th {
    position: sticky;
    top: 0;
    background: #ffffff;
    color: #111827;
    z-index: 10;
}

.table-container {
    overflow-x: auto;
    max-height: 75vh;
}

.help-content h1,
.help-content h2,
.help-content h3,
.help-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.help-content p {
    margin-top: 0;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.help-content ul,
.help-content ol {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.help-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 0.5rem 0;
}

.help-content {
    font-size: 1rem;
}


.summary-cards {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.summary-card {
    padding: 12px 18px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    min-width: 110px;
    text-align: center;
}

.status-badge {
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.sent {
    background: #d4edda;
    color: #155724;
}

.status-badge.failed {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.skipped {
    background: #e2e3e5;
    color: #383d41;
}

.status-badge.cancelled {
    background: #777;
    color: white;
}


.help-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px 0;
}

.help-image:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}


.site-footer {
    margin-top: 40px;
    padding: 20px 10px;
    text-align: center;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e67e22;
    margin-bottom: 4px;
}

.footer-tagline {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 10px;
}

.footer-company,
.footer-motto {
    font-size: 0.8rem;
    color: #888;
}

.site-footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 8px;
}

.footer-brand:hover {
    opacity: .85;
}

.footer-icon {
    width: 40px;
    height: 40px;
}

.footer-title {
    font-size: 1.35rem;
    font-weight: bold;
    color: #e67e22;
}

.footer-tagline {
    color: #555;
    margin-top: 5px;
    margin-bottom: 12px;
}

.footer-company,
.footer-motto {
    color: #888;
    font-size: .85rem;
}

.footer-version {
    font-size: .75rem;
    color: #aaa;
    margin-bottom: 8px;
}

.site-footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
    box-shadow: 0 -2px 8px rgba(0,0,0,.05);
}

.footer-icon {
    width: 42px;
    height: 42px;
    transition: transform .2s ease;
}

.footer-brand:hover .footer-icon {
    transform: rotate(5deg) scale(1.08);
}


.site-footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e5e5e5;
    background-color: #fafafa;
    box-shadow: 0 -2px 8px rgba(0,0,0,.05);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 8px;
}

.footer-brand:hover {
    opacity: .85;
}

.footer-icon {
    width: 42px;
    height: 42px;
    transition: transform .2s ease;
}

.footer-brand:hover .footer-icon {
    transform: rotate(5deg) scale(1.08);
}

.footer-title {
    font-size: 1.35rem;
    font-weight: bold;
    color: #e67e22;
}

.footer-version {
    margin-top: 6px;
    font-size: .80rem;
    color: #999;
}

.footer-tagline {
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: .95rem;
    color: #555;
}

.footer-company,
.footer-motto {
    font-size: .82rem;
    color: #888;
}

.footer-links {
    margin-top: 15px;
    font-size: .85rem;
}

.footer-links a {
    color: #777;
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    color: #e67e22;
    text-decoration: underline;
}

.footer-links span {
    color: #bbb;
}
