/* ForaTV Admin Panel - Glassmorphism Design System v2.0 | RTL Arabic | Dark Theme */
:root {
    --bg-primary: #050510;
    --bg-secondary: #0a0a2e;
    --bg-tertiary: #12123a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-bg-active: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-blur: 20px;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --accent-glow: rgba(99, 102, 241, 0.25);
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.3);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-border: rgba(34, 197, 94, 0.3);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --warning-border: rgba(245, 158, 11, 0.3);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.3);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --info-border: rgba(59, 130, 246, 0.3);
    --font-family: 'Cairo', sans-serif;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-xs: 0.75rem;
    --text-sm: 0.85rem;
    --text-base: 0.95rem;
    --text-lg: 1.1rem;
    --text-xl: 1.3rem;
    --text-2xl: 1.6rem;
    --text-3xl: 2rem;
    --sidebar-width: 280px;
    --topbar-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    direction: rtl
}

a {
    color: inherit;
    text-decoration: none
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit
}

input,
select,
textarea {
    font-family: inherit;
    outline: none
}

::-webkit-scrollbar {
    width: 6px
}

::-webkit-scrollbar-track {
    background: var(--bg-primary)
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary)
}

/* Animated BG */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 8s ease-in-out infinite
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-primary), transparent);
    top: -100px;
    right: -100px
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--cyan), transparent);
    bottom: -80px;
    left: -80px;
    animation-delay: 3s
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-secondary), transparent);
    top: 40%;
    left: 30%;
    animation-delay: 5s;
    opacity: 0.2
}

.orb-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #ec4899, transparent);
    top: 20%;
    right: 40%;
    animation-delay: 2s;
    opacity: 0.15
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1)
    }

    33% {
        transform: translate(30px, -30px) scale(1.1)
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9)
    }
}

.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite
}

@keyframes particleFloat {
    0% {
        transform: translateY(0);
        opacity: 0
    }

    10% {
        opacity: 1
    }

    90% {
        opacity: 1
    }

    100% {
        transform: translateY(-100vh);
        opacity: 0
    }
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: var(--transition)
}

.glass-card:hover {
    border-color: var(--glass-border-hover)
}

.glass-card-mini {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md)
}

/* LOGIN PAGE */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1)
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.login-card {
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px
}

.login-logo {
    margin-bottom: 35px
}

.logo-ring {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: logoPulse 3s ease-in-out infinite
}

.logo-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    opacity: 0.3;
    filter: blur(10px);
    animation: ringGlow 3s ease-in-out infinite
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.05)
    }
}

@keyframes ringGlow {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1)
    }

    50% {
        opacity: 0.5;
        transform: scale(1.15)
    }
}

.logo-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent-primary);
    position: relative;
    z-index: 1
}

.logo-title {
    font-size: var(--text-3xl);
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-top: 5px
}

.title-line {
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    margin: 15px auto 0;
    border-radius: 3px
}

/* Alerts */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: var(--text-sm);
    animation: fadeIn 0.4s ease
}

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger)
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success)
}

.alert-warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning)
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 30px
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    overflow: hidden
}

.input-group:hover {
    border-color: var(--glass-border-hover)
}

.input-group.focused {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.06)
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 52px;
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition)
}

.input-group.focused .input-icon {
    color: var(--accent-primary)
}

.input-group input {
    flex: 1;
    height: 52px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: var(--text-base);
    padding: 0 15px 0 0
}

.input-group input::placeholder {
    color: var(--text-muted)
}

.input-line {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition)
}

.input-group.focused .input-line {
    width: 100%
}

.toggle-password {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 52px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition)
}

.toggle-password:hover {
    color: var(--text-primary)
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow)
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow)
}

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

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25)
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.35)
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25)
}

.btn-danger:hover {
    transform: translateY(-2px)
}

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

.btn-ghost {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary)
}

.btn-ghost:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-primary)
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm)
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-sm)
}

.btn-login {
    width: 100%;
    height: 52px;
    font-size: var(--text-lg);
    margin-top: 8px
}

.btn-login .btn-content,
.btn-login .btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px
}

.btn-login .btn-arrow {
    transition: transform 0.3s
}

.btn-login:hover .btn-arrow {
    transform: translateX(-5px)
}

.btn-login.loading {
    opacity: 0.8;
    pointer-events: none
}

.login-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px
}

.footer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: var(--text-xs)
}

.footer-badge i {
    color: var(--success);
    font-size: 10px
}

.version-text {
    color: var(--text-muted);
    font-size: var(--text-xs);
    opacity: 0.6
}

.shake {
    animation: shake 0.6s ease-in-out
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0)
    }

    10%,
    50%,
    90% {
        transform: translateX(-8px)
    }

    30%,
    70% {
        transform: translateX(8px)
    }
}

