:root {
    --bg-primary: #0b0d16;
    --bg-secondary: #14182b;
    --accent-1: #ff2d75;
    --accent-2: #6c5ce7;
    --accent-3: #00e0ff;
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(20, 24, 43, 0.82);
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 24px 65px rgba(0, 0, 0, 0.65);
    --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.35);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --transition-fast: 160ms ease;
    --transition-slow: 420ms ease;
    --blur-strength: 25px;
}

/* GLOBAL RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(255, 45, 117, 0.55), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(108, 92, 231, 0.55), transparent 52%),
        radial-gradient(circle at 50% 80%, rgba(0, 224, 255, 0.45), transparent 50%),
        var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding: clamp(18px, 2.5vw, 52px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: -20vh;
    z-index: -2;
    pointer-events: none;
    background: conic-gradient(from 45deg, rgba(255, 45, 117, 0.22), rgba(108, 92, 231, 0.18), rgba(0, 224, 255, 0.18), rgba(255, 45, 117, 0.22));
    animation: swirl 28s linear infinite;
    filter: blur(160px);
}

body::after {
    animation-direction: reverse;
    opacity: 0.65;
}

canvas.background-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.06;
    pointer-events: none;
}

main,
.container {
    width: min(1080px, 100%);
    backdrop-filter: blur(var(--blur-strength));
    background: linear-gradient(120deg, rgba(17, 21, 35, 0.85), rgba(12, 16, 27, 0.78));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: clamp(28px, 4vw, 48px);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 45, 117, 0.18), transparent 55%),
        radial-gradient(circle at 80% 15%, rgba(108, 92, 231, 0.18), transparent 50%);
    opacity: 0.65;
    mix-blend-mode: screen;
}

/* HEADER */
.header {
    position: relative;
    text-align: center;
    margin-bottom: clamp(28px, 3vw, 48px);
}

.header h1,
.header h2 {
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(120deg, #fff, rgba(0, 224, 255, 0.85), rgba(255, 45, 117, 0.9));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 18px 35px rgba(255, 45, 117, 0.35));
    animation: titleGlow 3.2s ease-in-out infinite;
}

.header p {
    margin-top: 12px;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.section-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-label::before {
    content: "";
    width: 42px;
    height: 2px;
    background: linear-gradient(120deg, var(--accent-1), var(--accent-3));
    border-radius: 999px;
}

/* FORM CONTAINER */
.form-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.4);
}

.form-card,
.card,
.table-wrapper,
.summary-badges {
    position: relative;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(17, 21, 35, 0.9), rgba(14, 17, 28, 0.82));
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: clamp(22px, 3vw, 32px);
    margin-bottom: clamp(18px, 3vw, 32px);
    overflow: hidden;
    transition: transform var(--transition-slow), border-color var(--transition-fast), box-shadow var(--transition-slow);
}

.card::before,
.form-card::before,
.table-wrapper::before,
.summary-badges::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 45, 117, 0.18), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.card:hover,
.form-card:hover,
.table-wrapper:hover,
.summary-badges:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255, 45, 117, 0.35);
    box-shadow: 0 30px 55px rgba(255, 45, 117, 0.22);
}

.card:hover::before,
.form-card:hover::before,
.table-wrapper:hover::before,
.summary-badges:hover::before {
    opacity: 0.9;
}

.summary-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: clamp(12px, 2vw, 22px);
}

.summary-badge {
    position: relative;
    padding: clamp(18px, 2.4vw, 26px);
    border-radius: var(--radius-sm);
    background: radial-gradient(circle at 20% -20%, rgba(255, 45, 117, 0.32), transparent 65%),
        rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.summary-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 120%, rgba(0, 224, 255, 0.22), transparent 65%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.summary-badge:hover::after {
    opacity: 1;
}

.summary-badge h3 {
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 14px;
}

.summary-badge .metric {
    font-size: clamp(1.8rem, 3.6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
}

.summary-badge .trend {
    margin-top: 10px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 224, 255, 0.12);
    color: rgba(0, 224, 255, 0.85);
}

/* FORM STYLES */
.form-card form,
form.standard-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: clamp(15px, 2.4vw, 28px);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.78);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(0, 224, 255, 0.65);
    box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.28);
    transform: translateY(-2px);
}

.form-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.actions,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

button,
.btn,
input[type="submit"],
input[type="button"],
a.button-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(120deg, rgba(255, 45, 117, 0.95), rgba(108, 92, 231, 0.95));
    box-shadow: 0 18px 35px rgba(255, 45, 117, 0.22);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
    text-decoration: none;
    overflow: hidden;
}

button::before,
.btn::before,
a.button-link::before,
input[type="submit"]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

button:hover,
.btn:hover,
a.button-link:hover,
input[type="submit"]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 28px 40px rgba(255, 45, 117, 0.28);
}

button:hover::before,
.btn:hover::before,
a.button-link:hover::before,
input[type="submit"]:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: linear-gradient(120deg, rgba(108, 92, 231, 0.85), rgba(0, 224, 255, 0.72));
    box-shadow: 0 18px 35px rgba(108, 92, 231, 0.24);
}

