body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.login-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 440px;
    max-width: 100%;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: var(--fs-14);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: var(--fs-16);
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--skin-accent);
    box-shadow: 0 0 0 3px var(--skin-accent-soft);
}

.remember-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 12px 0;
    box-sizing: border-box;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0;
    font-size: var(--fs-14);
    line-height: 1.25;
    color: #444;
}

.remember-label input {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    width: 1.125em;
    height: 1.125em;
    cursor: pointer;
}

/* Register panel: company admin checkbox */
.reg-admin-checkbox.admin-checkbox-row,
.admin-checkbox-row {
    display: flex;
    align-items: center;
}
.reg-admin-checkbox {
    margin-bottom: 16px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    box-sizing: border-box;
}
.admin-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    line-height: 1;
    margin-bottom: 0;
    font-size: var(--fs-14);
    color: #333;
    font-weight: 600;
}
.admin-checkbox-label input[type="checkbox"] {
    margin: 0;
    padding: 0;
    vertical-align: middle;
    flex: 0 0 auto;
    width: 1.125em;
    height: 1.125em;
    cursor: pointer;
}
.admin-checkbox-label span {
    display: inline-block;
    line-height: 1;
}

.btn-login {
    background: linear-gradient(135deg, var(--skin-accent) 0%, var(--skin-accent-600) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: var(--fs-16);
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--skin-accent-shadow);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: var(--fs-14);
    border: none;
}

.alert-danger  { background-color: #f8d7da; color: #721c24; }
.alert-warning { background-color: #fff3cd; color: #856404; }
.alert-success { background-color: #d1e7dd; color: #0f5132; }
.alert-info    { background-color: #d0ebff; color: #0c3f6e; }

.loading { display: none; }
.loading.is-visible { display: inline-block; }

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── auth tabs ── */
.auth-tabs {
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid #e0e0e0;
    margin: 0 -24px 20px;
    padding: 0 24px;
    gap: 4px;
}

.auth-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 16px;
    font-size: var(--fs-14);
    font-weight: 600;
    color: #888;
    cursor: pointer;
    margin-bottom: -1px;
    border-radius: 0;
    transition: color 0.2s, border-color 0.2s;
}

.auth-tab-btn.active {
    color: var(--skin-accent);
    border-bottom-color: var(--skin-accent);
}

.auth-tab-btn:hover:not(.active) { color: #555; }

/* ── invite code success banner ── */
.invite-banner {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.invite-banner .invite-label {
    font-size: var(--fs-12);
    font-weight: 700;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.invite-code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: var(--mono);
    font-size: var(--fs-16);
    font-weight: 700;
    color: #166534;
    letter-spacing: 0.06em;
    word-break: break-all;
}

.btn-copy {
    background: none;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: var(--fs-12);
    font-weight: 600;
    color: #166534;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-copy:hover { background: #dcfce7; }

.invite-hint {
    font-size: var(--fs-12);
    color: #166534;
    margin-top: 6px;
}

/* ── link to switch ── */
.auth-switch-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #888;
}

.auth-switch-link a {
    color: var(--skin-accent) !important;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch-link a:hover { text-decoration: underline; }

.invite-login-action {
    margin-top: 12px;
}

.is-hidden {
    display: none;
}
