/*
|--------------------------------------------------------------------------
| SpineSight Diagnostics - Global Styles
|--------------------------------------------------------------------------
| Theme Colors:
| - Baltic Blue (Primary): #2D6381
| - Tropical Teal (Secondary): #3DA3A3
|--------------------------------------------------------------------------
*/

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Primary - Baltic Blue */
    --primary: #2D6381;
    --primary-dark: #245270;
    --primary-light: #3A7A9C;
    --primary-bg: #e8f4f8;
    --primary-bg-light: #f0f9fc;

    /* Secondary - Tropical Teal */
    --secondary: #3DA3A3;
    --secondary-dark: #2E8585;
    --secondary-light: #4FBFBF;

    /* Accent colors derived from theme */
    --purple: #4A7C8C;
    --purple-gradient: linear-gradient(135deg, #3DA3A3, #4FBFBF);

    --success: #2E8B7A;
    --success-dark: #247A6A;
    --success-bg: #d1f0ea;

    --warning: #D4A54A;
    --warning-dark: #B8923F;
    --warning-bg: #fef6e6;

    --danger: #C65D5D;
    --danger-dark: #A84D4D;
    --danger-bg: #fce8e8;

    --info: #3DA3A3;
    --info-dark: #2E8585;
    --info-bg: #e0f5f5;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2D6381, #245270);
    --gradient-secondary: linear-gradient(135deg, #3DA3A3, #2E8585);
    --gradient-success: linear-gradient(135deg, #2E8B7A, #247A6A);
    --gradient-danger: linear-gradient(135deg, #C65D5D, #A84D4D);
    --gradient-info: linear-gradient(135deg, #3DA3A3, #4FBFBF);
    --gradient-dark: linear-gradient(135deg, #1a3a4a 0%, #2D6381 100%);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(45, 99, 129, 0.08);
    --shadow-md: 0 4px 12px rgba(45, 99, 129, 0.12);
    --shadow-lg: 0 8px 24px rgba(45, 99, 129, 0.15);
    --shadow-primary: 0 4px 12px rgba(45, 99, 129, 0.25);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ============================================
   Utility Classes
   ============================================ */
.bg-purple {
    background-color: var(--purple) !important;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

.bg-gradient-danger {
    background: var(--gradient-danger) !important;
}

.bg-gradient-purple {
    background: var(--purple-gradient) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #D4A54A, #B8923F) !important;
}

.bg-gradient-info {
    background: var(--gradient-info) !important;
}

.bg-gradient-secondary {
    background: var(--gradient-secondary) !important;
}

.text-primary-custom {
    color: var(--primary) !important;
}

.text-teal {
    color: var(--primary) !important;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #245270, #1a3d52);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

.btn-save {
    background: var(--gradient-primary);
    border: none;
    padding: 0.625rem 1.5rem;
    font-weight: 500;
}

.btn-save:hover {
    background: linear-gradient(135deg, #245270, #1a3d52);
}

/* ============================================
   Cards
   ============================================ */
.card-custom {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-custom .card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-custom .card-body {
    padding: 1.5rem;
}

.card-custom .card-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

/* ============================================
   Option Cards (Checkbox/Radio Cards)
   ============================================ */
.option-card {
    display: flex;
    align-items: flex-start;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.option-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(45, 99, 129, 0.15);
}

.option-card.checked {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-bg-light) 0%, var(--primary-bg) 100%);
}

.option-card .check-wrapper {
    flex-shrink: 0;
    margin-right: 1rem;
}

.option-card .form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.25rem;
    cursor: pointer;
    border: 2px solid #cbd5e1;
}

.option-card .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.option-card .option-content {
    flex: 1;
}

.option-card .option-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
}

.option-card .option-title i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.option-card .option-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.option-card .option-icon-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.option-card .option-icon-wrapper i {
    font-size: 1.25rem;
}

/* Option Card Color Variants */
.option-card.teal .option-title i { color: var(--primary); }
.option-card.teal .option-icon-wrapper { background: #ccfbf1; }
.option-card.teal .option-icon-wrapper i { color: var(--primary); }
.option-card.teal.checked { border-color: var(--primary); background: linear-gradient(135deg, var(--primary-bg-light) 0%, var(--primary-bg) 100%); }

.option-card.emerald .option-title i { color: var(--success-dark); }
.option-card.emerald .option-icon-wrapper { background: var(--success-bg); }
.option-card.emerald .option-icon-wrapper i { color: var(--success-dark); }
.option-card.emerald.checked { border-color: var(--success-dark); background: linear-gradient(135deg, #ecfdf5 0%, var(--success-bg) 100%); }

.option-card.blue .option-title i { color: #2563eb; }
.option-card.blue .option-icon-wrapper { background: var(--info-bg); }
.option-card.blue .option-icon-wrapper i { color: #2563eb; }
.option-card.blue.checked { border-color: #2563eb; background: linear-gradient(135deg, #eff6ff 0%, var(--info-bg) 100%); }

/* ============================================
   Stat Cards
   ============================================ */
.stat-card {
    border: none;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.2;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.stat-card.primary { background: var(--gradient-primary); }
.stat-card.success { background: var(--gradient-success); }
.stat-card.danger { background: var(--gradient-danger); }
.stat-card.info { background: var(--gradient-info); }

/* ============================================
   Info/Alert Boxes
   ============================================ */
.info-box-custom {
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.info-box-custom.success {
    background: var(--success-bg);
    border: 1px solid #6ee7b7;
}

.info-box-custom.warning {
    background: #ffedd5;
    border: 1px solid #fdba74;
}

.info-box-custom.info {
    background: var(--info-bg);
    border: 1px solid #93c5fd;
}

.info-box-custom.danger {
    background: var(--danger-bg);
    border: 1px solid #fca5a5;
}

/* Left-bordered boxes */
.alert-box {
    border-left: 4px solid;
    padding: 15px 18px;
    margin: 20px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.alert-box.info {
    background-color: var(--primary-bg);
    border-left-color: var(--primary);
}

.alert-box.warning {
    background-color: var(--warning-bg);
    border-left-color: var(--warning);
}

.alert-box.danger {
    background-color: var(--danger-bg);
    border-left-color: var(--danger);
}

/* ============================================
   User Avatar
   ============================================ */
.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    background: var(--gradient-primary);
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.85rem;
}

.user-avatar-md {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.25rem;
}

.user-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 2rem;
}

.user-avatar-square {
    border-radius: var(--radius-md) !important;
}

/* ============================================
   Badges
   ============================================ */
.badge-success-soft {
    background: var(--success-bg);
    color: #065f46;
}

.badge-danger-soft {
    background: var(--danger-bg);
    color: #991b1b;
}

.badge-warning-soft {
    background: var(--warning-bg);
    color: #92400e;
}

.badge-info-soft {
    background: var(--info-bg);
    color: #1e40af;
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.success {
    background: var(--success-bg);
    color: #065f46;
}

.status-badge.warning {
    background: var(--warning-bg);
    color: #92400e;
}

/* ============================================
   Form Elements
   ============================================ */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 99, 129, 0.15);
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary);
}

.input-group:focus-within .form-control {
    border-color: var(--primary);
}

/* Code input (for 2FA) */
.code-input {
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.5rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    padding: 1rem;
}

.code-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 99, 129, 0.2);
}

/* Credential field */
.credential-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.credential-field:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   Tables
   ============================================ */
.table-custom {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-custom .table {
    margin-bottom: 0;
}

.table-custom .table th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-custom .table td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

.ip-badge {
    background: #f1f5f9;
    color: #475569;
    font-family: monospace;
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
}

/* ============================================
   Profile Header
   ============================================ */
.profile-header {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin-right: 1.5rem;
    border: 3px solid rgba(255,255,255,0.3);
}

.profile-info h2 {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.profile-info p {
    margin: 0;
    opacity: 0.8;
}

.profile-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: inline-block;
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    background: var(--gradient-dark);
    min-height: 100vh;
}

.login-box {
    width: 420px;
    max-width: 95%;
}

.login-card-body {
    border-radius: 1rem;
    padding: 2rem;
}

.login-logo a {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
}

.brand-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-primary);
}

.brand-icon i {
    font-size: 1.75rem;
    color: #fff;
}

/* ============================================
   Success Banner
   ============================================ */
.success-banner {
    background: var(--gradient-success);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 1rem;
}

/* ============================================
   Password Requirements
   ============================================ */
.password-requirements {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 0.5rem;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.25rem;
}

.password-requirements li {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #1f2937;
    color: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Misc
   ============================================ */
.filter-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.timer-text {
    color: #64748b;
    font-size: 0.875rem;
}

.timer-text strong {
    color: var(--primary);
}

.email-display {
    background: #f1f5f9;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: #475569;
}

.email-display i {
    color: var(--primary);
}

/* User info in tables */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.user-email {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0;
}

/* Browser info */
.browser-info {
    max-width: 200px;
    font-size: 0.8rem;
    color: #64748b;
}

/* Time info */
.time-info {
    font-size: 0.85rem;
}

.time-info .date {
    color: #1e293b;
    font-weight: 500;
}

.time-info .time {
    color: #64748b;
    font-size: 0.8rem;
}

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] {
    text-align: right;
}

/* Option Cards RTL */
[dir="rtl"] .option-card .check-wrapper {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .option-card .option-title i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .option-card .option-icon-wrapper {
    margin-left: 0;
    margin-right: 1rem;
}

/* Stat Cards RTL */
[dir="rtl"] .stat-card .stat-icon {
    right: auto;
    left: 15px;
}

/* Alert Boxes RTL */
[dir="rtl"] .alert-box {
    border-left: none;
    border-right: 4px solid;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

[dir="rtl"] .alert-box.info {
    border-right-color: var(--primary);
}

[dir="rtl"] .alert-box.warning {
    border-right-color: var(--warning);
}

[dir="rtl"] .alert-box.danger {
    border-right-color: var(--danger);
}

/* Profile Avatar RTL */
[dir="rtl"] .profile-avatar {
    margin-right: 0;
    margin-left: 1.5rem;
}

/* User Info RTL */
[dir="rtl"] .user-info .user-avatar {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* Toast RTL */
[dir="rtl"] .toast-notification {
    right: auto;
    left: 20px;
}

/* Form Elements RTL */
[dir="rtl"] .input-group > .input-group-text:first-child {
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

[dir="rtl"] .input-group > .form-control:last-child,
[dir="rtl"] .input-group > .form-select:last-child {
    border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
}

[dir="rtl"] .input-group > .form-control:not(:last-child),
[dir="rtl"] .input-group > .form-select:not(:last-child) {
    border-radius: 0;
}

/* Password Requirements RTL */
[dir="rtl"] .password-requirements ul {
    padding-left: 0;
    padding-right: 1.25rem;
}

/* Tables RTL */
[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

[dir="rtl"] .table .text-end {
    text-align: left !important;
}

/* Card RTL */
[dir="rtl"] .card-footer .d-flex.justify-content-between {
    flex-direction: row-reverse;
}

/* Buttons RTL */
[dir="rtl"] .btn i.me-1,
[dir="rtl"] .btn i.me-2 {
    margin-right: 0 !important;
    margin-left: 0.25rem;
}

[dir="rtl"] .btn i.ms-1,
[dir="rtl"] .btn i.ms-2 {
    margin-left: 0 !important;
    margin-right: 0.25rem;
}

/* ============================================
   Breadcrumb Styles
   ============================================ */
.breadcrumb {
    background: linear-gradient(135deg, rgba(45, 99, 129, 0.08) 0%, rgba(61, 163, 163, 0.08) 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(45, 99, 129, 0.1);
}

.breadcrumb-item {
    font-size: 0.875rem;
    font-weight: 500;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a:hover {
    color: var(--secondary);
}

.breadcrumb-item a i {
    font-size: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb-item.active {
    color: #64748b;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--secondary);
    font-weight: 600;
    opacity: 0.6;
}

/* Breadcrumb RTL */
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "\f053";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* List Groups RTL */
[dir="rtl"] .list-group-item {
    text-align: right;
}

/* Alerts RTL */
[dir="rtl"] .alert {
    text-align: right;
}

[dir="rtl"] .alert .btn-close {
    margin-left: 0;
    margin-right: auto;
}

/* Dropdown RTL */
[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .dropdown-item i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Modal RTL */
[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

/* Form Check RTL */
[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}

[dir="rtl"] .form-check .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -1.5em;
}

/* Form Switch RTL */
[dir="rtl"] .form-switch {
    padding-left: 0;
    padding-right: 2.5em;
}

[dir="rtl"] .form-switch .form-check-input {
    margin-right: -2.5em;
    margin-left: 0;
}

/* Pagination RTL */
[dir="rtl"] .pagination {
    flex-direction: row-reverse;
}

/* Card Header Title Icons RTL */
[dir="rtl"] .card-title i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Small Box Footer Arrow RTL */
[dir="rtl"] .small-box-footer i {
    margin-left: 0;
    margin-right: 0.25rem;
}

/* User Avatar in Table RTL */
[dir="rtl"] .d-flex .user-avatar,
[dir="rtl"] .d-flex .rounded {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}

/* Login Activity User Info RTL */
[dir="rtl"] .user-info .user-avatar {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* Back button RTL */
[dir="rtl"] .fa-arrow-left::before {
    content: "\f061";
}

/* Arrow Circle Right RTL */
[dir="rtl"] .fa-arrow-circle-right::before {
    content: "\f0a8";
}

/* ============================================
   Auth Pages Common Styles
   ============================================ */
.login-page .btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.login-page .btn-primary:hover {
    background: linear-gradient(135deg, #245270, #1a3d52);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

.login-page a {
    color: var(--primary);
}

.login-page a:hover {
    color: var(--primary-dark);
}

.login-page .input-group-text {
    background-color: #f8f9fa;
}

.login-logo img {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.verify-email-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(45, 99, 129, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ============================================
   Lock Screen Styles
   ============================================ */
.lock-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a3a4a 0%, #2D6381 50%, #245270 100%);
}

.lock-box {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.lock-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.lock-page .user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2D6381, #245270);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(45, 99, 129, 0.4);
}

.lock-icon {
    position: absolute;
    bottom: 0;
    right: calc(50% - 55px);
    width: 32px;
    height: 32px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    border: 3px solid white;
}

[dir="rtl"] .lock-icon {
    right: auto;
    left: calc(50% + 25px);
}

.lock-page .user-info {
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lock-page .user-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    display: block;
    width: 100%;
}

.lock-page .user-email {
    color: #64748b;
    font-size: 0.875rem;
    display: block;
    width: 100%;
}

.locked-time {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.locked-time i {
    color: #f59e0b;
}

.btn-unlock {
    background: linear-gradient(135deg, #2D6381, #245270);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: white;
}

.btn-unlock:hover {
    background: linear-gradient(135deg, #245270, #1a3d52);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 99, 129, 0.4);
    color: white;
}

.logout-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.logout-link:hover {
    color: white;
}

/* ============================================
   Avatar Upload Styles
   ============================================ */
.avatar-upload-wrapper {
    position: relative;
    display: inline-block;
    padding: 8px;
}

.avatar-upload-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.avatar-upload-wrapper:hover::before {
    border-color: var(--primary);
    border-style: solid;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 -2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
}

.avatar-preview:hover {
    transform: scale(1.02);
}

.avatar-preview.has-image {
    background: transparent;
}

.avatar-initials {
    background: var(--gradient-primary);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(45, 99, 129, 0.4);
    transition: all 0.3s ease;
    z-index: 10;
}

.avatar-upload-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #075985);
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 16px rgba(45, 99, 129, 0.5);
}

.avatar-upload-btn i {
    font-size: 1rem;
}

/* Avatar upload help text */
.avatar-upload-wrapper + small {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

/* RTL support for avatar upload button */
[dir="rtl"] .avatar-upload-btn {
    right: auto;
    left: 8px;
}

/* Profile avatar image for header */
.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[dir="ltr"] .profile-avatar-img {
    margin-right: 1rem;
}

[dir="rtl"] .profile-avatar-img {
    margin-left: 1rem;
}

/* Sidebar user avatar image */
.sidebar-user-avatar-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

[dir="ltr"] .sidebar-user-avatar-img {
    margin-right: 12px;
}

[dir="rtl"] .sidebar-user-avatar-img {
    margin-left: 12px;
}

/* User dropdown avatar image */
.user-dropdown-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

[dir="ltr"] .user-dropdown-avatar-img {
    margin-right: 10px;
}

[dir="rtl"] .user-dropdown-avatar-img {
    margin-left: 10px;
}

/* Login activity table user avatar image */
.user-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

[dir="ltr"] .user-avatar-img {
    margin-right: 10px;
}

[dir="rtl"] .user-avatar-img {
    margin-left: 10px;
}

/* Lock screen avatar image */
.user-avatar-img-lock {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(45, 99, 129, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Settings Card Styles
   ============================================ */
.settings-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.settings-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.settings-card .card-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.settings-card .card-body {
    padding: 1.5rem;
}

[dir="ltr"] .settings-card .card-header h5 i {
    margin-right: 0.75rem;
    color: var(--primary);
}

[dir="rtl"] .settings-card .card-header h5 i {
    margin-left: 0.75rem;
    color: var(--primary);
}

/* ============================================
   Table Loading Overlay
   ============================================ */
.table-loading {
    position: relative;
    pointer-events: none;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.table-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

.table-loading .table {
    opacity: 0.5;
}

.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

.table-loading .loading-spinner {
    display: block;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   Credentials Page Styles
   ============================================ */
.credentials-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.credentials-card .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.credentials-card .card-body {
    padding: 1.5rem;
}

.credentials-card .card-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.user-info-section {
    padding: 1.25rem;
    gap: 1rem;
}

.user-info-text {
    padding: 0 0.5rem;
}

.btn-copy {
    background: #e2e8f0;
    border: none;
    color: #64748b;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #cbd5e1;
    color: #475569;
}

.btn-copy-all {
    background: rgba(45, 99, 129, 0.1);
    border: none;
    color: var(--primary);
    padding: 0.875rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-copy-all:hover {
    background: rgba(45, 99, 129, 0.2);
    color: var(--primary-dark);
}

.warning-box {
    background: var(--warning-bg);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.warning-box i {
    color: var(--warning);
}

.info-box {
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.info-box.success {
    background: var(--success-bg);
    border: 1px solid #6ee7b7;
}

.info-box.warning {
    background: #ffedd5;
    border: 1px solid #fdba74;
}

.info-box.info {
    background: var(--info-bg);
    border: 1px solid #93c5fd;
}

/* ============================================
   Activity Table Styles
   ============================================ */
.activity-table {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.activity-table .table {
    margin-bottom: 0;
}

.activity-table .table th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 0.75rem;
}

.activity-table .table td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

/* Login Activity User Avatar */
.user-info .user-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(45, 99, 129, 0.25);
}

/* ============================================
   Login Activity Stat Cards
   ============================================ */
.stat-card.primary { background: var(--gradient-primary); }
.stat-card.success { background: var(--gradient-success); }
.stat-card.danger { background: var(--gradient-danger); }
.stat-card.info { background: var(--gradient-info); }

.stat-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.85rem;
}

.stat-card .stat-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
}

[dir="ltr"] .stat-card .stat-icon {
    top: 2rem;
    right: 1rem;
}

[dir="rtl"] .stat-card .stat-icon {
    top: 2rem;
    left: 1rem;
}

/* ============================================
   Login Activity Badges
   ============================================ */
.badge-success-soft {
    background: var(--success-bg);
    color: var(--success-dark);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

.badge-danger-soft {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

/* ============================================
   Additional Utility Classes
   ============================================ */

/* Hidden by default (JS toggle) */
.js-hidden {
    display: none;
}

/* Role Badges */
.badge-admin {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

.badge-doctor {
    background: linear-gradient(135deg, #3DA3A3, #4FBFBF);
}

/* Primary Gradient Button */
.btn-gradient-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #245270, #1a3d52);
    color: white;
}

/* User Table Avatar */
.user-table-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.user-table-avatar-placeholder {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Edit Page Avatar */
.edit-user-avatar {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.edit-user-avatar-placeholder {
    width: 80px;
    height: 80px;
}

/* Login Activity Icon */
.login-activity-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-activity-icon i {
    font-size: 10px;
}

/* Login Activity List */
.login-activity-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Credentials Page */
.credentials-avatar-lg {
    border-radius: 14px;
    object-fit: cover;
}

.credentials-role-badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.credentials-role-badge.admin {
    background: #7c3aed;
}

.credentials-role-badge.doctor {
    background: var(--primary);
}

/* Text Truncate with Max Width */
.text-truncate-300 {
    max-width: 300px;
}

/* Info Alert Light */
.alert-info-light {
    background: #f0fdfa;
    border: none;
}

/* Sidebar Brand Logo */
.sidebar-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
}

[dir="ltr"] .sidebar-brand-logo {
    margin-right: 12px;
}

[dir="rtl"] .sidebar-brand-logo {
    margin-left: 12px;
}

/* Dashboard Welcome Logo */
.welcome-logo {
    width: 80px;
    opacity: 0.6;
}

/* Table Width Utilities */
.w-160 {
    width: 160px;
}

.w-100px {
    width: 100px;
}

/* Link Primary Color */
.link-primary-custom {
    color: var(--primary);
    text-decoration: none;
}

.link-primary-custom:hover {
    color: var(--primary-dark);
}

/* Warning Text Color */
.text-warning-custom {
    color: #c2410c;
}

/* Form Switch Large */
.form-switch-lg .form-check-input {
    width: 3rem;
    height: 1.5rem;
}

/* Filter Button Gradient */
.btn-filter-gradient {
    background: linear-gradient(135deg, #2D6381, #245270);
    border: none;
    color: #fff;
}

.btn-filter-gradient:hover {
    background: linear-gradient(135deg, #245270, #1a3d52);
    color: #fff;
}

/* ============================================
   Dashboard Layout Styles
   ============================================ */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--gradient-dark);
    z-index: 1040;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

[dir="ltr"] .sidebar {
    left: 0;
}

[dir="rtl"] .sidebar {
    right: 0;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

/* Brand */
.sidebar-brand {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(45, 99, 129, 0.3);
}

[dir="ltr"] .sidebar-brand-icon {
    margin-right: 12px;
}

[dir="rtl"] .sidebar-brand-icon {
    margin-left: 12px;
}

.sidebar-brand-icon i {
    color: #fff;
    font-size: 1.25rem;
}

.sidebar-brand-text {
    color: #fff;
}

.sidebar-brand-text .brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.sidebar-brand-text .brand-subtitle {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* User Panel */
.sidebar-user {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-user:hover {
    background: rgba(255,255,255,0.05);
}

.sidebar-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

[dir="ltr"] .sidebar-user-avatar {
    margin-right: 12px;
}

[dir="rtl"] .sidebar-user-avatar {
    margin-left: 12px;
}

.sidebar-user-info .name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #fff;
}

.sidebar-user-info .role {
    font-size: 0.75rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
}

.sidebar-user-info .role i {
    font-size: 0.5rem;
}

[dir="ltr"] .sidebar-user-info .role i {
    margin-right: 6px;
}

[dir="rtl"] .sidebar-user-info .role i {
    margin-left: 6px;
}

/* Navigation */
.sidebar-nav {
    padding: 1rem 0;
}

.nav-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
}

.sidebar-nav .nav-link {
    padding: 0.8rem 1.5rem;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    margin: 2px 0;
}

[dir="ltr"] .sidebar-nav .nav-link {
    border-right: none;
}

[dir="rtl"] .sidebar-nav .nav-link {
    border-left: none;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(61, 163, 163, 0.25) 0%, rgba(61, 163, 163, 0.08) 100%);
    color: #4FBFBF;
    font-weight: 500;
}

.sidebar-nav .nav-link.active i {
    color: #4FBFBF;
}

[dir="ltr"] .sidebar-nav .nav-link.active {
    border-left-color: #4FBFBF;
}

[dir="rtl"] .sidebar-nav .nav-link.active {
    border-right-color: #4FBFBF;
    background: linear-gradient(-90deg, rgba(61, 163, 163, 0.25) 0%, rgba(61, 163, 163, 0.08) 100%);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

[dir="ltr"] .sidebar-nav .nav-link i {
    margin-right: 12px;
}

[dir="rtl"] .sidebar-nav .nav-link i {
    margin-left: 12px;
}

.sidebar-nav .nav-link .nav-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

[dir="ltr"] .sidebar-nav .nav-link .nav-badge {
    margin-left: auto;
}

[dir="rtl"] .sidebar-nav .nav-link .nav-badge {
    margin-right: auto;
}

/* Main Content */
.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[dir="ltr"] .main-wrapper {
    margin-left: 280px;
}

[dir="rtl"] .main-wrapper {
    margin-right: 280px;
}

/* Navbar */
.main-navbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.navbar-toggler {
    display: none;
    border: none;
    background: none;
    font-size: 1.25rem;
    color: #475569;
    padding: 0.5rem;
    cursor: pointer;
}

[dir="ltr"] .navbar-toggler {
    margin-right: 1rem;
}

[dir="rtl"] .navbar-toggler {
    margin-left: 1rem;
}

.navbar-toggler:hover {
    color: var(--primary);
}

/* Content */
.main-content {
    flex: 1;
    padding: 1.5rem;
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Footer */
.main-footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    color: #64748b;
}

.main-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Small boxes / Stats */
.small-box {
    border-radius: 12px;
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.small-box .inner h3 {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.small-box .inner p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.small-box .icon {
    position: absolute;
    top: 0px;
    font-size: 4rem;
    opacity: 0.2;
}

[dir="ltr"] .small-box .icon {
    right: 20px;
}

[dir="rtl"] .small-box .icon {
    left: 20px;
}

.small-box-footer {
    display: block;
    padding: 0.75rem 0 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.8rem;
}

.small-box-footer:hover {
    color: #fff;
}

/* Medical Theme Colors */
.bg-info { background: linear-gradient(135deg, #3DA3A3, #4FBFBF) !important; }
.bg-success { background: linear-gradient(135deg, #2E8B7A, #3DA3A3) !important; }
.bg-warning { background: linear-gradient(135deg, #D4A54A, #E5B85C) !important; }
.bg-danger { background: linear-gradient(135deg, #C65D5D, #D97070) !important; }
.bg-primary { background: linear-gradient(135deg, #2D6381, #3A7A9C) !important; }
.bg-purple { background: linear-gradient(135deg, #4A7C8C, #5A9CAC) !important; }

.bg-gradient-primary {
    background: linear-gradient(135deg, #2D6381, #3A7A9C) !important;
}

.text-teal { color: #2D6381 !important; }

/* User dropdown */
.user-dropdown-toggle {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-dropdown-toggle:hover {
    background: #f1f5f9;
}

.user-dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

[dir="ltr"] .user-dropdown-avatar {
    margin-right: 10px;
}

[dir="rtl"] .user-dropdown-avatar {
    margin-left: 10px;
}

.user-dropdown-info .name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #1e293b;
}

.user-dropdown-info .role {
    font-size: 0.75rem;
    color: #64748b;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-switcher .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.lang-switcher .btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    [dir="rtl"] .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .navbar-toggler {
        display: flex;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1035;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* ============================================
   Auth Pages Layout Styles
   ============================================ */

/* Language switcher for auth pages */
.auth-lang-switcher {
    position: fixed;
    top: 1rem;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
}

[dir="ltr"] .auth-lang-switcher {
    right: 1rem;
}

[dir="rtl"] .auth-lang-switcher {
    left: 1rem;
}

.auth-lang-switcher .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

.auth-lang-switcher .btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.auth-lang-switcher .btn.active {
    background: var(--primary, #2D6381);
    border-color: var(--primary, #2D6381);
    color: #fff;
}

/* =====================================================
   Confirmation Modal
   ===================================================== */
#confirmModal .modal-content {
    border-radius: 16px;
    overflow: hidden;
}

#confirmModal .modal-body {
    padding: 2rem;
}

#confirmModal .confirm-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

#confirmModal .confirm-icon .text-warning {
    color: #f59e0b !important;
}

#confirmModal .confirm-icon .text-danger {
    color: #ef4444 !important;
}

#confirmModal .confirm-icon .text-success {
    color: #10b981 !important;
}

#confirmModal .confirm-icon .text-info {
    color: #2D6381 !important;
}

#confirmModal .modal-title {
    font-weight: 600;
    color: #1f2937;
}

#confirmModal .btn {
    min-width: 100px;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
}

#confirmModal .btn-light {
    background: #f3f4f6;
    border: none;
    color: #4b5563;
}

#confirmModal .btn-light:hover {
    background: #e5e7eb;
}

#confirmModal .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
}

#confirmModal .btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #fff;
}

#confirmModal .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
}

/* Animation */
#confirmModal.show .modal-dialog {
    animation: modalPop 0.3s ease;
}

@keyframes modalPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Action Buttons Styling
   ============================================ */

/* Ensure all btn-group-sm buttons have equal size */
.btn-group-sm .btn {
    min-width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-group-sm .btn i {
    font-size: 0.8rem;
    line-height: 1;
}

/* Table action buttons - both btn-group-sm and d-flex gap styles */
table .btn-group-sm .btn,
table .d-flex .btn.btn-sm,
.d-flex.gap-1 .btn.btn-sm {
    min-width: 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

table .d-flex .btn.btn-sm i,
.d-flex.gap-1 .btn.btn-sm i {
    font-size: 0.8rem;
    line-height: 1;
}

/* Rounded circle buttons centering fix */
.btn.rounded-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn.rounded-circle i {
    line-height: 1;
}
