/* css/style.css — Premium IT Manager Design v2 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — DARK THEME (default)
══════════════════════════════════════════════════════════════════════════ */
:root,
[data-theme="dark"] {
    --bg-dark: #06070b;
    --bg-page: #06070b;
    --bg-card: rgba(16, 18, 30, 0.85);
    --bg-card-solid: #0e0f19;
    --bg-sidebar: rgba(10, 11, 20, 0.92);
    --bg-modal: #0d0e18;
    --bg-input: rgba(255, 255, 255, 0.06);
    --bg-hover: rgba(255, 255, 255, 0.07);
    --border-glass: rgba(255, 255, 255, 0.10);
    --border-hover: rgba(255, 255, 255, 0.18);
    --text-primary: #f1f3f7;
    --text-secondary: #a0a8bc;
    --text-muted: #6b7280;
    --text-white: #ffffff;

    --scrollbar-track: #06070b;
    --scrollbar-thumb: rgba(255, 255, 255, 0.12);
    --bg-gradient-1: rgba(0, 210, 255, 0.06);
    --bg-gradient-2: rgba(120, 80, 230, 0.05);
    --bg-gradient-3: rgba(236, 72, 153, 0.03);

    --primary: #00d4ff;
    --primary-hsl: 190, 100%, 50%;
    --primary-glow: rgba(0, 212, 255, 0.35);
    --secondary: #6366f1;
    --secondary-glow: rgba(99, 102, 241, 0.35);
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-emerald: #10b981;

    --status-success: #34d399;
    --status-success-bg: rgba(52, 211, 153, 0.1);
    --status-warning: #fbbf24;
    --status-warning-bg: rgba(251, 191, 36, 0.1);
    --status-danger: #f87171;
    --status-danger-bg: rgba(248, 113, 113, 0.1);
    --status-info: #60a5fa;
    --status-info-bg: rgba(96, 165, 250, 0.1);

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.35);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.15);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — LIGHT THEME
══════════════════════════════════════════════════════════════════════════ */
[data-theme="light"] {
    --bg-dark: #f4f6fa;
    --bg-page: #edf0f7;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-solid: #ffffff;
    --bg-sidebar: rgba(255, 255, 255, 0.9);
    --bg-modal: #ffffff;
    --bg-input: rgba(0, 0, 0, 0.03);
    --bg-hover: rgba(0, 0, 0, 0.03);
    --border-glass: rgba(0, 0, 0, 0.07);
    --border-hover: rgba(0, 0, 0, 0.14);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #0f172a;

    --scrollbar-track: #edf0f7;
    --scrollbar-thumb: rgba(0, 0, 0, 0.12);
    --bg-gradient-1: rgba(0, 210, 255, 0.05);
    --bg-gradient-2: rgba(120, 80, 230, 0.04);
    --bg-gradient-3: rgba(236, 72, 153, 0.02);

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 16px rgba(0, 212, 255, 0.1);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESETS & GLOBALS
══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 15% 10%, var(--bg-gradient-1) 0px, transparent 55%),
        radial-gradient(ellipse at 85% 90%, var(--bg-gradient-2) 0px, transparent 55%),
        radial-gradient(ellipse at 50% 50%, var(--bg-gradient-3) 0px, transparent 60%);
    background-attachment: fixed;
    display: flex;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ══════════════════════════════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════════════════════════════ */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════════════════ */
aside.sidebar {
    width: 270px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid var(--border-glass);
    padding: 1.8rem 1.2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-normal);
}

aside.sidebar.collapsed {
    transform: translateX(-100%);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    padding: 0.5rem 0.6rem;
}

.logo-icon {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.logo-text {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
}

[data-theme="dark"] .logo-text {
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav { flex: 1; }

.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    position: relative;
}

.menu-item a i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    transition: transform var(--transition-fast);
}

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

.menu-item a:hover i {
    transform: scale(1.1);
}

