/* Prooweb auth pages (login / forgot / reset) */
:root {
    --pw-ink: #0b0f3b;
    --pw-muted: #6b7aa8;
    --pw-soft: #9aa7cc;
    --pw-primary: #4f46f5;
    --pw-primary-dark: #4038d6;
    --pw-accent: #5b3fd1;
    --pw-border: #dfe4f5;
    --pw-card: #ffffff;
    --pw-danger: #e5484d;
}

* { box-sizing: border-box; }

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

body.pw-auth {
    font-family: 'Inter', 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    color: var(--pw-ink);
    background: linear-gradient(135deg, #f3f6ff 0%, #f8f9ff 45%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}
body.pw-rtl { font-family: 'Tajawal', 'Inter', system-ui, Tahoma, sans-serif; }

/* background decoration */
.pw-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.pw-blob { position: absolute; border-radius: 50%; }
.pw-blob-1 { width: 520px; height: 620px; inset-inline-start: -200px; bottom: -160px; background: radial-gradient(circle at 40% 40%, #c9c4fb 0%, #e3e1fd 55%, rgba(227,225,253,0) 75%); opacity: .85; }
.pw-blob-2 { width: 420px; height: 420px; inset-inline-end: -180px; top: 8%; background: radial-gradient(circle at 40% 50%, #dcd6fb 0%, rgba(220,214,251,0) 70%); opacity: .7; }
.pw-dots {
    position: absolute; inset-inline-start: 4%; bottom: 8%; width: 130px; height: 90px; opacity: .55;
    background-image: radial-gradient(circle, #8f8ae6 1.6px, transparent 1.8px);
    background-size: 20px 20px;
}

/* language switcher */
.pw-lang { position: absolute; top: 18px; inset-inline-end: 24px; z-index: 5; }
.pw-lang-btns {
    display: inline-flex; align-items: center; gap: 2px; padding: 4px; background: #fff; border-radius: 12px;
    border: 1px solid #eceffa; box-shadow: 0 4px 14px rgba(40, 50, 120, .08);
}
.pw-lang-pill {
    display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 8px 10px; border-radius: 9px;
    font: inherit; font-size: 11px; font-weight: 700; color: #555b75; text-decoration: none; transition: background .15s, color .15s;
}
.pw-lang-pill:hover { color: var(--pw-primary); }
.pw-lang-pill.active { background: var(--pw-primary); color: #fff; box-shadow: 0 4px 10px rgba(91, 48, 232, .3); }

/* layout */
.pw-shell {
    position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 56px 24px 24px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.pw-brand { text-align: center; }
.pw-logo { display: inline-block; text-decoration: none; }
.pw-logo-img { display: block; max-height: 48px; width: auto; object-fit: contain; }
.pw-tagline { margin: 14px 0 0; font-size: 18px; color: var(--pw-muted); line-height: 1.6; }
.pw-tagline b { color: var(--pw-accent); font-weight: 600; }

.pw-card-wrap { width: 100%; display: flex; justify-content: center; }
.pw-card {
    width: 100%; max-width: 520px; background: var(--pw-card); border-radius: 22px; padding: 44px 48px 36px;
    box-shadow: 0 24px 60px rgba(79, 70, 245, .12), 0 2px 8px rgba(40, 50, 120, .05);
}
.pw-title { margin: 0 0 8px; text-align: center; font-size: 32px; font-weight: 800; letter-spacing: -.5px; color: var(--pw-ink); }
.pw-sub { margin: 0 0 30px; text-align: center; font-size: 16px; color: var(--pw-soft); line-height: 1.6; }
.pw-badge {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: #f0eeff; color: var(--pw-accent);
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.pw-alert { background: #eef0ff; color: var(--pw-accent); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; text-align: center; }

/* form */
.pw-field { margin-bottom: 20px; }
.pw-field label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--pw-ink); }
.pw-input {
    display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; background: #fff;
    border: 1px solid var(--pw-border); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.pw-input:focus-within { border-color: var(--pw-primary); box-shadow: 0 0 0 4px rgba(79, 70, 245, .12); }
.pw-input.pw-invalid { border-color: var(--pw-danger); }
.pw-input input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--pw-ink); height: 100%;
}
.pw-input input::placeholder { color: #a9b3d6; }
.pw-lead { font-size: 22px; color: #7b88b8; }
.pw-eye { background: none; border: 0; padding: 4px; cursor: pointer; color: #7b88b8; font-size: 22px; line-height: 1; }
.pw-error { display: block; margin-top: 6px; color: var(--pw-danger); font-size: 13px; }
.pw-forgot { text-align: end; margin-top: 10px; }
.pw-forgot a { color: var(--pw-primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.pw-forgot a:hover, .pw-divider a:hover { text-decoration: underline; }

.pw-btn {
    width: 100%; height: 56px; margin-top: 10px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-size: 18px; font-weight: 600;
    color: #fff; background: var(--pw-primary); box-shadow: 0 10px 22px rgba(79, 70, 245, .3); transition: background .15s, transform .05s;
}
.pw-btn:hover { background: var(--pw-primary-dark); }
.pw-btn:active { transform: translateY(1px); }
.pw-btn:disabled { opacity: .7; cursor: not-allowed; }

.pw-divider { display: flex; align-items: center; gap: 14px; margin-top: 26px; color: var(--pw-soft); font-size: 15px; text-align: center; }
.pw-divider::before, .pw-divider::after { content: ''; flex: 1; height: 1px; background: var(--pw-border); }
.pw-divider a { color: var(--pw-accent); font-weight: 700; text-decoration: none; }

.pw-footer { position: relative; z-index: 1; text-align: center; padding: 18px 16px 28px; color: var(--pw-muted); font-size: 15px; font-weight: 500; }

/* features: icon tiles (mobile/tablet) -> list (desktop split layout) */
.pw-features { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.pw-features li { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pw-ico {
    flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; background: #fff; color: var(--pw-accent); font-size: 28px;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(79, 70, 245, .1);
}
.pw-features h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--pw-ink); }
.pw-features p { display: none; margin: 0; max-width: 270px; font-size: 15px; line-height: 1.55; color: var(--pw-muted); }

@media (min-width: 992px) {
    .pw-shell-split { flex-direction: row; justify-content: space-between; align-items: center; gap: 60px; }
    .pw-shell-split .pw-brand { text-align: start; flex: 1; }
    .pw-shell-split .pw-logo-img { max-height: 56px; }
    .pw-shell-split .pw-features { display: block; margin-top: 34px; text-align: start; }
    .pw-shell-split .pw-features li { flex-direction: row; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
    .pw-shell-split .pw-features h3 { margin: 2px 0 4px; font-size: 18px; }
    .pw-shell-split .pw-features p { display: block; }
    .pw-shell-split .pw-card-wrap { flex: 0 0 520px; width: 520px; }
}

@media (max-width: 575px) {
    .pw-shell { padding: 56px 16px 8px; gap: 28px; }
    .pw-logo-img { max-height: 46px; margin: 0 auto; }
    .pw-tagline { font-size: 17px; color: #3e4466; max-width: 260px; margin-inline: auto; }
    .pw-features { margin-top: 28px; gap: 6px; }
    .pw-ico { width: 56px; height: 56px; font-size: 26px; }
    .pw-features h3 { font-size: 12.5px; }
    .pw-card { padding: 30px 22px 26px; border-radius: 18px; }
    .pw-title { font-size: 26px; }
    .pw-sub { margin-bottom: 22px; font-size: 15px; }
    .pw-lang { top: 12px; inset-inline-end: 12px; max-width: calc(100% - 24px); }
    .pw-lang-pill { padding: 8px 10px; font-size: 12px; }
    .pw-blob-1 { width: 320px; height: 380px; }
}

/* RTL tweaks: logical properties handle most; keep icons/inputs correct */
.pw-rtl .pw-input input[type="email"], .pw-rtl .pw-input input[type="password"] { text-align: start; }
.pw-rtl .pw-input input[type="email"] { direction: ltr; text-align: right; }
.pw-rtl .pw-input input[type="email"]::placeholder { direction: rtl; }
