/* Auth Pages Common Styles */

/* Buttons - Base Reset */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    line-height: 1.5 !important;
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-align: center !important;
    transform: none !important;
}

.btn:hover,
.btn:focus,
.btn:active,
.btn:focus-visible,
.btn.active,
.btn.show {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    line-height: 1.5 !important;
    outline: none !important;
    transform: none !important;
    text-align: center !important;
}

.btn.w-100,
.btn.w-100:hover,
.btn.w-100:focus,
.btn.w-100:active {
    width: 100% !important;
}


.btn-lg,
.btn-lg:hover,
.btn-lg:focus,
.btn-lg:active {
    padding: 12px 28px !important;
    font-size: 1rem !important;
}

.btn-sm,
.btn-sm:hover,
.btn-sm:focus,
.btn-sm:active {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
    color: white !important;
}

.btn-light {
    background: #ffffff !important;
    border: none !important;
    color: #1e40af !important;
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    background: #f3f4f6 !important;
    color: #1e3a8a !important;
}

.btn-outline-primary {
    border: 2px solid #3b82f6 !important;
    color: #3b82f6 !important;
    background: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: #3b82f6 !important;
    color: white !important;
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border: none !important;
    color: white !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    color: white !important;
}

.btn-secondary {
    background: #6b7280 !important;
    border: none !important;
    color: white !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background: #4b5563 !important;
    color: white !important;
}

.btn-outline-secondary {
    border: 1px solid #d1d5db !important;
    color: #6b7280 !important;
    background: #f9fafb !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background: #e5e7eb !important;
    color: #374151 !important;
    border-color: #9ca3af !important;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
    border: none !important;
    color: white !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%) !important;
    color: white !important;
}

.btn-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    border: none !important;
    color: white !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
    color: white !important;
}

.btn-info {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%) !important;
    border: none !important;
    color: white !important;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%) !important;
    color: white !important;
}

/* Modal Button Fix */
.modal .btn,
.modal .btn:hover,
.modal .btn:focus,
.modal .btn:active,
.modal .btn:focus-visible {
    height: 50px !important;
    min-height: auto !important;
    max-height: 50px !important;
    transform: none !important;
    outline: none !important;
}

/* Form Controls */
.form-control,
.form-select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #111827;
    background: #ffffff;
    transition: all 0.2s ease;
    height: auto !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    color: #1e40af;
    border-right: 4px solid #3b82f6;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    color: #92400e;
    border-right: 4px solid #f59e0b;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #dcfce7 100%);
    color: #065f46;
    border-right: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
    color: #991b1b;
    border-right: 4px solid #ef4444;
}

/* Form Label */
.form-label {
    color: #374151;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

/* Text Helpers */
.text-danger {
    color: #dc2626 !important;
}

.text-muted {
    color: #6b7280 !important;
    font-size: 0.8rem;
}

/* Invalid Feedback */
.invalid-feedback {
    font-size: 0.8rem;
    color: #dc2626;
}

.is-invalid {
    border-color: #dc2626 !important;
}

/* Input Group RTL Fix */
.input-group .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.input-group .btn {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

/* Modal Styles */
.modal-content {
    border-radius: 16px;
    border: none;
    overflow: hidden;
}

.modal-body {
    padding: 2rem;
}

/* Navbar Hide in Auth Pages */
.auth-page .header,
.auth-page #header,
.auth-page .navbar,
.auth-page nav.navbar {
    display: none !important;
}

/* Footer Hide in Auth Pages (optional) */
.auth-page-minimal .footer,
.auth-page-minimal #footer {
    display: none !important;
}


/* Bootstrap active/toggle selectors can override button border and cause height jump */
.btn-check:checked + .btn,
:not(.btn-check) + .btn:active,
.btn:first-child:active {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    line-height: 1.5 !important;
    transform: none !important;
    box-sizing: border-box !important;
}

.btn.w-100,
.btn.w-100:hover,
.btn.w-100:focus,
    font-size: 1rem !important;
}

/* Keep solid buttons borderless in all active/checked states to prevent size change */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark,
.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover,
.btn-light:hover,
.btn-dark:hover,
.btn-primary:focus,
.btn-secondary:focus,
.btn-success:focus,
.btn-danger:focus,
.btn-warning:focus,
.btn-info:focus,
.btn-light:focus,
.btn-dark:focus,
.btn-primary:active,
.btn-secondary:active,
.btn-success:active,
.btn-danger:active,
.btn-warning:active,
.btn-info:active,
.btn-light:active,
.btn-dark:active,
.btn-check:checked + .btn-primary,
.btn-check:checked + .btn-secondary,
.btn-check:checked + .btn-success,
.btn-check:checked + .btn-danger,
.btn-check:checked + .btn-warning,
.btn-check:checked + .btn-info,
.btn-check:checked + .btn-light,
.btn-check:checked + .btn-dark,
:not(.btn-check) + .btn-primary:active,
:not(.btn-check) + .btn-secondary:active,
:not(.btn-check) + .btn-success:active,
:not(.btn-check) + .btn-danger:active,
:not(.btn-check) + .btn-warning:active,
:not(.btn-check) + .btn-info:active,
:not(.btn-check) + .btn-light:active,
:not(.btn-check) + .btn-dark:active {
    border-width: 0 !important;
}