:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2333;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --border: #30363d;
  --border-focus: #f59e0b;
  --danger: #f85149;
  --success: #3fb950;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --transition: 180ms ease;
  --navbar-h: 56px;
}

[data-theme="light"] {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-hover: #f0efea;
  --text: #1b1b1b;
  --text-secondary: #6b7280;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-dim: rgba(217, 119, 6, 0.1);
  --border: #e5e7eb;
  --border-focus: #d97706;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hero-section {
  text-align: center;
  padding: 3rem 1.5rem 0.5rem;
  position: relative;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.hero-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-desc {
  margin: 0.85rem auto 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 500px;
}

/* ─── LAYOUT ─── */

.layout {
  width: 100%;
  max-width: 100%;
  padding: 1rem 1.5rem 2rem;
  margin: 0;
}

/* ─── NAVBAR ─── */

.navbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--navbar-h);
  padding: 0 1.5rem;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.user-label::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.btn-navbar {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border: none;
  background: var(--accent);
  color: #0d1117;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: background var(--transition), box-shadow var(--transition), transform 100ms;
}

.btn-navbar:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-navbar:active {
  transform: scale(0.97);
}

.btn-navbar.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-navbar.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text);
  box-shadow: none;
}

.btn-navbar.btn-outline:active {
  transform: scale(0.97);
}

.btn-icon-navbar {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon-navbar:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
  color: var(--text);
}

.btn-icon-navbar:active {
  transform: scale(0.92);
}

/* ─── AUTH ─── */

.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.auth-bg-decoration {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.auth-card-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.04) 100%);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  color: #0d1117;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.auth-card-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-tagline {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-desc {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 400;
}

.auth-body {
  padding: 1.25rem 1.75rem 1.75rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
}

.auth-tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  flex: 1;
  transition: all var(--transition);
  font-family: inherit;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  pointer-events: none;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.input-group:focus-within .input-icon {
  opacity: 0.9;
  color: var(--accent);
}

.input-group input {
  width: 100%;
  padding: 0.7rem 0.9rem 0.7rem 2.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.input-group input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.auth-form button {
  padding: 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  background: var(--accent);
  color: #0d1117;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), transform 100ms, box-shadow var(--transition);
  margin-top: 0.15rem;
}

.auth-form button:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.auth-form button:active {
  transform: scale(0.97);
}

/* ─── Google button ─── */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn-google:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-google:active {
  transform: scale(0.98);
}

.btn-google svg {
  flex-shrink: 0;
}

.auth-message {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  text-align: center;
  min-height: 1.2rem;
  font-weight: 500;
}

.auth-message.success {
  color: var(--success);
}

.auth-message.error {
  color: var(--danger);
}

/* ─── DASHBOARD ─── */

.dashboard {
  display: none;
}

.dashboard-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* ─── SIDEBAR ─── */

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  position: sticky;
  top: calc(var(--navbar-h) + 1rem);
  max-height: calc(100vh - var(--navbar-h) - 2rem);
  overflow-y: auto;
}

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

.sidebar-header h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

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

.btn-icon:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.08);
}

.btn-icon:active {
  transform: scale(0.95);
}

/* ─── FOLDER LIST ─── */

.folder-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid transparent;
  margin-bottom: 1px;
}

.folder-item:hover {
  background: var(--surface-hover);
}

.folder-item.active {
  background: var(--accent-dim);
  border-color: rgba(245, 158, 11, 0.3);
}

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

.folder-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.folder-count {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--bg);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.folder-delete {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 4px;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition), background var(--transition);
  border-radius: 4px;
}

.folder-item:hover .folder-delete {
  opacity: 0.5;
}

.folder-delete:hover {
  opacity: 1 !important;
  color: var(--danger);
  background: rgba(248, 81, 73, 0.1);
}

/* ─── ADD FOLDER FORM ─── */

.add-folder-form {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.add-folder-form input,
.add-folder-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.add-folder-form input:focus,
.add-folder-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.add-folder-form input::placeholder,
.add-folder-form textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.add-folder-form textarea {
  min-height: 56px;
}

.folder-form-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.15rem;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  background: var(--accent);
  color: #0d1117;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), box-shadow var(--transition), transform 100ms;
}

.btn-sm:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.btn-sm:active {
  transform: scale(0.96);
}

.btn-sm.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-sm.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-sm.btn-outline:active {
  transform: scale(0.96);
}

/* ─── MAIN CONTENT ─── */

.main-content {
  flex: 1;
  min-width: 0;
}

