* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.2);
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --sidebar-width: 250px;
    --mobile-header-height: 60px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

.background-effects {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: #0ea5e9;
    top: -100px;
    left: -100px;
}

.shape2 {
    width: 350px;
    height: 350px;
    background: #8b5cf6;
    bottom: -50px;
    right: -50px;
}

.shape3 {
    width: 300px;
    height: 300px;
    background: #10b981;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
}

#main-app {
    display: none;
    height: 100vh;
    height: 100dvh;
    width: 100%;
}

#main-app[style*="flex"] {
    display: flex !important;
    flex-direction: column;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-height);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
}

.brand-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.brand-mobile .brand-logo {
    height: 28px;
}

.brand-mobile h2 {
    font-size: 16px;
    font-weight: 700;
}

.mobile-user {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
}

.sidebar-overlay.active {
    display: block;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    transition: transform 0.3s ease;
    z-index: 99;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 20px 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .brand {
    margin-bottom: 0;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 30px;
}

.brand .brand-logo {
    height: 32px;
}

.brand h2 {
    font-size: 20px;
    font-weight: 700;
}

.sidebar nav {
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.bottom-info {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

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

.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ===== VIEW SYSTEM ===== */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* ===== LOGIN VIEW (GLOBAL) ===== */
#login-view {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    padding: 20px;
    flex-direction: column;
}

#login-view.active {
    display: flex;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .login-logo {
    height: 80px;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

.error-message {
    color: var(--danger);
    font-size: 14px;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

/* ===== PANEL STYLES (GLOBAL) ===== */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.panel-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    min-width: 280px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.action-btn {
    padding: 10px 20px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: var(--primary);
    color: white;
}

/* ===== VIEWER STYLES ===== */
.viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.viewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    flex: 1;
}

.back-btn {
    padding: 8px 16px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.back-btn:hover {
    background: rgba(148, 163, 184, 0.2);
}

.viewer-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn {
    width: 36px;
    height: 36px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: var(--primary);
}

    .canvas-container {
        width: 100%;
        flex: 1;
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        background: #000;
        touch-action: none;
    }

#remote-screen {
    display: block;
    cursor: default;
    background: #000;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--text-secondary);
    z-index: 10;
}

.loading-overlay.hidden {
    display: none;
}

/* ===== FULLSCREEN OVERRIDES ===== */
:fullscreen .canvas-container,
:-webkit-full-screen .canvas-container,
#viewer-view:fullscreen .canvas-container {
    height: 100vh !important;
    height: 100dvh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
    z-index: 100 !important;
}

:fullscreen .viewer-header,
:-webkit-full-screen .viewer-header {
    z-index: 101 !important;
}

/* ===== DEVICE LIST GRID ===== */
.device-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 15px 0;
}

.device-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    position: relative;
    overflow: hidden;
}

.device-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.device-status-bar {
    width: 6px;
    background: var(--success);
    height: 100%;
}

.device-content {
    padding: 20px;
    flex: 1;
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.device-icon i {
    font-size: 24px;
    color: var(--primary);
}

.device-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.device-status.status-online {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}
.device-status.status-offline {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
}
.device-status-bar.status-offline {
    background: var(--text-secondary) !important;
}
.device-card.offline {
    opacity: 0.6;
    cursor: default !important;
}
.device-card.offline:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--border-color) !important;
}
.last-seen {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.6);
    margin-left: 8px;
}

.device-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.device-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.8);
}

.device-id-badge {
    background: rgba(148, 163, 184, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
}

/* ===== USERS TABLE ===== */
.users-table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 10px;
}