.menu-item.active a {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 18px var(--primary-glow), 0 1px 3px rgba(0,0,0,0.2);
    border-color: transparent;
    font-weight: 600;
}

[data-theme="light"] .menu-item.active a {
    color: #fff;
}

.menu-item.active a i {
    color: #fff;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 0.4rem 0 0.4rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(248,113,113,0.08);
    border: 1px solid rgba(248,113,113,0.12);
    color: var(--status-danger);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(248,113,113,0.18);
    border-color: rgba(248,113,113,0.35);
    transform: scale(1.08);
}

/* ══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════════════════════ */
main.main-content {
    flex: 1;
    margin-left: 270px;
    padding: 2rem 2.5rem;
    min-height: 100vh;
    transition: var(--transition-normal);
}

.sidebar.collapsed ~ main.main-content {
    margin-left: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   TOP HEADER
══════════════════════════════════════════════════════════════════════════ */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--border-glass);
}

.header-title h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
}

[data-theme="dark"] .header-title h1 {
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Search Box */
.search-box {
    position: relative;
    width: 240px;
}

.search-box input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.82rem;
    outline: none;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: var(--bg-hover);
}

.search-box input::placeholder { color: var(--text-muted); }

.search-box i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.82rem;
    pointer-events: none;
}

/* Theme Toggle */
.btn-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.btn-theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: rotate(15deg) scale(1.05);
}

/* ══════════════════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    outline: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow), var(--shadow-glow);
    filter: brightness(1.1);
}

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

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

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4), 0 0 20px rgba(239, 68, 68, 0.15);
    filter: brightness(1.1);
}

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

.btn-danger-outline {
    background: var(--status-danger-bg);
    color: var(--status-danger);
    border-color: rgba(248, 113, 113, 0.15);
}

.btn-danger-outline:hover {
    background: rgba(248, 113, 113, 0.18);
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════════════
   STAT CARDS (Dashboard)
══════════════════════════════════════════════════════════════════════════ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

/* Animated gradient border-left accent */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 0 2px 2px 0;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.stat-card-clickable {
    transition: all 0.25s ease;
}
.stat-card-clickable:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    border-color: var(--primary);
}
.stat-card-clickable:active {
    transform: translateY(-1px) scale(0.98);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(99,102,241,0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
}

.stat-card:nth-child(2) .stat-icon {
    color: var(--secondary);
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(168,85,247,0.06));
}
.stat-card:nth-child(3) .stat-icon {
    color: var(--accent-purple);
    background: linear-gradient(135deg, rgba(168,85,247,0.12), rgba(236,72,153,0.06));
}
.stat-card:nth-child(4) .stat-icon {
    color: var(--accent-pink);
    background: linear-gradient(135deg, rgba(236,72,153,0.12), rgba(0,212,255,0.06));
}

.stat-card:nth-child(2)::before { background: linear-gradient(180deg, var(--secondary), var(--accent-purple)); }
.stat-card:nth-child(3)::before { background: linear-gradient(180deg, var(--accent-purple), var(--accent-pink)); }
.stat-card:nth-child(4)::before { background: linear-gradient(180deg, var(--accent-pink), var(--accent-emerald)); }

.stat-info { display: flex; flex-direction: column; }

.stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-top: 0.1rem;
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD GRID & PANELS
══════════════════════════════════════════════════════════════════════════ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.2rem;
}

.panel-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.2rem;
    transition: border-color var(--transition-fast);
}

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.2px;
}

.panel-title i { color: var(--primary); font-size: 0.95rem; }

/* Quick Room List */
.room-quick-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.quick-room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.9rem;
    background: var(--bg-hover);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.quick-room-item:hover {
    border-color: var(--border-glass);
    background: var(--bg-input);
}

.quick-room-name { font-size: 0.85rem; font-weight: 600; }

.quick-room-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.quick-room-count {
    background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(99,102,241,0.08));
    color: var(--primary);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   STATUS BADGES