/* ─── TOOLBAR ─── */

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.toolbar .search-bar {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.toolbar-toggle {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toolbar-toggle .view-btn {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
}

.toolbar-toggle .view-btn:hover {
  color: var(--text);
}

.toolbar-toggle .view-btn.active {
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-machine-select {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-machine-select:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-machine-select:active {
  transform: scale(0.97);
}

.btn-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-toolbar:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-toolbar:active {
  transform: scale(0.97);
}

.btn-toolbar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ─── SEARCH BAR ─── */

.search-bar input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.search-bar input:focus {
  border-color: var(--accent);
}

.search-bar input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ─── PANEL ─── */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem 0.25rem;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.panel-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.folder-badge {
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.status-message {
  margin: 0.5rem 0 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* ─── SIDEBAR DIVIDER & SECTIONS ─── */

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.6rem 0;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.sidebar-section-header h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.sidebar-nota-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nota-list .nota-card {
  padding: 0.35rem 0.5rem;
}

.sidebar-nota-list .nota-card-title {
  font-size: 0.8rem;
}

.sidebar-nota-list .nota-card-preview {
  font-size: 0.7rem;
}

.sidebar-nota-list .nota-card-date {
  font-size: 0.62rem;
}

.status-message.error {
  color: var(--danger);
}

/* ─── COMMAND LIST ─── */

.command-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.command-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 3px;
  border: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.command-list li:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.command-list li:last-child {
  margin-bottom: 0;
}

.cmd-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.cmd-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.time {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.command-list code {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.82rem;
  background: rgba(245, 158, 11, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.45rem;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.command-list .path {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 0;
}

.cmd-actions {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

/* ─── FOLDER SELECT ─── */

.folder-select {
  font-size: 0.7rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.3rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  max-width: 120px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' fill='%238b949e'%3E%3Cpath d='M0 0h8L4 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 18px;
}

.folder-select:hover {
  border-color: var(--text-secondary);
  background-color: var(--surface-hover);
}

.folder-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

/* ─── FADE-IN ANIMATION ─── */

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.command-list li {
  animation: fadeSlideIn 250ms ease both;
}

.command-list li:nth-child(1) { animation-delay: 0ms; }
.command-list li:nth-child(2) { animation-delay: 30ms; }
.command-list li:nth-child(3) { animation-delay: 60ms; }
.command-list li:nth-child(4) { animation-delay: 90ms; }
.command-list li:nth-child(5) { animation-delay: 120ms; }
.command-list li:nth-child(6) { animation-delay: 150ms; }
.command-list li:nth-child(7) { animation-delay: 180ms; }
.command-list li:nth-child(8) { animation-delay: 210ms; }
.command-list li:nth-child(9) { animation-delay: 240ms; }
.command-list li:nth-child(10) { animation-delay: 270ms; }
.command-list li:nth-child(11) { animation-delay: 300ms; }
.command-list li:nth-child(12) { animation-delay: 330ms; }

/* ─── RESPONSIVE ─── */

/* ─── NOTAS VIEW ─── */

.notas-view {
  display: none;
}

.notas-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.nota-search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.nota-search-input:focus {
  border-color: var(--accent);
}

.nota-search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.nota-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nota-card {
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.nota-card:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.nota-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.nota-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nota-card-preview {
  font-size: 0.78rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.15rem;
}

.nota-card-date {
  font-size: 0.68rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.nota-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ─── NOTA EDITOR ─── */

.nota-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nota-editor-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nota-editor-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.nota-title-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}

.nota-title-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.nota-title-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.nota-content-input {
  width: 100%;
  min-height: 260px;
  padding: 0.75rem;
  font-size: 0.88rem;
  font-family: inherit;
  line-height: 1.6;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
  box-sizing: border-box;
}

.nota-content-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.nota-content-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.nota-editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 768px) {
  .layout {
    padding: 0.75rem 0.6rem 1.5rem;
  }

  .navbar {
    padding: 0 0.75rem;
    height: 50px;
  }

  .navbar-logo {
    font-size: 1rem;
  }

  .user-label {
    display: none;
  }

  .btn-navbar {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
  }

  .dashboard-content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
    padding: 0.6rem;
  }

  .sidebar-nota-list {
    max-height: 160px;
  }

  .auth-card-header {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .auth-body {
    padding: 1rem 1.25rem 1.5rem;
  }

  .auth-logo {
    width: 44px;
    height: 44px;
  }

  .auth-logo svg {
    width: 22px;
    height: 22px;
  }

  .auth-card-header h1 {
    font-size: 1.25rem;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar .search-bar {
    min-width: 0;
  }

  .toolbar-actions {
    justify-content: flex-end;
  }

  .cmd-meta {
    flex-shrink: 1;
    min-width: 0;
  }

  .cmd-maquina-badge {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
  }

  .folder-select {
    max-width: 100%;
    justify-self: start;
  }

  .panel-header h2 {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .sidebar {
    padding: 0.5rem;
  }

  .sidebar-nota-list {
    max-height: 120px;
  }

  .sidebar-nota-list .nota-card {
    padding: 0.25rem 0.4rem;
  }

  .sidebar-nota-list .nota-card-title {
    font-size: 0.75rem;
  }

  .sidebar-nota-list .nota-card-preview {
    font-size: 0.65rem;
  }

  .sidebar-nota-list .nota-card-date {
    font-size: 0.6rem;
  }
}

/* ─── MODAL ─── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
  animation: modalFadeIn 180ms ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: modalSlideIn 200ms ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-hover);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
}

.modal-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--transition);
}

.modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

/* ─── FOLDER ACTION BUTTONS ─── */

.btn-folder-action {
  font-size: 0.68rem;
  font-family: inherit;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-folder-action:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
}

.btn-folder-action--danger {
  color: var(--danger);
  border-color: rgba(248, 81, 73, 0.3);
}

.btn-folder-action--danger:hover {
  background: rgba(248, 81, 73, 0.1);
  border-color: var(--danger);
}

/* ─── FOLDER CHECKBOX LIST ─── */

.folder-checkbox-list {
  display: flex;
  flex-direction: column;
}

.folder-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  border-radius: var(--radius-sm);
  margin: 0 -0.35rem;
  padding: 0.5rem 0.35rem;
}

.folder-checkbox-label:last-child {
  border-bottom: none;
}

.folder-checkbox-label:hover {
  background: var(--surface-hover);
}

.folder-checkbox-label span {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}

.folder-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ─── COMMAND FOLDER BADGE ─── */

.cmd-folder-badge {
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  display: inline-block;
  text-align: center;
  transition: background var(--transition), opacity var(--transition);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.cmd-folder-badge:hover {
  background: rgba(245, 158, 11, 0.2);
  opacity: 0.85;
}

.cmd-folder-badge--none {
  color: var(--text-secondary);
  background: transparent;
  border: 1px dashed var(--border);
  font-style: italic;
  font-size: 0.68rem;
}

.cmd-folder-badge--none:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
}

/* ─── PASOS GUIDE ─── */

.pasos-guide {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.paso {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.paso-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d1117;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.paso-texto {
  flex: 1;
  min-width: 0;
}

.paso-texto strong {
  font-size: 0.82rem;
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.paso-texto p {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.paso-texto p:last-child {
  margin-bottom: 0;
}

.paso-code {
  display: block;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  color: var(--accent);
  margin-top: 0.35rem;
  overflow-x: auto;
}

.paso-nota {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.2rem;
}

.paso-nota code {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--surface-hover);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

/* ─── OS SELECTOR ─── */

.os-selector {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.os-tab {
  flex: 1;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-align: center;
}

.os-tab:not(:last-child) {
  border-right: 1px solid var(--border);
}

.os-tab.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.os-tab:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text);
}

/* ─── MACHINE SELECTION MODAL ─── */

.machine-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.machine-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition);
  border: 1px solid transparent;
}

.machine-option:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.machine-option.active {
  background: var(--accent-dim);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent);
}

.machine-option svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.machine-option.active svg {
  opacity: 1;
}

/* ─── MACHINE BADGE ─── */

.cmd-maquina-badge {
  font-size: 0.65rem;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ─── DETAIL MODAL FIELDS ─── */

.detail-field {
  margin-bottom: 0.85rem;
}

.detail-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  font-size: 0.85rem;
  color: var(--text);
}

.detail-code {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  word-break: break-all;
}

.detail-maquina {
  font-weight: 600;
  color: var(--accent);
}

.detail-path {
  word-break: break-all;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.82rem;
}

/* ─── ADD COMMAND BAR ─── */

.add-command-bar {
  margin-bottom: 0.75rem;
  padding: 0.65rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.add-command-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.add-command-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color var(--transition);
}

.add-command-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.add-command-results {
  margin-top: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.add-command-result {
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  transition: background var(--transition);
}

.add-command-result:hover {
  background: var(--surface-hover);
}

.add-command-result-code {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.add-command-result-path {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── USER TRIGGER ─── */

.user-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem 0.2rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.user-trigger:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.user-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d1117;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── PROFILE PANEL ─── */

.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: transparent;
}

.profile-panel {
  position: fixed;
  top: calc(var(--navbar-h) + 0.5rem);
  right: 1.5rem;
  z-index: 950;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  overflow: hidden;
}

.profile-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.03) 100%);
  border-bottom: 1px solid var(--border);
}

.profile-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d1117;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

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

.profile-username {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-body {
  padding: 1rem 1.25rem;
}

.profile-field {
  margin-bottom: 0.5rem;
}

.profile-field-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.profile-token-row {
  display: flex;
  gap: 0.4rem;
}

.profile-token-input {
  flex: 1;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.72rem;
  padding: 0.4rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  outline: none;
  cursor: default;
}

.profile-token-input:focus {
  border-color: var(--accent);
}

.profile-field-value {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}

.profile-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.85rem 0;
}

.profile-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.profile-logout:hover {
  background: rgba(248, 81, 73, 0.08);
  border-color: var(--danger);
}

.profile-logout:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .profile-panel {
    right: 0.75rem;
    width: 300px;
  }
}

@media (max-width: 480px) {
  .toolbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .toolbar-actions .btn-machine-select,
  .toolbar-actions .btn-toolbar {
    flex: 1;
    justify-content: center;
  }

  .toolbar-toggle {
    flex: 1;
  }

  .toolbar-toggle .view-btn {
    flex: 1;
    text-align: center;
  }

  .profile-panel {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
  }

  .machine-option {
    padding: 0.75rem 0.6rem;
    font-size: 0.82rem;
  }

  .modal-box {
    width: 95%;
    max-width: none;
  }
}