/* DASHBOARD LAYOUT */
.dashboard-page {
    display: flex;
    min-height: 100vh
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(10, 10, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition-slow);
    overflow-y: auto
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px
}

.sidebar-logo-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0
}

.sidebar-logo-text h2 {
    font-size: var(--text-xl);
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.sidebar-badge {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase
}

.sidebar-close {
    display: none;
    position: absolute;
    left: 15px;
    top: 25px;
    width: 35px;
    height: 35px;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 16px;
    align-items: center;
    justify-content: center;
    transition: var(--transition)
}

.sidebar-close:hover {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger)
}

.sidebar-nav {
    flex: 1;
    padding: 15px 12px
}

.nav-section-title {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 16px;
    margin-bottom: 5px
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition);
    margin-bottom: 4px;
    position: relative
}

.nav-link:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary)
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.2)
}

.nav-link-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition)
}

.nav-link.active .nav-link-icon {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 3px 10px var(--accent-glow)
}

.nav-link-text {
    font-size: var(--text-sm);
    font-weight: 600
}

.nav-active-indicator {
    width: 4px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 4px;
    position: absolute;
    right: -12px
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--glass-border)
}

.admin-info-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #6366f1, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0
}

.admin-details {
    display: flex;
    flex-direction: column
}

.admin-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary)
}

.admin-role {
    font-size: var(--text-xs);
    color: var(--text-muted)
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: var(--transition)
}

.btn-logout:hover {
    background: var(--danger);
    color: white
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999
}

.main-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    z-index: 1
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    margin: 15px 20px 0;
    border-radius: var(--radius-lg)
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 18px;
    align-items: center;
    justify-content: center;
    transition: var(--transition)
}

.menu-toggle:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary)
}

.page-title-area {
    display: flex;
    align-items: center;
    gap: 12px
}

.page-title-icon {
    font-size: 20px;
    color: var(--accent-primary)
}

.page-title {
    font-size: var(--text-xl);
    font-weight: 700
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: var(--text-xs)
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: var(--transition)
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: statusPulse 2s ease-in-out infinite
}

.status-dot.offline {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5)
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.5
    }
}

.status-text {
    color: var(--text-secondary)
}

.topbar-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: var(--text-sm)
}

.topbar-time i {
    font-size: 12px
}

.content-area {
    padding: 25px 20px;
    animation: contentFadeIn 0.5s ease
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px
}

.stat-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition)
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow)
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0
}

.stat-card.accent::before {
    background: var(--accent-gradient)
}

.stat-card.cyan::before {
    background: linear-gradient(180deg, var(--cyan), #0ea5e9)
}

.stat-card.success::before {
    background: linear-gradient(180deg, var(--success), #15803d)
}

.stat-card.warning::before {
    background: linear-gradient(180deg, var(--warning), #d97706)
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px
}

.stat-card.accent .stat-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary)
}

.stat-card.cyan .stat-icon {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cyan)
}

.stat-card.success .stat-icon {
    background: var(--success-bg);
    color: var(--success)
}

.stat-card.warning .stat-icon {
    background: var(--warning-bg);
    color: var(--warning)
}

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

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary)
}

/* Section Cards */
.section-card {
    padding: 25px;
    margin-bottom: 20px
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-lg);
    font-weight: 700
}

.section-title i {
    color: var(--accent-primary)
}

.section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

/* Data Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border)
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm)
}

.data-table thead {
    background: rgba(255, 255, 255, 0.04)
}

.data-table th {
    padding: 14px 18px;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    vertical-align: middle
}

.data-table tbody tr {
    transition: var(--transition)
}

.data-table tbody tr:hover {
    background: var(--glass-bg-hover)
}

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

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border)
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border)
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border)
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border)
}

.badge-accent {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.3)
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: modalOverlayIn 0.3s ease
}

@keyframes modalOverlayIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal {
    width: 100%;
    max-width: 550px;
    padding: 0;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto
}

.modal-sm {
    max-width: 420px
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.modal-header {
    padding: 22px 25px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.modal-header h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px
}

.modal-close {
    width: 35px;
    height: 35px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border)
}

.modal-close:hover {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger)
}

.modal-body {
    padding: 25px
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px
}

/* Form Elements */
.form-group {
    margin-bottom: 18px
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: var(--transition)
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.06)
}

.form-control::placeholder {
    color: var(--text-muted)
}

textarea.form-control {
    min-height: 100px;
    resize: vertical
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px
}

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

.toggle-switch input {
    display: none
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    transition: var(--transition);
    border: 1px solid var(--glass-border)
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition)
}

.toggle-switch input:checked+.toggle-slider {
    background: rgba(34, 197, 94, 0.2);
    border-color: var(--success-border)
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(-26px);
    background: var(--success);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5)
}

/* Control Card */
.control-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 25px;
    gap: 15px
}

.control-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1
}

.control-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0
}

.control-text h4 {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: 3px
}

