:root {
    --acred-stage-blue: #0f78cf;
    --acred-stage-blue-deep: #0b5ba9;
    --acred-stage-glow: rgba(10, 109, 193, 0.28);
    --acred-stage-green: #198754;
    --acred-stage-green-deep: #115c39;
    --acred-stage-green-glow: rgba(23, 111, 67, 0.28);
    --acred-card-shadow: 0 28px 55px rgba(8, 45, 89, 0.2);
    --acred-card-shadow-soft: 0 20px 40px rgba(8, 45, 89, 0.14);
    --acred-ink: #17355a;
    --acred-muted: #7b8798;
    --acred-line: #e5edf5;
    --acred-success: #35c46d;
    --acred-danger: #ff4d67;
    --acred-info: #2fb2e7;
    --acred-warning: #ffb545;
}

.acred-dashboard-stage {
    position: relative;
    margin-bottom: 1.5rem;
    padding: clamp(1.15rem, 2vw, 1.75rem);
    border-radius: 34px;
    overflow: hidden;
    background:
        linear-gradient(135deg, var(--acred-stage-blue-deep) 0%, var(--acred-stage-blue) 52%, #1287da 100%);
    box-shadow: 0 26px 55px var(--acred-stage-glow);
}

.candidate-dashboard-shell.acred-dashboard-stage {
    background:
        linear-gradient(135deg, var(--acred-stage-green-deep) 0%, var(--acred-stage-green) 54%, #23a866 100%);
    box-shadow: 0 26px 55px var(--acred-stage-green-glow);
}

.acred-dashboard-stage > * {
    position: relative;
    z-index: 1;
}

.acred-dashboard-stage::before,
.acred-dashboard-stage::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(0.2px);
}

.acred-dashboard-stage::before {
    top: 36px;
    left: -10px;
    width: 180px;
    height: 140px;
}

.acred-dashboard-stage::after {
    right: 24px;
    bottom: 24px;
    width: 150px;
    height: 160px;
}

.admin-dashboard-shell .admin-page-title,
.admin-dashboard-shell .admin-page-subtitle,
.admin-dashboard-shell .admin-page-head .btn,
.candidate-dashboard-shell .candidate-kicker,
.candidate-dashboard-shell .candidate-hero h2,
.candidate-dashboard-shell .candidate-hero p {
    position: relative;
    z-index: 1;
}

.admin-dashboard-shell .admin-page-title,
.candidate-dashboard-shell .candidate-hero h2 {
    color: #fff;
}

.admin-dashboard-shell .admin-page-subtitle,
.candidate-dashboard-shell .candidate-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.admin-dashboard-shell .btn-outline-primary,
.candidate-dashboard-shell .btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-dashboard-shell .btn-outline-primary:hover,
.admin-dashboard-shell .btn-outline-primary:focus,
.candidate-dashboard-shell .btn-outline-primary:hover,
.candidate-dashboard-shell .btn-outline-primary:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.48);
    color: #fff;
}

