/* AHMEDTECH DZ-IPTV - Complete Styles with User Management & Modern Role Selection */
/* IMPROVED RESPONSIVE DESIGN */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.2);
    --button-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --link-color: #64b5f6;
    --toggle-bg: rgba(255, 255, 255, 0.1);
    --error-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --owner-color: #ffd700;
    --admin-color: #ff6b6b;
    --user-color: #4ecdc4;
    --card-hover: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] {
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --link-color: #667eea;
    --toggle-bg: rgba(0, 0, 0, 0.05);
    --card-hover: rgba(255, 255, 255, 0.8);
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: var(--bg-gradient);
    position: relative;
    overflow-x: hidden;
    transition: all 0.5s ease;
}

body[dir="rtl"] { font-family: 'Tajawal', sans-serif; }

.bg-animation {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bg-animation span {
    position: absolute;
    display: block;
    width: 20px; height: 20px;
    background: rgba(255, 255, 255, 0.1);
    animation: float 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

[data-theme="light"] .bg-animation span { background: rgba(255, 255, 255, 0.3); }

.bg-animation span:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.bg-animation span:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.bg-animation span:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.bg-animation span:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.bg-animation span:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.bg-animation span:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; border-radius: 0; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; border-radius: 50%; }
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: calc(100% - 40px);
}

body[dir="rtl"] .notification-container { right: auto; left: 20px; }

@media (max-width: 480px) {
    .notification-container { top: 10px; right: 10px; left: 10px; width: calc(100% - 20px); max-width: none; }
    body[dir="rtl"] .notification-container { left: 10px; right: 10px; }
}

.notification {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    pointer-events: all;
    transform: translateX(100%);
    opacity: 0;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: all 0.3s ease;
}

body[dir="rtl"] .notification {
    transform: translateX(-100%);
    animation: slideInRTL 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideIn { to { transform: translateX(0); opacity: 1; } }
@keyframes slideInRTL { to { transform: translateX(0); opacity: 1; } }

.notification.hiding { animation: slideOut 0.3s ease forwards; }
body[dir="rtl"] .notification.hiding { animation: slideOutRTL 0.3s ease forwards; }
@keyframes slideOut { to { transform: translateX(100%); opacity: 0; } }
@keyframes slideOutRTL { to { transform: translateX(-100%); opacity: 0; } }

.notification.success { border-left: 4px solid var(--success-color); background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, var(--glass-bg) 100%); }
.notification.error { border-left: 4px solid var(--error-color); background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, var(--glass-bg) 100%); }
.notification.warning { border-left: 4px solid var(--warning-color); background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, var(--glass-bg) 100%); }
.notification.info { border-left: 4px solid var(--info-color); background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, var(--glass-bg) 100%); }

body[dir="rtl"] .notification.success { border-left: none; border-right: 4px solid var(--success-color); }
body[dir="rtl"] .notification.error { border-left: none; border-right: 4px solid var(--error-color); }
body[dir="rtl"] .notification.warning { border-left: none; border-right: 4px solid var(--warning-color); }
body[dir="rtl"] .notification.info { border-left: none; border-right: 4px solid var(--info-color); }

.notification-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    animation: iconPop 0.5s ease;
}

@keyframes iconPop {
    0% { transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.notification.success .notification-icon { background: rgba(34, 197, 94, 0.2); color: var(--success-color); }
.notification.error .notification-icon { background: rgba(239, 68, 68, 0.2); color: var(--error-color); }
.notification.warning .notification-icon { background: rgba(245, 158, 11, 0.2); color: var(--warning-color); }
.notification.info .notification-icon { background: rgba(59, 130, 246, 0.2); color: var(--info-color); }

.notification-content { flex: 1; min-width: 0; }
.notification-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.notification-message { font-size: 13px; color: var(--text-secondary); line-height: 1.5; word-wrap: break-word; }

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    flex-shrink: 0;
}

.notification-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); transform: rotate(90deg); }

.notification-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 0 16px;
    overflow: hidden;
    width: 100%;
}

body[dir="rtl"] .notification-progress-bar { transform-origin: right; }
.notification-progress-bar { height: 100%; width: 100%; transform-origin: left; animation: progress linear forwards; }
@keyframes progress { to { transform: scaleX(0); } }

