:root {
  color-scheme: light;
  --bg: #eef4fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe7f3;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #15803d;
  --danger: #dc2626;
  --warning: #f97316;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  height: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  overflow-x: hidden;
}

#app {
  min-height: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

/* --- Modern To-Do UI --- */
.todo-modern-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 32px;
  color: #ffffff;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.modern-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.modern-hero-head span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.modern-hero-head h1 {
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 950;
  margin: 0;
  line-height: 1.1;
}

.modern-metric-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .modern-metric-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.fab-button {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: #2563eb;
  color: #ffffff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-button:active {
  transform: scale(0.92);
}

.modern-metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.modern-metric {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 12px 8px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.modern-metric strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.modern-metric small {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
}

.modern-metric.is-blue { border-bottom: 4px solid #3b82f6; }
.modern-metric.is-orange { border-bottom: 4px solid #f97316; }
.modern-metric.is-red { border-bottom: 4px solid #ef4444; }
.modern-metric.is-green { border-bottom: 4px solid #10b981; }

@keyframes pulse-soft {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.has-pulse { animation: pulse-soft 2s infinite; }

.todo-workspace {
  display: grid;
  gap: 16px;
  padding-bottom: 20px;
}

.modern-filter-bar {
  margin: 0 -14px;
}

.filter-scroll-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 14px;
  scrollbar-width: none;
}

.filter-scroll-row::-webkit-scrollbar { display: none; }

.filter-pill {
  flex: 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 900;
  color: var(--muted);
  cursor: pointer;
}

.filter-pill.is-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.filter-pill span {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.7;
}

.owner-filter-bar {
  display: flex;
  gap: 8px;
  background: var(--surface-soft);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.owner-pill {
  flex: 1;
  background: transparent;
  border-radius: 12px;
  padding: 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  cursor: pointer;
}

.owner-pill.is-active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.modern-todo-card {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  margin-bottom: 12px;
  position: relative;
  transition: all 0.2s ease;
}

.modern-todo-card.is-urgent { border-left: 6px solid #ef4444; }
.modern-todo-card.is-overdue { background: #fff7ed; border-color: #fed7aa; }
.theme-dark .modern-todo-card.is-overdue { background: #2a1b10; border-color: #432b1a; }
.modern-todo-card.is-completed { opacity: 0.6; grayscale: 0.5; }

.modern-todo-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modern-todo-main {
  display: flex;
  gap: 16px;
}

.modern-todo-status {
  flex: 0 0 32px;
}

.status-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid #d1d5db;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-circle.is-done {
  background: #10b981;
  border-color: #10b981;
}

.modern-todo-content {
  flex: 1;
}

.modern-todo-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.modern-todo-title strong {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.3;
}

.urgent-tag {
  background: #fee2e2;
  color: #ef4444;
  font-size: 9px;
  font-weight: 950;
  padding: 2px 6px;
  border-radius: 6px;
}

.modern-todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.meta-item {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.modern-todo-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modern-todo-pills {
  display: flex;
  gap: 8px;
}

.pill {
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
}

.pill.reminder { background: #e0f2fe; color: #0369a1; }
.pill.files { background: #f3e8ff; color: #7e22ce; }

.modern-todo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.action-btn {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

.action-btn.delete { color: #ef4444; }

/* Modern Form */
.modern-form-container {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 32px;
  padding: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modern-form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modern-form-head h2 { font-size: 20px; font-weight: 950; margin: 0; }

.text-button {
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.modern-field {
  margin-bottom: 16px;
}

.modern-field label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.modern-grid-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modern-choice-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modern-segmented-control {
  display: flex;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.modern-segmented-control label {
  flex: 1;
  text-align: center;
  margin: 0;
  padding: 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-transform: none;
}

.modern-segmented-control label.is-selected {
  background: var(--primary);
  color: #ffffff;
}

.modern-segmented-control label.is-selected.is-urgent { background: #ef4444; }

.modern-segmented-control input { position: absolute; opacity: 0; pointer-events: none; }

.modern-editor {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-soft);
}

.modern-editor-field {
  padding: 12px;
  min-height: 100px;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

.modern-file-input {
  border: 1px dashed var(--primary);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  position: relative;
  background: rgba(37, 99, 235, 0.05);
}

.modern-file-input span { font-size: 13px; font-weight: 800; color: var(--primary); }
.modern-file-input input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.modern-submit-button {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border-radius: 18px;
  padding: 16px;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
  margin-top: 10px;
}

/* Update general shell padding for better modern look */
.app-shell {
  padding: max(14px, env(safe-area-inset-top)) 14px 100px;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  padding: 18px;
  place-items: center;
}

.login-card,
.top-card,
.card,
.notice-card,
.metric {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.login-card {
  display: grid;
  gap: 16px;
  max-width: 440px;
  padding: 28px;
  width: 100%;
}

.auth-card {
  max-width: 560px;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 6px;
}

.auth-switch button,
.link-button {
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 950;
  min-height: 42px;
}

.auth-switch button.is-active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.link-button {
  border: 1px solid var(--border);
  color: var(--primary);
}

.register-form {
  display: grid;
  gap: 10px;
}

.form-section-title {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08));
  padding: 12px;
}

.form-section-title strong,
.permission-box strong {
  color: var(--text);
  font-weight: 950;
}

.form-section-title small {
  color: var(--muted);
  font-weight: 800;
}

.register-social-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
  padding: 14px;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.check-row a {
  color: var(--primary);
  font-weight: 950;
}

.login-card span,
.top-card span,
.section-head span,
.notice-card span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.login-card h1,
.top-card h1,
.notice-card h2,
.section-head h2 {
  color: var(--text);
  font-weight: 950;
  line-height: 1.05;
  margin: 4px 0;
}

.login-card p,
.top-card p,
.notice-card p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
}

.login-card form,
.inline-form {
  display: grid;
  gap: 10px;
}

.login-card label {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfe0f4;
  border-radius: 16px;
  background: #f8fafc;
  color: var(--text);
  min-height: 48px;
  padding: 12px 14px;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.login-card button,
.inline-form button,
.small-button,
.icon-button {
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-weight: 950;
  min-height: 46px;
  padding: 0 16px;
}

.top-card {
  align-items: center;
  background: #102033;
  color: #ffffff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.top-card h1 {
  color: #ffffff;
  font-size: 28px;
  overflow-wrap: anywhere;
}

.top-card p {
  color: #cbd5e1;
}

.top-card span {
  color: #93c5fd;
}

.icon-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 18px;
  flex: 0 0 48px;
  font-size: 20px;
  min-height: 48px;
  padding: 0;
}

.top-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.module-toggle {
  align-items: center;
  border: 1px solid #93c5fd;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.1);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.module-toggle small,
.control-panel span,
.weather-card span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.module-toggle strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}

.module-burger,
.module-caret {
  align-items: center;
  border-radius: 18px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  font-size: 24px;
  font-weight: 950;
  height: 54px;
  justify-content: center;
  width: 54px;
  transition: transform 180ms ease, background 180ms ease;
}

.module-toggle.is-open .module-caret {
  background: #dbeafe;
  transform: rotate(180deg);
}

.module-grid {
  border: 1px solid #dbeafe;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 1000px;
  opacity: 1;
  overflow-y: auto;
  padding: 10px;
  transform: translateY(0);
  transition: max-height 220ms ease, opacity 180ms ease, padding 220ms ease, transform 180ms ease, border-color 180ms ease;
}

.module-grid.is-closed {
  border-color: transparent;
  box-shadow: none;
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
  padding-top: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.module-grid button {
  align-items: center;
  border: 1px solid #dbe7f3;
  border-radius: 18px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 70px;
  padding: 10px;
  text-align: left;
}

.module-grid button span {
  align-items: center;
  background: #f1f5f9;
  border-radius: 16px;
  color: #2563eb;
  display: inline-flex;
  font-size: 18px;
  font-weight: 950;
  grid-row: span 2;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.module-grid button strong {
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
}

.module-grid button small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}

.module-grid button.is-active {
  border-color: #60a5fa;
  box-shadow: inset 4px 0 0 #2563eb;
}

.module-grid button.is-active span {
  background: var(--primary);
  color: #ffffff;
}

.control-panel {
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 26px;
  background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 55%, #ecfeff 100%);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.1);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.control-panel h2 {
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
  margin: 4px 0;
}

.control-panel p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  margin: 0;
}

.control-panel time {
  border: 1px solid #93c5fd;
  border-radius: 22px;
  background: #ffffff;
  color: var(--primary);
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  min-width: 106px;
  padding: 18px 14px;
  text-align: center;
}

.notice-action {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.notice-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.notice-action .small-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
}

.weather-card {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 98px;
  padding: 14px;
}

.weather-card strong {
  color: var(--text);
  display: block;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  margin-top: 5px;
}

.weather-card small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-top: 7px;
}

.dashboard-tabs {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 7px;
}

.dashboard-tabs button {
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  min-height: 42px;
}

.dashboard-tabs button.is-active {
  background: #ffffff;
  border: 1px solid #93c5fd;
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.notice-card {
  background: linear-gradient(135deg, #f8fbff 0%, #ecfdf5 100%);
  padding: 18px;
}

.release-notes-list {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.release-notes-list li {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 12px;
  font-weight: 850;
  gap: 7px;
  line-height: 1.35;
}

.release-notes-list li::before {
  background: var(--primary);
  border-radius: 999px;
  content: "";
  flex: 0 0 6px;
  height: 6px;
  width: 6px;
}

.mobile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  background: rgba(15, 23, 42, 0.48);
  padding: 18px;
}

.mobile-modal-panel {
  width: min(100%, 680px);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
  display: grid;
  gap: 16px;
  padding: 18px;
}

.confirm-panel {
  justify-items: center;
  max-width: 420px;
  text-align: center;
}

.confirm-icon {
  align-items: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #dc2626;
  display: inline-flex;
  font-size: 24px;
  font-weight: 950;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.confirm-panel h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  margin: 0;
}

.confirm-panel p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  margin: 0;
}

.confirm-panel input {
  width: 100%;
}

.confirm-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.danger-solid-button {
  background: #dc2626;
  color: #ffffff;
}

.release-timeline {
  display: grid;
  gap: 12px;
}

.release-timeline article {
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #f8fbff;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.release-timeline article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.release-timeline strong {
  color: var(--primary);
  font-size: 14px;
  font-weight: 950;
}

.release-timeline small,
.release-timeline li {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.release-timeline ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

/* --- Modern Calendar UI --- */
.calendar-modern-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 32px;
  color: #ffffff;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.modern-day-plan {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 28px;
}

.modern-day-plan .section-head {
  padding: 18px 22px;
}

.day-hour-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  min-height: 70px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.day-hour-row time {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  border-right: 1px solid var(--border);
}

.hour-content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 4px;
  gap: 2px;
}

.timeline-event {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  position: relative;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  margin-bottom: 2px;
}

.timeline-event.is-shift {
  border-left-color: #f97316;
  background: #fff7ed;
  color: #9a3412;
}

/* Event Spanning styles */
.timeline-event.is-start { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; padding-bottom: 0; }
.timeline-event.is-middle { border-radius: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-top: none; border-bottom: none; }
.timeline-event.is-end { border-top-left-radius: 0; border-top-right-radius: 0; margin-top: 0; padding-top: 0; }

.event-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.event-inner strong { font-size: 14px; font-weight: 900; }
.event-inner small { font-size: 11px; opacity: 0.8; margin-top: 2px; }

.action-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.action-icon.danger { color: #ef4444; right: 40px; }

.empty-hour-button {
  width: 100%;
  height: 100%;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  padding-left: 12px;
}

.calendar-strip-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 16px;
  border: 1px solid var(--border);
}

.calendar-day-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}
.calendar-day-strip::-webkit-scrollbar { display: none; }

.calendar-day-strip button {
  flex: 0 0 65px;
  height: 85px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.calendar-day-strip button.is-active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.calendar-day-strip button.is-active small,
.calendar-day-strip button.is-active strong {
  color: #ffffff !important;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.event-detail {
  display: block;
  font-size: 11px;
  margin-top: 2px;
  opacity: 0.9;
  font-weight: 700;
}

.event-time {
  font-weight: 800;
  margin-bottom: 2px;
}
.calendar-day-strip button small { font-size: 11px; opacity: 0.7; text-transform: uppercase; }

.upcoming-agenda {
  background: var(--surface);
  border-radius: 28px;
  padding: 18px;
  border: 1px solid var(--border);
}

.settings-mobile-hero,
.profile-cloud-card {
  border: 1px solid #bfdbfe;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.1);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.settings-mobile-hero {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.settings-mobile-hero span,
.profile-cloud-card span {
  color: var(--primary);
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.settings-mobile-hero h2,
.profile-cloud-card h2 {
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  margin: 4px 0;
}

.settings-mobile-hero p,
.profile-cloud-card p,
.section-head p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.settings-mobile-hero > strong,
.profile-cloud-card .section-head > strong {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
  padding: 9px 12px;
  white-space: nowrap;
}

.profile-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-tools .small-button,
.profile-tools .file-action {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 42px;
}

.mobile-health-card,
.calendar-health-card,
.mobile-reminder-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 48%, #eef6ff 100%);
}

.profile-cloud-card .section-head > strong.is-connected {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
}

.profile-cloud-card .section-head > strong.is-warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.cloud-health-grid,
.reminder-log-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cloud-health-grid article,
.reminder-log-metrics article {
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 13px;
}

.cloud-health-grid strong,
.reminder-log-metrics strong {
  color: var(--text);
  display: block;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.cloud-health-grid small,
.reminder-log-metrics small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  margin-top: 6px;
}

.cloud-record-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cloud-record-pills span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  padding: 8px 10px;
  text-transform: none;
}

.cloud-record-pills strong {
  color: var(--text);
}

.reminder-log-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.reminder-log-list li {
  align-items: flex-start;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 12px;
}

.reminder-log-list strong {
  color: var(--text);
  display: block;
  font-size: 13px;
  font-weight: 950;
}

.reminder-log-list small,
.reminder-log-list p {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  margin: 4px 0 0;
}

.reminder-log-badge {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 950;
  padding: 6px 8px;
}

.reminder-log-badge.error {
  background: #fef2f2;
  color: #b91c1c;
}

.reminder-log-badge.missing {
  background: #fff7ed;
  color: #c2410c;
}

.reminder-log-badge.sent {
  background: #ecfdf5;
  color: #15803d;
}

.app-form label {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.schedule-mobile-hero span,
.calendar-strip-card span,
.schedule-agenda-item span {
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.schedule-mobile-hero span {
  color: #bfdbfe;
}

.schedule-mobile-hero h2 {
  font-size: 25px;
  font-weight: 950;
  line-height: 1.08;
  margin: 4px 0;
}

.schedule-mobile-hero p {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  margin: 0;
}

.schedule-mobile-hero .small-button {
  background: #ffffff;
  color: #1d4ed8;
  flex: 0 0 auto;
}

.schedule-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calendar-strip-card {
  border: 1px solid #dbeafe;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.calendar-day-strip {
  display: grid;
  gap: 8px;
  grid-auto-columns: minmax(72px, 1fr);
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: 2px;
}

.calendar-day-strip button {
  border: 1px solid #dbe7f3;
  border-radius: 22px;
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-height: 82px;
  padding: 10px;
  place-items: center;
  position: relative;
}

.calendar-day-strip button small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day-strip button strong {
  font-size: 22px;
  font-weight: 950;
}

/* --- Calendar Sync Status Bar --- */
.calendar-sync-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.sync-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.sync-dot.is-active {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.sync-dot.is-syncing {
  animation: pulse-sync 1s infinite;
  background: #3b82f6;
}

.calendar-sync-status-bar.has-error {
  border-color: #fca5a5;
  background: #fef2f2;
}

.theme-dark .calendar-sync-status-bar.has-error {
  border-color: #7f1d1d;
  background: #2a1215;
}

.sync-dot.is-error {
  background: #ef4444;
}

@keyframes pulse-sync {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.calendar-sync-status-bar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.calendar-sync-status-bar .text-button {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.calendar-day-strip button span {
  align-items: center;
  background: #2563eb;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.calendar-day-strip button.is-active {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: inset 0 -4px 0 #2563eb;
}

.month-calendar-card {
  border: 1px solid #dbeafe;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 12px;
  padding: 16px;
}

.month-calendar-header {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.month-calendar-header h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  margin: 0;
  text-align: center;
  text-transform: capitalize;
}

.calendar-view-tabs {
  border-radius: 18px;
  background: #eff4fb;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px;
}

.calendar-view-tabs button {
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: default;
  font-size: 12px;
  font-weight: 950;
  min-height: 36px;
}

.calendar-view-tabs button.is-active {
  background: #ffffff;
  border: 1px solid #93c5fd;
  color: var(--primary);
}

.month-weekdays,
.month-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.month-grid button,
.month-empty {
  align-items: center;
  border: 1px solid #dbe7f3;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  display: grid;
  min-height: 48px;
  padding: 6px;
  position: relative;
}

.month-grid button strong {
  font-size: 13px;
  font-weight: 950;
}

.month-grid button small {
  align-items: center;
  background: #7c3aed;
  border-radius: 999px;
  bottom: 5px;
  color: #ffffff;
  display: inline-flex;
  font-size: 9px;
  height: 15px;
  justify-content: center;
  min-width: 15px;
  padding: 0 4px;
  position: absolute;
  right: 5px;
}

.month-grid button.is-today {
  border-color: #60a5fa;
}

.month-grid button.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: inset 0 -3px 0 #2563eb;
}

.day-timeline {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  max-height: 520px;
  overflow: auto;
}

.day-hour-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 56px;
}

.day-hour-row + .day-hour-row {
  border-top: 1px solid #e2e8f0;
}

.day-hour-row time {
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 12px 8px;
}

.day-hour-row > div {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.empty-hour-button {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  min-height: 38px;
  text-align: left;
  padding: 0 12px;
}

.timeline-event {
  border: 1px solid #bfdbfe;
  border-left: 5px solid #60a5fa;
  border-radius: 16px;
  background: #eff6ff;
  display: grid;
  gap: 7px;
  padding: 10px;
}

.timeline-event.is-shift {
  background: #fff7ed;
  border-color: #fed7aa;
  border-left-color: #fb923c;
}

.timeline-event strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.timeline-event small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.schedule-form-card .app-form {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #f8fbff;
  padding: 12px;
}

.day-plan-card .section-head small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
  margin-top: 6px;
}

.day-plan-card .section-head > strong {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
  padding: 8px 11px;
  white-space: nowrap;
}

.schedule-agenda-item {
  border-left: 5px solid #60a5fa;
}

.schedule-agenda-item.is-shift {
  border-left-color: #fb923c;
}

.schedule-agenda-item span {
  color: var(--primary);
  margin-bottom: 5px;
}

.metric-grid,
.finance-strip,
.dashboard-columns {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
  min-height: 98px;
  padding: 16px;
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-top: 7px;
}

.metric.blue {
  background: #eff6ff;
}

.metric.orange {
  background: #fff7ed;
}

.metric.green {
  background: #f0fdf4;
}

.metric.purple {
  background: #f5f3ff;
}

.metric.red {
  background: #fef2f2;
}

.card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-head h2 {
  font-size: 21px;
}

.small-button {
  border-radius: 999px;
  min-height: 40px;
}

.list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 14px;
}

.list-item.is-clickable {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.list-item.is-clickable:hover {
  border-color: #93c5fd;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.list-item strong {
  color: var(--text);
  display: block;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.list-item small,
.list-item p {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin: 5px 0 0;
}

.item-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.inline-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-form {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #f8fbff;
  padding: 12px;
}

.is-overdue {
  background: #fff7ed;
  border-color: #fed7aa;
}

.edit-button {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.danger-button {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.done-button {
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  min-height: 38px;
  padding: 0 13px;
}

.todo-hero-card {
  border: 1px solid #bfdbfe;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 54%, #ecfdf5 100%);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.1);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.todo-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.todo-summary-grid article {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
}

.todo-summary-grid article.is-today {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.todo-summary-grid article.is-hot {
  background: #fff7ed;
  border-color: #fed7aa;
}

.todo-summary-grid article.is-urgent {
  background: #fef2f2;
  border-color: #fecaca;
}

.todo-summary-grid article.is-customer {
  background: #f8fafc;
  border-color: #dbeafe;
}

.todo-summary-grid strong {
  color: var(--text);
  display: block;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.todo-summary-grid small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  margin-top: 7px;
}

.todo-form-panel {
  border: 1px solid #dbeafe;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 251, 255, 0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  margin-bottom: 76px;
  padding: 14px;
}

.todo-form-title {
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #ffffff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.todo-form-title span,
.todo-form-panel label {
  color: var(--primary);
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.todo-form-title strong {
  color: var(--text);
  display: block;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  margin-top: 3px;
}

.todo-form-panel label {
  color: #0f172a;
  font-size: 12px;
  margin: 0;
  text-transform: none;
}

.todo-field-block {
  display: grid;
  gap: 8px;
}

.todo-field-block input,
.todo-field-block select,
.todo-form-panel input,
.todo-form-panel select {
  background-color: #ffffff;
  color: #0f172a;
  font-weight: 800;
}

.todo-field-block select option,
.todo-form-panel select option {
  background: #ffffff;
  color: #0f172a;
}

.todo-segment-stack {
  display: grid;
  gap: 10px;
}

.todo-choice-group {
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #f8fbff;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
}

.todo-choice-group label {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 950;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
}

.todo-choice-group label.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.todo-choice-group label.is-urgent.is-selected {
  background: #ef4444;
  border-color: #ef4444;
}

.todo-choice-group input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.todo-form-panel input[type="file"] {
  background: #ffffff;
  border: 1px dashed #93c5fd;
}

.todo-editor-shell {
  border: 1px solid #cfe2ff;
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

.todo-editor-toolbar {
  align-items: center;
  background: #eff6ff;
  border-bottom: 1px solid #dbeafe;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 9px 12px;
}

.todo-editor-toolbar span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.todo-editor-toolbar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}

.todo-editor-field {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
  min-height: 138px;
  outline: none;
  padding: 13px;
  white-space: pre-wrap;
}

.todo-editor-field:empty::before {
  color: #94a3b8;
  content: attr(data-placeholder);
}

.todo-file-help {
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #eff6ff;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  margin: -2px 0 0;
  padding: 10px 12px;
}

.todo-workspace-card {
  border-color: #bfdbfe;
  border-radius: 28px;
}

.todo-filter-row,
.todo-owner-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.todo-filter-row button,
.todo-owner-row button {
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  font-weight: 950;
  min-height: 42px;
  padding: 0 13px;
}

.todo-filter-row button.is-active,
.todo-owner-row button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.todo-filter-row button span,
.todo-owner-row button span {
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  color: inherit;
  font-size: 11px;
  min-width: 24px;
  padding: 4px 7px;
  text-align: center;
}

.compact-head {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.compact-head > strong {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
  padding: 8px 10px;
}

.todo-list-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
}

.todo-list-item.is-urgent {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff 0%, #fff7f7 100%);
}

.todo-list-item.is-completed {
  opacity: 0.72;
}

.todo-title-line {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.todo-icon-bubble {
  align-items: center;
  align-self: start;
  border-radius: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 14px;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.todo-icon-bubble.urgent {
  background: #fee2e2;
  color: #dc2626;
}

.todo-priority {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 950;
  padding: 6px 8px;
}

.todo-priority.normal {
  background: #eff6ff;
  color: #1d4ed8;
}

.todo-priority.urgent {
  background: #ef4444;
  color: #ffffff;
}

.todo-reminder {
  color: #1d4ed8 !important;
}

.todo-files {
  color: #7c3aed !important;
}

.todo-completed-badge {
  border-radius: 999px;
  background: #ecfdf5;
  color: #15803d;
  font-size: 12px;
  font-weight: 950;
  padding: 9px 12px;
}

.todo-card-actions {
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 10px;
}

.todo-submit-button {
  border-radius: 20px;
  min-height: 52px;
}

.danger-soft-button {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  color: #be123c !important;
}

.success-soft-button {
  background: #ecfdf5 !important;
  border-color: #bbf7d0 !important;
  color: #15803d !important;
}

.task-hero-card {
  border: 1px solid #bfdbfe;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 54%, #f5f3ff 100%);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.1);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.task-hero-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
  margin: 4px 0 0;
}

.task-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-summary-grid article {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
}

.task-summary-grid article.is-hot {
  background: #fff7ed;
  border-color: #fed7aa;
}

.task-summary-grid article.is-urgent {
  background: #fef2f2;
  border-color: #fecaca;
}

.task-summary-grid strong {
  color: var(--text);
  display: block;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.task-summary-grid small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  margin-top: 7px;
}

.task-form-panel {
  border: 1px solid #dbeafe;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 251, 255, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  margin-bottom: 76px;
  padding: 14px;
}

.task-form-title {
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #ffffff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.task-form-title span {
  color: var(--primary);
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.task-form-title strong {
  color: var(--text);
  display: block;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  margin-top: 3px;
}

.task-field-block {
  display: grid;
  gap: 8px;
}

.task-field-block label,
.task-form-panel label {
  color: #0f172a;
  display: block;
  font-size: 12px;
  font-weight: 950;
  margin: 0;
}

.task-field-block input,
.task-field-block select,
.task-form-panel input,
.task-form-panel select {
  background-color: #ffffff;
  color: #0f172a;
  font-weight: 800;
}

.task-field-block select option,
.task-form-panel select option {
  background: #ffffff;
  color: #0f172a;
}

.task-segment-stack {
  display: grid;
  gap: 10px;
}

.task-choice-group {
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #f8fbff;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
}

.task-choice-group.priority-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-choice-group label {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 950;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
}

.task-choice-group label.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.task-choice-group label.is-urgent.is-selected {
  background: #ef4444;
  border-color: #ef4444;
}

.task-choice-group input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.task-editor-shell {
  border: 1px solid #cfe2ff;
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

.task-editor-toolbar {
  align-items: center;
  background: #eff6ff;
  border-bottom: 1px solid #dbeafe;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 9px 12px;
}

.task-editor-toolbar span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.task-editor-toolbar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}

.task-editor-field {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
  min-height: 132px;
  outline: none;
  padding: 13px;
  white-space: pre-wrap;
}

.task-editor-field:empty::before {
  color: #94a3b8;
  content: attr(data-placeholder);
}

.task-file-help {
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #eff6ff;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  margin: -2px 0 0;
  padding: 10px 12px;
}

.task-submit-button {
  border-radius: 20px;
  min-height: 52px;
}

.task-workspace-card {
  border-color: #bfdbfe;
  border-radius: 28px;
}

.task-customer-summary {
  display: grid;
  gap: 10px;
}

.task-customer-pills,
.task-filter-row,
.task-owner-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.task-customer-pills button,
.task-filter-row button,
.task-owner-row button {
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  font-weight: 950;
  min-height: 42px;
  padding: 0 13px;
}

.task-customer-pills button {
  color: #1d4ed8;
}

.task-filter-row button.is-active,
.task-owner-row button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.task-customer-pills button span,
.task-filter-row button span,
.task-owner-row button span {
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  color: inherit;
  font-size: 11px;
  min-width: 24px;
  padding: 4px 7px;
  text-align: center;
}

.task-search-shell input {
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
}

.task-list-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
}

.task-list-item.is-overdue {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
}

.task-list-item.priority-high,
.task-list-item.priority-urgent {
  border-color: #fecaca;
}

.task-list-item.is-completed {
  opacity: 0.72;
}

.task-icon-bubble {
  align-items: center;
  align-self: start;
  border-radius: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 14px;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.task-icon-bubble.urgent {
  background: #fee2e2;
  color: #dc2626;
}

.task-icon-bubble.overdue {
  background: #ffedd5;
  color: #ea580c;
}

.task-card-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.task-title-line {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.task-title-line strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
}

.task-card-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.task-card-main p {
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  margin: 2px 0 0;
}

.task-priority {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 950;
  padding: 6px 8px;
}

.task-priority.low {
  background: #f1f5f9;
  color: #475569;
}

.task-priority.normal {
  background: #eff6ff;
  color: #1d4ed8;
}

.task-priority.urgent,
.task-priority.high {
  background: #ef4444;
  color: #ffffff;
}

.task-files {
  color: #7c3aed !important;
}

.task-card-actions {
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 10px;
}

.task-completed-badge {
  border-radius: 999px;
  background: #ecfdf5;
  color: #15803d;
  font-size: 12px;
  font-weight: 950;
  padding: 9px 12px;
}

.customer-mobile-hero,
.note-mobile-hero,
.file-mobile-hero {
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 58%, #ecfdf5 100%);
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.11);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 18px;
}

.note-mobile-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 58%, #fff7ed 100%);
}

.file-mobile-hero {
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 58%, #f8fafc 100%);
}

.customer-mobile-hero span,
.note-mobile-hero span,
.file-mobile-hero span,
.mobile-form-title span {
  color: var(--primary);
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.customer-mobile-hero h2,
.note-mobile-hero h2,
.file-mobile-hero h2 {
  color: var(--text);
  font-size: 25px;
  font-weight: 950;
  line-height: 1.05;
  margin: 4px 0 6px;
}

.customer-mobile-hero p,
.note-mobile-hero p,
.file-mobile-hero p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
  margin: 0;
}

.customer-summary-grid,
.note-summary-grid,
.file-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-workspace-card,
.note-workspace-card,
.file-workspace-card {
  border-color: #bfdbfe;
  border-radius: 28px;
}

.mobile-upload-status {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  padding: 16px;
}

.mobile-upload-status.is-info {
  border-color: #bfdbfe;
}

.mobile-upload-status.is-success {
  border-color: #86efac;
}

.mobile-upload-status.is-error {
  border-color: #fecaca;
}

.mobile-upload-status-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.mobile-upload-status-head span {
  color: var(--primary);
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.mobile-upload-status-head strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  font-weight: 950;
  margin-top: 2px;
}

.mobile-upload-status-head p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  margin: 4px 0 0;
}

.mobile-upload-badge {
  background: rgba(37, 99, 235, .1);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--primary);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 950;
  padding: 7px 10px;
}

.mobile-upload-status.is-success .mobile-upload-badge {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}

.mobile-upload-status.is-error .mobile-upload-badge {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.mobile-upload-log-list {
  display: grid;
  gap: 8px;
}

.mobile-upload-log-list article {
  background: var(--soft-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
}

.mobile-upload-log-list article span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.mobile-upload-log-list article strong {
  color: var(--text);
  display: block;
  font-size: 12px;
  font-weight: 950;
  margin-top: 3px;
}

.mobile-upload-log-list pre {
  background: rgba(15, 23, 42, .06);
  border-radius: 14px;
  color: var(--text);
  font: 700 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin: 8px 0 0;
  max-height: 160px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.mobile-upload-log-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
  margin: 0;
}

.mobile-search-shell input {
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
}

.mobile-editor-form {
  border: 1px solid #dbeafe;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 251, 255, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  margin-bottom: 12px;
  padding: 14px;
}

.mobile-editor-form label {
  color: #0f172a;
  display: block;
  font-size: 12px;
  font-weight: 950;
}

.mobile-editor-form input,
.mobile-editor-form select,
.mobile-editor-form textarea {
  background-color: #ffffff;
  color: #0f172a;
  font-weight: 800;
}

.mobile-editor-form select option {
  background: #ffffff;
  color: #0f172a;
}

.mobile-form-title {
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #ffffff;
  padding: 12px;
}

.mobile-form-title strong {
  color: var(--text);
  display: block;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  margin-top: 3px;
}

.customer-mobile-item,
.file-mobile-item {
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
}

.customer-color-dot {
  align-self: start;
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px #bfdbfe;
  height: 38px;
  width: 38px;
}

.customer-color-dot.blue { background: #60a5fa; }
.customer-color-dot.yellow { background: #fde68a; }
.customer-color-dot.green { background: #86efac; }
.customer-color-dot.pink { background: #f9a8d4; }
.customer-color-dot.purple { background: #c4b5fd; }
.customer-color-dot.gray { background: #cbd5e1; }
.customer-color-dot.orange { background: #fdba74; }

.customer-card-main,
.file-mobile-item .task-card-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.customer-card-main small,
.customer-card-main p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  margin: 0;
}

.customer-mini-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-mini-row span {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 950;
  padding: 6px 8px;
}

.note-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.note-filter-row button {
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  font-weight: 950;
  min-height: 42px;
  padding: 0 13px;
}

.note-filter-row button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.note-filter-row button span {
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  color: inherit;
  font-size: 11px;
  min-width: 24px;
  padding: 4px 7px;
  text-align: center;
}

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

.color-dot {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.color-dot input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.color-dot span {
  border-radius: 999px;
  height: 26px;
  width: 26px;
}

.color-dot.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.color-dot.yellow span { background: #fde68a; }
.color-dot.blue span { background: #bfdbfe; }
.color-dot.green span { background: #bbf7d0; }
.color-dot.pink span { background: #fbcfe8; }
.color-dot.purple span { background: #ddd6fe; }
.color-dot.gray span { background: #e2e8f0; }
.color-dot.orange span { background: #fed7aa; }

.note-preview {
  background: #ffffff;
}

.note-preview.is-passive {
  opacity: 0.66;
}

.file-icon-bubble {
  align-items: center;
  align-self: start;
  border-radius: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 14px;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.finance-mobile-hero {
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 58%, #ecfdf5 100%);
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.11);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 18px;
}

.finance-mobile-hero span,
.finance-panel-card .section-head span {
  color: var(--primary);
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.finance-mobile-hero h2 {
  color: var(--text);
  font-size: 25px;
  font-weight: 950;
  line-height: 1.05;
  margin: 4px 0 6px;
}

.finance-mobile-hero p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
  margin: 0;
}

.finance-overview {
  display: grid;
  gap: 10px;
}

.finance-net-card {
  border: 1px solid #bbf7d0;
  border-radius: 28px;
  background: linear-gradient(135deg, #052e2b 0%, #0f766e 100%);
  box-shadow: 0 20px 48px rgba(15, 118, 110, 0.18);
  color: #ffffff;
  min-height: 132px;
  padding: 18px;
}

.finance-net-card.is-negative {
  background: linear-gradient(135deg, #450a0a 0%, #dc2626 100%);
  border-color: #fecaca;
}

.finance-net-card span,
.finance-balance-pair span,
.finance-month-pair span,
.finance-action-card span {
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.finance-net-card strong {
  display: block;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
  margin-top: 10px;
}

.finance-net-card small {
  color: rgba(255, 255, 255, 0.82);
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-top: 10px;
}

.finance-balance-pair,
.finance-month-pair,
.finance-action-needed {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-balance-pair article,
.finance-month-pair article,
.finance-action-card {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #ffffff;
  padding: 14px;
}

.finance-balance-pair strong,
.finance-month-pair strong,
.finance-action-card strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
  margin-top: 7px;
}

.finance-month-pair .is-income,
.finance-action-card.collection {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.finance-month-pair .is-expense,
.finance-action-card.payment {
  background: #fff1f2;
  border-color: #fecdd3;
}

.finance-quick-actions {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-mobile-subnav,
.finance-type-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.finance-mobile-subnav button,
.finance-type-row button {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 950;
  min-height: 42px;
  padding: 0 14px;
}

.finance-quick-actions button {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px 8px;
  text-align: left;
}

.finance-quick-actions button span {
  align-items: center;
  border-radius: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 15px;
  font-weight: 950;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.finance-quick-actions button strong {
  font-size: 12px;
  font-weight: 950;
}

.finance-quick-actions button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.finance-quick-actions .income-action span,
.finance-quick-actions .collection-action span {
  background: #dcfce7;
  color: #15803d;
}

.finance-quick-actions .expense-action span,
.finance-quick-actions .payment-action span {
  background: #ffe4e6;
  color: #be123c;
}

.finance-mobile-subnav button.is-active,
.finance-type-row button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.finance-dashboard-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-panel-card {
  border: 1px solid #dbeafe;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.finance-mobile-form {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px;
}

.finance-mobile-form label {
  color: var(--text);
  display: block;
  font-size: 12px;
  font-weight: 950;
  margin: 2px 0 -4px;
}

.finance-form-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.finance-list-item {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px;
}

.finance-list-item.transaction-income,
.finance-list-item.transaction-collection {
  border-left: 5px solid #22c55e;
}

.finance-list-item.transaction-expense,
.finance-list-item.transaction-payment {
  border-left: 5px solid #ef4444;
}

.finance-list-item.status-cancelled {
  opacity: 0.68;
}

.finance-item-side {
  align-items: flex-end;
  display: grid;
  gap: 7px;
  justify-items: end;
}

.finance-item-side strong {
  color: var(--text);
  font-size: 15px;
  white-space: nowrap;
}

.finance-item-side .amount-income {
  color: #15803d;
}

.finance-item-side .amount-expense {
  color: #be123c;
}

.finance-icon-bubble {
  align-items: center;
  align-self: start;
  border-radius: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 14px;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.finance-icon-bubble.income {
  background: #dcfce7;
  color: #15803d;
}

.finance-icon-bubble.expense {
  background: #ffe4e6;
  color: #be123c;
}

.finance-status-pill {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 950;
  padding: 6px 9px;
}

.finance-card-actions {
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 10px;
}

.customer-detail-card {
  border: 1px solid #bfdbfe;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.12);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-pills span,
.detail-pills a {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  text-decoration: none;
}

.customer-detail-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
  margin: 0;
}

.mini-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-metrics .metric {
  min-height: 78px;
  padding: 12px;
}

.note-preview {
  border-left: 5px solid #cbd5e1;
}

.note-yellow { border-left-color: #facc15; }
.note-blue { border-left-color: #60a5fa; }
.note-green { border-left-color: #86efac; }
.note-pink { border-left-color: #f9a8d4; }
.note-purple { border-left-color: #c4b5fd; }
.note-orange { border-left-color: #fdba74; }
.note-gray { border-left-color: #cbd5e1; }

.secondary {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.empty {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  padding: 18px;
  text-align: center;
}

.bottom-nav {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbeafe;
  border-radius: 28px;
  bottom: max(12px, env(safe-area-inset-bottom));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(6, 1fr);
  left: 12px;
  margin: 0 auto;
  max-width: 940px;
  padding: 8px;
  position: fixed;
  right: 12px;
  z-index: 20;
}

.bottom-nav button {
  align-items: center;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  gap: 3px;
  font-size: 10px;
  font-weight: 950;
  justify-items: center;
  min-height: 52px;
  padding: 6px 4px;
}

.bottom-nav button span {
  align-items: center;
  background: #f1f5f9;
  border-radius: 14px;
  color: #2563eb;
  display: inline-flex;
  font-size: 15px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.bottom-nav button strong {
  font-size: 10px;
  line-height: 1;
}

.bottom-nav button.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.bottom-nav button.is-active span {
  background: var(--primary);
  color: #ffffff;
}

.mobile-toast {
  background: #102033;
  border: 1px solid #1e3a5f;
  border-radius: 18px;
  bottom: 94px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  left: 18px;
  padding: 13px 15px;
  position: fixed;
  right: 18px;
  z-index: 50;
}

.theme-dark,
.theme-system {
  --dark-bg: #07111f;
  --dark-surface: #101b2d;
  --dark-surface-soft: #142238;
  --dark-border: #263a56;
  --dark-text: #e6eefc;
  --dark-muted: #9fb0c8;
}

.theme-dark {
  color-scheme: dark;
  --bg: var(--dark-bg);
  --surface: var(--dark-surface);
  --surface-soft: var(--dark-surface-soft);
  --text: var(--dark-text);
  --muted: var(--dark-muted);
  --border: var(--dark-border);
}

@media (prefers-color-scheme: dark) {
  .theme-system {
    color-scheme: dark;
    --bg: var(--dark-bg);
    --surface: var(--dark-surface);
    --surface-soft: var(--dark-surface-soft);
    --text: var(--dark-text);
    --muted: var(--dark-muted);
    --border: var(--dark-border);
  }
}

.theme-dark .login-card,
.theme-dark .card,
.theme-dark .notice-card,
.theme-dark .metric,
.theme-dark .module-toggle,
.theme-dark .module-grid,
.theme-dark .list-item,
.theme-dark .profile-cloud-card,
.theme-dark .month-calendar-card,
.theme-dark .calendar-strip-card,
.theme-dark .schedule-form-card,
.theme-dark .customer-detail-card,
.theme-system .login-card,
.theme-system .card,
.theme-system .notice-card,
.theme-system .metric,
.theme-system .module-toggle,
.theme-system .module-grid,
.theme-system .list-item,
.theme-system .profile-cloud-card,
.theme-system .month-calendar-card,
.theme-system .calendar-strip-card,
.theme-system .schedule-form-card,
.theme-system .customer-detail-card {
  background: var(--surface);
  border-color: var(--border);
}

.theme-dark input,
.theme-dark select,
.theme-dark textarea,
.theme-dark .todo-field-block input,
.theme-dark .todo-field-block select,
.theme-dark .todo-form-panel input,
.theme-dark .todo-form-panel select,
.theme-dark .task-field-block input,
.theme-dark .task-field-block select,
.theme-dark .task-form-panel input,
.theme-dark .task-form-panel select,
.theme-dark .mobile-editor-form input,
.theme-dark .mobile-editor-form select,
.theme-dark .mobile-editor-form textarea,
.theme-dark .finance-mobile-form input,
.theme-dark .finance-mobile-form select,
.theme-dark .finance-mobile-form textarea {
  background-color: #0b1626;
  border-color: var(--border);
  color: var(--text);
}

.theme-dark select option {
  background: #0b1626;
  color: var(--text);
}

.theme-dark .top-card,
.theme-system .top-card {
  background: #081525;
  border-color: #1e3350;
}

@media (prefers-color-scheme: light) {
  .theme-system .top-card {
    background: #102033;
  }
}

.theme-dark .module-burger,
.theme-dark .module-caret,
.theme-dark .bottom-nav button span,
.theme-dark .file-icon-bubble,
.theme-dark .task-icon-bubble,
.theme-dark .todo-icon-bubble {
  background: #172842;
  color: #8bb7ff;
}

.theme-dark .bottom-nav,
.theme-system .bottom-nav {
  background: rgba(16, 27, 45, 0.94);
  border-color: var(--border);
}

@media (prefers-color-scheme: light) {
  .theme-system .bottom-nav {
    background: rgba(255, 255, 255, 0.94);
  }
}

.theme-dark .control-panel,
.theme-dark .settings-mobile-hero,
.theme-dark .todo-hero-card,
.theme-dark .task-hero-card,
.theme-dark .customer-mobile-hero,
.theme-dark .note-mobile-hero,
.theme-dark .file-mobile-hero,
.theme-dark .finance-mobile-hero,
.theme-dark .mobile-upload-status,
.theme-dark .mobile-editor-form,
.theme-dark .todo-form-panel,
.theme-dark .task-form-panel,
.theme-dark .finance-mobile-form,
.theme-dark .finance-net-card,
.theme-dark .finance-action-card,
.theme-dark .finance-overview article,
.theme-dark .finance-quick-actions button,
.theme-dark .weather-card,
.theme-dark .todo-list-item,
.theme-dark .task-list-item,
.theme-dark .customer-mobile-item,
.theme-dark .file-mobile-item,
.theme-dark .note-preview {
  background: linear-gradient(135deg, #101b2d 0%, #13233a 100%);
  border-color: var(--border);
}

.theme-dark .todo-summary-grid article,
.theme-dark .task-summary-grid article,
.theme-dark .reminder-log-metrics article,
.theme-dark .mobile-form-title,
.theme-dark .todo-form-title,
.theme-dark .task-form-title,
.theme-dark .todo-choice-group,
.theme-dark .task-choice-group,
.theme-dark .todo-editor-shell,
.theme-dark .task-editor-shell,
.theme-dark .todo-editor-toolbar,
.theme-dark .task-editor-toolbar,
.theme-dark .todo-file-help,
.theme-dark .task-file-help,
.theme-dark .mobile-search-shell input,
.theme-dark .task-search-shell input,
.theme-dark .month-grid button,
.theme-dark .month-empty,
.theme-dark .calendar-view-tabs,
.theme-dark .day-hour-row > div {
  background: #0b1626;
  border-color: var(--border);
  color: var(--text);
}

.theme-dark .mobile-upload-log-list article,
.theme-dark .mobile-upload-log-list pre {
  background: #0b1626;
  border-color: var(--border);
  color: var(--text);
}

.theme-dark .mobile-upload-status.is-success .mobile-upload-badge {
  background: #0f2a1c;
  border-color: #166534;
  color: #bbf7d0;
}

.theme-dark .mobile-upload-status.is-error .mobile-upload-badge {
  background: #3a1220;
  border-color: #7f1d1d;
  color: #fecdd3;
}

.theme-dark .empty {
  background: rgba(11, 22, 38, 0.78);
  border-color: var(--border);
  color: var(--muted);
}

.theme-dark .small-button.secondary,
.theme-dark .done-button.edit-button,
.theme-dark .finance-mobile-subnav button,
.theme-dark .todo-filter-row button,
.theme-dark .todo-owner-row button,
.theme-dark .task-filter-row button,
.theme-dark .task-owner-row button,
.theme-dark .task-customer-pills button,
.theme-dark .note-filter-row button {
  background: #0b1626;
  border-color: var(--border);
  color: var(--text);
}

.theme-dark .danger-soft-button {
  background: #3a1220 !important;
  border-color: #7f1d1d !important;
  color: #fecdd3 !important;
}

.theme-dark .success-soft-button {
  background: #0f2a1c !important;
  border-color: #166534 !important;
  color: #bbf7d0 !important;
}

.theme-dark .task-priority.normal,
.theme-dark .todo-priority.normal,
.theme-dark .customer-mini-row span,
.theme-dark .compact-head > strong {
  background: #172842;
  color: #93c5fd;
}

.theme-dark .login-card h1,
.theme-dark .notice-card h2,
.theme-dark .section-head h2,
.theme-dark .module-toggle strong,
.theme-dark .task-title-line strong,
.theme-dark .todo-title-line strong,
.theme-dark .mobile-form-title strong,
.theme-dark .todo-form-title strong,
.theme-dark .task-form-title strong,
.theme-dark .finance-mobile-hero h2,
.theme-dark .settings-mobile-hero h2,
.theme-dark .customer-mobile-hero h2,
.theme-dark .note-mobile-hero h2,
.theme-dark .file-mobile-hero h2,
.theme-dark .todo-hero-card h2,
.theme-dark .task-hero-card h2,
.theme-dark .finance-net-card strong,
.theme-dark .metric strong {
  color: var(--text);
}

.theme-dark .mobile-toast {
  background: #e6eefc;
  color: #081525;
}

@media (min-width: 760px) {
  .metric-grid,
  .finance-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bottom-nav {
    bottom: max(32px, env(safe-area-inset-bottom));
    max-width: 760px;
  }
}

@media (min-width: 980px) {
  .app-shell {
    gap: 16px;
    padding: max(18px, env(safe-area-inset-top)) 22px 132px;
  }

  .top-card {
    padding: 22px;
  }

  .notice-card {
    padding: 22px;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-columns {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
  }

  .module-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .card {
    padding: 18px;
  }

  .bottom-nav {
    bottom: 86px;
    grid-template-columns: repeat(6, minmax(92px, 1fr));
    max-width: 760px;
    padding: 10px;
  }

  .bottom-nav button {
    min-height: 58px;
  }
}

@media (max-width: 680px) {
  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weather-card {
    grid-column: span 2;
  }

  .notice-action {
    align-items: stretch;
    display: grid;
  }

  .notice-actions {
    justify-content: stretch;
  }

  .notice-actions .small-button {
    width: 100%;
  }

  .schedule-mobile-hero {
    align-items: stretch;
    display: grid;
  }

  .settings-mobile-hero {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .finance-mobile-hero {
    align-items: stretch;
    display: grid;
  }

  .customer-mobile-hero,
  .note-mobile-hero,
  .file-mobile-hero {
    align-items: stretch;
    display: grid;
  }

  .customer-summary-grid,
  .note-summary-grid,
  .file-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .finance-list-item {
    align-items: stretch;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .finance-item-side {
    align-items: start;
    display: flex;
    flex-wrap: wrap;
    grid-column: 2;
    justify-content: space-between;
    justify-items: start;
  }

  .finance-card-actions {
    justify-content: stretch;
  }

  .finance-card-actions .small-button {
    flex: 1 1 100px;
  }

  .finance-form-actions {
    grid-template-columns: 1fr;
  }

  .profile-tools,
  .confirm-actions {
    grid-template-columns: 1fr;
  }

  .schedule-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-tabs {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(108px, 1fr));
  }

  .bottom-nav {
    left: 10px;
    right: 10px;
  }

  .bottom-nav button strong {
    font-size: 9px;
  }

  .mini-metrics {
    grid-template-columns: 1fr;
  }

  .todo-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-hero-card {
    padding: 14px;
  }

  .task-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cloud-health-grid,
  .reminder-log-metrics {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .todo-form-title,
  .todo-item-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .todo-list-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .todo-form-title {
    display: grid;
  }

  .todo-card-actions {
    justify-content: stretch;
  }

  .todo-card-actions .small-button {
    flex: 1 1 120px;
  }

  .task-form-title {
    align-items: stretch;
    display: grid;
  }

  .task-choice-group.priority-three {
    grid-template-columns: 1fr;
  }

  .task-list-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .task-card-actions {
    justify-content: stretch;
  }

  .task-card-actions .small-button,
  .task-card-actions .task-completed-badge {
    flex: 1 1 120px;
    text-align: center;
  }

  .customer-mobile-item,
  .file-mobile-item {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .module-grid {
    grid-template-columns: 1fr;
  }

  .control-panel {
    align-items: stretch;
    display: grid;
  }

  .control-panel time {
    width: 100%;
  }

  .item-row {
    grid-template-columns: 1fr;
  }

  .todo-item-row {
    align-items: stretch;
  }

  .month-calendar-header {
    grid-template-columns: 1fr;
  }

  .day-hour-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .month-grid button,
  .month-empty {
    border-radius: 11px;
    min-height: 42px;
    padding: 5px;
  }
}

/* Dark mode final polish: keep this block at the end so module-specific light styles cannot win. */
.theme-dark {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(180deg, #07111f 0%, #081321 100%) !important;
}

.theme-dark .top-card,
.theme-dark .module-toggle,
.theme-dark .module-grid,
.theme-dark .control-panel,
.theme-dark .notice-card,
.theme-dark .weather-card,
.theme-dark .card,
.theme-dark .metric,
.theme-dark .settings-mobile-hero,
.theme-dark .profile-cloud-card,
.theme-dark .calendar-strip-card,
.theme-dark .month-calendar-card,
.theme-dark .schedule-form-card,
.theme-dark .day-plan-card,
.theme-dark .todo-hero-card,
.theme-dark .task-hero-card,
.theme-dark .customer-mobile-hero,
.theme-dark .note-mobile-hero,
.theme-dark .file-mobile-hero,
.theme-dark .finance-mobile-hero,
.theme-dark .finance-net-card,
.theme-dark .finance-action-card,
.theme-dark .finance-overview article,
.theme-dark .finance-quick-actions button,
.theme-dark .finance-mobile-form,
.theme-dark .mobile-editor-form,
.theme-dark .todo-form-panel,
.theme-dark .task-form-panel,
.theme-dark .customer-detail-card,
.theme-dark .bottom-nav {
  background: linear-gradient(145deg, #0e1a2c 0%, #101f34 100%) !important;
  border-color: #29405f !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28) !important;
  color: #e8f0ff !important;
}

.theme-dark .module-grid button,
.theme-dark .dashboard-tabs,
.theme-dark .dashboard-tabs button,
.theme-dark .list-item,
.theme-dark .todo-list-item,
.theme-dark .task-list-item,
.theme-dark .customer-mobile-item,
.theme-dark .file-mobile-item,
.theme-dark .note-preview,
.theme-dark .finance-list-item,
.theme-dark .todo-summary-grid article,
.theme-dark .task-summary-grid article,
.theme-dark .calendar-day-strip button,
.theme-dark .month-grid button,
.theme-dark .month-empty,
.theme-dark .day-hour-row > div,
.theme-dark .mobile-form-title,
.theme-dark .todo-form-title,
.theme-dark .task-form-title,
.theme-dark .todo-choice-group,
.theme-dark .task-choice-group,
.theme-dark .todo-editor-shell,
.theme-dark .task-editor-shell,
.theme-dark .todo-editor-toolbar,
.theme-dark .task-editor-toolbar,
.theme-dark .todo-file-help,
.theme-dark .task-file-help,
.theme-dark .reminder-log-metrics article,
.theme-dark .cloud-health-grid article {
  background: #101b2d !important;
  border-color: #29405f !important;
  color: #e8f0ff !important;
}

.theme-dark .module-grid button.is-active,
.theme-dark .dashboard-tabs button.is-active,
.theme-dark .finance-mobile-subnav button.is-active,
.theme-dark .todo-filter-row button.is-active,
.theme-dark .todo-owner-row button.is-active,
.theme-dark .task-filter-row button.is-active,
.theme-dark .task-owner-row button.is-active,
.theme-dark .note-filter-row button.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

.theme-dark input,
.theme-dark select,
.theme-dark textarea,
.theme-dark .mobile-search-shell input,
.theme-dark .task-search-shell input,
.theme-dark [contenteditable="true"] {
  background: #071321 !important;
  border-color: #345071 !important;
  color: #f8fbff !important;
  caret-color: #93c5fd;
}

.theme-dark input::placeholder,
.theme-dark textarea::placeholder,
.theme-dark .task-editor-field:empty::before,
.theme-dark .todo-editor-field:empty::before {
  color: #7f91aa !important;
}

.theme-dark select,
.theme-dark option {
  background-color: #071321 !important;
  color: #f8fbff !important;
}

.theme-dark label,
.theme-dark strong,
.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark .section-head h2,
.theme-dark .module-toggle strong,
.theme-dark .module-grid button strong,
.theme-dark .bottom-nav button strong,
.theme-dark .task-title-line strong,
.theme-dark .todo-title-line strong,
.theme-dark .mobile-form-title strong,
.theme-dark .todo-form-title strong,
.theme-dark .task-form-title strong,
.theme-dark .metric strong,
.theme-dark .weather-card strong,
.theme-dark .finance-net-card strong {
  color: #f8fbff !important;
}

.theme-dark small,
.theme-dark p,
.theme-dark .module-grid button small,
.theme-dark .notice-card p,
.theme-dark .control-panel p,
.theme-dark .weather-card small,
.theme-dark .metric span,
.theme-dark .list-item small,
.theme-dark .task-card-main small,
.theme-dark .customer-card-main small,
.theme-dark .customer-card-main p,
.theme-dark .finance-item-main small,
.theme-dark .release-notes-list li {
  color: #aab8ce !important;
}

.theme-dark span,
.theme-dark .section-head span,
.theme-dark .notice-card span,
.theme-dark .login-card span,
.theme-dark .settings-mobile-hero span,
.theme-dark .profile-cloud-card span,
.theme-dark .customer-mobile-hero span,
.theme-dark .note-mobile-hero span,
.theme-dark .file-mobile-hero span,
.theme-dark .finance-mobile-hero span {
  color: #60a5fa;
}

.theme-dark .module-burger,
.theme-dark .module-caret,
.theme-dark .bottom-nav button span,
.theme-dark .file-icon-bubble,
.theme-dark .task-icon-bubble,
.theme-dark .todo-icon-bubble {
  background: #e8f0ff !important;
  color: #2563eb !important;
}

.theme-dark .bottom-nav button.is-active {
  background: #e8f0ff !important;
  color: #1d4ed8 !important;
}

.theme-dark .bottom-nav button.is-active strong {
  color: #1d4ed8 !important;
}

.theme-dark .bottom-nav button.is-active span {
  background: #2563eb !important;
  color: #ffffff !important;
}

.theme-dark .small-button.secondary,
.theme-dark .done-button.edit-button,
.theme-dark .finance-mobile-subnav button,
.theme-dark .todo-filter-row button,
.theme-dark .todo-owner-row button,
.theme-dark .task-filter-row button,
.theme-dark .task-owner-row button,
.theme-dark .task-customer-pills button,
.theme-dark .note-filter-row button {
  background: #071321 !important;
  border-color: #345071 !important;
  color: #e8f0ff !important;
}

.theme-dark .success-soft-button {
  background: #123322 !important;
  border-color: #2f9e57 !important;
  color: #bbf7d0 !important;
}

.theme-dark .danger-soft-button {
  background: #3b1420 !important;
  border-color: #ef4444 !important;
  color: #fecdd3 !important;
}

.theme-dark .task-priority.normal,
.theme-dark .todo-priority.normal,
.theme-dark .compact-head > strong,
.theme-dark .customer-mini-row span {
  background: #172842 !important;
  color: #93c5fd !important;
}

.theme-dark .empty {
  background: #071321 !important;
  border-color: #345071 !important;
  color: #aab8ce !important;
}

.theme-dark .settings-mobile-hero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(20, 184, 166, 0.08)),
    #101b2d !important;
}

.theme-dark .settings-mobile-hero > strong {
  background: #071321 !important;
  border-color: #60a5fa !important;
  color: #93c5fd !important;
}

/* Dark system mode and dashboard/menu refinement. */
.theme-dark .module-grid,
.theme-dark .dashboard-tabs,
.theme-dark .control-panel,
.theme-dark .notice-card,
.theme-dark .weather-card,
.theme-dark .dashboard-columns .card {
  background:
    linear-gradient(145deg, rgba(18, 33, 54, 0.94), rgba(12, 24, 40, 0.98)) !important;
  border-color: #2a4568 !important;
}

.theme-dark .module-grid button {
  background: #101d31 !important;
  border: 1px solid #2d4769 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

.theme-dark .module-grid button.is-active {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.9)) !important;
  border-color: #60a5fa !important;
}

.theme-dark .control-panel {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(20, 184, 166, 0.08)),
    #101d31 !important;
}

.theme-dark .control-panel time {
  background: #0b1626 !important;
  border-color: #60a5fa !important;
  color: #93c5fd !important;
}

.theme-dark .weather-card {
  background: #101d31 !important;
}

.theme-dark .dashboard-tabs {
  background: #101d31 !important;
  border-color: #2d4769 !important;
}

.theme-dark .dashboard-tabs button {
  background: transparent !important;
  border-color: transparent !important;
  color: #9fb0c8 !important;
}

.theme-dark .dashboard-tabs button.is-active {
  background: #e8f0ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

.theme-dark .release-notes-list li {
  color: #9fb0c8 !important;
}

@media (prefers-color-scheme: dark) {
  .theme-system {
    background:
      radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
      linear-gradient(180deg, #07111f 0%, #081321 100%) !important;
  }

  .theme-system .top-card,
  .theme-system .module-toggle,
  .theme-system .module-grid,
  .theme-system .control-panel,
  .theme-system .notice-card,
  .theme-system .weather-card,
  .theme-system .card,
  .theme-system .metric,
  .theme-system .settings-mobile-hero,
  .theme-system .profile-cloud-card,
  .theme-system .calendar-strip-card,
  .theme-system .month-calendar-card,
  .theme-system .schedule-form-card,
  .theme-system .day-plan-card,
  .theme-system .todo-hero-card,
  .theme-system .task-hero-card,
  .theme-system .customer-mobile-hero,
  .theme-system .note-mobile-hero,
  .theme-system .file-mobile-hero,
  .theme-system .finance-mobile-hero,
  .theme-system .finance-net-card,
  .theme-system .finance-action-card,
  .theme-system .finance-overview article,
  .theme-system .finance-quick-actions button,
  .theme-system .finance-mobile-form,
  .theme-system .mobile-editor-form,
  .theme-system .todo-form-panel,
  .theme-system .task-form-panel,
  .theme-system .customer-detail-card,
  .theme-system .bottom-nav {
    background: linear-gradient(145deg, #0e1a2c 0%, #101f34 100%) !important;
    border-color: #29405f !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28) !important;
    color: #e8f0ff !important;
  }

  .theme-system .module-grid,
  .theme-system .dashboard-tabs,
  .theme-system .control-panel,
  .theme-system .notice-card,
  .theme-system .weather-card,
  .theme-system .dashboard-columns .card {
    background:
      linear-gradient(145deg, rgba(18, 33, 54, 0.94), rgba(12, 24, 40, 0.98)) !important;
    border-color: #2a4568 !important;
  }

  .theme-system .module-grid button,
  .theme-system .list-item,
  .theme-system .todo-list-item,
  .theme-system .task-list-item,
  .theme-system .customer-mobile-item,
  .theme-system .file-mobile-item,
  .theme-system .note-preview,
  .theme-system .finance-list-item,
  .theme-system .todo-summary-grid article,
  .theme-system .task-summary-grid article,
  .theme-system .calendar-day-strip button,
  .theme-system .month-grid button,
  .theme-system .month-empty,
  .theme-system .day-hour-row > div,
  .theme-system .mobile-form-title,
  .theme-system .todo-form-title,
  .theme-system .task-form-title,
  .theme-system .todo-choice-group,
  .theme-system .task-choice-group,
  .theme-system .todo-editor-shell,
  .theme-system .task-editor-shell,
  .theme-system .todo-editor-toolbar,
  .theme-system .task-editor-toolbar,
  .theme-system .todo-file-help,
  .theme-system .task-file-help,
  .theme-system .reminder-log-metrics article,
  .theme-system .cloud-health-grid article {
    background: #101b2d !important;
    border-color: #29405f !important;
    color: #e8f0ff !important;
  }

  .theme-system input,
  .theme-system select,
  .theme-system textarea,
  .theme-system .mobile-search-shell input,
  .theme-system .task-search-shell input,
  .theme-system [contenteditable="true"] {
    background: #071321 !important;
    border-color: #345071 !important;
    color: #f8fbff !important;
    caret-color: #93c5fd;
  }

  .theme-system select,
  .theme-system option {
    background-color: #071321 !important;
    color: #f8fbff !important;
  }

  .theme-system input::placeholder,
  .theme-system textarea::placeholder,
  .theme-system .task-editor-field:empty::before,
  .theme-system .todo-editor-field:empty::before {
    color: #7f91aa !important;
  }

  .theme-system label,
  .theme-system strong,
  .theme-system h1,
  .theme-system h2,
  .theme-system h3,
  .theme-system .section-head h2,
  .theme-system .module-toggle strong,
  .theme-system .module-grid button strong,
  .theme-system .bottom-nav button strong,
  .theme-system .task-title-line strong,
  .theme-system .todo-title-line strong,
  .theme-system .mobile-form-title strong,
  .theme-system .todo-form-title strong,
  .theme-system .task-form-title strong,
  .theme-system .metric strong,
  .theme-system .weather-card strong,
  .theme-system .finance-net-card strong {
    color: #f8fbff !important;
  }

  .theme-system small,
  .theme-system p,
  .theme-system .module-grid button small,
  .theme-system .notice-card p,
  .theme-system .control-panel p,
  .theme-system .weather-card small,
  .theme-system .metric span,
  .theme-system .list-item small,
  .theme-system .task-card-main small,
  .theme-system .customer-card-main small,
  .theme-system .customer-card-main p,
  .theme-system .finance-item-main small,
  .theme-system .release-notes-list li {
    color: #aab8ce !important;
  }

  .theme-system span,
  .theme-system .section-head span,
  .theme-system .notice-card span,
  .theme-system .login-card span,
  .theme-system .settings-mobile-hero span,
  .theme-system .profile-cloud-card span,
  .theme-system .customer-mobile-hero span,
  .theme-system .note-mobile-hero span,
  .theme-system .file-mobile-hero span,
  .theme-system .finance-mobile-hero span {
    color: #60a5fa;
  }

  .theme-system .module-burger,
  .theme-system .module-caret,
  .theme-system .bottom-nav button span,
  .theme-system .file-icon-bubble,
  .theme-system .task-icon-bubble,
  .theme-system .todo-icon-bubble {
    background: #e8f0ff !important;
    color: #2563eb !important;
  }

  .theme-system .module-grid button.is-active,
  .theme-system .finance-mobile-subnav button.is-active,
  .theme-system .todo-filter-row button.is-active,
  .theme-system .todo-owner-row button.is-active,
  .theme-system .task-filter-row button.is-active,
  .theme-system .task-owner-row button.is-active,
  .theme-system .note-filter-row button.is-active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
  }

  .theme-system .dashboard-tabs {
    background: #101d31 !important;
    border-color: #2d4769 !important;
  }

  .theme-system .dashboard-tabs button {
    background: transparent !important;
    border-color: transparent !important;
    color: #9fb0c8 !important;
  }

  .theme-system .dashboard-tabs button.is-active {
    background: #e8f0ff !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
  }

  .theme-system .bottom-nav button.is-active {
    background: #e8f0ff !important;
    color: #1d4ed8 !important;
  }

  .theme-system .bottom-nav button.is-active strong {
    color: #1d4ed8 !important;
  }

  .theme-system .bottom-nav button.is-active span {
    background: #2563eb !important;
    color: #ffffff !important;
  }

  .theme-system .small-button.secondary,
  .theme-system .done-button.edit-button,
  .theme-system .finance-mobile-subnav button,
  .theme-system .todo-filter-row button,
  .theme-system .todo-owner-row button,
  .theme-system .task-filter-row button,
  .theme-system .task-owner-row button,
  .theme-system .task-customer-pills button,
  .theme-system .note-filter-row button {
    background: #071321 !important;
    border-color: #345071 !important;
    color: #e8f0ff !important;
  }

  .theme-system .success-soft-button {
    background: #123322 !important;
    border-color: #2f9e57 !important;
    color: #bbf7d0 !important;
  }

  .theme-system .danger-soft-button {
    background: #3b1420 !important;
    border-color: #ef4444 !important;
    color: #fecdd3 !important;
  }

  .theme-system .control-panel time {
    background: #0b1626 !important;
    border-color: #60a5fa !important;
    color: #93c5fd !important;
  }
}