.dashboard-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
    padding: 1.6rem 1.7rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.dashboard-hero-kicker {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.dashboard-hero-title {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    font-weight: 700;
    color: #fff;
}

.dashboard-hero-copy {
    margin: 0.35rem 0 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
}

.dashboard-hero-badge {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 18px 30px rgba(8, 33, 67, 0.24);
}

.dashboard-hero-card[data-tone="success"] .dashboard-hero-badge {
    background: linear-gradient(180deg, #58dc89 0%, #24b860 100%);
}

.dashboard-hero-card[data-tone="info"] .dashboard-hero-badge {
    background: linear-gradient(180deg, #47c6f2 0%, #1f96d8 100%);
}

.admin-dashboard-shell .admin-stat-card,
.candidate-dashboard-shell .candidate-stat-card {
    position: relative;
    min-height: 215px;
    padding: 3rem 1.35rem 1.4rem;
    border: 0;
    border-radius: 28px;
    background: #fff !important;
    color: var(--acred-ink) !important;
    box-shadow: var(--acred-card-shadow);
    overflow: visible;
}

.admin-dashboard-shell .admin-stat-card::before,
.candidate-dashboard-shell .candidate-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 7px;
    background: var(--acred-card-accent, var(--acred-info));
}

.admin-dashboard-shell .stat-green,
.candidate-dashboard-shell .tone-emerald {
    --acred-card-accent: var(--acred-success);
}

.admin-dashboard-shell .stat-gold,
.candidate-dashboard-shell .tone-amber {
    --acred-card-accent: var(--acred-warning);
}

.admin-dashboard-shell .stat-blue,
.candidate-dashboard-shell .tone-blue {
    --acred-card-accent: var(--acred-info);
}

.admin-dashboard-shell .stat-purple,
.candidate-dashboard-shell .tone-indigo {
    --acred-card-accent: #2fb2e7;
}

.admin-dashboard-shell .stat-brown {
    --acred-card-accent: #c48a36;
}

.admin-dashboard-shell .stat-slate {
    --acred-card-accent: #60738c;
}

.admin-dashboard-shell .admin-stat-icon,
.candidate-dashboard-shell .candidate-stat-icon {
    position: absolute;
    top: -34px;
    left: 50%;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--acred-card-accent, var(--acred-info));
    color: #fff !important;
    border: 4px solid rgba(13, 110, 184, 0.26);
    box-shadow: 0 16px 26px rgba(16, 68, 122, 0.26);
}

.admin-dashboard-shell .admin-stat-body,
.candidate-dashboard-shell .candidate-stat-copy {
    width: 100%;
    text-align: center;
}

.admin-dashboard-shell .admin-stat-label,
.candidate-dashboard-shell .candidate-stat-copy span {
    color: var(--acred-muted);
    font-weight: 600;
}

.admin-dashboard-shell .admin-stat-value,
.candidate-dashboard-shell .candidate-stat-copy strong {
    color: var(--acred-ink);
}

.admin-dashboard-shell .admin-panel-card,
.admin-dashboard-shell .admin-table-card,
.candidate-dashboard-shell .candidate-panel,
.candidate-dashboard-shell .candidate-hero {
    border: 0;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--acred-card-shadow-soft);
}

.admin-dashboard-shell .admin-panel-card,
.admin-dashboard-shell .admin-table-card,
.candidate-dashboard-shell .candidate-panel {
    position: relative;
    overflow: hidden;
}

.admin-dashboard-shell .admin-panel-card::before,
.admin-dashboard-shell .admin-table-card::before,
.candidate-dashboard-shell .candidate-panel::before,
.candidate-dashboard-shell .candidate-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--acred-info) 0%, #4fd28f 100%);
}

.candidate-dashboard-shell .candidate-hero {
    position: relative;
    padding-top: 2.1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.candidate-dashboard-shell .candidate-hero::before {
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.45) 100%);
}

.candidate-dashboard-shell .candidate-hero-badge {
    border-radius: 28px;
    background: #fff;
    color: var(--acred-ink);
    box-shadow: var(--acred-card-shadow-soft);
}

.candidate-dashboard-shell .candidate-hero-badge small {
    color: var(--acred-muted);
}

.candidate-dashboard-shell .candidate-panel h3,
.candidate-dashboard-shell .candidate-list-title,
.candidate-dashboard-shell .candidate-opportunity-title,
.admin-dashboard-shell .admin-panel-title,
.admin-dashboard-shell .admin-section-title,
.admin-dashboard-shell .admin-summary-value {
    color: var(--acred-ink);
}

.candidate-dashboard-shell .candidate-panel p,
.candidate-dashboard-shell .candidate-list-subtitle,
.candidate-dashboard-shell .candidate-opportunity-meta,
.admin-dashboard-shell .admin-panel-copy,
.admin-dashboard-shell .admin-section-copy,
.admin-dashboard-shell .admin-summary-label {
    color: var(--acred-muted);
}

.candidate-dashboard-shell .candidate-list-item,
.candidate-dashboard-shell .candidate-opportunity-card,
.admin-dashboard-shell .admin-quick-link {
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(14, 44, 85, 0.08);
}

.modal-backdrop.show {
    opacity: 0.78;
}

.modal.show {
    background: rgba(5, 38, 79, 0.18);
    backdrop-filter: blur(8px);
}

.modal .modal-dialog {
    padding: 1rem;
}

.modal .modal-content {
    position: relative;
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafd 100%);
    box-shadow: 0 36px 72px rgba(8, 44, 88, 0.28);
}

