/* Design Tokens */
:root {
    --bg-top: #f4f8ff;
    --bg-mid: #e9f1ff;
    --bg-bottom: #dfe7f4;
    --ink-strong: #172033;
    --ink-main: #24324a;
    --ink-soft: #5d6c86;
    --ink-muted: #7786a2;
    --line-soft: rgba(255, 255, 255, 0.34);
    --line-strong: rgba(255, 255, 255, 0.52);
    --glass-fill: rgba(255, 255, 255, 0.42);
    --glass-fill-strong: rgba(255, 255, 255, 0.62);
    --glass-fill-deep: rgba(244, 248, 255, 0.68);
    --nav-fill: rgba(255, 255, 255, 0.3);
    --primary: #2e68ff;
    --primary-strong: #1f54e6;
    --primary-soft: rgba(46, 104, 255, 0.14);
    --success: #1d8f68;
    --danger: #cf425f;
    --neutral-button: #666666;
    --shadow-xl: 0 28px 70px rgba(23, 33, 58, 0.16);
    --shadow-lg: 0 22px 44px rgba(37, 52, 84, 0.14);
    --shadow-md: 0 14px 32px rgba(46, 61, 94, 0.1);
    --shadow-sm: 0 8px 18px rgba(46, 61, 94, 0.08);
    --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    --blur-strong: 22px;
    --blur-soft: 14px;
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 18px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 40px;
    --space-7: 56px;
    --transition-fast: 180ms ease;
    --transition-base: 260ms ease;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    position: relative;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    color: var(--ink-main);
    background:
        radial-gradient(circle at 12% 18%, rgba(116, 164, 255, 0.28), transparent 26%),
        radial-gradient(circle at 85% 12%, rgba(164, 214, 255, 0.34), transparent 24%),
        radial-gradient(circle at 78% 78%, rgba(165, 183, 255, 0.24), transparent 28%),
        linear-gradient(160deg, var(--bg-top) 0%, var(--bg-mid) 46%, var(--bg-bottom) 100%);
    padding: var(--space-5);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    filter: blur(10px);
}

body::before {
    width: 360px;
    height: 360px;
    top: -110px;
    left: -90px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.08) 62%, transparent 76%);
}

body::after {
    width: 420px;
    height: 420px;
    right: -140px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(114, 163, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 58%, transparent 76%);
}

a {
    color: var(--primary-strong);
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

.error {
    color: var(--danger);
    font-weight: 600;
    font-size: 14px;
}

.success {
    text-align: center;
    color: var(--success);
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(244, 248, 255, 0.36) 100%);
    box-shadow: var(--highlight), var(--shadow-xl);
    backdrop-filter: blur(var(--blur-strong));
    -webkit-backdrop-filter: blur(var(--blur-strong));
}

.container::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius-xl) - 1px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08) 48%, rgba(141, 174, 255, 0.08));
    pointer-events: none;
}

.header {
    text-align: center;
    margin-bottom: var(--space-5);
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--ink-strong);
    margin-bottom: var(--space-2);
    font-weight: 700;
    text-wrap: balance;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

nav {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    text-align: center;
    margin-bottom: var(--space-6);
    padding: 14px;
    font-size: 0;
    border: 1px solid var(--line-soft);
    border-radius: calc(var(--radius-lg) + 6px);
    background: linear-gradient(180deg, var(--nav-fill), rgba(255, 255, 255, 0.18));
    box-shadow: var(--highlight), var(--shadow-sm);
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
}

nav a {
    position: relative;
    color: var(--ink-main);
    margin: 0;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 999px;
    transition: color var(--transition-base), background-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

nav a:hover {
    color: var(--ink-strong);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: var(--highlight), 0 10px 24px rgba(42, 60, 102, 0.1);
    transform: translateY(-1px);
}

nav a.active {
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #5b8cff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 28px rgba(46, 104, 255, 0.24);
}

/* Shared Glass Surfaces */
.form-container,
.content,
.message-box,
.instructions {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, var(--glass-fill-strong) 0%, var(--glass-fill) 100%);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
    border: 1px solid var(--line-soft);
    box-shadow: var(--highlight), var(--shadow-md);
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
}

.form-container::before,
.content::before,
.message-box::before,
.instructions::before,
.profile-display::before,
.table-wrapper::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08) 55%, rgba(108, 148, 255, 0.05));
    pointer-events: none;
}

.message-box,
.instructions {
    border-color: var(--line-strong);
}

