:root {
    /* Color Palette */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #059669;
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #d97706;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #dc2626;

    --info: #0ea5e9;
    --info-light: #e0f2fe;
    
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    
    --sidebar-bg: #111827;
    --sidebar-text: #d1d5db;
    --sidebar-active: #1f2937;

    /* Tree Line Styles for Hierarchical View */
.tree-line-container {
    position: relative;
    padding-left: 2.5rem !important;
}
.tree-line {
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 50%;
    width: 1rem;
    border-left: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    border-bottom-left-radius: 4px;
}
.tree-line-extend {
    position: absolute;
    left: 1rem;
    top: 50%;
    bottom: 0;
    border-left: 2px solid var(--border-color);
}
.master-row:hover, .child-row:hover {
    background-color: var(--primary-light) !important;
}

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Borders */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar .logo {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0.75rem;
}

.sidebar nav {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    font-weight: 500;
    gap: 1rem;
    transition: all 0.2s ease;
}

.sidebar nav a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar nav a.active {
    background-color: var(--sidebar-active);
    color: #fff;
    border-left: 4px solid var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    height: 64px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    outline: none;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: var(--bg-main);
}

.search-bar input:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.user-profile span {
    font-weight: 500;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .top-header {
        padding: 0 1rem;
    }

    .hamburger-menu {
        display: block !important;
        cursor: pointer;
        font-size: 1.5rem;
        color: var(--text-main);
    }
}

@media (min-width: 1025px) {
    .hamburger-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .search-bar {
        display: none; /* Hide search bar on mobile */
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .card-header h2 {
        margin-bottom: 0.5rem;
    }

    .data-table th, .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    /* Stack grid columns */
    div[style*="grid-template-columns: 2fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr 1fr"],
    div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"],
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

/* Content Area */
.content-wrapper {
    padding: 2rem;
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: #fff;
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-main);
}

.btn-danger {
    background-color: #fff;
    color: var(--danger);
    border-color: var(--danger-light);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: #fff;
}

.btn-icon {
    padding: 0.375rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
}

.btn-icon:hover {
    background-color: var(--bg-main);
    color: var(--primary);
}

.d-none { display: none !important; }

/* Data Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 1.5rem;
    color: var(--danger); /* PDF Red */
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-title {
    font-weight: 500;
    /*color: var(--text-main);*/
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-dark);
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-dark);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger-dark);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.warning { background-color: var(--warning-light); color: var(--warning-dark); }
.stat-icon.info { background-color: var(--info-light); color: var(--info); }
.stat-icon.success { background-color: var(--success-light); color: var(--success-dark); }
.stat-icon.danger { background-color: var(--danger-light); color: var(--danger-dark); }

.stat-details h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-details .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Details Grid (for Modals) */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.detail-row {
    display: flex;
    margin-bottom: 0.75rem;
}

.detail-label {
    width: 140px;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    flex: 1;
    color: var(--text-main);
    word-break: break-all;
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid #fecaca;
}

.alert i {
    margin-top: 0.125rem;
}

/* Drive / Folder Explorer */
.drive-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-main);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.breadcrumbs a:hover {
    background-color: var(--bg-main);
}

.view-toggles {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-main);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.view-toggles .btn-icon.active {
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--primary);
}

.drive-container {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    min-height: 500px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.section-title:first-child { margin-top: 0; }

/* Grid Views */
.drive-grid {
    display: grid;
    gap: 1.25rem;
}
.drive-grid.large-icon { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.drive-grid.small-icon { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.drive-grid.tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.drive-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}
.drive-item:hover {
    background: var(--bg-main);
    border-color: var(--primary-light);
}
.drive-item.selected {
    background: var(--primary-light);
    border-color: var(--primary);
}

.drive-grid .item-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
.drive-grid.small-icon .item-icon { 
    font-size: 2rem; 
    margin-bottom: 0.75rem; 
}
.drive-grid.small-icon .drive-item {
    padding: 1rem;
}

.drive-grid.tiles .drive-item {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 1rem;
    padding: 1rem;
}
.drive-grid.tiles .item-icon { 
    font-size: 2.5rem; 
    margin-bottom: 0; 
}

.item-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-main);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: none;
}
.drive-grid.tiles .item-meta { display: block; }

/* List View */
.drive-list {
    width: 100%;
    border-collapse: collapse;
}
.drive-list th, .drive-list td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.drive-list th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.drive-list tr {
    transition: background 0.2s;
    cursor: pointer;
}
.drive-list tr:hover { background: var(--bg-main); }
.drive-list tr.selected { background: var(--primary-light); }
.drive-list .item-icon { 
    font-size: 1.25rem; 
    margin-right: 0.75rem; 
    vertical-align: middle; 
}
.drive-list td.item-name-cell {
    display: flex;
    align-items: center;
}

/* Detail View (Similar to List but more columns) */
/* Context Actions */
.item-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: none;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    gap: 0.125rem;
    padding: 0.125rem;
    border: 1px solid var(--border-color);
}
.drive-item:hover .item-actions { display: flex; }

.drive-list tr .item-actions { 
    position: static; 
    display: flex; 
    opacity: 0; 
    box-shadow: none; 
    background: transparent; 
    border: none;
    justify-content: flex-end;
}
.drive-list tr:hover .item-actions { opacity: 1; }

