:root {
    --purple: #382988;
    --purple-dark: #2d2070;
    --bg: #f6f6f6;
    --text: #1a1a1a;
    --label: #3a3a3a;
    --muted: #6d6d6d;
    --border: #d5d5d5;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body.registration-page {
    background-color: #f2eefa;
    background-image: url("../img/index-bg-printing.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
}

.reg-card {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(20, 20, 20, 0.08);
    overflow: hidden;
}

.reg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 14px 22px;
    background: var(--purple);
    color: #fff;
}

.brand {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.reg-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.25;
    text-align: right;
}

.reg-body {
    padding: 22px 26px 26px;
}

.access-label {
    margin: 4px 0 10px;
    text-align: center;
    color: #4a4a4a;
    font-size: 13.5px;
}

.access-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.access-prefix,
.access-suffix {
    color: #111;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.access-input {
    width: 168px;
    flex: 0 0 168px;
}

.access-error {
    margin: -8px 0 14px;
    text-align: center;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
}

.field > label:not(.terms) {
    display: block;
    margin-bottom: 6px;
    color: var(--label);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.2;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.field input::placeholder {
    color: #a3a3a3;
}

.field input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 2px rgba(56, 41, 136, 0.15);
}

.field.is-invalid input {
    border-color: var(--danger);
}

.field-error {
    min-height: 0;
    margin: 4px 0 0;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.3;
}

.field-error:empty {
    display: none;
}

.terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 2px;
    color: #333;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.35;
}

.terms label {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 400;
    cursor: pointer;
}

.terms input {
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    accent-color: var(--purple);
    flex: 0 0 auto;
}

.terms-link {
    padding: 0;
    border: 0;
    background: none;
    color: #111;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.terms-link:hover {
    color: var(--purple);
}

.submit-btn {
    width: 100%;
    height: 40px;
    margin-top: 16px;
    border: 0;
    border-radius: 6px;
    background: var(--purple);
    color: #fff;
    font: inherit;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
}

.submit-btn:hover {
    background: var(--purple-dark);
}

.submit-btn:disabled {
    opacity: 0.72;
    cursor: default;
}

.form-alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fdecea;
    color: var(--danger);
    font-size: 13.5px;
}

.form-alert:empty {
    display: none;
}

.success-panel {
    padding: 54px 32px 60px;
    text-align: center;
}

.success-panel h2 {
    margin: 0 0 10px;
    color: var(--purple);
    font-size: 22px;
    font-weight: 700;
}

.success-panel p {
    margin: 0;
    color: #444;
    font-size: 15px;
    line-height: 1.5;
}

.success-panel strong {
    color: #111;
}

.list-page {
    padding: 32px 20px 48px;
}

.list-wrap {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.list-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(20, 20, 20, 0.08);
    overflow: hidden;
}

.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.list-toolbar p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.search-input {
    width: min(280px, 100%);
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 2px rgba(56, 41, 136, 0.15);
}

.logout-link {
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
}

.logout-link:hover {
    color: #fff;
    text-decoration: underline;
}

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

.member-table {
    width: 100%;
    margin: 0;
    font-size: 14px;
}

.member-table thead th {
    background: #f7f6fb;
    color: #3a3a3a;
    font-weight: 600;
    white-space: nowrap;
}

.member-table td,
.member-table th {
    padding: 12px 14px;
    vertical-align: top;
}

.member-table a {
    color: var(--purple);
    text-decoration: none;
}

.member-table a:hover {
    text-decoration: underline;
}

.slug {
    font-weight: 600;
    white-space: nowrap;
}

.empty-row td {
    padding: 36px 16px;
    color: var(--muted);
    text-align: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.gate-error {
    margin: 0 0 12px;
    color: var(--danger);
    font-size: 13.5px;
}

@media (max-width: 560px) {
    .reg-header {
        align-items: flex-start;
    }

    .brand {
        font-size: 20px;
    }

    .reg-title {
        font-size: 12.5px;
    }

    .reg-body {
        padding: 18px 16px 20px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .access-row {
        flex-wrap: wrap;
    }

    .access-input {
        width: 100%;
        flex-basis: 100%;
    }

    .list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}
