/* =========================================================
   SureStack Global Theme
   Brand palette:
   Deep Navy     #0D2B45
   Tech Teal     #00B4A6
   Progress Lime #A6E22E
   Slate Grey    #6B7580
   Cloud White   #F4F7F9
   ========================================================= */

:root {
    --ss-navy: #0D2B45;
    --ss-navy-dark: #071D30;
    --ss-navy-soft: #153B5D;
    --ss-teal: #00B4A6;
    --ss-teal-dark: #008F85;
    --ss-lime: #A6E22E;
    --ss-slate: #6B7580;
    --ss-cloud: #F4F7F9;
    --ss-white: #FFFFFF;
    --ss-border: #DCE4E9;
    --ss-text: #17324A;
    --ss-muted: #6B7580;
    --ss-danger: #C94848;
    --ss-warning: #D99A24;
    --ss-shadow: 0 8px 28px rgba(13, 43, 69, 0.08);
    --ss-shadow-hover: 0 14px 36px rgba(13, 43, 69, 0.13);
    --ss-radius: 12px;
}

html, body {
    min-height: 100%;
    font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ss-text);
    background: var(--ss-cloud);
}

body {
    margin: 0;
}

a,
.btn-link {
    color: var(--ss-teal-dark);
}

a:hover,
.btn-link:hover {
    color: var(--ss-teal);
}

.content {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ss-navy);
    font-weight: 700;
    letter-spacing: -0.015em;
}

h1 {
    font-size: clamp(1.55rem, 2vw, 2rem);
}

h1:focus {
    outline: none;
}

.text-muted {
    color: var(--ss-muted) !important;
}

/* ---------- Cards ---------- */

.card {
    border: 1px solid rgba(13, 43, 69, 0.06) !important;
    border-radius: var(--ss-radius);
    box-shadow: var(--ss-shadow);
    background: var(--ss-white);
}

.card-body {
    padding: 0.9rem 1rem;
}

.card-title {
    color: var(--ss-navy);
    font-weight: 700;
}

a .card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

a .card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 180, 166, 0.22) !important;
    box-shadow: var(--ss-shadow-hover) !important;
}

/* ---------- Buttons ---------- */

.btn {
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.42rem 0.75rem;
    line-height: 1.25;
    transition: all 0.15s ease;
}

.btn-primary {
    color: #fff;
    background: var(--ss-teal);
    border-color: var(--ss-teal);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    background: var(--ss-teal-dark);
    border-color: var(--ss-teal-dark);
}

.btn-success {
    color: var(--ss-navy);
    background: var(--ss-lime);
    border-color: var(--ss-lime);
}

.btn-success:hover,
.btn-success:focus {
    color: var(--ss-navy);
    background: #94cf20;
    border-color: #94cf20;
}

.btn-secondary {
    background: var(--ss-slate);
    border-color: var(--ss-slate);
}

.btn-outline-primary {
    color: var(--ss-teal-dark);
    border-color: var(--ss-teal);
}

.btn-outline-primary:hover {
    color: white;
    background: var(--ss-teal);
    border-color: var(--ss-teal);
}

.btn-outline-secondary {
    color: var(--ss-slate);
    border-color: #AAB5BE;
}

.btn-danger,
.btn-outline-danger:hover {
    background: var(--ss-danger);
    border-color: var(--ss-danger);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.22rem rgba(0, 180, 166, 0.18);
}

/* ---------- Forms ---------- */

.form-label {
    color: var(--ss-navy);
    font-size: 0.78rem;
    font-weight: 650;
    margin-bottom: 0.28rem;
}

.form-control,
.form-select {
    min-height: 2.15rem;
    border-radius: 7px;
    border-color: #CBD5DC;
    color: var(--ss-text);
    background-color: white;
    font-size: 0.88rem;
    padding-top: 0.38rem;
    padding-bottom: 0.38rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ss-teal);
}

.form-control[readonly] {
    background-color: #F1F5F7;
}

.form-check-input:checked {
    background-color: var(--ss-teal);
    border-color: var(--ss-teal);
}

.darker-border-checkbox.form-check-input {
    border-color: var(--ss-slate);
}

/* ---------- Tables ---------- */

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(13, 43, 69, 0.025);
    color: var(--ss-text);
    margin-bottom: 0;
}

.table > thead {
    background: #EEF3F6;
}

.table > thead th {
    color: var(--ss-navy);
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    border-bottom: 1px solid var(--ss-border);
    white-space: nowrap;
}

.table > tbody td {
    border-color: #E7EDF1;
    font-size: 0.84rem;
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    background: rgba(0, 180, 166, 0.045);
}

/* ---------- Badges ---------- */

.badge {
    border-radius: 999px;
    padding: 0.3em 0.58em;
    font-size: 0.72rem;
    font-weight: 650;
}

.bg-primary {
    background-color: var(--ss-teal) !important;
}

.bg-success {
    background-color: var(--ss-lime) !important;
    color: var(--ss-navy) !important;
}

.bg-secondary {
    background-color: var(--ss-slate) !important;
}

.bg-info {
    background-color: #7DD3FC !important;
}

.bg-warning {
    background-color: #F6C453 !important;
}

.bg-danger {
    background-color: var(--ss-danger) !important;
}

