/* ==========================================================================
   start.mauriciodelima.com.br — Zen Glass & Editorial (Escuro Suave + Claro Papel)
   Simples, minimalista e sereno.
   ========================================================================== */

:root,
html[data-theme="dark"] {
  --bg-base: #0b0f17;
  --bg-gradient-top: rgba(56, 78, 122, 0.14);
  --bg-gradient-mid: rgba(20, 30, 48, 0.06);
  --surface: rgba(255, 255, 255, 0.028);
  --surface-hover: rgba(255, 255, 255, 0.055);
  --surface-elevated: #121824;
  --border-subtle: rgba(255, 255, 255, 0.065);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(148, 163, 184, 0.38);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --danger: #f87171;

  --icon-bg: rgba(255, 255, 255, 0.04);
  --icon-fg: #cbd5e1;
  --shadow-soft: 0 14px 40px -16px rgba(0, 0, 0, 0.55);
  --backdrop-blur: blur(16px);
}

html[data-theme="light"] {
  --bg-base: #f6f4ef;
  --bg-gradient-top: rgba(214, 206, 188, 0.35);
  --bg-gradient-mid: rgba(246, 244, 239, 0);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --surface-elevated: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.075);
  --border-hover: rgba(15, 23, 42, 0.16);
  --border-focus: rgba(15, 23, 42, 0.32);

  --text-primary: #1e293b;
  --text-secondary: #526071;
  --text-muted: #8492a6;

  --accent: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.1);
  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.11);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.11);
  --danger: #dc2626;

  --icon-bg: rgba(15, 23, 42, 0.045);
  --icon-fg: #334155;
  --shadow-soft: 0 12px 32px -14px rgba(15, 23, 42, 0.08);
  --backdrop-blur: blur(14px);
}

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

html,
body {
  min-height: 100%;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s ease, color 0.35s ease;
}

body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 48% at 50% -8%, var(--bg-gradient-top), transparent 72%),
    radial-gradient(circle at 50% 42%, var(--bg-gradient-mid), transparent 65%);
  z-index: 0;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  min-height: 100vh;
  padding: 26px 32px 44px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Barra Superior (Clima + Ações)
   ========================================================================== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.weather-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.weather-pill:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.weather-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.weather-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weather-primary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.weather-primary strong {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.weather-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: var(--backdrop-blur);
  transition: all 0.2s ease;
}

.sync-badge:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.sync-badge.is-owner .sync-dot {
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.55);
}

.sync-icon {
  display: inline-flex;
  align-items: center;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  backdrop-filter: var(--backdrop-blur);
  transition: all 0.2s ease;
}

.icon-btn:hover,
.icon-btn.active {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.icon-btn.active {
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.35);
}

/* ==========================================================================
   Palco Principal: Relógio, Saudação, Foco, Busca, Atalhos e Painéis
   ========================================================================== */

.main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 12px;
}

.page-shell.zen-active .main-stage {
  justify-content: center;
  padding-bottom: 6vh;
}