.notification.success .notification-progress-bar { background: var(--success-color); }
.notification.error .notification-progress-bar { background: var(--error-color); }
.notification.warning .notification-progress-bar { background: var(--warning-color); }
.notification.info .notification-progress-bar { background: var(--info-color); }

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.top-controls {
    position: absolute;
    top: 15px; left: 15px; right: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 100;
}

.theme-toggle, .lang-toggle {
    background: var(--toggle-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-family: inherit;
}

.theme-toggle:hover, .lang-toggle:hover { transform: scale(1.05); }

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px 22px;
    box-shadow: var(--shadow);
    text-align: center;
    width: 92%;
    max-width: 380px;
}

.logo-section { margin-bottom: 15px; }
.logo-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.flag { font-size: 20px; animation: wave 2s ease-in-out infinite; }
@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.logo-subtitle { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-top: 5px; }
.fire-emoji { color: #ff6b35; animation: flicker 1.5s infinite; }
@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.datetime-box {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 8px 15px;
    margin: 12px 0 15px;
    display: inline-block;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

.form-section { display: none; animation: fadeIn 0.4s ease; }
.form-section.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 15px; }
.back-btn {
    background: none;
    border: none;
    color: var(--link-color);
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.form-group { margin-bottom: 12px; text-align: left; }
body[dir="rtl"] .form-group { text-align: right; }
.input-wrapper { position: relative; }

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.form-input::placeholder { color: var(--text-secondary); }

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
}
body[dir="rtl"] .toggle-password { right: auto; left: 12px; }

.password-strength {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
    display: none;
}
.password-strength.show { display: block; }
.password-strength-bar { height: 100%; width: 0; transition: all 0.3s; border-radius: 2px; }
.strength-weak { background: var(--error-color); width: 33%; }
.strength-medium { background: #f59e0b; width: 66%; }
.strength-strong { background: var(--success-color); width: 100%; }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    font-size: 12px;
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}
.forgot-password, .switch-btn {
    color: var(--link-color);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--button-bg);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
    position: relative;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}