.users-table th {
    text-align: left;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table td {
    padding: 16px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.users-table tr td:first-child {
    border-left: 1px solid var(--border-color);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    font-weight: 600;
}

.users-table tr td:last-child {
    border-right: 1px solid var(--border-color);
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.role-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.role-admin {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.role-technician {
    background: rgba(14, 165, 233, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.role-client {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.actions-cell {
    white-space: nowrap;
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-edit {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    border: 1px solid rgba(14, 165, 233, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: var(--primary);
    color: white;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* ===== DESKTOP VIEWER LAYOUT ===== */
@media (min-width: 769px) {
    #main-app {
        display: none;
        height: 100vh;
        height: 100dvh;
    }

    #main-app[style*="flex"] {
        display: flex !important;
        flex-direction: row;
    }

    .main-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 30px;
    }

    .canvas-container {
        height: calc(100vh - 150px);
        height: calc(100dvh - 150px);
    }
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        z-index: 99;
        width: 85%;
        max-width: 320px;
    }

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

    .sidebar-close {
        display: block;
    }

    #main-app {
        height: 100vh;
        height: 100dvh;
    }

    .main-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: calc(var(--mobile-header-height) + 10px) 10px 10px 10px;
    }

    .view {
        display: none;
    }

    .view.active {
        display: block;
    }

    .devices-panel {
        margin: 0;
        padding: 15px;
        border-radius: 8px;
        min-height: calc(100vh - var(--mobile-header-height) - 40px);
        min-height: calc(100dvh - var(--mobile-header-height) - 40px);
    }

    .panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 15px;
    }

    .panel-header h3 {
        font-size: 15px;
    }

    .panel-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .search-box {
        flex: 1;
        min-width: 0;
    }



    .connect-btn {
        padding: 8px 16px;
        font-size: 12px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        width: 100%;
    }

    /* Viewer mode mobile */
    .viewer-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        padding: 8px 12px;
        z-index: 101;
        border-bottom: 1px solid var(--border-color);
        display: none;
        align-items: center;
        justify-content: space-between;
    }

    .viewer-header.visible {
        display: flex;
    }

    .viewer-info h2 {
        font-size: 14px;
        margin: 0;
    }

    .viewer-info p {
        display: none;
    }

    .viewer-controls {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    .control-btn {
        width: 38px;
        height: 38px;
        background: rgba(148, 163, 184, 0.15);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: var(--text-primary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    }

    #zoom-level {
        font-size: 12px;
        color: var(--text-secondary);
        min-width: 40px;
        text-align: center;
    }

    .canvas-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
        background: #000;
        touch-action: none;
        padding: 0;
        z-index: 40;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #remote-screen {
        /* image rendering is smooth by default */
    }

    .back-btn {
        padding: 8px 12px;
        font-size: 13px;
        background: rgba(148, 163, 184, 0.15);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        color: var(--text-secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .back-btn span {
        display: inline;
    }

    /* Login mobile overrides (most styles are global now) */
    .login-container {
        padding: 25px 20px;
        background: transparent;
        box-shadow: none;
        border: none;
    }
    .login-header .login-logo {
        height: 60px;
    }
    .login-header h1 {
        font-size: 28px;
    }
}

/* Permissions */
.permissions-container {
    padding: 20px;
}

.permission-item {
    margin-bottom: 15px;
    padding: 15px;
}

.permission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.permission-header h4 {
    margin: 0;
    font-size: 16px;
}

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

.agents-checklist {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: rgba(148, 163, 184, 0.1);
}

.checkbox-label input {
    margin-right: 10px;
}

.checkbox-label span {
    font-size: 14px;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

.modal-body {
    padding: 20px 24px;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

#create-user-form {
    padding: 20px 24px;
}

#create-user-form .form-group {
    margin-bottom: 16px;
}

#create-user-form .form-group select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s;
    appearance: auto;
}

#create-user-form .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    padding: 10px 20px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
}

.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

#permissions-view .panel-header {
    margin-bottom: 0;
}

#permissions-view .glass-panel > .panel-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* File transfer progress */
.file-progress {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 13px;
    z-index: 50;
    min-width: 260px;
    text-align: center;
    backdrop-filter: blur(10px);
}
.file-progress .progress-bar {
    margin-top: 8px;
    height: 6px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
    overflow: hidden;
}
.file-progress .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s;
}
.file-progress.done {
    border-color: var(--success);
    color: var(--success);
}
.file-progress.done i {
    margin-right: 8px;
}
.btn-upload {
    color: #22c55e !important;
}
.btn-upload:hover {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: #22c55e !important;
}
.btn-download {
    color: #38bdf8 !important;
}
.btn-download:hover {
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: #38bdf8 !important;
}
