/* ==================== DESIGN SYSTEM TOKENS ==================== */
:root {
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-arabic: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    
    /* GATE 01 Brand - Deep Blue Cybersecurity Palette */
    --color-bg: #050a14;
    --color-surface: rgba(8, 18, 36, 0.55);
    --color-surface-hover: rgba(10, 24, 48, 0.7);
    --color-border: rgba(30, 120, 220, 0.15);
    --color-border-glow: rgba(30, 120, 220, 0.4);
    
    --color-primary: #1a6fd4;       /* GATE 01 Electric Blue */
    --color-primary-hover: #1558b0;
    --color-primary-glow: rgba(26, 111, 212, 0.45);
    
    --color-secondary: rgba(255, 255, 255, 0.07);
    --color-secondary-hover: rgba(255, 255, 255, 0.13);
    
    --color-text: #e8f0fe;
    --color-text-muted: #8aadd4;
    --color-text-dim: #4d7aa8;
    
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-error: #ef4444;
    --color-error-bg: rgba(239, 68, 68, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 8px 16px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px 0 rgba(26, 111, 212, 0.2);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== GLOBAL STYLES ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    background-image:
        linear-gradient(rgba(5, 10, 20, 0.72), rgba(5, 10, 20, 0.72)),
        url('bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--color-text);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Decorative Background Glows */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: floatGlow 12s infinite alternate ease-in-out;
}

.bg-glow-1 {
    background: radial-gradient(circle, #1a6fd4 0%, rgba(26, 111, 212, 0) 70%);
    top: -200px;
    left: -200px;
}

.bg-glow-2 {
    background: radial-gradient(circle, #0d47a1 0%, rgba(13, 71, 161, 0) 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: -6s;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(80px, 60px) scale(1.15);
    }
}

.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 24px;
    z-index: 10;
}

/* ==================== GLASSMORPHISM CARD DEFINITION ==================== */
.glass-card {
    background: var(--color-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--color-border-glow);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* ==================== FORM ELEMENTS ==================== */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px 12px 42px;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-fast);
}

input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

input::placeholder {
    color: var(--color-text-dim);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    user-select: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px 0 rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px 0 rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-secondary-hover);
    border-color: var(--color-text-muted);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 16px;
    text-align: left;
}

.alert-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ==================== LOGIN VIEW CARD ==================== */
.login-card {
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 32px;
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    display: none;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.login-card.active {
    opacity: 1;
    transform: scale(1);
    display: block;
}

.card-header {
    margin-bottom: 32px;
}

/* ==================== LOGO IMAGES ==================== */
.logo-wrap {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.login-logo-icon {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 0 16px rgba(26, 111, 212, 0.7));
    animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-6px); }
}

.nav-logo-full {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(26, 111, 212, 0.5));
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
    color: #e8f0fe;
    text-shadow: 0 0 20px rgba(26, 111, 212, 0.6);
}

.brand-tagline {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.card-header p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.card-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.card-footer p {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    line-height: 1.4;
}

.card-footer code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 4px;
    border-radius: 4px;
    color: #cbd5e1;
}

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn var(--transition-normal);
}

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

/* Navigation Header */
.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-radius: var(--radius-md);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.nav-user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.08);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-email {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-role-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    margin-top: 2px;
}

/* Tab Bar Navigation */
.tab-bar {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Dashboard Content Areas */
.dashboard-content {
    min-height: 480px;
    position: relative;
}

.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.tab-pane.active {
    display: block;
    opacity: 1;
}

/* Grid layout for search and results */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.content-card {
    padding: 32px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.content-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.content-card .subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* ==================== SEARCH MODE TOGGLE ==================== */
.search-mode-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mode-btn:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.04);
}

.mode-btn.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Search input specific formatting */
.search-input-group {
    display: flex;
    gap: 12px;
}

.search-input-group .input-wrapper {
    flex: 1;
}

/* Results Formatting */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.badge {
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

.btn-copy:active {
    transform: scale(0.98);
}

.btn-copy.copied {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.results-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    color: var(--color-text-dim);
    border: 2px dashed rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 40px;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.2;
}

.results-content-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn var(--transition-normal);
}

.results-meta {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.meta-label {
    color: var(--color-text-muted);
}

.meta-value {
    font-weight: 600;
    color: var(--color-primary);
}

.names-list-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: 250px;
    padding-right: 4px;
}