.btn-danger {
    background: linear-gradient(120deg, rgba(255, 71, 87, 0.95), rgba(231, 76, 60, 0.85));
    box-shadow: 0 18px 35px rgba(231, 76, 60, 0.28);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.85);
    box-shadow: none;
}

/* FILTER BUTTONS */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(45, 45, 45, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    user-select: none;
}

.filter-btn:hover {
    background: rgba(60, 60, 60, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.filter-btn:active {
    transform: translateY(0);
}

/* DATA CONTROLS */
.table-controls,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: clamp(12px, 2vw, 18px);
    margin-bottom: clamp(16px, 2vw, 24px);
}

.search-group {
    position: relative;
    flex: 1 1 280px;
}

.search-group input {
    padding-right: 46px;
}

.search-group::after {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(0, 224, 255, 0.12);
    color: rgba(0, 224, 255, 0.75);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* TABLE VIEW */
.table-wrapper {
    overflow: hidden;
    padding: 0;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    backdrop-filter: blur(8px);
}

.table-wrapper thead th {
    text-align: left;
    padding: 18px 22px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.82rem;
    background: linear-gradient(120deg, rgba(255, 45, 117, 0.28), rgba(108, 92, 231, 0.28));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.table-wrapper tbody td {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
}

.table-wrapper tbody tr {
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.table-wrapper tbody tr:hover {
    background-color: rgba(0, 224, 255, 0.06);
    transform: translateX(4px);
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(108, 92, 231, 0.2);
    color: rgba(108, 92, 231, 0.9);
    font-size: 0.82rem;
}

.table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: rgba(255, 255, 255, 0.6);
    display: grid;
    gap: 16px;
}

.empty-state svg {
    width: 72px;
    margin: 0 auto;
    opacity: 0.55;
}

/* CARD VIEW (MOBILE) */
.member-cards {
    display: none;
    gap: 18px;
}

.member-card {
    border-radius: var(--radius-sm);
    padding: clamp(18px, 3vw, 28px);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(108, 92, 231, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
    display: grid;
    gap: 10px;
    position: relative;
}

.member-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent) border-box;
    mask: linear-gradient(#fff, #fff) padding-box, linear-gradient(#fff, #fff);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.member-card:hover::after {
    opacity: 0.8;
}

.member-card h3 {
    font-size: 1.15rem;
    letter-spacing: 0.04em;
}

.member-card .meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.member-card .actions {
    margin-top: 12px;
}

.badge-fee {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 45, 117, 0.18);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
}

.text-muted {
    color: var(--text-muted) !important;
}

.link,
a.link {
    color: rgba(0, 224, 255, 0.85);
    text-decoration: none;
    position: relative;
}

a.link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-fast);
}

a.link:hover::after {
    transform: scaleX(1);
}

.toast {
    position: fixed;
    right: clamp(18px, 3vw, 28px);
    top: clamp(18px, 3vw, 32px);
    padding: 16px 24px;
    border-radius: 12px;
    background: rgba(12, 16, 27, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88);
    animation: slideDown 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar {
    position: relative;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-bar span {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 45, 117, 0.92), rgba(0, 224, 255, 0.92));
    animation: progress 4.5s linear forwards;
}

.floating-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-orbs span {
    position: absolute;
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 45, 117, 0.55));
    border-radius: 50%;
    opacity: 0.6;
    animation: drift var(--duration) linear infinite;
}

footer {
    margin-top: clamp(24px, 3vw, 40px);
    text-align: center;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.82rem;
}

footer a {
    color: rgba(0, 224, 255, 0.75);
}

@media (max-width: 960px) {
    .table-wrapper {
        border-radius: var(--radius-sm);
        overflow-x: auto;
    }

    .table-wrapper table {
        min-width: 640px;
    }
}

@media (max-width: 768px) {
    body {
        padding: clamp(16px, 4vw, 28px);
        align-items: stretch;
    }

    .container,
    main {
        padding: clamp(22px, 5vw, 34px);
    }

    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .table-wrapper {
        display: none;
    }

    .member-cards {
        display: grid;
    }
    
    /* Filter buttons mobile responsive */
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        flex: 1 1 auto;
        min-width: 120px;
    }
}

@media (max-width: 520px) {

    .actions,
    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    button,
    .btn,
    a.button-link,
    input[type="submit"],
    input[type="button"] {
        width: 100%;
    }
    
    /* Filter buttons on small mobile */
    .filter-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        width: 100%;
        min-width: unset;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@keyframes swirl {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.12);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes titleGlow {

    0%,
    100% {
        filter: drop-shadow(0 18px 35px rgba(255, 45, 117, 0.35));
    }

    50% {
        filter: drop-shadow(0 18px 45px rgba(0, 224, 255, 0.45));
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes progress {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0%);
    }
}

@keyframes drift {
    0% {
        transform: translateY(0) scale(0.85);
        opacity: 0;
    }

    20% {
        opacity: 0.45;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-220vh) scale(1.2);
        opacity: 0;
    }
}