.item-actions button {
    padding: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.item-actions button:hover {
    color: var(--primary);
    background: var(--bg-main);
}
.item-actions button.text-danger:hover {
    color: var(--danger);
}

.folder-color { color: #facc15; }
.pdf-color { color: #ef4444; }

/* Layout Overrides */

/* Top Navigation Layout */
body.layout-topnav .app-container {
    flex-direction: column;
}
body.layout-topnav .sidebar {
    display: none;
}
body.layout-topnav .main-content {
    margin-left: 0;
}
body.layout-topnav .top-header {
    background-color: var(--sidebar-bg);
    color: white;
}
body.layout-topnav .top-header .logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--info);
    gap: 0.75rem;
    margin-right: 2rem;
}
body.layout-topnav .top-header .search-bar input {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-color: transparent;
}
body.layout-topnav .top-header .search-bar input::placeholder {
    color: rgba(255,255,255,0.6);
}
body.layout-topnav .top-header .search-bar i {
    color: rgba(255,255,255,0.7);
}
body.layout-topnav .user-profile {
    color: white;
}
body.layout-topnav .top-navbar-links {
    display: flex;
    gap: 0.5rem;
    height: 100%;
    flex: 1;
}
body.layout-topnav .top-navbar-links a {
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    gap: 0.5rem;
}
body.layout-topnav .top-navbar-links a:hover, body.layout-topnav .top-navbar-links a.active {
    color: white;
    border-bottom-color: var(--info);
    background-color: rgba(255,255,255,0.05);
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.toast-message {
    background: white;
    color: var(--text-main);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid var(--primary);
    animation: slideInRight 0.3s ease-out forwards;
    transition: opacity 0.3s ease-out;
}
.toast-message.success { border-left-color: var(--success); }
.toast-message.error { border-left-color: var(--danger); }
.toast-message.info { border-left-color: var(--info); }
.toast-icon {
    font-size: 1.5rem;
}
.toast-message.success .toast-icon { color: var(--success); }
.toast-message.error .toast-icon { color: var(--danger); }
.toast-message.info .toast-icon { color: var(--info); }
.toast-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--text-main);
}
.toast-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.notification-panel.open {
    right: 0;
}
.notification-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}
.notification-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
}
.notification-header button {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
}
.notification-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.notification-item {
    padding: 1rem;
    border-radius: 8px;
    background: #f1f5f9;
    border-left: 4px solid var(--primary);
}
.notification-item.success { border-left-color: var(--success); background: #f0fdf4; }
.notification-item.error { border-left-color: var(--danger); background: #fef2f2; }
.notification-item.info { border-left-color: var(--info); background: #f0f9ff; }
.notification-item h4 { margin: 0 0 0.25rem 0; font-size: 0.95rem; }
.notification-item p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.notification-item .time { display: block; margin-top: 0.5rem; font-size: 0.75rem; color: #94a3b8; }
.empty-notifications {
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
}

body.layout-floatnav .sidebar {
    display: none;
}
body.layout-floatnav .main-content {
    margin-left: 0;
    padding-bottom: 6rem;
}
body.layout-floatnav .top-header .logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    gap: 0.75rem;
}
body.layout-floatnav .fab-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}
body.layout-floatnav .fab-menu {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    border: 1px solid var(--border-color);
}
body.layout-floatnav .fab-menu.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
body.layout-floatnav .fab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 0.75rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    gap: 0.5rem;
    transition: all 0.2s;
    text-align: center;
}
body.layout-floatnav .fab-item i {
    font-size: 1.5rem;
    color: var(--primary);
}
body.layout-floatnav .fab-item:hover {
    background-color: var(--bg-main);
    color: var(--primary);
    transform: translateY(-3px);
}
body.layout-floatnav .fab-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
body.layout-floatnav .fab-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
body.layout-floatnav .fab-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}
body.layout-floatnav .fab-button.active {
    transform: rotate(135deg);
    background: linear-gradient(135deg, var(--danger), #f87171);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Layout Switcher UI */
.layout-switcher {
    position: relative;
    margin-left: 10px;
}
.layout-switcher-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 200px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}
.layout-switcher-menu.show {
    display: flex;
}
.layout-option {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s;
}
.layout-option:hover {
    background: var(--bg-main);
}
.layout-option.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 500;
}

body.nm {
    background: #f7f8fa;
}

.nm-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.nm-sidebar {
    background: #0b1220;
    color: #e2e8f0;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nm-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
}

.nm-brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(37,99,235,1), rgba(99,102,241,1));
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
}

.nm-brand-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.nm-brand-subtitle {
    font-size: 12px;
    color: rgba(226, 232, 240, 0.7);
}

.nm-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nm-nav a {
    color: #e2e8f0;
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(148, 163, 184, 0.06);
}

.nm-nav a:hover {
    background: rgba(148, 163, 184, 0.10);
    text-decoration: none;
}

.nm-nav a.active {
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(37, 99, 235, 0.35);
    color: #fff;
}

.nm-nav small {
    font-size: 11px;
    color: rgba(226, 232, 240, 0.65);
}

.nm-sidebar-footer {
    margin-top: auto;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(148, 163, 184, 0.06);
    display: grid;
    gap: 6px;
}

.nm-kv {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.8);
    gap: 10px;
}

.nm-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.nm-main {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
}

.nm-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.nm-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-main);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.nm-icon-btn:hover {
    background: #f8fafc;
}

.nm-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 720px;
    position: relative;
}

.nm-search i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.nm-search input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    outline: none;
    font-family: inherit;
}

.nm-search input:focus {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
    border-color: rgba(37,99,235,0.45);
}

.nm-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nm-user-email {
    color: var(--text-muted);
    font-size: 13px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nm-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #dbeafe;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #1d4ed8;
}

.nm-content {
    padding: 18px;
    min-width: 0;
}

@media (max-width: 1100px) {
    .nm-app { grid-template-columns: 1fr; }
    .nm-sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-105%); transition: transform 0.2s ease; z-index: 120; }
    .nm-sidebar.open { transform: translateX(0); }
}