.narrow-form {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.center-note {
    text-align: center;
}

.center-note-tight {
    text-align: center;
    margin-bottom: var(--space-1);
    color: var(--ink-main);
}

.center-note-spaced {
    text-align: center;
    margin-bottom: var(--space-4);
    color: var(--ink-soft);
}

.top-align-cell {
    vertical-align: top;
    padding-top: 14px;
}

.radio-stack {
    display: block;
}

.radio-stack label {
    display: block;
    margin-bottom: 10px;
}

.radio-stack label:last-child {
    margin-bottom: 0;
}

.no-border-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.normal-note {
    font-style: normal;
    margin-top: 14px;
}

.compact-footer-link {
    margin-top: 0;
}

.form-title {
    text-align: center;
    font-size: clamp(1.5rem, 2vw, 1.95rem);
    color: var(--ink-strong);
    margin-bottom: var(--space-4);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.form-table {
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.form-table tr {
    height: 60px;
}

.form-table td {
    padding: 10px 8px;
}

.form-table td:first-child {
    text-align: right;
    padding-right: 22px;
    width: 35%;
    font-weight: 600;
    color: var(--ink-main);
}

.required::after {
    content: " *";
    color: var(--danger);
    font-weight: 700;
}

/* Form Controls */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(160, 179, 214, 0.45);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--ink-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 248, 255, 0.64));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 5px 12px rgba(66, 88, 130, 0.05);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base), transform var(--transition-base);
}

input::placeholder,
textarea::placeholder {
    color: #90a0bc;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(46, 104, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 0 0 4px rgba(46, 104, 255, 0.12), 0 10px 22px rgba(46, 104, 255, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.8));
    transform: translateY(-1px);
}

input[type="radio"] {
    margin-right: 7px;
    accent-color: var(--primary);
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(169, 184, 214, 0.4);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: background-color var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.radio-group label:hover {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(46, 104, 255, 0.24);
    transform: translateY(-1px);
}

/* Buttons */
.submit-container {
    text-align: center;
    margin-top: var(--space-5);
}

.submit-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, #6b93ff 100%);
    color: #ffffff;
    padding: 14px 30px;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 16px 30px rgba(46, 104, 255, 0.24);
    transition: transform var(--transition-base), box-shadow var(--transition-base), filter var(--transition-base), background var(--transition-base);
}

.submit-btn::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 42%);
    pointer-events: none;
}

.submit-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 20px 34px rgba(46, 104, 255, 0.28);
    filter: saturate(1.08);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 6px rgba(17, 39, 95, 0.18), 0 10px 20px rgba(46, 104, 255, 0.22);
}

.submit-btn:focus-visible,
.action-btn:focus-visible,
nav a:focus-visible,
.footer-link a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(46, 104, 255, 0.14), 0 0 0 1px rgba(46, 104, 255, 0.34);
}

.submit-btn-link {
    display: inline-flex;
    text-align: center;
    text-decoration: none;
}

.submit-btn-cancel {
    margin-left: 10px;
    background: linear-gradient(135deg, #687288 0%, #555e73 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 14px 24px rgba(85, 94, 115, 0.2);
}

.submit-btn-cancel:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 18px 28px rgba(85, 94, 115, 0.24);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #20a97c 0%, #4bc792 100%);
    color: #ffffff;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 20px rgba(32, 169, 124, 0.18);
    transition: transform var(--transition-base), box-shadow var(--transition-base), filter var(--transition-base);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 24px rgba(32, 169, 124, 0.22);
    filter: saturate(1.06);
}

/* Data Presentation */
.table-wrapper {
    position: relative;
    margin-top: var(--space-4);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--glass-fill-strong), rgba(245, 248, 255, 0.54));
    border: 1px solid var(--line-soft);
    box-shadow: var(--highlight), var(--shadow-md);
    overflow: hidden;
}

.admin-list-table {
    width: 100%;
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0;
    background-color: transparent;
    table-layout: fixed;
    font-size: 14px;
}

.admin-list-table th,
.admin-list-table td {
    border-bottom: 1px solid rgba(186, 198, 224, 0.35);
    padding: 14px 12px;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    color: var(--ink-main);
}

.admin-list-table th {
    background: rgba(255, 255, 255, 0.42);
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-strong);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.admin-list-table td {
    background: rgba(255, 255, 255, 0.18);
}

.admin-list-table tr:hover td {
    background: rgba(255, 255, 255, 0.32);
}

.admin-list-table tr:last-child td {
    border-bottom: none;
}

.admin-list-table th a {
    color: inherit;
    font-weight: inherit;
}

.admin-list-table th a:hover {
    color: var(--primary-strong);
}