.control-text p {
    font-size: var(--text-xs);
    color: var(--text-muted)
}

/* Search Bar */
.search-bar {
    position: relative;
    max-width: 320px;
    width: 100%
}

.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: var(--transition)
}

.search-bar input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1)
}

.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px
}

.empty-state-icon {
    font-size: 50px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 15px
}

.empty-state h3 {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: 8px
}

.empty-state p {
    font-size: var(--text-sm);
    color: var(--text-muted)
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    cursor: pointer;
    transition: var(--transition)
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-primary)
}

.quick-action-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0
}

.quick-action-text {
    font-size: var(--text-sm);
    font-weight: 600
}

/* Info Row */
.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03)
}

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

.info-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px
}

.info-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary)
}

/* Update Card */
.update-current {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2)
}

.update-version-badge {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.update-version-badge .ver-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7
}

.update-version-badge .ver-number {
    font-size: var(--text-xl);
    font-weight: 900
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 5px;
}

@media(max-width: 768px) {
    .update-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.update-details h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 5px
}

.update-details p {
    font-size: var(--text-sm);
    color: var(--text-secondary)
}

.update-meta {
    display: flex;
    gap: 15px;
    margin-top: 8px
}

.update-meta span {
    font-size: var(--text-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    min-width: 300px;
    max-width: 450px;
    animation: toastIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg)
}

.toast.removing {
    animation: toastOut 0.4s ease forwards
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-30px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0)
    }

    to {
        opacity: 0;
        transform: translateX(-30px)
    }
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0
}

.toast-content {
    flex: 1
}

.toast-title {
    font-size: var(--text-sm);
    font-weight: 700
}

.toast-message {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 2px
}

.toast-close {
    color: var(--text-muted);
    font-size: 12px;
    transition: var(--transition);
    padding: 5px
}

.toast-close:hover {
    color: var(--text-primary)
}

.toast.success .toast-icon {
    color: var(--success)
}

.toast.success {
    border-right: 3px solid var(--success)
}

.toast.error .toast-icon {
    color: var(--danger)
}

.toast.error {
    border-right: 3px solid var(--danger)
}

.toast.warning .toast-icon {
    color: var(--warning)
}

.toast.warning {
    border-right: 3px solid var(--warning)
}

.toast.info .toast-icon {
    color: var(--info)
}

.toast.info {
    border-right: 3px solid var(--info)
}

/* Loading */
.spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: var(--text-sm)
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px
}

/* Utilities */
.text-center {
    text-align: center
}

.text-success {
    color: var(--success) !important
}

.text-danger {
    color: var(--danger) !important
}

.text-warning {
    color: var(--warning) !important
}

.text-muted {
    color: var(--text-muted) !important
}

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

.mt-10 {
    margin-top: 10px
}

.mt-20 {
    margin-top: 20px
}

.mb-10 {
    margin-bottom: 10px
}

.mb-20 {
    margin-bottom: 20px
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px
}

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

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

    .sidebar.open {
        transform: translateX(0)
    }

    .sidebar-overlay.active {
        display: block
    }

    .sidebar-close {
        display: flex
    }

    .main-content {
        margin-right: 0
    }

    .menu-toggle {
        display: flex
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:768px) {
    .topbar {
        margin: 10px 10px 0;
        padding: 0 12px;
        height: 60px;
        gap: 10px
    }

    .topbar-right {
        gap: 10px
    }

    .topbar-left {
        gap: 10px
    }

    .content-area {
        padding: 15px 10px
    }

    .page-title {
        font-size: var(--text-base)
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px
    }

    .stat-card {
        padding: 15px
    }

    .stat-number {
        font-size: var(--text-xl)
    }

    .section-card {
        padding: 15px;
        margin-bottom: 15px
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr
    }

    .quick-actions {
        grid-template-columns: 1fr
    }

    .topbar-time {
        display: none
    }

    .modal {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 95vh
    }

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

    .control-card {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px
    }

    .control-info {
        flex-direction: column
    }

    .update-current {
        flex-direction: column;
        text-align: center
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center
    }

    .section-actions {
        justify-content: center
    }

    .page-title {
        font-size: 15px
    }

    .page-title-icon {
        font-size: 16px
    }
}

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

    .login-card {
        padding: 30px 20px
    }

    .logo-ring {
        width: 70px;
        height: 70px
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px
    }

    .logo-title {
        font-size: var(--text-xl)
    }

    .status-text {
        display: none
    }

    .connection-status {
        padding: 6px 10px
    }

    .form-control {
        padding: 10px 12px;
        font-size: 16px
    }

    .input-group input {
        font-size: 16px
    }

    .btn {
        padding: 10px 16px;
        font-size: var(--text-sm)
    }

    .modal-header h3 {
        font-size: var(--text-base)
    }

    .quick-action-card {
        padding: 12px 15px
    }

    .glass-card {
        border-radius: var(--radius-md)
    }
}