:root {
    --qw-blue-dark: #1a3fc4;
    --qw-blue-light: #4fc3f7;
    --qw-text-dark: #1b1b2a;
    --qw-text-muted: #8a8fa3;
    --qw-border: #e3e6f0;
    --qw-field-bg: #f5f7fc;
    --qw-danger: #e5484d;
    --qw-warning: #f5a623;
    --qw-success: #2ecc71;
}

* { box-sizing: border-box; }

body.qw-auth {
    margin: 0;
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #eaf6ff 0%, #fdfaf0 45%, #eef3ff 100%);
    background-attachment: fixed;
}

.qw-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 22px;
    padding: 32px 26px 28px;
    box-shadow: 0 10px 40px rgba(26, 63, 196, 0.10);
}

.qw-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.qw-logo-mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--qw-blue-dark), var(--qw-blue-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
}

.qw-logo-text {
    font-weight: 800;
    font-size: 18px;
    color: var(--qw-text-dark);
}

.qw-logo-text span { color: var(--qw-blue-dark); }

.qw-tagline {
    text-align: center;
    font-size: 12px;
    color: var(--qw-text-muted);
    margin-bottom: 20px;
}

.qw-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--qw-text-dark);
    margin: 0 0 4px;
}

.qw-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--qw-text-muted);
    margin: 0 0 22px;
}

.qw-row {
    display: flex;
    gap: 10px;
}

.qw-field {
    position: relative;
    margin-bottom: 12px;
    flex: 1;
}

.qw-field .qw-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--qw-blue-dark);
    font-size: 15px;
    opacity: 0.75;
    pointer-events: none;
}

.qw-field input,
.qw-field select {
    width: 100%;
    padding: 13px 14px 13px 40px;
    border-radius: 12px;
    border: 1px solid var(--qw-border);
    background: var(--qw-field-bg);
    font-size: 14px;
    color: var(--qw-text-dark);
    outline: none;
    transition: border-color .15s, background .15s;
    appearance: none;
}

.qw-field select { padding-left: 40px; cursor: pointer; }

.qw-field input::placeholder { color: #a3a8bd; }

.qw-field input:focus,
.qw-field select:focus {
    border-color: var(--qw-blue-dark);
    background: #fff;
}

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

.qw-field-error {
    font-size: 11.5px;
    color: var(--qw-danger);
    margin: 2px 2px 8px;
    display: none;
}

.qw-field-error.show { display: block; }

.qw-toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--qw-text-muted);
    cursor: pointer;
    font-size: 15px;
}

.qw-strength-wrap {
    margin: -4px 0 14px;
}

.qw-strength-bar {
    height: 4px;
    border-radius: 4px;
    background: var(--qw-border);
    overflow: hidden;
}

.qw-strength-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: var(--qw-danger);
    transition: width .2s, background .2s;
}

.qw-strength-label {
    display: flex;
    justify-content: flex-end;
    font-size: 11px;
    color: var(--qw-text-muted);
    margin-top: 3px;
}

.qw-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--qw-blue-dark), var(--qw-blue-light));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .15s, transform .1s;
}

.qw-btn:hover { opacity: 0.92; }
.qw-btn:active { transform: scale(0.99); }
.qw-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.qw-btn-small {
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: #e7edff;
    color: var(--qw-blue-dark);
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    white-space: nowrap;
}

.qw-btn-small:disabled { opacity: 0.6; cursor: not-allowed; }

.qw-footer-link {
    text-align: center;
    font-size: 13px;
    color: var(--qw-text-muted);
    margin-top: 18px;
}

.qw-footer-link a {
    color: var(--qw-blue-dark);
    font-weight: 700;
    text-decoration: none;
}

.qw-alert {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    margin-bottom: 16px;
    display: none;
}

.qw-alert.show { display: block; }

.qw-alert-error {
    background: #fdecec;
    color: #c0292d;
    border: 1px solid #f6c7c8;
}

.qw-alert-success {
    background: #e8fbf0;
    color: #1f9d55;
    border: 1px solid #bdf0d3;
}

.qw-otp-row { display: flex; gap: 8px; }
.qw-otp-row .qw-field { margin-bottom: 12px; }

.qw-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -2px 0 16px;
    font-size: 12.5px;
    color: var(--qw-text-muted);
}

.qw-remember-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.qw-remember-row a {
    color: var(--qw-blue-dark);
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 380px) {
    .qw-row { flex-direction: column; gap: 0; }
}