body[dir="rtl"] .login-btn.loading::after { right: auto; left: 15px; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.switch-section { margin-top: 15px; color: var(--text-secondary); font-size: 13px; }
.copyright {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.alert { padding: 10px; border-radius: 8px; margin-bottom: 12px; font-size: 12px; display: none; }
.alert-error { background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.5); color: var(--error-color); }
.alert-success { background: rgba(34, 197, 94, 0.2); border: 1px solid rgba(34, 197, 94, 0.5); color: var(--success-color); }
.alert-info { background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(59, 130, 246, 0.5); color: #3b82f6; }

.verification-code { display: flex; gap: 8px; justify-content: center; margin: 15px 0; }
.code-input {
    width: 45px; height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-primary);
}
.resend-code { font-size: 12px; color: var(--text-secondary); margin-top: 10px; }
.resend-btn { color: var(--link-color); background: none; border: none; cursor: pointer; font-family: inherit; font-weight: 600; }
.resend-btn:disabled { color: var(--text-secondary); cursor: not-allowed; }

/* Dashboard */
.dashboard { display: none; min-height: 100vh; position: relative; z-index: 10; }
.dashboard.active { display: block; }

.dashboard-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu { display: flex; align-items: center; gap: 15px; }
.role-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.role-owner { background: var(--owner-color); color: #000; }
.role-admin { background: var(--admin-color); color: #fff; }
.role-user { background: var(--user-color); color: #fff; }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 14px;
}

.logout-btn {
    background: var(--error-color);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}
.logout-btn:hover { background: #dc2626; }

.dashboard-container { padding: 25px; max-width: 1200px; margin: 0 auto; }
.welcome-section { text-align: center; margin-bottom: 30px; }
.welcome-title { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: 5px; }
.welcome-subtitle { font-size: 14px; color: var(--text-secondary); }

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.module-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    box-shadow: var(--shadow);
}

.module-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 35px;
    transition: transform 0.3s;
}
.module-card:hover .module-icon { transform: scale(1.1); }

.icon-user-mgmt { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.icon-settings { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
.icon-mac { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.icon-xtream { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.icon-ticket { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.icon-telegram { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.icon-apps { background: rgba(168, 85, 247, 0.2); color: #a855f7; }

.module-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 5px; }
.module-desc { font-size: 12px; color: var(--text-secondary); }

.access-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    margin-top: 10px;
    text-transform: uppercase;
}
.access-full { background: var(--success-color); color: white; }
.access-read { background: var(--link-color); color: white; }

/* ============================================
   USER MANAGEMENT MODULE STYLES
   ============================================ */

.module-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.back-to-dashboard {
    background: var(--toggle-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}
.back-to-dashboard:hover { background: var(--glass-bg); transform: translateX(-3px); }
body[dir="rtl"] .back-to-dashboard:hover { transform: translateX(3px); }

.module-title-header {
    font-size: 28px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.module-title-header i { color: #3b82f6; }
.module-subtitle { color: var(--text-secondary); font-size: 14px; }

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 0;
}

.stat-card:hover { 
    transform: translateY(-3px); 
    background: var(--card-hover); 
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Users Table */
.users-table-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.users-table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 600px;
}

.users-table thead { background: rgba(255, 255, 255, 0.05); }
.users-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}
body[dir="rtl"] .users-table th { text-align: right; }
.users-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.users-table tbody tr:last-child td { border-bottom: none; }
.users-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.users-table tbody tr.banned-row { background: rgba(239, 68, 68, 0.05); opacity: 0.8; }

/* User Info Cell */
.user-info-cell { display: flex; align-items: center; gap: 12px; }
.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}
.user-details { display: flex; flex-direction: column; gap: 2px; }
.user-name {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.you-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 8px;
}
body[dir="rtl"] .you-badge {
    margin-left: 0;
    margin-right: 8px;
}
.user-email { font-size: 12px; color: var(--text-secondary); }

/* Role Badges */
.role-badge-table {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.role-owner-badge { background: var(--owner-color); color: #000; }
.role-admin-badge { background: var(--admin-color); color: #fff; }
.role-user-badge { background: var(--user-color); color: #fff; }

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.status-badge.active { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.status-badge.active::before {
    content: '';
    width: 6px; height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
.status-badge.banned { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Action Buttons */
.actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}
.action-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.action-btn.ban { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.action-btn.ban:hover { background: #ef4444; color: white; }
.action-btn.unban { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.action-btn.unban:hover { background: #22c55e; color: white; }
.action-btn.edit { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.action-btn.edit:hover { background: #3b82f6; color: white; }
.action-btn.delete { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
.action-btn.delete:hover { background: #ef4444; color: white; }
.no-action { color: var(--text-secondary); font-size: 12px; }
.protected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}
.protected-badge::before { content: '🔒'; }

/* ============================================
   MODERN MODAL STYLES - Glassmorphism Design
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content.modern-modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 100px rgba(102, 126, 234, 0.15);
}

.modal-overlay.active .modal-content.modern-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 22px;
    margin: 0;
    font-weight: 700;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 4px 0 0 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Modal Body */
.modal-body {
    padding: 28px;
}

.modern-form-group {
    margin-bottom: 24px;
}

.modern-form-group:last-child {
    margin-bottom: 0;
}

.modern-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: none;
    letter-spacing: 0;
}

.modern-form-group label i {
    color: #667eea;
    font-size: 14px;
}

.modern-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.modern-input:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.modern-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.modern-form-group small {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.8;
}

/* Status Display */
.status-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-banned {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Modal Footer */
.modal-footer {
    padding: 20px 28px 28px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

body[dir="rtl"] .modal-footer {
    justify-content: flex-start;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

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

/* ============================================
   MODERN ROLE SELECTION - Radio Button Style
   ============================================ */

.role-selection-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.role-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.role-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

body[dir="rtl"] .role-option:hover {
    transform: translateX(-4px);
}

.role-option.selected {
    background: rgba(102, 126, 234, 0.15);
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.role-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.role-option-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.role-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.role-option[data-role="user"] .role-icon {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
}

.role-option[data-role="admin"] .role-icon {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.role-option[data-role="owner"] .role-icon {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.role-option.selected .role-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px currentColor;
}

.role-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.role-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.role-desc {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.role-option.selected .role-name {
    color: #667eea;
}

/* Radio Button Circle */
.role-radio {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.role-option.selected .role-radio {
    border-color: #667eea;
    background: #667eea;
}

.role-radio-inner {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.role-option.selected .role-radio-inner {
    transform: scale(1);
}

/* Glow Effect for Selected */
.role-option.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 0 0 16px;
}

body[dir="rtl"] .role-option.selected::before {
    left: auto;
    right: 0;
    border-radius: 0 16px 16px 0;
}

/* Animation on select */
@keyframes roleSelect {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.role-option.selecting {
    animation: roleSelect 0.3s ease;
}

/* Light Theme Adjustments */
[data-theme="light"] .role-option {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .role-option:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .role-option.selected {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

[data-theme="light"] .role-radio {
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .modal-content.modern-modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

[data-theme="light"] .modern-input {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #2d3748;
}

[data-theme="light"] .modern-input:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: #667eea;
}

[data-theme="light"] .modal-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #2d3748;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .modal-close {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #718096;
}

/* Current user row highlight in table */
.current-user-row {
    background: rgba(102, 126, 234, 0.08) !important;
    border-left: 3px solid #667eea;
}

body[dir="rtl"] .current-user-row {
    border-left: none;
    border-right: 3px solid #667eea;
}

/* ============================================
   RESPONSIVE DESIGN - IMPROVED
   ============================================ */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .dashboard-container { max-width: 1400px; }
    .modules-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Desktop (1024px - 1199px) */
@media (max-width: 1199px) {
    .modules-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-bar { grid-template-columns: repeat(4, 1fr); }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .modules-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .module-card { padding: 25px 15px; }
    .module-icon { width: 60px; height: 60px; font-size: 28px; }
    .module-title { font-size: 16px; }
    .module-desc { font-size: 11px; }

    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .stat-value { font-size: 28px; }

    .dashboard-header { padding: 12px 20px; }
    .dashboard-logo { font-size: 18px; }
    .user-menu { gap: 10px; }

    .modal-content.modern-modal { max-width: 90%; }
}

/* Mobile Large (480px - 767px) */
@media (max-width: 767px) {
    .modules-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .module-card { padding: 20px 12px; border-radius: 16px; }
    .module-icon { width: 50px; height: 50px; font-size: 24px; margin-bottom: 10px; }
    .module-title { font-size: 14px; margin-bottom: 3px; }
    .module-desc { font-size: 10px; }
    .access-badge { font-size: 9px; padding: 3px 8px; margin-top: 8px; }

    .dashboard-header { 
        flex-wrap: wrap; 
        gap: 10px; 
        padding: 12px 15px;
    }
    .dashboard-logo { font-size: 16px; }
    .user-info span { display: none; }
    .user-menu { gap: 8px; }

    .dashboard-container { padding: 15px; }
    .welcome-title { font-size: 20px; }
    .welcome-subtitle { font-size: 13px; }

    .stats-bar { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
        margin-bottom: 20px; 
    }
    .stat-card { 
        padding: 15px 10px; 
        border-radius: 12px; 
    }
    .stat-value { 
        font-size: 24px; 
        margin-bottom: 4px; 
    }
    .stat-label { 
        font-size: 10px; 
        letter-spacing: 0.5px; 
    }

    .users-table-wrapper { 
        overflow-x: auto; 
        margin: 0 -10px; 
        width: calc(100% + 20px); 
        border-radius: 12px; 
    }
    .users-table { min-width: 600px; }
    .users-table th, .users-table td { 
        padding: 12px 15px; 
        font-size: 13px; 
    }
    .user-avatar { width: 36px; height: 36px; font-size: 14px; }
    .user-name { font-size: 13px; }
    .user-email { font-size: 11px; }
    .actions-cell { 
        flex-direction: column; 
        gap: 6px; 
    }
    .action-btn { 
        padding: 6px 10px; 
        font-size: 11px; 
        width: 100%; 
        justify-content: center; 
    }

    .modal-content.modern-modal { 
        margin: 10px; 
        max-height: 95vh; 
        border-radius: 20px; 
        max-width: 100%;
    }
    .modal-header { padding: 20px; }
    .modal-body { padding: 20px; }
    .modal-footer { 
        padding: 16px 20px 20px; 
        flex-direction: column; 
    }
    .btn { 
        width: 100%; 
        justify-content: center; 
    }
    .modal-icon { width: 40px; height: 40px; font-size: 16px; }
    .modal-header h3 { font-size: 18px; }
    .modal-subtitle { font-size: 12px; }

    .role-option { 
        padding: 14px 16px; 
        border-radius: 14px; 
    }
    .role-icon { 
        width: 36px; 
        height: 36px; 
        font-size: 16px; 
        border-radius: 10px; 
    }
    .role-name { font-size: 15px; }
    .role-desc { font-size: 11px; }
    .role-radio { width: 22px; height: 22px; }

    .module-title-header { font-size: 22px; }
    .back-to-dashboard { font-size: 13px; padding: 6px 12px; }
}

/* Mobile Small (375px - 479px) */
@media (max-width: 479px) {
    .modules-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    .module-card { 
        padding: 15px 8px; 
        border-radius: 14px; 
    }
    .module-icon { 
        width: 42px; 
        height: 42px; 
        font-size: 20px; 
        margin-bottom: 8px; 
    }
    .module-title { 
        font-size: 12px; 
        margin-bottom: 2px; 
    }
    .module-desc { 
        font-size: 9px; 
        line-height: 1.2; 
    }
    .access-badge { 
        font-size: 8px; 
        padding: 2px 6px; 
        margin-top: 6px; 
    }

    .dashboard-logo { font-size: 14px; }
    .role-badge { font-size: 10px; padding: 4px 8px; }
    .logout-btn { padding: 6px 12px; font-size: 11px; }

    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-card { padding: 12px 8px; border-radius: 10px; }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 9px; }

    .users-table th, .users-table td { 
        padding: 10px 12px; 
        font-size: 12px; 
    }
    .user-avatar { width: 32px; height: 32px; font-size: 12px; }
    .you-badge { font-size: 9px; padding: 1px 6px; }

    .modal-content.modern-modal { border-radius: 16px; }
    .modal-header { padding: 16px; }
    .modal-body { padding: 16px; }
    .modal-footer { padding: 12px 16px 16px; }

    .modern-form-group { margin-bottom: 16px; }
    .modern-form-group label { font-size: 13px; margin-bottom: 6px; }
    .modern-input { padding: 12px 14px; font-size: 14px; border-radius: 12px; }

    .role-option { padding: 12px 14px; border-radius: 12px; }
    .role-icon { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
    .role-name { font-size: 14px; }
    .role-desc { font-size: 10px; }
    .role-option-content { gap: 10px; }
    .role-radio { width: 20px; height: 20px; }
    .role-radio-inner { width: 6px; height: 6px; }

    .btn { padding: 10px 20px; font-size: 13px; }
    .modal-icon { width: 36px; height: 36px; font-size: 14px; border-radius: 12px; }
    .modal-header h3 { font-size: 16px; }

    .status-display { padding: 8px 12px; font-size: 13px; }
}

/* Mobile Extra Small (< 375px) */
@media (max-width: 374px) {
    .modules-grid { gap: 8px; }
    .module-card { padding: 12px 6px; }
    .module-icon { width: 36px; height: 36px; font-size: 16px; }
    .module-title { font-size: 11px; }

    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .stat-card { padding: 10px 6px; }
    .stat-value { font-size: 18px; }
    .stat-label { font-size: 8px; }

    .role-option { padding: 10px 12px; }
    .role-icon { width: 28px; height: 28px; font-size: 12px; }
    .role-name { font-size: 13px; }
    .role-desc { display: none; }

    .users-table th, .users-table td { padding: 8px 10px; font-size: 11px; }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content.modern-modal {
        max-height: 95vh;
        overflow-y: auto;
    }
    .modal-body { max-height: 60vh; overflow-y: auto; }
    .role-selection-container { gap: 8px; }
    .role-option { padding: 12px 16px; }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .role-option, .modal-content.modern-modal, .stat-card, .module-card {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .role-option, .modal-content.modern-modal, .role-radio-inner, .role-icon {
        transition: none !important;
        animation: none !important;
    }
}


/* ============================================
   FREE MAC'S MODULE - Clean Card Design
   ============================================ */

.mac-module-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.mac-module-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 10px 0;
}

.add-mac-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.add-mac-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.mac-header-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.cleanup-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.cleanup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.mac-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 15px;
}

.mac-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.mac-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(255, 255, 255, 0.25);
}

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

.mac-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.mac-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.mac-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.mac-status.expired {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.mac-card-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 8px 0;
}

.mac-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    justify-content: flex-start;
}

.mac-info-row .mac-label {
    order: 1;
}

.mac-info-row .mac-value {
    order: 2;
    flex: 1;
}

.mac-info-row .mac-copy-btn {
    order: 3;
    margin-left: auto;
}

.mac-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 45px;
    flex-shrink: 0;
}

.mac-value {
    font-size: 12px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 0 1 auto;
}

.mac-address {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.mac-copy-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 11px;
}

.mac-copy-btn:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

.mac-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--glass-border);
}

.mac-expiry {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.mac-expiry i {
    color: #f59e0b;
    font-size: 11px;
}

.mac-actions {
    display: flex;
    gap: 6px;
}

.mac-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.mac-action-btn.edit {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.mac-action-btn.edit:hover {
    background: #f59e0b;
    color: white;
    transform: scale(1.05);
}

.mac-action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.mac-action-btn.delete:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.05);
}

.mac-loading,
.mac-empty,
.mac-error {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.mac-empty i,
.mac-error i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.mac-error i {
    color: #ef4444;
}

/* Light theme adjustments */
[data-theme="light"] .mac-card {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .mac-cards-container {
        grid-template-columns: 1fr;
    }

    .mac-card {
        padding: 15px;
    }

    .mac-info-row {
        flex-wrap: wrap;
    }

    .mac-value {
        width: 100%;
        order: 3;
        margin-top: 5px;
    }

    .mac-copy-btn {
        order: 2;
    }
}

body[dir="rtl"] .mac-info-row {
    flex-direction: row;
}

body[dir="rtl"] .mac-label {
    text-align: right;
}

body[dir="rtl"] .mac-info-row .mac-copy-btn {
    margin-left: 0;
    margin-right: auto;
}

body[dir="rtl"] .mac-card-header {
    flex-direction: row-reverse;
}

body[dir="rtl"] .mac-card-footer {
    flex-direction: row-reverse;
}

body[dir="rtl"] .mac-module-header {
    text-align: right;
}


/* ============================================
   TELEGRAM MODULE STYLES
   ============================================ */

.telegram-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.telegram-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.telegram-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.telegram-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.group-card::before {
    background: linear-gradient(90deg, #0088cc, #00a8e8);
}

.channel-card::before {
    background: linear-gradient(90deg, #00a8e8, #00d4ff);
}

.profile-card::before {
    background: linear-gradient(90deg, #00d4ff, #38bdf8);
}

.telegram-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.telegram-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.group-card .telegram-icon {
    background: linear-gradient(135deg, #0088cc 0%, #00a8e8 100%);
}

.channel-card .telegram-icon {
    background: linear-gradient(135deg, #00a8e8 0%, #00d4ff 100%);
}

.profile-card .telegram-icon {
    background: linear-gradient(135deg, #00d4ff 0%, #38bdf8 100%);
}

.telegram-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.telegram-card-body {
    margin-bottom: 15px;
}

.telegram-link-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.telegram-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.telegram-value {
    font-size: 14px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.telegram-card-footer {
    display: flex;
    gap: 10px;
}

.telegram-btn {
    flex: 1;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    font-family: inherit;
}

.telegram-btn.visit {
    background: linear-gradient(135deg, #0088cc 0%, #00a8e8 100%);
    color: white;
}

.telegram-btn.visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
}

.telegram-btn.copy {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.telegram-btn.copy:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

/* Telegram Modal */
.telegram-modal {
    max-width: 500px;
}

/* RTL Support */
body[dir="rtl"] .telegram-card-header {
    flex-direction: row-reverse;
}

body[dir="rtl"] .telegram-card-footer {
    flex-direction: row-reverse;
}

body[dir="rtl"] .telegram-link-row {
    align-items: flex-end;
}

body[dir="rtl"] .telegram-label {
    text-align: right;
}

/* Light Theme */
[data-theme="light"] .telegram-card {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .telegram-value {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .telegram-cards-container {
        grid-template-columns: 1fr;
    }

    .telegram-card {
        padding: 15px;
    }

    .telegram-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .telegram-title {
        font-size: 16px;
    }

    .telegram-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ============================================
   TICKET SYSTEM STYLES
   ============================================ */

.ticket-container {
    max-width: 1200px;
    margin: 0 auto;
}

.ticket-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.ticket-stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.ticket-stat-card:hover {
    transform: translateY(-2px);
    background: var(--card-hover);
}

.ticket-stat-value {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 3px;
}

.ticket-stat-value.open { color: #22c55e; }
.ticket-stat-value.closed { color: #ef4444; }
.ticket-stat-value.total { color: #3b82f6; }
.ticket-stat-value.my { color: #f59e0b; }

.ticket-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ticket List */
.ticket-list {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
}

.ticket-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 10px;
}

.ticket-list-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-list-title i {
    color: #ef4444;
}

.ticket-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ticket-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.ticket-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.ticket-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Ticket Items */
.ticket-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ticket-item:last-child {
    border-bottom: none;
}

.ticket-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ticket-item.unread {
    background: rgba(102, 126, 234, 0.08);
    border-left: 3px solid #667eea;
}

body[dir="rtl"] .ticket-item.unread {
    border-left: none;
    border-right: 3px solid #667eea;
}

.ticket-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ticket-status-icon.open {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.ticket-status-icon.closed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.ticket-content {
    flex: 1;
    min-width: 0;
}

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

.ticket-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-id {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.ticket-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ticket-badge.open {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.ticket-badge.closed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.ticket-badge.priority-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.ticket-badge.priority-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.ticket-badge.priority-low {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.ticket-preview {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.ticket-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-secondary);
}

.ticket-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ticket-meta i {
    font-size: 11px;
}

.ticket-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ticket-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.ticket-action-btn.view {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.ticket-action-btn.view:hover {
    background: #3b82f6;
    color: white;
}

.ticket-action-btn.close-ticket {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.ticket-action-btn.close-ticket:hover {
    background: #22c55e;
    color: white;
}

.ticket-action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.ticket-action-btn.delete:hover {
    background: #ef4444;
    color: white;
}

/* Empty State */
.ticket-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.ticket-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.ticket-empty h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.ticket-empty p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Create Ticket Button */
.create-ticket-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.create-ticket-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Ticket Detail View */
.ticket-detail {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
}

.ticket-detail-header {
    padding: 25px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
}

.ticket-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticket-detail-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
}

.ticket-detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Ticket Messages */
.ticket-messages {
    padding: 25px;
    max-height: 500px;
    overflow-y: auto;
}

.ticket-message {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.ticket-message.own {
    flex-direction: row-reverse;
}

.ticket-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.ticket-message.own .ticket-message-avatar {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.ticket-message-content {
    flex: 1;
    max-width: 70%;
}

.ticket-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 13px;
}

.ticket-message-author {
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-message-time {
    color: var(--text-secondary);
    font-size: 11px;
}

.ticket-message-body {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.ticket-message.own .ticket-message-body {
    background: rgba(102, 126, 234, 0.2);
}

/* Ticket Reply Form */
.ticket-reply-form {
    padding: 20px 25px;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
}

.ticket-reply-input-wrapper {
    display: flex;
    gap: 12px;
}

.ticket-reply-input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 50px;
}

.ticket-reply-input:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
}

.ticket-reply-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-reply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ticket-reply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Create Ticket Modal */
.ticket-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.ticket-priority-select {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.ticket-priority-option {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.ticket-priority-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ticket-priority-option.selected {
    border-color: currentColor;
    background: currentColor;
    background-opacity: 0.2;
}

.ticket-priority-option.low {
    color: #22c55e;
}

.ticket-priority-option.medium {
    color: #f59e0b;
}

.ticket-priority-option.high {
    color: #ef4444;
}

.ticket-priority-option.selected.low {
    background: rgba(34, 197, 94, 0.2);
}

.ticket-priority-option.selected.medium {
    background: rgba(245, 158, 11, 0.2);
}

.ticket-priority-option.selected.high {
    background: rgba(239, 68, 68, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .ticket-stat-value {
        font-size: 24px;
    }

    .ticket-list-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ticket-item {
        flex-direction: column;
        gap: 10px;
    }

    .ticket-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .ticket-message-content {
        max-width: 85%;
    }

    .ticket-reply-input-wrapper {
        flex-direction: column;
    }

    .ticket-reply-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================
   MODERN LINK TYPE SELECTION - Radio Style
   ============================================ */

.link-type-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.link-type-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-type-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

body[dir="rtl"] .link-type-option:hover {
    transform: translateX(-4px);
}

.link-type-option.selected {
    background: rgba(102, 126, 234, 0.12);
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.15);
}

.link-type-option.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px 0 0 14px;
}

body[dir="rtl"] .link-type-option.selected::before {
    left: auto;
    right: 0;
    border-radius: 0 14px 14px 0;
}

.link-type-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.link-type-option.selected .link-type-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px currentColor;
}

.link-type-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 12px;
}

.link-type-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.link-type-option.selected .link-type-name {
    color: #667eea;
}

.link-type-desc {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.link-type-radio {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.link-type-option.selected .link-type-radio {
    border-color: #667eea;
    background: #667eea;
}

.link-type-radio-inner {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.link-type-option.selected .link-type-radio-inner {
    transform: scale(1);
}

/* Light Theme Adjustments */
[data-theme="light"] .link-type-option {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .link-type-option:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .link-type-option.selected {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

[data-theme="light"] .link-type-radio {
    border-color: rgba(0, 0, 0, 0.2);
}

/* Animation */
@keyframes linkTypeSelect {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.link-type-option.selecting {
    animation: linkTypeSelect 0.3s ease;
}

/* Responsive */
@media (max-width: 480px) {
    .link-type-option {
        padding: 12px 14px;
    }

    .link-type-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 10px;
    }

    .link-type-name {
        font-size: 14px;
    }

    .link-type-desc {
        font-size: 11px;
    }
}


/* ============================================
   SYSTEM SETTINGS MODULE
   ============================================ */

.system-settings-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.settings-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.settings-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section-title i {
    color: #667eea;
    font-size: 20px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card-large {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-card-large:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon-large {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-info-large {
    flex: 1;
}

.stat-number-large {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label-large {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Maintenance Card */
.maintenance-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.maintenance-card.active {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.maintenance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.maintenance-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    transition: all 0.3s ease;
}

.status-indicator.on {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.status-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 32px;
    cursor: pointer;
}

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

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 34px;
    transition: all 0.3s ease;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(28px);
}

/* Maintenance Body */
.maintenance-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.maintenance-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.maintenance-info i {
    color: #3b82f6;
    margin-top: 2px;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-modern label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.modern-textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

.modern-textarea:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn-save-settings {
    align-self: flex-start;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-save-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* System Info Card */
.system-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

/* RTL Support */
body[dir="rtl"] .settings-section-title i {
    margin-left: 0;
    margin-right: 0;
}

body[dir="rtl"] .stat-card-large {
    flex-direction: row-reverse;
}

body[dir="rtl"] .btn-save-settings {
    align-self: flex-end;
}

body[dir="rtl"] .maintenance-info {
    flex-direction: row-reverse;
}

body[dir="rtl"] .maintenance-info i {
    margin-top: 2px;
}

/* Light Theme */
[data-theme="light"] .settings-section {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .stat-card-large,
[data-theme="light"] .maintenance-card,
[data-theme="light"] .system-info-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .modern-textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #2d3748;
}

[data-theme="light"] .modern-textarea:focus {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .toggle-slider {
    background: rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card-large {
        padding: 15px;
    }

    .stat-icon-large {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .stat-number-large {
        font-size: 22px;
    }

    .settings-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .maintenance-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .btn-save-settings {
        width: 100%;
        justify-content: center;
    }
}
