
:root {
  --primary:        #1e40af;
  --primary-dark:   #1e3a8a;
  --primary-light:  #3b82f6;
  --accent:         #0891b2;
  --accent-light:   #06b6d4;
  --success:        #059669;
  --warning:        #d97706;
  --danger:         #dc2626;
  --star:           #f59e0b;

  --bg:             #f8fafc;
  --bg-elevated:    #ffffff;
  --bg-subtle:      #f1f5f9;
  --bg-hover:       #e2e8f0;

  --text:           #0f172a;
  --text-muted:     #475569;
  --text-light:     #94a3b8;


  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;

  --shadow-sm:      0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow:         0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg:      0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl:      0 25px 50px -12px rgba(15, 23, 42, 0.25);

  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      14px;
  --radius-xl:      20px;

  --t:              all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  --sidebar-width:  280px;
  --header-height:  68px;
  --footer-height:  56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }



.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr var(--footer-height);
  height: 100vh;
}

.sidebar { grid-row: 1 / 2; }
.main    { grid-row: 1 / 2; display: flex; flex-direction: column; overflow: hidden; }
.footer  { grid-column: 1 / 3; }



.sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 4px 8px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.brand-logo svg { width: 24px; height: 24px; }

.brand-info { min-width: 0; }
.brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.btn-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  transition: var(--t);
}

.btn-new:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-new svg { width: 18px; height: 18px; }

.nav-section { margin-bottom: 20px; }

.nav-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  padding: 0 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--text-muted);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  margin-bottom: 2px;
  transition: var(--t);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.nav-item.active {
  background: rgba(30, 64, 175, 0.08);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.storage-card {
  margin-top: auto;
  padding: 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.storage-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.storage-header svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.storage-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.storage-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 0.6s ease;
  width: 0%;
}

.storage-meta {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}



.header {
  height: var(--header-height);
  padding: 0 28px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.search-wrap {
  flex: 1;
  max-width: 540px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: var(--t);
}

.search-input:focus {
  outline: none;
  background: var(--bg-elevated);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.header-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
}

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

.icon-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.icon-btn svg { width: 18px; height: 18px; }



.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb-item {
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: var(--t);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.breadcrumb-item.current {
  color: var(--text);
  font-weight: 600;
}

.breadcrumb-item svg { width: 14px; height: 14px; }

.breadcrumb-sep {
  color: var(--text-light);
  font-size: 12px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin: 24px 0 14px;
}
.section-title:first-child { margin-top: 0; }


.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.item {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--t);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  user-select: none;
  animation: itemIn 0.3s ease-out backwards;
}

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

.item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.item-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.item-icon svg { width: 30px; height: 30px; }

.item-icon.folder    { background: rgba(30, 64, 175, 0.1);  color: var(--primary); }
.item-icon.image     { background: rgba(219, 39, 119, 0.1); color: #db2777; }
.item-icon.video     { background: rgba(220, 38, 38, 0.1);  color: var(--danger); }
.item-icon.audio     { background: rgba(5, 150, 105, 0.1);  color: var(--success); }
.item-icon.document  { background: rgba(59, 130, 246, 0.1); color: var(--primary-light); }
.item-icon.pdf       { background: rgba(220, 38, 38, 0.1);  color: var(--danger); }
.item-icon.archive   { background: rgba(217, 119, 6, 0.1);  color: var(--warning); }
.item-icon.code      { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.item-icon.spreadsheet { background: rgba(5, 150, 105, 0.1); color: var(--success); }
.item-icon.default   { background: rgba(100, 116, 139, 0.1); color: var(--text-muted); }

.item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.item-star {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  color: var(--text-light);
  transition: var(--t);
}

.item:hover .item-star { opacity: 1; }
.item-star:hover { background: var(--bg-subtle); color: var(--star); }
.item-star.starred { opacity: 1; color: var(--star); }
.item-star svg { width: 16px; height: 16px; fill: currentColor; }

.item-star.starred svg path,
.item-star:not(.starred) svg path { fill: currentColor; }
.item-star:not(.starred) svg path { fill: none; stroke: currentColor; stroke-width: 2; }
.item-star.starred svg path { fill: currentColor; stroke: currentColor; }

/* Vista lista */
.list-view .grid {
  grid-template-columns: 1fr;
  gap: 4px;
}

.list-view .item {
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 10px 14px;
}

.list-view .item-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 0;
  margin-right: 14px;
}

.list-view .item-icon svg { width: 18px; height: 18px; }

.list-view .item-name { 
  flex: 1;
  margin-bottom: 0;
  font-size: 14px;
  -webkit-line-clamp: 1;
}

.list-view .item-meta {
  margin-left: 16px;
  white-space: nowrap;
  font-size: 12px;
}

.list-view .item-star {
  position: static;
  margin-left: 8px;
  opacity: 1;
}

/* ============================================================
   ESTADO VACÍO
   ============================================================ */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-icon {
  width: 88px;
  height: 88px;
  background: var(--bg-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-light);
}
.empty-icon svg { width: 40px; height: 40px; }

.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 400px;
}



.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

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

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s ease;
}

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

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

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title svg { width: 20px; height: 20px; color: var(--primary); }

.modal-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
}
.modal-close:hover { background: var(--bg-subtle); color: var(--danger); }
.modal-close svg { width: 18px; height: 18px; }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: var(--t);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--t);
}
.color-option:hover { transform: scale(1.1); }
.color-option.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--t);
}