══════════════════════════════════════════════════════════════════════════ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
    letter-spacing: 0.2px;
}

.status-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-operacional, .status-em-stock, .status-operativo, .status-entregue, .status-em-uso {
    color: var(--status-success);
    background: var(--status-success-bg);
    border-color: rgba(52, 211, 153, 0.15);
}
.status-operacional::before, .status-em-stock::before, .status-operativo::before, .status-entregue::before, .status-em-uso::before {
    background: var(--status-success);
    box-shadow: 0 0 6px var(--status-success);
}

.status-manutencao, .status-em-manutencao, .status-pendente {
    color: #f97316;
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.2);
}
.status-manutencao::before, .status-em-manutencao::before, .status-pendente::before {
    background: #f97316;
    box-shadow: 0 0 6px #f97316;
}

.status-inativo, .status-danificado, .status-em-atraso, .status-para-abate {
    color: var(--status-danger);
    background: var(--status-danger-bg);
    border-color: rgba(248, 113, 113, 0.15);
}
.status-inativo::before, .status-danificado::before, .status-em-atraso::before, .status-para-abate::before {
    background: var(--status-danger);
    box-shadow: 0 0 6px var(--status-danger);
}

.status-concluida {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}
.status-concluida::before {
    background: #6366f1;
    box-shadow: 0 0 6px #6366f1;
}

.status-emprestado {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.2);
}
.status-emprestado::before {
    background: #8b5cf6;
    box-shadow: 0 0 6px #8b5cf6;
}

/* Task done / Request delivered row */
.task-done td, .request-delivered td {
    background-color: rgba(52, 211, 153, 0.1) !important;
    opacity: 0.9;
}

.row-manutencao td, .equip-card.row-manutencao {
    background-color: rgba(245, 158, 11, 0.12) !important;
    border-left-color: #f59e0b;
}
.row-manutencao:hover td, .equip-card.row-manutencao:hover {
    background-color: rgba(245, 158, 11, 0.2) !important;
}

.row-abate td, .equip-card.row-abate {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-left-color: #ef4444;
}
.row-abate:hover td, .equip-card.row-abate:hover {
    background-color: rgba(239, 68, 68, 0.18) !important;
}

/* Inline status select for tasks table */
.inline-status-select {
    padding: 3px 6px;
    font-size: 0.72rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    max-width: 110px;
}

/* ══════════════════════════════════════════════════════════════════════════
   ACTIVITY LIST
══════════════════════════════════════════════════════════════════════════ */
.activity-list { display: flex; flex-direction: column; gap: 1rem; }

.activity-item { display: flex; gap: 0.8rem; align-items: flex-start; }

.activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.activity-icon.add { background: var(--status-success-bg); color: var(--status-success); }
.activity-icon.edit { background: var(--status-info-bg); color: var(--status-info); }
.activity-icon.del { background: var(--status-danger-bg); color: var(--status-danger); }

.activity-info { display: flex; flex-direction: column; gap: 0.1rem; }
.activity-text { font-size: 0.82rem; line-height: 1.4; color: var(--text-secondary); }
.activity-text strong { color: var(--text-primary); font-weight: 600; }
.activity-time { font-size: 0.68rem; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════════════════ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
}

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

table.data-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-glass);
}

table.data-table td {
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-glass);
    vertical-align: middle;
    transition: background var(--transition-fast);
}

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

table.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.actions-cell { display: flex; gap: 0.4rem; }

.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}

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

.btn-icon.edit:hover {
    color: var(--status-info);
    border-color: rgba(96, 165, 250, 0.25);
    background: var(--status-info-bg);
}

.btn-icon.delete:hover {
    color: var(--status-danger);
    border-color: rgba(248, 113, 113, 0.25);
    background: var(--status-danger-bg);
}

.btn-icon.success:hover {
    color: var(--status-success);
    border-color: rgba(52, 211, 153, 0.25);
    background: var(--status-success-bg);
}