.modal .modal-content::before {
    content: "";
    display: block;
    height: 7px;
    background: var(--acred-modal-accent, var(--acred-info));
}

.modal .modal-header,
.modal .modal-footer {
    position: relative;
    z-index: 1;
}

.modal .modal-header {
    padding: 1.1rem 1.4rem 1rem;
    border-bottom: 1px solid rgba(21, 53, 90, 0.08);
    background: rgba(255, 255, 255, 0.8);
}

.modal .modal-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--acred-ink);
}

.modal .modal-body {
    padding: 1.35rem 1.4rem;
    color: var(--acred-ink);
}

.modal .modal-footer {
    padding: 1rem 1.4rem 1.35rem;
    border-top: 1px solid rgba(21, 53, 90, 0.08);
    background: rgba(247, 250, 253, 0.95);
}

.modal .btn-close {
    border-radius: 50%;
    box-shadow: none;
    opacity: 0.8;
}

.modal .btn,
.swal-button {
    border-radius: 999px;
    font-weight: 700;
}

.admin-modal-form .modal-dialog,
#documentPreviewModal .modal-dialog {
    padding-top: 1.4rem;
}

.document-preview-modal {
    --acred-modal-accent: var(--acred-info);
}

.document-preview-modal .modal-body {
    min-height: 240px;
}

.acred-modal-state {
    --acred-modal-accent: var(--acred-info);
}

.acred-modal-state[data-acred-tone="success"] {
    --acred-modal-accent: var(--acred-success);
}

.acred-modal-state[data-acred-tone="error"] {
    --acred-modal-accent: var(--acred-danger);
}

.acred-modal-state[data-acred-tone="warning"] {
    --acred-modal-accent: var(--acred-warning);
}

.acred-modal-state[data-acred-tone="info"] {
    --acred-modal-accent: var(--acred-info);
}

.acred-modal-state .modal-body {
    padding: 3.5rem 1.9rem 1.8rem;
    text-align: center;
}

.acred-modal-state .acred-modal-badge {
    position: absolute;
    top: -34px;
    left: 50%;
    z-index: 3;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--acred-modal-accent);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 16px 28px rgba(12, 55, 103, 0.28);
    border: 4px solid rgba(12, 82, 148, 0.2);
}

.acred-modal-state .acred-modal-headline {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 800;
    color: var(--acred-modal-accent);
}

.acred-modal-state .acred-modal-divider {
    width: 72px;
    height: 3px;
    margin: 1rem auto 1rem;
    border-radius: 999px;
    background: rgba(23, 53, 90, 0.12);
}

.acred-modal-state .acred-modal-copy {
    margin: 0 auto;
    max-width: 320px;
    color: var(--acred-muted);
    font-size: 1rem;
    line-height: 1.7;
    white-space: pre-line;
}

.acred-modal-state .acred-modal-copy.is-rich {
    max-width: 430px;
    color: var(--acred-ink);
    text-align: left;
    white-space: normal;
}

.acred-activity-summary {
    display: grid;
    gap: 0.95rem;
}

.acred-activity-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 1rem 1.15rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(47, 178, 231, 0.12) 0%, rgba(47, 178, 231, 0.05) 100%);
    border: 1px solid rgba(47, 178, 231, 0.18);
}

.acred-modal-state[data-acred-tone="success"] .acred-activity-highlight {
    background: linear-gradient(180deg, rgba(53, 196, 109, 0.14) 0%, rgba(53, 196, 109, 0.05) 100%);
    border-color: rgba(53, 196, 109, 0.22);
}

.acred-modal-state[data-acred-tone="error"] .acred-activity-highlight {
    background: linear-gradient(180deg, rgba(255, 77, 103, 0.14) 0%, rgba(255, 77, 103, 0.05) 100%);
    border-color: rgba(255, 77, 103, 0.22);
}

.acred-modal-state[data-acred-tone="warning"] .acred-activity-highlight {
    background: linear-gradient(180deg, rgba(255, 181, 69, 0.18) 0%, rgba(255, 181, 69, 0.06) 100%);
    border-color: rgba(255, 181, 69, 0.25);
}

.acred-activity-highlight-count {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--acred-modal-accent);
}

