:root {
    --responsive-row-gap: 1rem;
    --responsive-card-bg: #ffffff;
    --responsive-card-border: rgba(15, 36, 84, 0.08);
    --responsive-card-shadow: 0 6px 24px rgba(15, 36, 84, 0.08);
    --responsive-muted: rgba(15, 36, 84, 0.55);

    --zaha-blue: #1366d6;
    --zaha-blue-light: #e9f2ff;
    --zaha-blue-soft: rgba(19, 102, 214, 0.08);
    --zaha-text-dark: #102542;
    --zaha-muted: rgba(16, 37, 66, 0.55);
    --zaha-radius: 16px;
    --zaha-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

html[data-bs-theme='dark'] {
    --responsive-card-bg: var(--section-bg-color, #111820);
    --responsive-card-border: rgba(255, 255, 255, 0.12);
    --responsive-card-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    --responsive-muted: rgba(241, 237, 229, 0.65);
}

.dashboard-metric {
    border-radius: var(--zaha-radius);
    border: 1px solid var(--zaha-blue-soft);
    background: linear-gradient(120deg, var(--zaha-blue-light), #fff);
    box-shadow: var(--zaha-shadow);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    border-left: 5px solid var(--zaha-blue);
}

.dashboard-metric span {
    text-transform: uppercase;
    color: var(--zaha-muted);
    font-weight: 600;
    font-size: 0.75rem;
}

.dashboard-metric-value {
    font-size: 2rem;
    margin-top: 0.5rem;
    font-weight: 700;
}

.badge-meter-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(25, 135, 84, 0.18));
    color: var(--bs-primary);
}

/* Responsive tables ---------------------------------------------------- */
.responsive-table {
    --table-border-color: var(--responsive-card-border);
    border-color: var(--table-border-color);
}

.responsive-table th {
    white-space: nowrap;
    color: var(--responsive-muted);
    font-weight: 600;
    letter-spacing: 0.015em;
}

.responsive-table td {
    vertical-align: middle;
}

.table-responsive {
    --bs-table-bg: transparent;
}

.responsive-table .btn-outline-primary,
.responsive-table .btn-outline-success {
    border-width: 2px;
}

.responsive-table .btn-outline-success {
    color: var(--bs-success);
    border-color: rgba(25, 135, 84, 0.4);
}

.responsive-table .btn-outline-success:hover,
.responsive-table .btn-outline-success:focus {
    color: #fff;
    background-color: var(--bs-success);
}

@media (max-width: 767.98px) {
    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody tr {
        display: block;
        margin-bottom: var(--responsive-row-gap);
        border: 1px solid var(--responsive-card-border);
        border-radius: 1rem;
        background-color: var(--responsive-card-bg);
        box-shadow: var(--responsive-card-shadow);
        padding: 0.75rem 1rem;
    }

    .responsive-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        gap: 1.25rem;
        padding: 0.35rem 0;
        border: none;
        font-size: 0.95rem;
    }

    [dir='rtl'] .responsive-table tbody td {
        text-align: right;
    }

    .responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--responsive-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .responsive-table tbody td .btn {
        width: 100%;
        justify-content: center;
    }

    .responsive-table tbody td .badge {
        align-self: flex-start;
    }
}

/* Badge helpers -------------------------------------------------------- */
.badge.text-bg-light {
    background-color: rgba(13, 110, 253, 0.12) !important;
    color: var(--bs-primary, #0d6efd);
    border: 1px solid rgba(13, 110, 253, 0.16);
}

html[data-bs-theme='dark'] .badge.text-bg-light {
    background-color: rgba(13, 110, 253, 0.18) !important;
    border-color: rgba(13, 110, 253, 0.28);
    color: #dbe7ff;
}

.badge.text-bg-primary-subtle {
    color: var(--bs-primary, #0d6efd);
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.16);
}

html[data-bs-theme='dark'] .badge.text-bg-primary-subtle {
    color: #f1f5ff;
    background-color: rgba(13, 110, 253, 0.22);
    border-color: rgba(13, 110, 253, 0.35);
}

/* Opportunities -------------------------------------------------------- */
.volunteer-opportunities-hero {
    background: radial-gradient(circle at top right, rgba(13, 110, 253, 0.08), transparent 50%),
        radial-gradient(circle at bottom left, rgba(25, 135, 84, 0.08), transparent 55%);
}

.volunteer-opportunities-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.volunteer-opportunities-hero__chips span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.08);
    font-size: 0.85rem;
}

.volunteer-opportunity-card {
    border: 1px solid var(--responsive-card-border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(15, 36, 84, 0.08);
}

html[data-bs-theme='dark'] .volunteer-opportunity-card {
    background: linear-gradient(180deg, rgba(17, 24, 32, 0.95), rgba(17, 24, 32, 0.92));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.volunteer-opportunity-card__badge {
    font-size: 0.85rem;
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.12);
    width: fit-content;
}

.volunteer-opportunity-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin: 0;
}

.volunteer-opportunity-card__meta dt {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--responsive-muted);
    margin: 0 0 0.15rem;
}

.volunteer-opportunity-card__meta dd {
    margin: 0;
    font-weight: 600;
}