.btn-icon.warning { color: var(--status-warning); border-color: rgba(245, 158, 11, 0.25); }
.btn-icon.warning:hover {
    background: var(--status-warning-bg);
}

.btn-icon.primary { color: var(--status-info); border-color: rgba(59, 130, 246, 0.25); }
.btn-icon.primary:hover {
    background: var(--status-info-bg);
}

/* ══════════════════════════════════════════════════════════════════════════
   CARDS GRID (Rooms / Hardware)
══════════════════════════════════════════════════════════════════════════ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.2rem;
    transition: all var(--transition-normal);
    position: relative;
}

.info-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(0,212,255,0.08), transparent 50%, rgba(99,102,241,0.06));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.info-card:hover::before { opacity: 1; }

.card-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title-main h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.2px;
}

.card-subtitle-main {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-details-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.card-detail-item {
    display: flex;
    font-size: 0.78rem;
    line-height: 1.4;
}

.card-detail-item strong {
    width: 105px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.card-detail-item span {
    color: var(--text-secondary);
    word-break: break-word;
}

.card-footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 3, 8, 0.75);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-container {
    background: var(--bg-modal);
    border: 1px solid var(--border-glass);
    width: 92%;
    max-width: 660px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(24px) scale(0.97);
    transition: transform var(--transition-smooth);
}

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

.modal-header {
    background: var(--bg-hover);
    padding: 1.3rem 1.8rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.modal-body {
    padding: 1.5rem 1.8rem;
    max-height: 68vh;
    overflow-y: auto;
}

.modal-footer {
    background: var(--bg-hover);
    padding: 1rem 1.8rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════════════════════ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group.full-width { grid-column: span 2; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

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

.form-group input, .form-group select, .form-group textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.82rem;
    outline: none;
    transition: all var(--transition-fast);
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--bg-hover);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.highlight-field {
    background: rgba(0, 212, 255, 0.05);
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

.highlight-field label {
    color: var(--primary);
    font-weight: 700;
}

.room-select-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.room-select-group select {
    flex: 1;
}

.btn-inline-action {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-glass);
    background: var(--bg-input);
    color: var(--text-secondary);
}

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

.btn-inline-action.add:hover {
    color: var(--status-success);
    border-color: var(--status-success);
}

.btn-inline-action.remove:hover {
    color: var(--status-danger);
    border-color: var(--status-danger);
}

/* ══════════════════════════════════════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════════════════════════════════════ */
.filter-bar {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group select {
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.78rem;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.filter-group select:focus { border-color: var(--primary); }

/* ══════════════════════════════════════════════════════════════════════════
   HELPERS
══════════════════════════════════════════════════════════════════════════ */
.badge {
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-floor {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
}

.text-center { text-align: center; }

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-glass);
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════════════════
   TOASTS
══════════════════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: var(--bg-card-solid);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    width: 360px;
    max-width: 90vw;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: auto;
}

.toast.show { transform: translateX(0); opacity: 1; }

.toast-icon {
    font-size: 1.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 6px var(--primary-glow));
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.toast-body { display: flex; flex-direction: column; gap: 0.15rem; }
.toast-title { font-weight: 700; font-size: 0.82rem; color: var(--text-primary); }
.toast-message { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.4; }

/* ══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

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

.animate-fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered card animation */
.animate-fade-in .stat-card:nth-child(1) { animation: fadeIn 0.4s 0.05s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-in .stat-card:nth-child(2) { animation: fadeIn 0.4s 0.1s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-in .stat-card:nth-child(3) { animation: fadeIn 0.4s 0.15s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-in .stat-card:nth-child(4) { animation: fadeIn 0.4s 0.2s cubic-bezier(0.16,1,0.3,1) both; }

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
══════════════════════════════════════════════════════════════════════════ */
.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    background: var(--bg-page);
    overflow: hidden;
}

/* Background animated orbs */
.login-bg-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

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

.orb-1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, var(--primary), transparent);
    top: -220px;
    left: -120px;
    animation-delay: 0s;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--accent-purple), transparent);
    bottom: -180px;
    right: -120px;
    animation-delay: -4s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--secondary), transparent);
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    animation-delay: -8s;
}

