html,
body.login-page {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.login-page {
    direction: ltr;
    font-family: "Segoe UI", Tahoma, "Simplified Arabic", Arial, sans-serif;
    color: #1c2b24;
    background-color: #0b3d2e;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12), transparent 36%),
        radial-gradient(circle at 85% 80%, rgba(196, 163, 90, 0.18), transparent 32%),
        linear-gradient(155deg, #07281e 0%, #0e5a38 48%, #083326 100%);
}

.login-page form {
    min-height: 100vh;
    margin: 0;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
    padding: 36px 32px 28px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    display: block;
    height: 4px;
    margin: -36px -32px 28px;
    background: linear-gradient(90deg, #0e6b3c 0%, #c4a35a 100%);
}

.login-logo {
    display: block;
    text-align: center;
    margin-bottom: 8px;
}

.login-logo img {
    max-width: 168px;
    height: auto;
    border: 0;
}

.login-title {
    margin: 4px 0 4px;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #0d3d2c;
    direction: rtl;
}

.login-subtitle {
    margin: 0 0 26px;
    text-align: center;
    font-size: 15px;
    color: #6d7f76;
    direction: rtl;
}

.login-form {
    text-align: left;
}

.login-field {
    margin-bottom: 16px;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.login-label {
    font-size: 13px;
    font-weight: 600;
    color: #31443b;
}

.login-req {
    color: #c0392b;
    font-weight: 700;
}

.login-input {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid #d5ddd8;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 15px;
    font-family: inherit;
    color: #1c2b24;
    background: #f6faf7;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-input:focus {
    outline: none;
    border-color: #1a7a4c;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(26, 122, 76, 0.14);
}

.login-alert {
    display: block;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fdecec;
    color: #9f1239;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

.login-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.login-btn {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.login-btn-primary {
    background: #0e6b3c;
    color: #ffffff;
    border-color: #0e6b3c;
}

.login-btn-primary:hover {
    background: #0b5731;
}

.login-btn-ghost {
    background: #ffffff;
    color: #0e6b3c;
    border-color: #c9d8cf;
}

.login-btn-ghost:hover {
    background: #f3f8f5;
    border-color: #0e6b3c;
}

.login-btn:active {
    transform: translateY(1px);
}

.otp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 28, 20, 0.58);
    z-index: 9999;
}

.otp-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 28px 24px;
    width: 380px;
    max-width: calc(100% - 32px);
    text-align: right;
    direction: rtl;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
}

.otp-title {
    margin: 0 0 8px;
    color: #0d3d2c;
    font-size: 18px;
    font-weight: 700;
}

.otp-body {
    margin: 0 0 16px;
    color: #4d5e56;
    font-size: 14px;
    line-height: 1.7;
}

.otp-error {
    display: block;
    color: #9f1239;
    background: #fdecec;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.otp-input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 14px;
    padding: 12px 10px;
    font-size: 22px;
    text-align: center;
    letter-spacing: 8px;
    border: 1px solid #d5ddd8;
    border-radius: 12px;
    background: #f6faf7;
    font-family: inherit;
}

.otp-input:focus {
    outline: none;
    border-color: #1a7a4c;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(26, 122, 76, 0.14);
}

.otp-verify {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #0e6b3c;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.otp-verify:hover {
    background: #0b5731;
}

.otp-resend-row {
    text-align: center;
}

.otp-resend {
    background: none;
    border: none;
    color: #0e6b3c;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.otp-resend:disabled {
    color: #8aa094;
    cursor: default;
    text-decoration: none;
}

.otp-countdown {
    font-size: 12px;
    color: #7b8b83;
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 18px 22px;
        border-radius: 18px;
    }

    .login-card::before {
        margin: -28px -18px 22px;
    }

    .login-actions {
        flex-direction: column;
    }
}