.acred-activity-highlight-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--acred-muted);
    text-align: center;
}

.acred-activity-item {
    display: grid;
    gap: 0.32rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 8px 18px rgba(15, 57, 101, 0.05);
}

.acred-activity-item-label,
.acred-activity-note-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--acred-muted);
}

.acred-activity-item-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--acred-ink);
}

.acred-activity-reference {
    color: #6d7f95;
    font-weight: 600;
}

.acred-activity-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
}

.acred-activity-status.is-success {
    color: #167c46;
    background: rgba(53, 196, 109, 0.16);
}

.acred-activity-status.is-info {
    color: #146fa7;
    background: rgba(47, 178, 231, 0.16);
}

.acred-activity-status.is-warning {
    color: #9e6400;
    background: rgba(255, 181, 69, 0.22);
}

.acred-activity-status.is-error {
    color: #c22d4a;
    background: rgba(255, 77, 103, 0.16);
}

.acred-activity-note {
    display: grid;
    gap: 0.45rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border-left: 5px solid var(--acred-modal-accent);
    background: rgba(15, 120, 207, 0.08);
}

.acred-activity-note.is-success {
    background: rgba(53, 196, 109, 0.12);
    border-left-color: var(--acred-success);
}

.acred-activity-note.is-info {
    background: rgba(47, 178, 231, 0.12);
    border-left-color: var(--acred-info);
}

.acred-activity-note.is-warning {
    background: rgba(255, 181, 69, 0.16);
    border-left-color: var(--acred-warning);
}

.acred-activity-note.is-error {
    background: rgba(255, 77, 103, 0.12);
    border-left-color: var(--acred-danger);
}

.acred-activity-note-text {
    color: var(--acred-ink);
    line-height: 1.65;
}

.acred-modal-state .modal-title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 800;
    color: var(--acred-modal-accent);
}

.acred-modal-state .text-muted {
    display: block;
    margin: 0 auto;
    max-width: 320px;
    color: var(--acred-muted) !important;
    font-size: 1rem;
    line-height: 1.7;
}

.acred-modal-state .modal-body > .bi-check2-circle,
.acred-modal-state .modal-body > .bi-info-circle {
    display: none !important;
}

#successModal .modal-title {
    font-size: 0;
}

#successModal .modal-title::after {
    content: "Success!";
    font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.acred-modal-actions {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1.55rem;
}

.acred-modal-btn-secondary,
.acred-modal-btn-primary {
    min-width: 150px;
    padding: 0.85rem 1.15rem;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
}

.acred-modal-btn-secondary {
    background: #fff;
    color: #9aa6b6;
    box-shadow: inset 0 0 0 1px #d9e3ee;
}

.acred-modal-btn-primary {
    color: #fff;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.08) 100%), var(--acred-modal-accent);
    box-shadow: 0 16px 24px rgba(15, 72, 130, 0.16);
}

.acred-modal-btn-secondary:hover,
.acred-modal-btn-primary:hover {
    transform: translateY(-1px);
}

.acred-modal-btn-secondary:focus,
.acred-modal-btn-primary:focus {
    outline: none;
}

#acredStatusModal .modal-dialog {
    max-width: 520px;
}

@media (max-width: 991.98px) {
    .acred-dashboard-stage::before,
    .acred-dashboard-stage::after {
        opacity: 0.55;
    }
}

@media (max-width: 767.98px) {
    .acred-dashboard-stage {
        border-radius: 26px;
        padding: 0.9rem;
    }

    .dashboard-hero-card,
    .acred-modal-actions {
        flex-direction: column;
    }

    .dashboard-hero-badge {
        width: 72px;
        height: 72px;
        font-size: 1.7rem;
    }

    .admin-dashboard-shell .admin-stat-card,
    .candidate-dashboard-shell .candidate-stat-card {
        min-height: 138px;
        padding: 2.25rem 0.7rem 0.85rem;
        border-radius: 20px;
    }

    .candidate-dashboard-shell .candidate-stat-icon {
        top: -24px;
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
    }

    .candidate-dashboard-shell .candidate-stat-copy {
        display: grid;
        gap: 0.2rem;
    }

    .acred-modal-btn-secondary,
    .acred-modal-btn-primary {
        width: 100%;
    }
}