@keyframes orbFloat {
    0%, 100% { transform: scale(1) translate(0, 0); }
    25% { transform: scale(1.08) translate(25px, -25px); }
    50% { transform: scale(0.95) translate(-10px, 20px); }
    75% { transform: scale(1.04) translate(-20px, -10px); }
}

/* Login Card */
.login-card {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-logo {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(99,102,241,0.1));
    border: 1px solid rgba(0,212,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    filter: drop-shadow(0 0 16px var(--primary-glow));
    margin-bottom: 0.5rem;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin: 0;
}

[data-theme="dark"] .login-title {
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-school {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--status-danger-bg);
    border: 1px solid rgba(248,113,113,0.2);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    color: var(--status-danger);
    font-size: 0.78rem;
    width: 100%;
    text-align: left;
    animation: fadeIn 0.3s ease;
}

/* Google Login Button */
.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-google-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(99,102,241,0.04));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-google-login:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-google-login:hover::before { opacity: 1; }

.btn-google-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.login-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVENESS
══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    aside.sidebar {
        width: 68px;
        padding: 1.2rem 0.5rem;
        align-items: center;
    }

    aside.sidebar .logo-text,
    aside.sidebar .menu-item span,
    aside.sidebar .sidebar-footer .user-info {
        display: none;
    }

    aside.sidebar .logo-container {
        justify-content: center;
        margin-bottom: 1.5rem;
        padding-left: 0;
    }

    aside.sidebar .menu-item a {
        justify-content: center;
        padding: 0.7rem;
    }

    main.main-content {
        margin-left: 68px;
        padding: 1.2rem;
    }

    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .search-box {
        width: 100%;
        max-width: 240px;
    }

    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: span 1; }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Inline Edit Elements */
.inline-edit {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.85rem;
    padding: 4px;
    border-radius: 4px;
    color: var(--text-primary);
    transition: all 0.2s;
}
.inline-edit:hover, .inline-edit:focus {
    border-color: var(--border-color);
    background: var(--surface);
    outline: none;
}


/* SORTABLE HEADERS */
th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s, color 0.2s;
}

th.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sort-icon-inactive {
    opacity: 0.3;
    margin-left: 5px;
    font-size: 0.8em;
}

.sort-icon-active {
    color: var(--primary-color);
    margin-left: 5px;
}


/* Custom Scrollbar for Table Responsive */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

/* ══════════════════════════════════════════════════════════════════════════
   PAGINATION BAR (Premium)
══════════════════════════════════════════════════════════════════════════ */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin-top: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    backdrop-filter: blur(12px);
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.77rem;
    color: var(--text-muted);
}

.pagination-info i {
    font-size: 0.68rem;
    opacity: 0.55;
}

.pagination-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

