/* Legal Consulting Portal — Authentication pages */

:root {
    --font-sans: "Cairo", sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --letter-spacing-body: 0.01em;
    --letter-spacing-label: 0.02em;
    --brand-primary: #033c73;
    --text-primary: #1a2332;
    --text-muted: #5c6b7a;
    --border-light: #e8edf3;
    --radius-sm: 6px;
    --focus-ring: 0 0 0 3px rgba(31, 143, 201, 0.18);
}

.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: var(--letter-spacing-body);
    font-weight: var(--font-weight-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(31, 143, 201, 0.12), transparent 55%),
        radial-gradient(900px 500px at 100% 100%, rgba(3, 60, 115, 0.08), transparent 50%),
        #eef1f6;
    color: #1f2a37;
}

.auth-page.rtl {
    direction: rtl;
}

.auth-page:not(.rtl) {
    direction: ltr;
}

.auth-page[data-lang-align="right"] {
    text-align: right;
}

.auth-page[data-lang-align="left"] {
    text-align: left;
}

.auth-layout {
    display: flex;
    min-height: 100vh;
}

.auth-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    background: linear-gradient(145deg, #022a52 0%, #033c73 45%, #045a9e 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
    text-align: center;
}

.auth-logo {
    max-height: 72px;
    max-width: 220px;
    margin-bottom: 28px;
    filter: brightness(0) invert(1);
}

.auth-logo.auth-tenant-logo,
.auth-card-logo.auth-tenant-logo {
    filter: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    object-fit: contain;
}

.auth-card-logo {
    display: block;
    max-height: 56px;
    max-width: 180px;
    margin: 0 auto 12px;
}

.auth-brand-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 12px;
    line-height: 1.35;
}

.auth-brand-subtitle {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.88;
    margin: 0;
    font-weight: 400;
}

.auth-brand-divider {
    width: 48px;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    margin: 28px auto;
    border-radius: 2px;
}

.auth-brand-note {
    font-size: 13px;
    opacity: 0.72;
    margin: 0;
    line-height: 1.6;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    position: relative;
}

.auth-lang-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 420px;
}

.auth-lang-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7c93;
    margin-inline-end: 4px;
}

.auth-lang-option {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #d1d9e0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #344767;
    background: #fff;
    transition: all 0.2s;
}

.auth-lang-option:hover {
    border-color: #033c73;
    color: #033c73;
    text-decoration: none;
}

.auth-lang-option.active {
    background: #033c73;
    border-color: #033c73;
    color: #fff;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(3, 60, 115, 0.1), 0 2px 8px rgba(15, 35, 60, 0.05);
    border: 1px solid #dce3ec;
    overflow: hidden;
}

.auth-card-header {
    padding: 32px 36px 0;
    text-align: center;
}

.auth-card-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #033c73;
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}

.auth-card-header p {
    font-size: 14px;
    color: #6b7c93;
    margin: 0;
    line-height: 1.5;
}

.auth-card-body {
    padding: 28px 36px 36px;
}

.auth-alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.auth-alert-info {
    background: #eef6fc;
    border-color: #c5dff0;
    color: #033c73;
}

.auth-alert-danger {
    background: #fdf2f2;
    border-color: #f5c6cb;
    color: #842029;
}

.auth-alert-success {
    background: #edf7ed;
    border-color: #b8dfc0;
    color: #1e5631;
}

.auth-field {
    margin-bottom: 20px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #344767;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .glyphicon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 14px;
    color: #8a9bb0;
    font-size: 14px;
    pointer-events: none;
}

.auth-page.rtl .auth-input-wrap .glyphicon {
    left: auto;
    right: 14px;
}

.auth-input-wrap .form-control {
    height: 46px;
    padding-left: 42px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-page.rtl .auth-input-wrap .form-control {
    padding-left: 14px;
    padding-right: 42px;
}

.auth-input-wrap .form-control:focus {
    border-color: #033c73;
    box-shadow: 0 0 0 3px rgba(3, 60, 115, 0.12);
}

.auth-btn {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 8px;
    border: none;
    border-radius: 6px;
    background: #033c73;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.auth-btn:hover,
.auth-btn:focus {
    background: #022a52;
    color: #fff;
    box-shadow: 0 4px 12px rgba(3, 60, 115, 0.25);
    outline: none;
}

.auth-links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef1f4;
    text-align: center;
}

.auth-links a {
    font-size: 13px;
    color: #033c73;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: #2ea4e7;
    text-decoration: none;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #8a9bb0;
}

@media (max-width: 900px) {
    .auth-layout {
        flex-direction: column;
    }

    .auth-brand {
        padding: 36px 24px;
        min-height: auto;
    }

    .auth-brand-title {
        font-size: 22px;
    }

    .auth-form-panel {
        padding: 32px 20px 40px;
    }

    .auth-card-header,
    .auth-card-body {
        padding-left: 24px;
        padding-right: 24px;
    }
}

.auth-page,
.auth-page button,
.auth-page input,
.auth-page select,
.auth-page textarea,
.auth-page h1,
.auth-page h2,
.auth-page h3,
.auth-page p,
.auth-page a,
.auth-page label,
.auth-page .btn {
    font-family: var(--font-sans) !important;
}

.auth-page .glyphicon {
    font-family: 'Glyphicons Halflings' !important;
}

.auth-card-header h1,
.auth-brand-title {
    font-weight: var(--font-weight-bold);
    letter-spacing: 0;
    color: var(--brand-primary);
}

.auth-field label {
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-label);
    color: var(--text-primary);
}

.auth-input-wrap .form-control {
    font-family: var(--font-sans) !important;
    font-size: 14px;
    border-color: #d5dde8;
    border-radius: var(--radius-sm);
}

.auth-input-wrap .form-control:focus {
    border-color: #1f8fc9;
    box-shadow: var(--focus-ring);
}

.auth-btn {
    font-family: var(--font-sans) !important;
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-label);
    border-radius: var(--radius-sm);
}

.auth-card {
    border-color: var(--border-light);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(15, 35, 60, 0.08);
}

.app-captcha-recaptcha {
    margin-bottom: 16px;
}

.app-captcha-recaptcha .g-recaptcha {
    transform-origin: top right;
}

body.auth-page.rtl .app-captcha-recaptcha .g-recaptcha {
    transform-origin: top left;
}
