/* -------------------------------------------------
   Global layout
   ------------------------------------------------- */
body {
    background: #f8f9fa;
    font-family: Arial, sans-serif;
    padding: 24px;
    margin: 0;
}

/* -------------------------------------------------
   Card containers (Purchase‑Request & Entry)
   ------------------------------------------------- */
.form-card,
.help-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    border-top: 4px solid #00305f;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* -------------------------------------------------
   Card headings & subtitles
   ------------------------------------------------- */
.form-card h5,
.help-card h5 {
    color: #00305f;
    font-weight: 700;
    margin-bottom: 4px;
}

.form-card .subtitle,
.help-card .subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

/* -------------------------------------------------
   Section labels (e.g. “Item Details”, “Request Details”)
   ------------------------------------------------- */
.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #00305f;
    margin-bottom: 12px;
    margin-top: 4px;
}

/* -------------------------------------------------
   Form‑field basics
   ------------------------------------------------- */
label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.required-star {
    color: #dc2626;
    margin-left: 2px;
}

/* -------------------------------------------------
   Bootstrap‑like inputs
   ------------------------------------------------- */

/* -------------------------------------------------
   Select2 theming (used on the “Approved By” field)
   ------------------------------------------------- */
.select2-container--default .select2-selection--single {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    height: 38px;
    font-size: 0.875rem;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    color: #111827;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #00305f;
    box-shadow: 0 0 0 3px rgba(0,48,95,.1);
}

/* -------------------------------------------------
   Buttons
   ------------------------------------------------- */
.btn-submit {
    background-color: #00305f;
    border-color: #00305f;
    color: #fff;
    font-size: 0.9rem;
    padding: 9px 28px;            /* same for all three pages */
    border-radius: 6px;
    font-weight: 600;
}
.btn-submit:hover {
    background-color: #002347;
    border-color: #002347;
    color: #fff;
}

/* -------------------------------------------------
   Flash / alert messages
   ------------------------------------------------- */
.flash-error,
.flash-success {
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    color: #7f1d1d;
}
.flash-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    color: #166534;
}

/* -------------------------------------------------
   Layout helpers
   ------------------------------------------------- */

.form-row {
    margin-right: -8px;
    margin-left: -8px;
}
.form-row > [class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

/* -------------------------------------------------
   Mode badge – only on the “Add/Edit Entry” page
   ------------------------------------------------- */
.mode-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-left: 8px;
    vertical-align: middle;
}
.mode-badge.add {
    background: #eff6ff;
    color: #2563eb;
}
.mode-badge.edit {
    background: #fffbeb;
    color: #d97706;
}

/* -------------------------------------------------
   Help‑request page specific styles
   ------------------------------------------------- */
.examples {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
}
.examples p {
    margin: 0 0 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.examples ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.83rem;
    color: #374151;
}
.examples ul li {
    margin-bottom: 3px;
}
.char-count {
    font-size: .75rem;
    color: #9ca3af;
    text-align: right;
    margin-top: 4px;
}
.char-count.warn { color: #d97706; }
.char-count.over { color: #dc2626; }
