* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

a {
    color: #1d4f91;
}

/* =========================================================
   TOP NAVIGATION
   ========================================================= */

.topbar {
    background: #1d4f91;
    color: #fff;
    padding: 14px 22px;
}

.topbar-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-title a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
}

.main-nav a:hover {
    text-decoration: underline;
}

.user-name {
    color: #dce7f5;
}


/* =========================================================
   GENERAL PAGE LAYOUT
   ========================================================= */

.page {
    max-width: 1300px;
    margin: 28px auto;
    padding: 0 20px 50px;
}

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

h1 {
    margin: 0 0 8px;
}

h2 {
    margin-top: 0;
}

.subtitle {
    margin: 0 0 25px;
    color: #666;
}

.section,
.panel,
.card {
    background: #fff;
    border: 1px solid #d9dee5;
    border-radius: 8px;
    margin-bottom: 28px;
    overflow: hidden;
}

.section-header {
    padding: 18px 20px;
    border-bottom: 1px solid #d9dee5;
    background: #fafbfc;
}

.section-header h2 {
    margin: 0 0 4px;
    font-size: 21px;
}

.section-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.section-body,
.panel,
.card {
    padding: 20px;
}


/* =========================================================
   MESSAGES
   ========================================================= */

.notice {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.notice-success {
    background: #eef9f0;
    border: 1px solid #b6ddb9;
    color: #235d2b;
}

.notice-error {
    background: #fff1f1;
    border: 1px solid #e3b1b1;
    color: #8a1f1f;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn,
button {
    display: inline-block;
    border: 0;
    border-radius: 5px;
    padding: 10px 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary,
button.btn-primary {
    background: #1d4f91;
    color: #fff;
}

.btn-secondary,
button.btn-secondary {
    background: #e7edf5;
    color: #173d6e;
}

.btn-save,
button.btn-save {
    background: #e7edf5;
    color: #173d6e;
    white-space: nowrap;
}


/* =========================================================
   FORM CONTROLS
   ========================================================= */

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #bcc4cd;
    border-radius: 5px;
    font-size: 15px;
    font-family: inherit;
}

input[readonly] {
    background: #f4f6f8;
    color: #555;
}

input[type="checkbox"] {
    transform: translateY(1px);
}

textarea {
    resize: vertical;
}


/* =========================================================
   TABLES
   ========================================================= */

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

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

th,
td {
    padding: 10px 9px;
    border-bottom: 1px solid #e1e5ea;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f7f8fa;
    font-size: 13px;
    white-space: nowrap;
}


/* =========================================================
   STATUS / GENERAL HELPERS
   ========================================================= */

.status-active {
    color: #23722c;
    font-weight: 700;
}

.status-inactive {
    color: #8a1f1f;
    font-weight: 700;
}

.inactive {
    color: #999;
    font-weight: normal;
    font-size: 12px;
}

.add-form {
    display: grid;
    gap: 10px;
    align-items: end;
    padding: 15px;
    margin-bottom: 20px;
    background: #f7f9fb;
    border: 1px solid #e1e5ea;
    border-radius: 6px;
}

.check-wrap {
    height: 39px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.check-wrap label {
    margin: 0;
    font-weight: normal;
}

.money {
    display: flex;
    align-items: center;
    gap: 4px;
}

.money span {
    color: #555;
}

.save-row {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.special-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px;
    max-width: 650px;
    gap: 10px 18px;
    align-items: center;
}

.special-grid .label {
    font-weight: 700;
}


/* =========================================================
   LOGIN / REGISTRATION
   ========================================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border: 1px solid #d9dee5;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

.auth-card button {
    width: 100%;
    margin-top: 22px;
}


/* =========================================================
   QUOTES PAGE
   ========================================================= */

.quote-page-head .subtitle {
    margin-bottom: 0;
}

.quote-total-box {
    min-width: 190px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid #d9dee5;
    border-radius: 8px;
    text-align: right;
}

.quote-total-box span {
    display: block;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.quote-total-box strong {
    display: block;
    margin-top: 3px;
    font-size: 27px;
    color: #1d4f91;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.contact-wide {
    grid-column: span 2;
}

.contact-full {
    grid-column: 1 / -1;
}

.quote-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.quote-table-body {
    padding-top: 0;
}

.quote-table {
    min-width: 1180px;
}

.quote-table th {
    text-align: center;
}

.quote-table td {
    padding: 8px 5px;
}

.quote-table select {
    min-width: 145px;
}

.quote-table .stay-cell select {
    min-width: 135px;
}

.quote-table .qty {
    width: 68px;
    text-align: center;
}

.quote-table .room-notes {
    min-width: 150px;
}

.quote-table .line-total {
    min-width: 105px;
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.remove-cell {
    width: 38px;
    text-align: center;
}

.remove-room {
    width: 30px;
    height: 30px;
    padding: 0;
    background: #f3e8e8;
    color: #8a1f1f;
    font-size: 20px;
    line-height: 30px;
}

.quote-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 18px;
}

.quote-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quote-grand-total {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: 16px;
}

.quote-grand-total strong {
    font-size: 26px;
    color: #1d4f91;
}


/* =========================================================
   SAVED QUOTES / RETRIEVAL PAGE
   ========================================================= */

.quote-search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quote-search-box input[type="text"] {
    flex: 1;
    min-width: 300px;
}

.quote-results-body {
    padding-top: 0;
}

.saved-quotes-table {
    min-width: 1150px;
}

.saved-quotes-table td {
    vertical-align: middle;
}

.quote-list-total {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.quote-list-actions {
    width: 90px;
    text-align: right;
}

.empty-results {
    padding: 25px !important;
    text-align: center;
    color: #666;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    color: #777;
    font-size: 12px;
    padding: 15px 20px 30px;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .topbar-inner,
    .page-head,
    .quote-options-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .special-grid {
        grid-template-columns: 1fr;
    }

    .add-form {
        grid-template-columns: 1fr !important;
    }

    .quote-total-box {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 700px) {
    .quote-search-box {
        align-items: stretch;
        flex-direction: column;
    }

    .quote-search-box input[type="text"] {
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-wide,
    .contact-full {
        grid-column: auto;
    }

    .quote-bottom-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .quote-actions {
        width: 100%;
    }

    .quote-actions .btn,
    .quote-actions button {
        flex: 1;
        text-align: center;
    }

    .quote-grand-total {
        justify-content: space-between;
        width: 100%;
    }
}


/* =========================================================
   SAVED QUOTE DETAIL PAGE
   ========================================================= */

.quote-view-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quote-view-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.quote-view-field {
    min-width: 0;
}

.quote-view-label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.quote-view-field strong {
    display: block;
    font-size: 16px;
    word-break: break-word;
}

.quote-view-total strong {
    color: #1d4f91;
    font-size: 23px;
}

.quote-view-wide {
    grid-column: span 2;
}

.quote-view-full {
    grid-column: 1 / -1;
}

.quote-view-notes {
    line-height: 1.5;
    white-space: normal;
}

.quote-view-table {
    min-width: 1050px;
}

.quote-view-table th {
    text-align: center;
}

.quote-view-number {
    text-align: center;
}

.quote-view-grand-label {
    text-align: right;
    font-weight: 700;
    font-size: 16px;
}

.quote-view-grand-total {
    text-align: right;
    color: #1d4f91;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .quote-view-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .quote-view-summary {
        grid-template-columns: 1fr;
    }

    .quote-view-wide,
    .quote-view-full {
        grid-column: auto;
    }

    .quote-view-actions {
        width: 100%;
    }
}


/* =========================================================
   SAVED QUOTES SEARCH OPTIONS
   ========================================================= */

.quote-search-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #f7f9fb;
    border: 1px solid #e1e5ea;
    border-radius: 6px;
}

.search-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.search-radio input[type="radio"] {
    margin: 0;
}


/* =========================================================
   DELETE SAVED QUOTE
   ========================================================= */

.delete-quote-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 28px 0;
    padding: 20px;
    background: #b42318;
    border: 1px solid #8f1c13;
    border-radius: 8px;
    color: #fff;
}

.delete-quote-copy h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 20px;
}

.delete-quote-copy p {
    margin: 0;
    color: #fff;
    line-height: 1.45;
}

.delete-quote-button {
    background: #fff;
    color: #9f1c13;
    border: 2px solid #fff;
    white-space: nowrap;
}

.delete-quote-button:hover {
    background: #fbe9e7;
}

@media (max-width: 700px) {
    .delete-quote-box {
        align-items: stretch;
        flex-direction: column;
    }

    .delete-quote-button {
        width: 100%;
    }
}


/* =========================================================
   SAVED QUOTES OVERALL TOTALS
   ========================================================= */

.saved-quotes-overall {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: -14px;
    color: #6b7280;
    font-size: 12px;
}

.saved-quotes-overall strong {
    color: #374151;
    font-weight: 700;
}

.saved-quotes-overall-separator {
    color: #a0a7b0;
}

@media (max-width: 560px) {
    .saved-quotes-overall {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        margin-top: -10px;
    }

    .saved-quotes-overall-separator {
        display: none;
    }
}