/* Custom Scrollbar for list and tables */
.names-list-wrapper::-webkit-scrollbar,
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.names-list-wrapper::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.names-list-wrapper::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.3);
}

.names-list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.names-list li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.names-list li::before {
    display: none; /* Hide default icon, drawn in HTML */
}

.name-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.name-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    font-weight: 550;
    font-size: 1.05rem;
}

.name-item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.name-text {
    flex: 1;
}

.name-count-badge {
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 3px 9px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.names-list li:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
}

.contributors-section {
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contributors-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-dim);
    letter-spacing: 0.5px;
}

.contributors-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.contributor-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.contributor-pill:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--color-text);
}

.contributor-phone {
    font-family: monospace;
    font-weight: 600;
}

.contributor-name {
    color: var(--color-text-dim);
}

.contributor-pill:hover .contributor-name {
    color: var(--color-text-muted);
}

/* ==================== AUDIT LOG TABLE ==================== */
.log-card {
    min-height: 520px;
}

.log-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.2);
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.audit-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-muted);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.audit-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--color-text);
}

.audit-table tbody tr {
    transition: background-color var(--transition-fast);
}

.audit-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.audit-table tbody tr:last-child td {
    border-bottom: none;
}

.audit-table td code {
    background: rgba(99, 102, 241, 0.15);
    color: #cbd5e1;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

/* ==================== SELECT DROPDOWNS ==================== */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px 12px 42px;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.select-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.select-wrapper::after {
    content: "▼";
    font-size: 0.65rem;
    color: var(--color-text-muted);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.select-input option {
    background-color: #12121d;
    color: var(--color-text);
}

/* ==================== CHECKBOXES ==================== */
.form-group-checkbox {
    margin-bottom: 24px;
    text-align: left;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.checkbox-container:hover input ~ .checkbox-checkmark {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.checkbox-container input:checked ~ .checkbox-checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px 0 var(--color-primary-glow);
}

.checkbox-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkbox-checkmark:after {
    display: block;
}

.checkbox-container .checkbox-checkmark:after {
    left: 7px;
    top: 3px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ==================== TOGGLE SWITCHES ==================== */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: var(--transition-fast);
    border-radius: 20px;
    border: 1px solid var(--color-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--color-text-muted);
    transition: var(--transition-fast);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-success-bg);
    border-color: var(--color-success);
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: var(--color-success);
}

.role-select-cell {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.role-select-cell:focus {
    border-color: var(--color-primary);
}

.role-select-cell option {
    background-color: #12121d;
    color: var(--color-text);
}

.list-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* Admin badge customization */
.admin-badge {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-nav {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .nav-user-profile {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .content-card {
        min-height: auto;
    }
    
    .log-header-row {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    #refresh-logs-btn, #refresh-users-btn {
        width: 100%;
    }
}

/* ==================== LANGUAGE PICKER ==================== */
.lang-picker-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--color-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 5px 10px;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast);
}

.lang-picker-floating:hover {
    border-color: var(--color-border-glow);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.5px;
}

.lang-btn.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.lang-btn:hover:not(.active) {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.06);
}

.lang-divider {
    color: var(--color-text-dim);
    font-size: 0.75rem;
    user-select: none;
}

/* ==================== RTL / ARABIC OVERRIDES ==================== */
[lang="ar"] {
    font-family: var(--font-arabic);
}

[dir="rtl"] .lang-picker-floating {
    right: auto;
    left: 20px;
}

[dir="rtl"] .input-icon {
    left: auto;
    right: 14px;
}

[dir="rtl"] input,
[dir="rtl"] .select-input {
    padding-left: 16px;
    padding-right: 42px;
    text-align: right;
}

[dir="rtl"] .select-wrapper::after {
    right: auto;
    left: 16px;
}

[dir="rtl"] .user-info {
    align-items: flex-end;
}

[dir="rtl"] .names-list li:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .checkbox-container {
    padding-left: 0;
    padding-right: 32px;
}

[dir="rtl"] .checkbox-checkmark {
    left: auto;
    right: 0;
}

[dir="rtl"] .audit-table {
    text-align: right;
}

[dir="rtl"] .form-group {
    text-align: right;
}

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

[dir="rtl"] .card-footer {
    text-align: right;
}

[dir="rtl"] .names-list-wrapper {
    padding-right: 0;
    padding-left: 4px;
}

@media (max-width: 768px) {
    [dir="rtl"] .lang-picker-floating {
        left: 12px;
        right: auto;
        top: 12px;
    }
}