.volunteer-opportunity-card__meta i {
    margin-inline-end: 0.35rem;
}

.opportunity-card-new {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.opportunity-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Milestones & badges -------------------------------------------------- */
.next-milestone-box {
    display: flex;
    gap: 1.5rem;
    background: linear-gradient(135deg, #e9f2ff, #ffffff);
    border: 1px solid rgba(19, 102, 214, 0.15);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(19, 102, 214, 0.06);
    align-items: center;
}

.milestone-progress {
    flex-shrink: 0;
}

.progress-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(
        var(--accent, var(--zaha-blue)) calc(var(--percent, 0) * 1%),
        #e2e6f0 0
    );
}

.progress-circle[style*="--percent: 0"] {
    background: #e2e6f0;
}

.progress-circle::after {
    content: '';
    position: absolute;
    inset: 10px;
    background: #fff;
    border-radius: 50%;
}

.circle-text {
    position: absolute;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--zaha-blue);
    z-index: 1;
}

.milestone-info {
    flex: 1;
}

.milestone-label {
    font-size: 0.8rem;
    color: var(--zaha-muted);
    margin-bottom: 0.15rem;
}

.milestone-name {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.milestone-remaining {
    color: var(--zaha-blue);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.milestone-bar {
    width: 100%;
    height: 8px;
    border-radius: 20px;
    background: #e7ebf2;
    overflow: hidden;
    margin-bottom: 0.7rem;
}

.milestone-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--zaha-blue), #28c76f);
}

.milestone-message {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3a4750;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.4rem;
}

.badge-card {
    background: linear-gradient(180deg, #ffffff 65%, #f6f9ff);
    border-radius: 24px;
    padding: 1.8rem 1rem 1.3rem;
    text-align: center;
    box-shadow: 0 10px 28px rgba(19, 102, 214, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.badge-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(19, 102, 214, 0.16);
}

.badge-card.earned {
    border: 2px solid var(--zaha-blue);
    background: linear-gradient(180deg, #ffffff 60%, #e8f2ff);
}

.badge-card.locked {
    opacity: 0.6;
}

.badge-icon {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 20%, #fff 10%, #ffe9a8 55%, #f3c95a);
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.7),
        inset 0 -3px 4px rgba(0, 0, 0, 0.06),
        0 4px 10px rgba(0, 0, 0, 0.08);
}

.badge-icon img,
.badge-icon i {
    width: 54px;
    height: 54px;
    font-size: 2.6rem;
    opacity: 0.95;
}

.badge-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--zaha-text-dark);
    margin-bottom: 0.15rem;
}

.badge-description {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--zaha-muted);
    margin-bottom: 0.65rem;
}

.badge-status {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 0.7rem;
}

.earned-text {
    color: #28a745;
}

.locked-text {
    color: #6d6d6d;
}

.badge-progress {
    width: 85%;
    height: 5px;
    background: #e6e6e6;
    border-radius: 999px;
    overflow: hidden;
    margin: 0.25rem auto 0.55rem;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--zaha-blue), #58c0ff);
}

.badge-hours {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--zaha-muted);
}

@media (max-width: 500px) {
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Floating profile bubble --------------------------------------------- */
.bubble {
    position: fixed;
    bottom: 1.5rem;
    inset-inline-end: 1.5rem;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    z-index: 2000;
    cursor: grab;
    transition: 0.3s;
    animation: floatUpDown 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.bubble.success { background: #28a745; }
.bubble.warning { background: #ffc107; }
.bubble.amber { background: #ffa726; }
.bubble.danger { background: #dc3545; }

@keyframes floatUpDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.bubble-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.bubble.open {
    width: 320px;
    height: auto;
    border-radius: 20px;
    padding: 20px;
    background: var(--responsive-card-bg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
    animation: none;
    cursor: default;
    color: inherit;
}

.bubble.open .bubble-circle {
    display: none;
}

.bubble-panel {
    display: none;
    color: var(--bs-body-color);
}

.bubble.open .bubble-panel {
    display: block;
}

.bubble-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--responsive-muted);
    margin-bottom: 0.25rem;
}

.bubble-headline {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.bubble-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}

@media (max-width: 991.98px) {
    .bubble {
        inset-inline: 1rem;
    }

    .bubble.open {
        width: calc(100% - 2rem);
    }
}


.level-icon-circle {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.level-badge {
    font-weight: 700;
    padding: .42rem .72rem;
    border-radius: 999px;
}

.next-milestone-box {
    border-radius: 1.1rem;
    background: linear-gradient(130deg, #f8fbff 0%, #eef6ff 100%);
    border: 1px solid rgba(19, 102, 214, 0.15);
    box-shadow: 0 12px 24px rgba(16, 37, 66, 0.08);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.badge-card {
    border: 1px solid rgba(16,37,66,.08);
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(16,37,66,.08);
}

.badge-card.locked {
    background: linear-gradient(180deg, #fffdf5 0%, #fff8e6 100%);
}

.applications-empty-state .empty-state-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 110, 253, 0.12);
    color: var(--zaha-blue);
    font-size: 2rem;
}