/* ---------- Alerts ---------- */

.alert {
    border-radius: 8px;
    border-width: 1px;
}

.alert-info {
    color: #155E75;
    background: #ECFEFF;
    border-color: #A5F3FC;
}

.alert-success {
    color: #365314;
    background: #F7FEE7;
    border-color: #D9F99D;
}

.alert-warning {
    color: #713F12;
    background: #FFFBEB;
    border-color: #FDE68A;
}

/* ---------- Utility surfaces ---------- */

.bg-light {
    background-color: #F5F8FA !important;
}

hr {
    border-color: #DDE5EA;
    opacity: 1;
}

/* ---------- Validation ---------- */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--ss-lime);
}

.invalid {
    outline: 1px solid var(--ss-danger);
}

.validation-message {
    color: var(--ss-danger);
}

/* ---------- Dashboard ---------- */

.ss-dashboard-hero {
    position: relative;
    overflow: hidden;
    min-height: 155px;
    margin-bottom: 1rem;
    padding: 1.3rem 1.5rem;
    border-radius: 16px;
    background:
        radial-gradient(circle at 85% 20%, rgba(0, 180, 166, 0.22), transparent 30%),
        linear-gradient(135deg, var(--ss-navy-dark) 0%, var(--ss-navy) 55%, #12466C 100%);
    box-shadow: 0 16px 40px rgba(13, 43, 69, 0.18);
    color: white;
}

.ss-dashboard-hero h1,
.ss-dashboard-hero p {
    color: white;
}

.ss-dashboard-logo {
    width: min(380px, 72%);
    height: auto;
    display: block;
}

.ss-dashboard-kicker {
    margin-top: 0.65rem;
    color: #B8CBD8 !important;
    font-size: 0.82rem;
}

.ss-module-card {
    position: relative;
    overflow: hidden;
    min-height: 92px;
}

.ss-module-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ss-teal);
}

.ss-module-card.ss-accent-lime::before {
    background: var(--ss-lime);
}

.ss-module-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 180, 166, 0.10);
    color: var(--ss-teal-dark);
    font-size: 0.95rem;
    font-weight: 800;
}

/* ---------- Blazor ---------- */

.blazor-error-boundary {
    background: #B32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

@media (max-width: 640.98px) {
    .content {
        padding-top: 0.75rem;
    }

    .ss-dashboard-hero {
        min-height: 135px;
        padding: 1rem;
    }

    .ss-dashboard-logo {
        width: 100%;
    }

    .card-body {
        padding: 0.85rem;
    }
}


/* =========================================================
   Compact readability pass
   ========================================================= */

body {
    font-size: 0.9rem;
}

p {
    margin-bottom: 0.6rem;
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.12rem;
}

h4 {
    font-size: 1rem;
}

h5, h6 {
    font-size: 0.9rem;
}

.row {
    --bs-gutter-x: 1rem;
}

.row.g-4,
.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.row.g-3,
.g-3 {
    --bs-gutter-x: 0.8rem;
    --bs-gutter-y: 0.8rem;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.mt-3 {
    margin-top: 0.75rem !important;
}

.py-3 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.card-header {
    padding: 0.65rem 0.9rem;
    background: #F7F9FA;
    border-bottom: 1px solid var(--ss-border);
    color: var(--ss-navy);
    font-size: 0.84rem;
    font-weight: 700;
}

.card-footer {
    padding: 0.65rem 0.9rem;
    background: #FAFBFC;
    border-top: 1px solid var(--ss-border);
}

.table > :not(caption) > * > * {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.table-responsive {
    border-radius: 8px;
}

.table .btn,
.table .btn-sm {
    font-size: 0.74rem;
    padding: 0.28rem 0.5rem;
}

.btn-sm {
    font-size: 0.76rem;
    padding: 0.28rem 0.5rem;
    border-radius: 6px;
}

.input-group-text {
    min-height: 2.15rem;
    padding: 0.38rem 0.6rem;
    font-size: 0.82rem;
    border-color: #CBD5DC;
    background: #F4F7F9;
}

textarea.form-control {
    min-height: 5rem;
}

.form-text {
    margin-top: 0.2rem;
    font-size: 0.72rem;
}

.form-check {
    min-height: 1.2rem;
    margin-bottom: 0.25rem;
}

.form-check-label {
    font-size: 0.84rem;
}

.alert {
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.84rem;
}

.list-group-item {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
}

.modal-header,
.modal-footer {
    padding: 0.75rem 1rem;
}

.modal-body {
    padding: 1rem;
}

.ss-module-card .card-body {
    padding: 0.8rem 1rem;
}

.ss-module-card .card-title {
    font-size: 0.98rem;
}

.ss-module-card p {
    font-size: 0.82rem;
}

@media (min-width: 1200px) {
    .content {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ---------- Home management tiles ---------- */

.home-menu-card {
    min-height: 175px;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.home-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ss-shadow-hover) !important;
    border-color: rgba(0, 180, 166, 0.25) !important;
}

.home-menu-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 180, 166, 0.10);
    color: var(--ss-teal-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.home-menu-link {
    color: var(--ss-teal-dark);
    font-size: 0.82rem;
    font-weight: 700;
}



.home-menu-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
    fill: currentColor;
}