.required-note {
    text-align: center;
    color: var(--ink-soft);
    font-size: 14px;
    margin-top: var(--space-4);
    font-style: normal;
}

.content h2 {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    margin-bottom: var(--space-3);
    color: var(--ink-strong);
    letter-spacing: -0.03em;
}

.content p {
    margin-bottom: var(--space-3);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-main);
}

.instructions ul {
    margin-left: 20px;
    color: var(--ink-main);
}

.instructions li {
    margin-bottom: 12px;
    line-height: 1.65;
}

.footer-link {
    text-align: center;
    margin-top: var(--space-4);
}

.footer-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    color: var(--ink-main);
    text-decoration: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
    transition: transform var(--transition-base), background-color var(--transition-base), box-shadow var(--transition-base);
}

.footer-link a:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 10px 20px rgba(42, 60, 102, 0.08);
}

.profile-display {
    position: relative;
    background: linear-gradient(180deg, var(--glass-fill-strong), rgba(245, 248, 255, 0.56));
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    border: 1px solid var(--line-soft);
    box-shadow: var(--highlight), var(--shadow-md);
    overflow: hidden;
}

.profile-table {
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.profile-table tr {
    height: 52px;
    border-bottom: 1px solid rgba(198, 208, 230, 0.42);
}

.profile-table tr:last-child {
    border-bottom: none;
}

.profile-label {
    text-align: right;
    padding-right: 24px;
    width: 35%;
    font-weight: 600;
    color: var(--ink-main);
    vertical-align: middle;
}

.profile-value {
    padding-left: 10px;
    color: var(--ink-strong);
    font-size: 15px;
    vertical-align: middle;
}

/* Utility Classes */
.inline-form {
    display: inline;
}

.error-block {
    margin-bottom: 18px;
}

.submit-container-tight {
    margin-top: 20px;
}

.media-center {
    text-align: center;
    margin-bottom: 20px;
}

.feature-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(186, 198, 224, 0.7);
    box-shadow: var(--shadow-sm);
}

/* Decorative Footer */
.wave-footer {
    position: relative;
    width: 100%;
    height: 160px;
    margin-top: var(--space-6);
    overflow: hidden;
    border-radius: 28px 28px 0 0;
    opacity: 0.92;
}

.wave {
    position: absolute;
    width: 200%;
    height: 100%;
    left: 0;
    filter: blur(0.5px);
}

.wave1 {
    background: linear-gradient(90deg, rgba(84, 145, 255, 0.62), rgba(137, 201, 255, 0.5));
    opacity: 0.8;
    bottom: 0;
    border-radius: 50% 50% 0 0 / 80px 80px 0 0;
}

.wave2 {
    background: linear-gradient(90deg, rgba(56, 110, 224, 0.5), rgba(104, 177, 255, 0.38));
    opacity: 0.58;
    bottom: 10px;
    border-radius: 50% 50% 0 0 / 60px 60px 0 0;
}

.wave3 {
    background: linear-gradient(90deg, rgba(39, 80, 171, 0.34), rgba(84, 134, 222, 0.22));
    opacity: 0.44;
    bottom: 20px;
    border-radius: 50% 50% 0 0 / 40px 40px 0 0;
}

/* Responsive */
@media (max-width: 700px) {
    body {
        padding: 14px;
    }

    .container {
        padding: var(--space-4);
        border-radius: 24px;
    }

    .header h1 {
        font-size: 36px;
    }

    nav {
        justify-content: flex-start;
        gap: 8px;
        padding: 10px;
        margin-bottom: var(--space-5);
    }

    nav a {
        display: inline-flex;
        margin: 0;
        padding: 10px 14px;
        font-size: 14px;
    }

    .form-container,
    .content,
    .message-box,
    .instructions,
    .profile-display {
        padding: var(--space-4);
    }

    .form-table td,
    .form-table td:first-child {
        display: block;
        width: 100%;
        text-align: left;
        padding-right: 8px;
    }

    .form-table tr {
        height: auto;
        display: block;
        margin-bottom: 14px;
    }

    .narrow-form {
        max-width: 100%;
    }

    .profile-label,
    .profile-value {
        display: block;
        width: 100%;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }

    .profile-table tr {
        display: block;
        height: auto;
        padding: 10px 0;
    }

    .table-wrapper {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 16px;
    }

    .header {
        margin-bottom: var(--space-4);
    }

    .header h1 {
        font-size: 30px;
    }

    .submit-btn {
        width: 100%;
    }

    .radio-group {
        flex-direction: column;
    }
}
