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

body {
    background-color: var(--bs-body-bg, #1a1a2e);
    color: var(--bs-body-color, #e2e8f0);
}

/* RTL adjustments */
[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .ms-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
[dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }

[dir="rtl"] body {
    font-family: "Tahoma", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Arial, sans-serif;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Card hover */
.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Form validation */
.field-validation-error {
    color: #dc3545;
    font-size: 0.85rem;
}

.input-validation-error {
    border-color: #dc3545 !important;
}

/* Captcha */
.captcha-question {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d6efd;
    white-space: nowrap;
}

.captcha-label {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.captcha-input {
    max-width: 120px;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

.nav-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    line-height: 1;
}

/* Global placeholder styling: darker, italic for all inputs/textareas across the app */
input::placeholder,
input::-webkit-input-placeholder,
input:-ms-input-placeholder,
textarea::placeholder,
textarea::-webkit-input-placeholder,
textarea:-ms-input-placeholder,
.form-control::placeholder,
.form-control::-webkit-input-placeholder,
.form-control:-ms-input-placeholder {
    color: #6b7280 !important;
    font-style: italic !important;
    opacity: 1 !important;
}
