html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* asp-validation-summary/asp-validation-for elements across the app are hardcoded with
   Bootstrap alert/text-danger classes so the error styling is ready to go — but nothing hid
   them when there are no errors, so every page with a validation summary showed a visible
   empty red box (border + padding + margin-bottom) even on a first, error-free load. This is
   the standard rule ASP.NET Core's unobtrusive validation expects to exist. */
.validation-summary-valid { display: none; }
.field-validation-valid { display: none; }

:root {
    --amc-primary: #164e63;
    --amc-primary-dark: #0f3a49;
    --amc-accent: #0d9488;
    --amc-accent-light: #ccfbf1;
    --amc-border: #e2e8ec;
}

/* ===== Shared AMC staff-page design system (list/search pages) ===== */
.page-header {
    background: linear-gradient(135deg, var(--amc-primary, #164e63), var(--amc-primary-dark, #0f3a49));
    color: #fff;
    border-radius: .9rem;
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.page-header h2, .page-header h2 i {
    font-weight: 700;
    margin-bottom: 0;
    font-size: 1.22rem;
    /* !important: something else in the cascade was overriding the plain color rule, which
       made the title text render dark instead of white — forcing it here since a lower-priority
       rule wasn't enough. */
    color: #fff !important;
}
.page-header .count-pill {
    background: rgba(255,255,255,.15);
    border-radius: 2rem;
    padding: .35rem .95rem;
    font-weight: 600;
    font-size: .85rem;
}

.filter-card {
    background: #fff;
    border: 1px solid #e2e8ec;
    border-radius: .85rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.filter-card .form-label { font-weight: 600; font-size: .82rem; color: #33444a; }
.filter-card .form-control, .filter-card .form-select {
    border-radius: .5rem;
    border-color: #d7e0e3;
}
.filter-card .form-control:focus, .filter-card .form-select:focus {
    border-color: var(--amc-accent, #0d9488);
    box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .15);
}
.btn-amc-primary {
    background: var(--amc-primary, #164e63);
    border-color: var(--amc-primary, #164e63);
    font-weight: 600;
    border-radius: .5rem;
}
.btn-amc-primary:hover {
    background: var(--amc-primary-dark, #0f3a49);
    border-color: var(--amc-primary-dark, #0f3a49);
    color: #fff;
}

.table-card {
    background: #fff;
    border: 1px solid #e2e8ec;
    border-radius: .85rem;
    overflow: hidden;
}
.table-card table { margin-bottom: 0; }
.table-card thead th {
    background: #eefaf9;
    color: var(--amc-primary-dark, #0f3a49);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: none;
    white-space: nowrap;
}
.table-card tbody td { vertical-align: middle; font-size: .9rem; }

.badge-pending { background: #fef3c7; color: #b45309; }
.badge-approved { background: #dcfce7; color: #15803d; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }

.empty-state {
    text-align: center;
    color: #8a9aa0;
    padding: 3rem 1rem;
}

.form-card {
    background: #fff;
    border: 1px solid #e2e8ec;
    border-radius: .85rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.form-card legend {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--amc-primary-dark, #0f3a49);
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1rem;
    padding: 0;
    width: auto;
}
.form-card legend i { color: var(--amc-accent, #0d9488); }

/* ===== Shared citizen-facing form pages (public layout) ===== */
.apply-header {
    background: linear-gradient(135deg, var(--amc-primary, #164e63), var(--amc-primary-dark, #0f3a49));
    color: #fff;
    border-radius: .9rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}
.apply-header h2 {
    font-weight: 700;
    margin-bottom: .2rem;
    color: #fff !important;
}
.apply-header .subtitle { color: rgba(255,255,255,.85); font-size: .9rem; }

.apply-section {
    background: #fff;
    border: 1px solid #e2e8ec;
    border-radius: .85rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.apply-section legend {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--amc-primary-dark, #0f3a49);
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1rem;
    padding: 0;
    width: auto;
}
.apply-section legend i { color: var(--amc-accent, #0d9488); }
.apply-section .form-label { font-weight: 600; font-size: .85rem; color: #33444a; }
.apply-section .form-control, .apply-section .form-select {
    border-radius: .5rem;
    border-color: #d7e0e3;
}
.apply-section .form-control:focus, .apply-section .form-select:focus {
    border-color: var(--amc-accent, #0d9488);
    box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .15);
}
.btn-apply-submit {
    background: var(--amc-primary, #164e63);
    border-color: var(--amc-primary, #164e63);
    font-weight: 600;
    padding: .55rem 1.6rem;
    border-radius: .55rem;
}
.btn-apply-submit:hover {
    background: var(--amc-primary-dark, #0f3a49);
    border-color: var(--amc-primary-dark, #0f3a49);
    color: #fff;
}

.confirm-wrap { max-width: 640px; margin: 0 auto; }
.confirm-card {
    background: #fff;
    border: 1px solid #e2e8ec;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 28px rgba(15, 58, 73, .08);
}
.confirm-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    margin: 0 auto 1rem;
}
.confirm-card h2 { font-weight: 700; color: var(--amc-primary-dark, #0f3a49); }
.confirm-appid {
    display: inline-block;
    background: #f0f9f8;
    border: 1px solid #d3ece9;
    color: var(--amc-primary-dark, #0f3a49);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: .03em;
    padding: .5rem 1.25rem;
    border-radius: .6rem;
    margin: .75rem 0 1.25rem;
}
.confirm-note {
    background: #fff8e6;
    border: 1px solid #f5e3ad;
    color: #7a5c00;
    border-radius: .6rem;
    padding: .75rem 1rem;
    font-size: .85rem;
    text-align: left;
    margin-bottom: 1.5rem;
}
.confirm-details {
    text-align: left;
    border-top: 1px solid #eef1f3;
    padding-top: 1.25rem;
    margin-bottom: 1.5rem;
}
.confirm-details dt { color: #6c7a80; font-weight: 600; font-size: .82rem; }
.confirm-details dd { font-weight: 600; color: #1f2d33; }
.confirm-actions .btn { border-radius: .55rem; font-weight: 600; }
.btn-confirm-primary {
    background: var(--amc-primary, #164e63);
    border-color: var(--amc-primary, #164e63);
}
.btn-confirm-primary:hover {
    background: var(--amc-primary-dark, #0f3a49);
    border-color: var(--amc-primary-dark, #0f3a49);
    color: #fff;
}