/* === Velox Clone — Base === */
:root { --accent: #8b5cf6; }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; overflow: hidden; height: 100vh; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.25); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.45); }

/* Sidebar */
.sidebar {
  width: 260px; min-width: 260px; height: 100%;
  background: #0b1220; border-right: 1px solid #1e293b;
  display: flex; flex-direction: column; transition: margin-left .25s ease;
}
.sidebar.collapsed { margin-left: -260px; }
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid #1e293b;
}
.sidebar-toggle-btn {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: #64748b; cursor: pointer;
}
.sidebar-toggle-btn:hover { background: #1e293b; color: #cbd5e1; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }

.menu-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; margin-bottom: 2px; border-radius: 10px;
  background: transparent; border: none; color: #94a3b8;
  font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; transition: all .15s;
}
.menu-btn i:first-child { width: 18px; text-align: center; font-size: 14px; }
.menu-btn:hover { background: #1e293b; color: #e2e8f0; }
.menu-btn.active { background: rgba(139,92,246,.15); color: #c4b5fd; font-weight: 600; }
.menu-btn .chev { font-size: 10px; transition: transform .2s; }
.menu-btn.open .chev { transform: rotate(180deg); }

.dropdown-menu { display: none; padding-left: 12px; }
.dropdown-menu.open { display: block; }
.dropdown-menu-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 12px; border-radius: 8px; background: transparent; border: none;
  color: #64748b; font-size: 12.5px; cursor: pointer; text-align: left; transition: all .15s;
}
.dropdown-menu-btn:hover { background: #1e293b; color: #cbd5e1; }
.dropdown-menu-btn.active { background: rgba(139,92,246,.15); color: #c4b5fd; }

.sidebar-user {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid #1e293b; cursor: pointer;
}
.avatar {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg,#8b5cf6,#6366f1);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px;
}
.profile-dropdown {
  position: absolute; bottom: 52px; left: 12px; right: 12px;
  background: #0f172a; border: 1px solid #1e293b; border-radius: 12px;
  padding: 6px; display: none; z-index: 50; box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
.profile-dropdown.open { display: block; }
.action-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: 8px; background: transparent; border: none;
  color: #cbd5e1; font-size: 12px; cursor: pointer; text-align: left;
}
.action-btn:hover { background: #1e293b; }

/* Topbar + content */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid #1e293b; background: #0b1220;
}
.content-area { flex: 1; overflow-y: auto; padding: 20px; }

/* Mobile */
.mobile-toggle { display: none; position: fixed; top: 12px; left: 12px; z-index: 40; width: 36px; height: 36px; border-radius: 10px; background: #1e293b; color: #e2e8f0; border: 1px solid #334155; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }
@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 45; }
  .sidebar:not(.mobile-open) { margin-left: -260px; }
  .sidebar.mobile-open { margin-left: 0; }
  .mobile-toggle { display: flex; align-items: center; justify-content: center; }
  .sidebar-overlay.show { display: block; }
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(2,6,23,.8); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  width: 100%; max-width: 420px; background: #0f172a; border: 1px solid #1e293b;
  border-radius: 16px; padding: 20px;
}

/* Form controls */
.inp {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: #020617; border: 1px solid #1e293b; color: #e2e8f0; font-size: 12px; outline: none; transition: border .15s;
}
.inp:focus { border-color: var(--accent); }
.btn-primary {
  padding: 10px 14px; border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#8b5cf6,#6366f1); color: #fff; font-size: 12px; font-weight: 600; transition: filter .15s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost {
  padding: 10px 14px; border-radius: 10px; border: 1px solid #1e293b; cursor: pointer;
  background: #0b1220; color: #cbd5e1; font-size: 12px; font-weight: 500; transition: background .15s;
}
.btn-ghost:hover { background: #1e293b; }
.hidden { display: none !important; }

/* Module loading spinner */
.loading-spinner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 0; color: #64748b; font-size: 13px; }
.spinner { width: 34px; height: 34px; border: 3px solid #1e293b; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* dark scroll for light pages inside modules */
.dark { color-scheme: dark; }
