:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #111111;
    --muted: #6b7280;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --primary: #111827;
    --primary-hover: #0b1220;
    --danger: #b42318;
    --success-bg: #f3fbf6;
    --success-text: #1f6f43;
    --danger-bg: #fff7f7;
    --danger-text: #a92d2d;
    --radius: 16px;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.minimal-shell {
    min-height: 100vh;
    padding: 32px 20px;
}

.register-shell {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-card,
.card,
.panel-card,
.glass-card {
    width: 100%;
    max-width: 520px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
}

.register-card {
    padding: 36px;
}

.register-header {
    margin-bottom: 26px;
}

.register-brand {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 14px;
}

.register-title {
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
    font-weight: 800;
}

.register-subtitle,
.text-secondary,
.text-muted-soft,
.small-dn,
.empty-state {
    color: var(--muted) !important;
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
}

.register-form {
    display: grid;
    gap: 18px;
}

.form-row {
    display: grid;
    gap: 8px;
}

.card-body {
    padding: 1.5rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text);
    margin-bottom: 0;
}

.form-control,
.form-control:focus {
    background: #fff;
    border: 1px solid var(--border-strong);
    color: var(--text);
    min-height: 56px;
    border-radius: 14px;
    box-shadow: none;
    padding: 0.9rem 1rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #9ca3af;
}

.form-control::placeholder {
    color: #9ca3af;
}

.register-submit,
.btn {
    min-height: 56px;
    border-radius: 14px;
    font-weight: 700;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.alert {
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 14px 16px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.alert-secondary {
    background: #fafafa;
    color: var(--muted);
}

.flash-stack {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 18px;
}

.table-wrap {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.table {
    margin-bottom: 0;
    --bs-table-bg: #fff;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
}

.table thead th {
    background: #fafafa;
    color: #4b5563;
    font-size: .9rem;
    font-weight: 700;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.code-pill {
    display: inline-block;
    padding: .35rem .6rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafafa;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .9rem;
}

@media (max-width: 576px) {
    .minimal-shell {
        padding: 18px 14px;
    }

    .register-shell {
        min-height: calc(100vh - 36px);
        align-items: flex-start;
        padding-top: 14px;
    }

    .register-card {
        padding: 22px;
        border-radius: 18px;
    }

    .register-title {
        font-size: 1.9rem;
    }

    .form-control,
    .register-submit,
    .btn {
        min-height: 52px;
    }
}
