/* ===============================
   SITE COLOR PALETTE (Sand Theme)
   =============================== */

:root {

    /* Backgrounds */
    --color-bg: #F5EFE4;
    --color-sand-light: #E8DCC3;
    --color-sand-mid: #C9B189;
    --color-sand-dark: #9E865E;

    /* Text */
    --color-text-main: #2B2B2B;
    --color-text-soft: #6B6B6B;

    /* UI Elements */
    --color-card-bg: #FFFFFF;
    --color-border-soft: #E2D6BD;
}


/* ===============================
   GLOBAL STYLING
   =============================== */

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
}

a {
    color: var(--color-sand-dark);
    text-decoration: none;
}

a:hover {
    color: #7d6847;
}


/* ===============================
   HERO / BANNER SECTION
   =============================== */

.hero-section {
    background-color: var(--color-sand-light);
    /*background-image: url('/public/images/banner-placeholder.jpg');*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 220px;
    position: relative;
    display: flex;
    align-items: center;
}

/* soft sand overlay for readability */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(245, 239, 228, 0.65);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}


/* ===============================
   BUTTONS (Override Bootstrap blue)
   =============================== */

.btn-primary {
    background-color: var(--color-sand-mid);
    border: none;
    color: var(--color-text-main);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--color-sand-dark);
}

.btn-outline-primary {
    border: 2px solid var(--color-sand-mid);
    color: var(--color-text-main);
}

.btn-outline-primary:hover {
    background-color: var(--color-sand-mid);
}

/* ===============================
   ALERTS
   =============================== */

.alert {
    padding: 10px 14px;
    margin-bottom: 15px;
    border: 1px solid var(--color-border-soft);
    border-radius: 6px;
}

.alert-success {
    background-color: #EEF6EC;
    color: #3F6338;
}

.alert-danger {
    background-color: #F8EAEA;
    color: #8A3333;
}

/* ===============================
   SECONDARY BUTTON
   =============================== */

.btn-secondary {
    background-color: var(--color-sand-light);
    border: 1px solid var(--color-sand-mid);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background-color: var(--color-sand-mid);
}
.btn.btn-muted {
    display: inline-block;
    padding: 5px 10px;
    background: #E8DCC3 !important;
    border: 1px solid #9E865E !important;
    border-radius: 5px;
    color: #2B2B2B !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    appearance: button;
}

.btn.btn-muted:hover {
    background: #C9B189 !important;
    border-color: #9E865E !important;
}

/* ===============================
   FORMS
   =============================== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-main);
    font-weight: 600;
    font-size: 15px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: var(--color-text-soft);
    font-size: 13px;
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    display: block;
    padding: 10px 12px;
    background-color: #FFFFFF;
    color: var(--color-text-main);
    border: 1px solid var(--color-border-soft);
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-sand-mid);
    box-shadow: 0 0 0 3px rgba(201, 177, 137, 0.25);
}

.form-control::placeholder,
.form-textarea::placeholder {
    color: #9A9184;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--color-sand-dark) 50%),
        linear-gradient(135deg, var(--color-sand-dark) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.form-check-input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-sand-dark);
    cursor: pointer;
}

.form-check-label {
    color: var(--color-text-main);
    font-size: 15px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.form-inline {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
}

.form-error {
    margin-top: 5px;
    color: #9B2C2C;
    font-size: 13px;
    font-weight: 500;
}

.form-control.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: #B94A48;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(185, 74, 72, 0.18);
}

.form-control:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background-color: #F3EEE5;
    color: var(--color-text-soft);
    cursor: not-allowed;
}

.table-standard .form-control,
.table-standard .form-select {
    padding: 6px 8px;
    min-width: 110px;
    font-size: 14px;
}

fieldset {
    border: 1px solid var(--color-border-soft);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

legend {
    width: auto;
    padding: 0 8px;
    margin-bottom: 0;
    color: var(--color-text-main);
    font-size: 15px;
    font-weight: 600;
}

/* ===============================
   CARD / CONTENT BLOCKS
   =============================== */

.card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
}

.card-body {
    padding: 1.75rem;
}


/* ===============================
   LOGO PLACEHOLDERS
   =============================== */

.logo-rect {
    width: 300px;
    height: 150px;
    /* background-color: white;
    border: 1px solid var(--color-border-soft);*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 10px;
    box-sizing: border-box;
}

.logo-square {
    width: 100px;
    height: 100px;
    /* background-color: white;
    border: 1px solid var(--color-border-soft); */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 10px;
    box-sizing: border-box;
}

.logo-rect img,
.logo-square img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ===============================
   TABLES
   =============================== */

.table-scroll {
    width: 100%;
    max-width: 100%;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
    background-color: var(--color-card-bg);
    border-collapse: collapse;
}

.table-standard {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--color-card-bg);
    font-size: 15px;
}

.table-standard th,
.table-standard td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border-soft);
    text-align: left;
    vertical-align: top;
}

.table-standard thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--color-sand-light);
    color: var(--color-text-main);
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border-soft);
}

.table-standard tbody tr:nth-child(even) td {
    background-color: #FAF7F0;
}

.table-standard tbody tr:hover td {
    background-color: #F1E7D3;
}

.table-standard tbody tr:last-child td {
    border-bottom: none;
}

.table-standard caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 8px;
}
.table-standard .col-wrap {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 200px;
}

/* ===============================
   OUTPUT FRAME
   =============================== */

.form-output-layout {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.form-panel {
    flex: 0 0 420px;      /* form width */
    max-width: 420px;
    min-width: 320px;
}

.output-frame {
    flex: 1 1 auto;       /* takes whatever space is left */
    border: 1px solid var(--color-sand-mid);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.output-frame-header {
    background: var(--color-sand-light);
    color: var(--color-text-main);
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-sand-mid);
}

.output-frame-body {
    padding: 14px;
    min-height: 280px;
    max-height: 500px;
    overflow: auto;
    font-family: Consolas, monospace;
    font-size: 0.95rem;
    white-space: pre-wrap;
    color: var(--color-text-main);
}

@media (max-width: 768px) {
    .form-output-layout {
        flex-direction: column;
    }

    .output-frame {
        width: 100%;
        flex: none;
        position: static;
    }
}

/* ===============================
   SECTION SPACING
   =============================== */

.section-padding {
    padding-top: 60px;
    padding-bottom: 60px;
}


/* ===============================
   FOOTER
   =============================== */

.site-footer {
    background-color: var(--color-sand-light);
    padding: 25px 0;
    font-size: 14px;
    color: var(--color-text-soft);
    text-align: center;
}


/* ===============================
   MOBILE RESPONSIVE TWEAKS
   =============================== */

@media (max-width: 768px) {

    .hero-section {
        min-height: 320px;
        text-align: center;
    }

    .logo-rect {
        width: 220px;
        height: 70px;
        margin: 0 auto 15px auto;
    }

    .logo-square {
        margin: 0 auto;
    }

    .section-padding {
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

/* ===============================
   ACCESS DENIED
   =============================== */
.access-denied-page {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #f4f1ea, #e8e2d6);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.denied-container {
    width: 100%;
    padding: 20px;
}

.denied-card {
    max-width: 420px;
    margin: auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.denied-card .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.denied-card h1 {
    margin: 10px 0;
    font-size: 26px;
    color: #5a4a3f;
}

.denied-card p {
    color: #7a6a5f;
    margin-bottom: 25px;
}
.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn.primary {
    background-color: #c2a878;
    color: white;
}