.hero-clock {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clock-display {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: clamp(3.6rem, 6.8vw, 5.4rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  user-select: none;
}

.clock-sec {
  font-size: 0.44em;
  font-weight: 300;
  color: var(--text-muted);
  margin-left: 4px;
  letter-spacing: -0.01em;
}

.greeting-text {
  margin-top: 10px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: clamp(1.22rem, 2vw, 1.48rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.date-text {
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Linha de Foco do Dia */
.daily-focus-wrap {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.22s ease;
  max-width: 520px;
  width: 92vw;
  justify-content: center;
}

.daily-focus-wrap:hover,
.daily-focus-wrap:focus-within {
  background: var(--surface);
  border-color: var(--border-subtle);
}

.focus-check {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.focus-check:hover {
  border-color: var(--emerald);
}

.daily-focus-wrap.is-done .focus-check {
  background: var(--emerald);
  border-color: var(--emerald);
}

.daily-focus-wrap.is-done .focus-check::after {
  content: '';
  width: 5px;
  height: 8px;
  border: solid #0b0f17;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg) translate(-0.5px, -0.5px);
}

.focus-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: center;
  width: 100%;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.focus-input:focus {
  color: var(--text-primary);
}

.focus-input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.daily-focus-wrap.is-done .focus-input {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ==========================================================================
   Barra de Busca Híbrida (Launcher + Web)
   ========================================================================== */

.search-section {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.search-bar {
  position: relative;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 8px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.search-bar:hover {
  border-color: var(--border-hover);
}

.search-bar:focus-within {
  background: var(--surface-hover);
  border-color: var(--border-focus);
}

.engine-selector-wrap {
  position: relative;
}

.engine-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 11px;
  background: var(--icon-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.engine-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.engine-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.engine-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 195px;
  padding: 6px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  z-index: 40;
}

.engine-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.engine-option:hover,
.engine-option.active {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.engine-option-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.engine-prefix {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: monospace;
}

.search-input {
  flex: 1;
  height: 100%;
  padding: 0 14px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
}

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

.search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-right: 4px;
  user-select: none;
}

.search-bar:focus-within .search-kbd {
  opacity: 0;
  pointer-events: none;
}

.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.search-submit:hover {
  color: var(--text-primary);
  background: var(--icon-bg);
}

.launcher-hint {
  font-size: 0.76rem;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

/* ==========================================================================
   Atalhos Rápidos & Pílulas de Contexto
   ========================================================================== */

.shortcuts-section {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.context-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.context-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.context-pill:hover {
  color: var(--text-secondary);
}

.context-pill.active {
  background: var(--surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.shortcuts-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.text-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.text-action-btn:hover,
.text-action-btn.active {
  color: var(--text-primary);
  background: var(--surface);
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  gap: 12px;
}

.shortcut-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.shortcut-card:hover,
.shortcut-card.is-highlighted {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-soft);
}

.shortcut-card.is-highlighted {
  border-color: var(--accent);
}

.shortcut-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--icon-bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-fg);
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.shortcut-card:hover .shortcut-icon-box,
.shortcut-card.is-highlighted .shortcut-icon-box {
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.28);
  background: var(--accent-soft);
}

.shortcut-title {
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.shortcut-subtitle {
  font-size: 0.67rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: -5px;
}

.shortcut-edit-trigger {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.shortcuts-grid.edit-mode .shortcut-edit-trigger,
.shortcut-card:hover .shortcut-edit-trigger {
  display: inline-flex;
}

.shortcut-edit-trigger:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ==========================================================================
   Painéis Inferiores: Notas Rápidas e Lista de Tarefas
   ========================================================================== */

.workspace-panels {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 4px;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.page-shell.zen-active .workspace-panels {
  display: none;
}

.panel-card {
  display: flex;
  flex-direction: column;
  min-height: 235px;
  max-height: 270px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: border-color 0.22s ease;
}

.panel-card:focus-within {
  border-color: var(--border-hover);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-title-group {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.panel-icon.note-accent {
  color: var(--amber);
}

.panel-icon.task-accent {
  color: var(--emerald);
}

.panel-title {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.panel-meta-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.panel-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.clear-tasks-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.71rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.clear-tasks-btn:hover {
  color: var(--text-primary);
}

.panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  overflow: hidden;
}

.notes-textarea {
  width: 100%;
  flex: 1;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.65;
  overflow-y: auto;
}

.notes-textarea:focus {
  color: var(--text-primary);
}

.notes-textarea::placeholder {
  color: var(--text-muted);
}

.tasks-body {
  gap: 12px;
}

.task-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-input {
  flex: 1;
  height: 36px;
  padding: 0 13px;
  background: var(--icon-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.83rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.task-input:focus {
  border-color: var(--border-focus);
}

.task-input::placeholder {
  color: var(--text-muted);
}

.task-add-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--emerald-soft);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.task-add-btn:hover {
  background: var(--emerald);
  color: #0b0f17;
}

.task-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 9px;
  transition: background 0.15s ease;
}

.task-item:hover {
  background: var(--icon-bg);
}

.task-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.task-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.task-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.task-checkbox:checked::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #0b0f17;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg) translate(-0.5px, -0.5px);
}

.task-text {
  font-size: 0.84rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.task-item.is-done .task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  padding: 2px 5px;
  border-radius: 5px;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.task-item:hover .task-delete-btn {
  opacity: 1;
}

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

.task-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 22px 0;
}

/* Scrollbar minimalista */
.notes-textarea::-webkit-scrollbar,
.task-list::-webkit-scrollbar {
  width: 4px;
}

.notes-textarea::-webkit-scrollbar-thumb,
.task-list::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 999px;
}

/* ==========================================================================
   Modais (Sincronização, Atalhos e Configurações)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-card.modal-sm {
  max-width: 420px;
}

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

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

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

.modal-desc {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  flex: 1;
}

.form-group label {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-input {
  height: 38px;
  padding: 0 12px;
  background: var(--icon-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
}

.city-search-row {
  display: flex;
  gap: 6px;
}

.city-search-row .form-input {
  flex: 1;
}

.city-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding: 6px;
  border-radius: 10px;
  background: var(--icon-bg);
  border: 1px solid var(--border-subtle);
}

.city-result-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  text-align: left;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.city-result-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.settings-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.settings-divider {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-divider h4 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.backup-actions {
  display: flex;
  gap: 10px;
}

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-bottom: 8px;
}

.form-feedback {
  font-size: 0.78rem;
  color: var(--emerald);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.modal-footer-right {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  height: 36px;
  padding: 0 15px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-base);
  border: 1px solid transparent;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--icon-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.file-label {
  cursor: pointer;
}

/* ==========================================================================
   Responsividade (Mobile & Tablets)
   ========================================================================== */

@media (max-width: 780px) {
  .page-shell {
    padding: 18px 16px 32px;
  }

  .workspace-panels {
    grid-template-columns: 1fr;
  }

  .shortcuts-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
