/* Login / register pages (masar-card.com style): no app bar, no drawer, one centred card */

body.mq-auth header,
body.mq-auth .account-sidebar,
body.mq-auth .account-sidebar-overlay,
body.mq-auth .mobile-search-overlay,
body.mq-auth .bonus-banner,
body.mq-auth .twofa-warning-banner,
body.mq-auth .site-footer,
body.mq-auth footer {
    display: none !important;
}

body.mq-auth,
body.mq-auth.mq-drawer-open {
    padding: 0 !important;
}

.mq-auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: var(--mq-bg, #002b38);
    color: var(--mq-text, #fff);
    font-family: 'Tajawal', 'Inter', sans-serif;
}

.mq-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 8px 0;
}

.mq-auth-card.is-wide {
    max-width: 480px;
}

.mq-auth-logo {
    display: block;
    width: 100px;
    height: 100px;
    margin: 0 auto 40px;
    border-radius: 50%;
    object-fit: cover;
}

.mq-auth-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 24px;
}

/* ---------- fields ---------- */
.mq-field {
    position: relative;
    margin-bottom: 8px;
}

.mq-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mq-field input {
    width: 100%;
    height: 56px;
    border: 0;
    outline: 0;
    border-radius: 28px;
    background: var(--mq-input, rgba(255, 255, 255, 0.08));
    color: var(--mq-text, #fff);
    font-family: inherit;
    font-size: 1rem;
    padding: 18px 24px 0;
    transition: background 0.2s, box-shadow 0.2s;
}

.mq-field.has-icon input {
    padding-inline-end: 56px;
}

.mq-field input:focus {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .mq-field input:focus {
    background: rgba(0, 0, 0, 0.09);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.mq-field label {
    position: absolute;
    inset-inline-start: 24px;
    top: 18px;
    font-size: 1rem;
    color: var(--mq-muted, rgba(255, 255, 255, 0.7));
    pointer-events: none;
    transform-origin: top start;
    transition: transform 0.2s, color 0.2s;
}

html[dir="rtl"] .mq-field label {
    transform-origin: top right;
}

.mq-field input:focus + label,
.mq-field input:not(:placeholder-shown) + label {
    transform: translateY(-12px) scale(0.75);
}

.mq-field .mq-ico {
    position: absolute;
    inset-inline-end: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mq-muted, rgba(255, 255, 255, 0.7));
    font-size: 1rem;
    background: none;
    border: 0;
    padding: 0;
    cursor: default;
}

.mq-field button.mq-ico {
    cursor: pointer;
}

/* ---------- password rules ---------- */
.mq-rules {
    list-style: disc;
    margin: 4px 0 12px;
    padding-inline-start: 36px;
    font-size: 0.75rem;
    color: var(--mq-muted, rgba(255, 255, 255, 0.7));
}

.mq-rules li {
    line-height: 1.7;
}

.mq-rules li.ok {
    color: var(--mq-green, #00e676);
}

/* ---------- buttons ---------- */
.mq-btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    margin: 16px 0 20px;
    border: 0;
    border-radius: 28px;
    background: linear-gradient(123deg, #17485e 40%, #001d30 70%);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
    transition: filter 0.2s, transform 0.1s;
}

.mq-btn-main:hover {
    filter: brightness(1.15);
}

.mq-btn-main:active {
    transform: scale(0.99);
}

.mq-btn-main[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.mq-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
    height: 24px;
}

.mq-divider::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 50%;
    height: 1px;
    background: rgba(128, 128, 128, 0.6);
}

.mq-divider span {
    position: relative;
    z-index: 1;
    padding: 0 12px;
    height: 24px;
    line-height: 24px;
    border-radius: 12px;
    background: #555;
    color: #fff;
    font-size: 0.75rem;
}

.mq-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 36px;
    margin: 12px 0;
    border-radius: 28px;
    color: #4fa3c4;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

[data-theme="light"] .mq-link-btn {
    color: #17485e;
}

.mq-link-btn:hover {
    background: rgba(79, 163, 196, 0.12);
}

.mq-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    height: 40px;
    margin: 12px 0;
    border: 0;
    border-radius: 28px;
    background: #fff;
    color: rgba(0, 0, 0, 0.87);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    cursor: pointer;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
    transition: background 0.2s;
}

.mq-google:hover {
    background: #f1f1f1;
}

.mq-google svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mq-google[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.mq-small-link {
    display: block;
    margin: 4px 0 8px;
    font-size: 0.85rem;
    color: #4fa3c4;
    text-decoration: underline;
}

[data-theme="light"] .mq-small-link {
    color: #17485e;
}

/* ---------- messages ---------- */
.mq-msg {
    border-radius: 16px;
    padding: 12px 18px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.mq-msg.err {
    background: rgba(244, 67, 54, 0.15);
    color: #ff8a80;
    border: 1px solid rgba(244, 67, 54, 0.35);
}

[data-theme="light"] .mq-msg.err {
    color: #c62828;
}

.mq-msg.ok {
    background: rgba(0, 230, 118, 0.12);
    color: var(--mq-green, #00e676);
    border: 1px solid rgba(0, 230, 118, 0.3);
    text-align: center;
}

.mq-msg.ok i {
    display: block;
    font-size: 2.6rem;
    margin-bottom: 10px;
}

.mq-msg.info {
    background: rgba(66, 165, 245, 0.12);
    color: #90caf9;
    border: 1px solid rgba(66, 165, 245, 0.3);
}

.mq-ref-toggle {
    background: none;
    border: 0;
    padding: 0;
    margin: 0 4px 8px;
    color: var(--mq-muted, rgba(255, 255, 255, 0.7));
    font-family: inherit;
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
}

.mq-ref-feedback {
    display: block;
    min-height: 18px;
    margin: 0 20px 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.mq-have-account {
    text-align: center;
    margin-top: 16px;
    color: var(--mq-muted, rgba(255, 255, 255, 0.7));
    font-size: 0.9rem;
    font-weight: 700;
}

.mq-have-account a {
    display: inline-block;
    margin-top: 6px;
    color: var(--mq-text, #fff);
    font-weight: 500;
    text-decoration: none;
}

@media (max-width: 480px) {
    .mq-field-row {
        grid-template-columns: 1fr;
    }
}