.pagination-center {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.pagination-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.pagination-nav-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.pagination-nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.pagination-page-btn {
    min-width: 30px;
    height: 30px;
    border-radius: 7px;
    padding: 0 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.pagination-page-btn:hover:not(.active) {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #06080f;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.35);
    cursor: default;
    transform: scale(1.05);
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 30px;
    font-size: 0.82rem;
    color: var(--text-muted);
    user-select: none;
    letter-spacing: 1px;
}

.pagination-limit {
    display: flex;
    align-items: center;
}

.pagination-limit-select {
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: 7px;
    padding: 0.32rem 0.65rem;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.74rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast), color var(--transition-fast);
    height: 30px;
}

.pagination-limit-select:hover,
.pagination-limit-select:focus {
    border-color: var(--primary);
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .pagination-bar { justify-content: center; }
    .pagination-info { display: none; }
    .pagination-limit { display: none; }
}

 
 / *   R a c k   2 D   V i e w   * /  
 . r a c k - v i e w   {   d i s p l a y :   g r i d ;   g r i d - t e m p l a t e - c o l u m n s :   1 f r   3 0 0 p x ;   g a p :   1 . 5 r e m ;   a l i g n - i t e m s :   s t a r t ;   }  
 . r a c k - c a b i n e t   {   b a c k g r o u n d :   # 2 c 3 e 5 0 ;   b o r d e r :   8 p x   s o l i d   # 1 a 2 5 2 f ;   b o r d e r - r a d i u s :   4 p x ;   b o x - s h a d o w :   0   1 0 p x   2 5 p x   r g b a ( 0 , 0 , 0 , 0 . 5 ) ;   p a d d i n g :   1 0 p x   5 p x ;   w i d t h :   1 0 0 % ;   m a x - w i d t h :   5 0 0 p x ;   m a r g i n :   0   a u t o ;   }  
 . r a c k - s l o t   {   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   h e i g h t :   3 6 p x ;   b o r d e r - b o t t o m :   1 p x   d a s h e d   # 3 4 4 9 5 e ;   p o s i t i o n :   r e l a t i v e ;   }  
 . r a c k - s l o t : l a s t - c h i l d   {   b o r d e r - b o t t o m :   n o n e ;   }  
 . r a c k - s l o t - n u m b e r   {   w i d t h :   3 0 p x ;   t e x t - a l i g n :   c e n t e r ;   c o l o r :   # 7 f 8 c 8 d ;   f o n t - s i z e :   0 . 7 5 r e m ;   f o n t - f a m i l y :   m o n o s p a c e ;   f o n t - w e i g h t :   b o l d ;   }  
 . r a c k - s l o t - c o n t e n t   {   f l e x :   1 ;   h e i g h t :   1 0 0 % ;   m i n - h e i g h t :   1 0 0 % ;   b a c k g r o u n d :   r g b a ( 0 , 0 , 0 , 0 . 2 ) ;   b o r d e r :   1 p x   s o l i d   t r a n s p a r e n t ;   t r a n s i t i o n :   a l l   0 . 2 s ;   p o s i t i o n :   r e l a t i v e ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   j u s t i f y - c o n t e n t :   c e n t e r ;   }  
 . r a c k - s l o t - c o n t e n t . d r a g - o v e r   {   b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 3 ) ;   b o r d e r :   1 p x   d a s h e d   # 3 b 8 2 f 6 ;   }  
  
 . r a c k - e q u i p m e n t   {   w i d t h :   1 0 0 % ;   h e i g h t :   1 0 0 % ;   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 8 0 d e g ,   # 4 7 5 5 6 9   0 % ,   # 3 3 4 1 5 5   1 0 0 % ) ;   b o r d e r :   1 p x   s o l i d   # 1 e 2 9 3 b ;   b o r d e r - r a d i u s :   2 p x ;   c o l o r :   # f f f ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   p a d d i n g :   0   1 0 p x ;   f o n t - s i z e :   0 . 8 r e m ;   b o x - s h a d o w :   i n s e t   0   1 p x   0   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 1 ) ;   c u r s o r :   g r a b ;   u s e r - s e l e c t :   n o n e ;   }  
 . r a c k - e q u i p m e n t : a c t i v e   {   c u r s o r :   g r a b b i n g ;   }  
 . r a c k - e q u i p - i c o n   {   m a r g i n - r i g h t :   8 p x ;   c o l o r :   # 1 0 b 9 8 1 ;   }  
 . r a c k - e q u i p - n a m e   {   f l e x :   1 ;   w h i t e - s p a c e :   n o w r a p ;   o v e r f l o w :   h i d d e n ;   t e x t - o v e r f l o w :   e l l i p s i s ;   f o n t - f a m i l y :   m o n o s p a c e ;   }  
  
 . u n a s s i g n e d - p o o l   {   b a c k g r o u n d :   v a r ( - - s u r f a c e ) ;   b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ;   b o r d e r - r a d i u s :   v a r ( - - r a d i u s ) ;   p a d d i n g :   1 r e m ;   p o s i t i o n :   s t i c k y ;   t o p :   1 r e m ;   m a x - h e i g h t :   c a l c ( 1 0 0 v h   -   2 r e m ) ;   o v e r f l o w - y :   a u t o ;   }  
 . p o o l - i t e m   {   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   p a d d i n g :   0 . 7 5 r e m ;   b a c k g r o u n d :   v a r ( - - s u r f a c e - l i g h t ) ;   b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ;   b o r d e r - r a d i u s :   v a r ( - - r a d i u s ) ;   m a r g i n - b o t t o m :   0 . 5 r e m ;   c u r s o r :   g r a b ;   t r a n s i t i o n :   t r a n s f o r m   0 . 2 s ;   }  
 . p o o l - i t e m : h o v e r   {   t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ;   b o x - s h a d o w :   v a r ( - - s h a d o w - s m ) ;   }  
 . p o o l - i t e m - i c o n   {   w i d t h :   3 0 p x ;   h e i g h t :   3 0 p x ;   b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 1 ) ;   c o l o r :   v a r ( - - p r i m a r y ) ;   b o r d e r - r a d i u s :   5 0 % ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   j u s t i f y - c o n t e n t :   c e n t e r ;   m a r g i n - r i g h t :   1 0 p x ;   }  
 . p o o l - i t e m - d e t a i l s   {   f l e x :   1 ;   o v e r f l o w :   h i d d e n ;   }  
 . p o o l - i t e m - t i t l e   {   f o n t - w e i g h t :   6 0 0 ;   f o n t - s i z e :   0 . 8 7 5 r e m ;   c o l o r :   v a r ( - - t e x t ) ;   w h i t e - s p a c e :   n o w r a p ;   o v e r f l o w :   h i d d e n ;   t e x t - o v e r f l o w :   e l l i p s i s ;   }  
 . p o o l - i t e m - s u b t i t l e   {   f o n t - s i z e :   0 . 7 5 r e m ;   c o l o r :   v a r ( - - t e x t - m u t e d ) ;   }  
  
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   {   . r a c k - v i e w   {   g r i d - t e m p l a t e - c o l u m n s :   1 f r ;   }   }  
  
 / *   D e t a i l   G r i d   f o r   D i a g r a m   P a n e l   * /  
 . d e t a i l - g r i d   {  
         d i s p l a y :   f l e x ;  
         f l e x - d i r e c t i o n :   c o l u m n ;  
         g a p :   0 ;  
 }  
 . d e t a i l - r o w   {  
         d i s p l a y :   f l e x ;  
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;  
         a l i g n - i t e m s :   c e n t e r ;  
         p a d d i n g :   0 . 5 r e m   0 ;  
         b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ;  
 }  
 . d e t a i l - r o w : l a s t - c h i l d   {   b o r d e r - b o t t o m :   n o n e ;   }  
 . d e t a i l - l a b e l   {  
         f o n t - s i z e :   0 . 8 r e m ;  
         c o l o r :   v a r ( - - t e x t - m u t e d ) ;  
         d i s p l a y :   f l e x ;  
         a l i g n - i t e m s :   c e n t e r ;  
         g a p :   5 p x ;  
 }  
 . d e t a i l - v a l u e   {  
         f o n t - s i z e :   0 . 8 5 r e m ;  
         c o l o r :   v a r ( - - t e x t ) ;  
         t e x t - a l i g n :   r i g h t ;  
         m a x - w i d t h :   6 0 % ;  
         w o r d - b r e a k :   b r e a k - w o r d ;  
 }  
  
 @ m e d i a   ( m a x - w i d t h :   1 0 2 4 p x )   {  
         # d i a g r a m - d e t a i l - p a n e l   {   d i s p l a y :   n o n e ;   }  
 }  
 
.hoverable-row:hover { background-color: var(--surface-light) !important; }


/* TABS STYLE */
.tabs-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* ══════════════════════════════════════════════════════════════════════════
   RACK VISUAL CARDS — Infraestrutura de Rede
══════════════════════════════════════════════════════════════════════════ */

.rack-view-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Rack Card */
.rack-visual-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rack-visual-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.rack-visual-orphans {
    border-style: dashed;
    opacity: 0.85;
}

/* Rack Header */
.rack-visual-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-glass);
}

.rack-orphan-header {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.05) 0%, transparent 100%);
}

.rack-visual-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.rack-visual-info {
    flex: 1;
    min-width: 0;
}

.rack-visual-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rack-visual-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rack-visual-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.rack-visual-actions {
    display: flex;
    gap: 0.4rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rack-visual-card:hover .rack-visual-actions {
    opacity: 1;
}

/* Rack Body */
.rack-visual-body {
    padding: 1.25rem 1.5rem;
}

/* Rack Empty State */
.rack-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    border: 1px dashed var(--border-glass);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
}

.rack-empty-state i {
    font-size: 1.8rem;
    opacity: 0.25;
    margin-bottom: 0.5rem;
    display: block;
}

.rack-empty-state p {
    margin: 0;
    font-weight: 500;
    font-size: 0.95rem;
}

.rack-empty-state span {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Equipment Cards Grid */
.equip-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

/* Equipment Mini Card */
.equip-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.equip-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.equip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.equip-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.equip-card-actions {
    display: flex;
    gap: 0.2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.equip-card:hover .equip-card-actions {
    opacity: 1;
}

.equip-card-actions .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
}

.equip-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.75rem;
}

.equip-card-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.equip-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.equip-card-mac {
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    opacity: 0.8;
}

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

.equip-card-pos {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.equip-card-footer .status-badge {
    font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 768px) {
    .equip-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .rack-visual-header {
        flex-wrap: wrap;
    }
    
    .rack-visual-actions {
        opacity: 1;
    }
    
    .equip-card-actions {
        opacity: 1;
    }
}

/* =========================================
   NOTIFICAÇÕES (IN-APP)
========================================= */

.nav-badge {
    background-color: var(--status-danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 12px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notifications-container {
    position: relative;
    display: inline-block;
}

#bell-btn {
    position: relative;
}

.bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--status-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    height: 16px;
    min-width: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    padding: 0 4px;
    border: 2px solid var(--surface-light);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notifications-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--surface-light);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

.notifications-dropdown.active {
    display: block;
}

.notifications-header {
    padding: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-list {
    max-height: 350px;
    overflow-y: auto;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}
.notifications-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

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

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

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notif-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--status-danger);
}

.notif-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-warning);
}

.notif-content {
    flex-grow: 1;
}

.notif-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.notif-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.notif-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.notif-dismiss-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    align-self: center;
}

.notif-dismiss-btn:hover {
    background: rgba(248, 113, 113, 0.15);
    color: var(--status-danger);
}

.notif-clear-all-btn {
    background: none;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.notif-clear-all-btn:hover {
    background: rgba(248, 113, 113, 0.1);
    color: var(--status-danger);
    border-color: var(--status-danger);
}

/* ============================================================
   NETWORK TOPOLOGY GRAPH STYLES
   ============================================================ */
#network-canvas {
    width: 100%;
    height: 600px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] #network-canvas {
    background: #f8fafc;
}

.graph-toggle-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.graph-toggle-btn:hover, .graph-toggle-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Graph Info Panel overlay */
#network-graph-info {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 300px;
    background: var(--bg-modal);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    z-index: 10;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

#network-graph-info h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

#network-graph-info p {
    margin: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#network-graph-info .close-info {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

#network-graph-info .close-info:hover {
    color: var(--text-primary);
}

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