/* =========================================================================
   Voiory Digital Ecosystem - VDC Panel Core CSS (style.css)
   Theme: Sleek Dark Cybernetic & Premium Glassmorphism
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;900&family=Inter:wght@300;400;500;600;700;900&display=swap');

:root {
    /* Color Tokens */
    --bg-dark: #090d16;
    --bg-card: rgba(15, 23, 42, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.18);
    
    --primary: #06b6d4; /* Neon Cyan for VDC/Devices */
    --primary-glow: rgba(6, 182, 212, 0.35);
    --secondary: #8b5cf6; /* Cyber Purple */
    --secondary-glow: rgba(139, 92, 246, 0.35);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-ar);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Dynamic Glowing Orbs */
.glow-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.35;
    pointer-events: none;
    animation: pulse 10s infinite alternate;
}

.orb-primary {
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.orb-secondary {
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: 3s;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    100% { transform: scale(1.25) translate(40px, -30px); opacity: 0.55; }
}

/* Header styling */
.site-header {
    border-bottom: 1px solid var(--glass-border);
    background: rgba(9, 13, 22, 0.7);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand img {
    height: 38px;
    object-fit: contain;
}

.brand-text {
    font-family: var(--font-en);
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.brand-text span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-ar);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.08);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 15px var(--danger-glow);
}

/* Hero Section */
.hero-section {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    position: relative;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--primary);
    animation: flash 1.5s infinite alternate;
}

@keyframes flash {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-accent {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual svg {
    max-width: 100%;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Features Grid */
.features-section {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Premium Glass Panel */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    transition: var(--transition);
    padding: 2rem;
}

.glass-panel:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(6, 182, 212, 0.05);
}

.feature-card {
    text-align: right;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 65px);
}

.sidebar {
    background: rgba(9, 13, 22, 0.5);
    border-left: 1px solid var(--glass-border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
}

.menu-item button {
    width: 100%;
    text-align: right;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-family: var(--font-ar);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.menu-item button:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.03);
}

.menu-item.active button {
    color: var(--primary);
    background: rgba(6, 182, 212, 0.08);
    border-right: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
}

.dashboard-content {
    padding: 2rem;
    overflow-y: auto;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Devices Table */
.table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.custom-table-container {
    width: 100%;
    overflow-x: auto;
    background: rgba(15, 23, 42, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.custom-table th {
    background: rgba(9, 13, 22, 0.8);
    color: var(--text-secondary);
    padding: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-bottom: 1px solid var(--glass-border);
}

.custom-table td {
    padding: 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.badge {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-online {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-offline {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-maintenance {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Modal styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    background: #0f172a;
    border: 1px solid var(--glass-border-hover);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 800;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--danger);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background: rgba(9, 13, 22, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-ar);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* Footer styling */
.site-footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(9, 13, 22, 0.9);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.status-message {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.status-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

.status-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--success);
}

/* Loader Spin Animation */
.loader-spin {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        align-items: center;
    }
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        border-left: none;
        border-bottom: 1px solid var(--glass-border);
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
    }
    .sidebar-menu {
        flex-direction: row;
    }
    .menu-item.active button {
        border-right: none;
        border-bottom: 3px solid var(--primary);
        border-radius: 10px 10px 0 0;
    }
}