.btn-primary {
  background: var(--primary);
  color: white;
  flex: 1;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); }

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

.btn svg { width: 16px; height: 16px; }



.drop-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: var(--t);
}

.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--primary);
  background: rgba(30, 64, 175, 0.04);
}

.drop-zone svg {
  width: 40px;
  height: 40px;
  color: var(--primary);
  margin-bottom: 10px;
}

.drop-zone-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.drop-zone-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-options {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.upload-option-btn {
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: var(--t);
}
.upload-option-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.upload-list {
  margin-top: 16px;
  max-height: 280px;
  overflow-y: auto;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.upload-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.upload-icon-wrap svg { width: 16px; height: 16px; }

.upload-info { flex: 1; min-width: 0; }
.upload-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.upload-progress {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}
.upload-status {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.upload-item.success .upload-progress-bar { background: var(--success); }
.upload-item.error   .upload-progress-bar { background: var(--danger); }


.drag-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 64, 175, 0.08);
  backdrop-filter: blur(4px);
  border: 3px dashed var(--primary);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.drag-overlay.active { display: flex; }
.drag-overlay-box {
  background: var(--bg-elevated);
  padding: 36px 56px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-xl);
}
.drag-overlay-box svg {
  width: 56px;
  height: 56px;
  color: var(--primary);
  margin-bottom: 12px;
}
.drag-overlay-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.preview-modal {
  max-width: 880px;
  width: 95vw;
}

.preview-content {
  background: var(--bg-subtle);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-content img,
.preview-content video {
  max-width: 100%;
  max-height: 60vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.preview-content audio { width: 100%; }

.preview-content iframe {
  width: 100%;
  min-height: 60vh;
  border: none;
  border-radius: var(--radius-sm);
  background: white;
}

.preview-text {
  width: 100%;
  max-height: 60vh;
  overflow: auto;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.preview-info {
  background: var(--bg-subtle);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.preview-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.preview-info-row:last-child { border-bottom: none; }
.preview-info-label { color: var(--text-muted); font-weight: 500; }
.preview-info-value { color: var(--text); font-weight: 600; }

.url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: var(--t);
  word-break: break-all;
}
.url-box:hover { background: var(--bg-hover); border-color: var(--primary); }
.url-box svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.url-text { color: var(--primary); flex: 1; }


.context-menu {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  min-width: 200px;
  display: none;
}

.context-menu.active {
  display: block;
  animation: menuIn 0.12s ease-out;
}
@keyframes menuIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: var(--t);
}
.ctx-item:hover { background: var(--bg-subtle); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: rgba(220, 38, 38, 0.08); }
.ctx-item svg { width: 16px; height: 16px; }
.ctx-divider { height: 1px; background: var(--border); margin: 4px 0; }


.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease-out;
  font-size: 13px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--primary); }

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast.success .toast-icon { background: rgba(5, 150, 105, 0.1); color: var(--success); }
.toast.error   .toast-icon { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.toast.info    .toast-icon { background: rgba(30, 64, 175, 0.1); color: var(--primary); }

.toast-icon svg { width: 16px; height: 16px; }
.toast-message { flex: 1; color: var(--text); font-weight: 500; }


.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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



.footer {
  height: var(--footer-height);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.footer-logo svg { width: 16px; height: 16px; }

.footer-text strong { color: var(--text); font-weight: 700; }

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
}

.footer-version {
  padding: 3px 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: monospace;
}


@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: calc(100vh - var(--footer-height));
    z-index: 100;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-xl);
  }
  .sidebar.open { left: 0; }
  .header { padding: 0 16px; }
  .content { padding: 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .footer { padding: 0 16px; flex-direction: column; gap: 4px; justify-content: center; height: auto; min-height: var(--footer-height); padding: 8px 16px; }
  .footer-right { font-size: 10px; }
}
