.page-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 132px;
    display: flex;
    align-items: center;
    padding: 22px 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-sizing: border-box;
    color: #ffffff;
    background:
        radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.12), transparent 32%),
        linear-gradient(135deg, #0f4c81, #1976d2);
    box-shadow: 0 10px 24px rgba(15, 76, 129, 0.16);
    margin-bottom: 18px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(1.65rem, 2.4vw, 1.95rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.page-hero p {
    max-width: 820px;
    margin: 7px 0 0;
    font-size: 14.5px;
    line-height: 1.45;
    opacity: 0.93;
}

.page-hero-layout {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-hero-copy {
    min-width: 0;
}

.page-hero-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pill {
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
}

.form-group {
    margin-bottom: 18px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.form-input,
.form-control {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    outline: none;
    background: #f8fafc;
    font-size: 15px;
    transition: 0.2s;
}

.form-input:focus,
.form-control:focus {
    border-color: #1976d2;
    background: white;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.12);
}

.flash-messages {
    width: min(1500px, calc(100% - 48px));
    margin: 20px auto 0;
}

@media (max-width: 900px) {
    .flash-messages {
        width: min(1500px, calc(100% - 32px));
    }
}

@media (max-width: 680px) {
    .flash-messages {
        width: min(1500px, calc(100% - 24px));
        margin-top: 14px;
    }
}

.toast {
    display: none;
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.toast.success,
.toast.info,
.toast.message {
    display: block;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}


.toast.warning {
    display: block;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.toast.error,
.toast.danger {
    display: block;
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.empty-message {
    color: #9ca3af !important;
    background: #f9fafb !important;
    border-style: dashed !important;
}

.empty-message::before {
    content: "—" !important;
    background: #e5e7eb !important;
    color: #6b7280 !important;
}

.loading-state,
.no-records-state {
    padding: 36px 22px;
    text-align: center;
    color: #6b7280;
    line-height: 1.6;
}

.loading-state strong,
.no-records-state strong {
    display: block;
    margin-bottom: 6px;
    color: #0f4c81;
    font-size: 18px;
}

@media (max-width: 768px) {
    .page-hero {
        height: auto;
        min-height: 112px;
        padding: 20px;
        border-radius: 15px;
        margin-bottom: 16px;
    }

    .page-hero h1 {
        font-size: 1.65rem;
    }

    .page-hero p {
        font-size: 14px;
    }

    .page-hero-layout {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .page-hero-actions {
        justify-content: flex-start;
    }

    .hero-meta {
        gap: 7px;
        margin-top: 12px;
    }

    .pill {
        padding: 6px 9px;
        font-size: 12px;
    }
}


/* Shared application feedback and confirmation UI */
.app-toast-region {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 3000;
    width: min(390px, calc(100vw - 40px));
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    padding: 13px 15px;
    border: 1px solid #dbe2ef;
    border-radius: 12px;
    color: #172033;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: auto;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.app-toast-success { border-left: 4px solid #138a61; }
.app-toast-error { border-left: 4px solid #c53b48; }
.app-toast-info { border-left: 4px solid #4459e8; }

.app-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 17, 31, 0.58);
    backdrop-filter: blur(4px);
}

.app-confirm-card {
    width: min(460px, 100%);
    padding: 25px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(7, 17, 31, 0.3);
}

.app-confirm-card h2 {
    margin: 0;
    color: #172033;
    font-size: 1.25rem;
}

.app-confirm-card p {
    margin: 10px 0 0;
    color: #667085;
    line-height: 1.6;
}

.app-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.app-confirm-actions button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #dbe2ef;
    border-radius: 10px;
    background: #ffffff;
    color: #172033;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.app-confirm-submit {
    border-color: #4459e8 !important;
    color: #ffffff !important;
    background: #4459e8 !important;
}

.app-confirm-submit.danger {
    border-color: #c53b48 !important;
    background: #c53b48 !important;
}

.legacy-redirect-card {
    width: min(680px, calc(100% - 32px));
    margin: 80px auto;
    padding: 36px;
    text-align: center;
    border: 1px solid #e4e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.legacy-redirect-card h1 { margin: 0; }
.legacy-redirect-card p { color: #667085; line-height: 1.65; }
.legacy-redirect-card a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 10px;
    color: #ffffff;
    background: #4459e8;
    font-weight: 700;
}
