@import url("https://fonts.googleapis.com/css2?family=Calibri:wght@300;400;600;700&display=swap");

:root {
  --bg: #f2f2f2;
  --ink: #1f1f1f;
  --muted: #5a5a5a;
  --accent: #4f81bd;
  --accent-dark: #3a5f90;
  --accent-light: #dbe5f1;
  --accent-mid: #b8cce4;
  --card: #ffffff;
  --line: #9eb6ce;
  --shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Calibri", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 6vw;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, var(--accent-light), var(--accent-mid));
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.brand {
  font-size: 22px;
  letter-spacing: 0.4px;
  font-weight: 700;
  color: #1f2d3d;
}

.topbar-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 14px;
  color: #23364b;
}

.topbar-links .cta {
  padding: 8px 14px;
  border-radius: 6px;
  background: linear-gradient(180deg, #7ea6d6, #4f81bd);
  color: #fff;
  font-weight: 600;
  border: 1px solid #3b6aa0;
}

.site-main {
  flex: 1;
  padding: 0 6vw 80px;
}

.site-footer {
  padding: 24px 6vw 36px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding: 70px 0 50px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(32px, 5vw, 58px);
  margin: 12px 0 16px;
  line-height: 1.05;
}

.hero-content p {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #2b4c6f;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0 16px;
  flex-wrap: wrap;
}

.button {
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #e6eef8);
  color: #1f2d3d;
}

.button.primary {
  background: linear-gradient(180deg, #7ea6d6, #4f81bd);
  color: #fff;
  border-color: #3b6aa0;
  box-shadow: 0 8px 18px rgba(79, 129, 189, 0.35);
}

.button.ghost {
  background: linear-gradient(180deg, #ffffff, #edf2f9);
  color: #1f2d3d;
}

.hero-meta {
  color: var(--muted);
  font-size: 14px;
}

.hero-panel {
  background: var(--card);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-panel h3 {
  margin: 0 0 10px;
}

.hero-stats {
  display: grid;
  gap: 12px;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f7f9fc;
  font-size: 14px;
  border: 1px solid var(--line);
}

.section {
  padding: 50px 0;
}

.section h2 {
  font-size: clamp(24px, 3vw, 38px);
  margin-bottom: 12px;
}

.section p.lead {
  color: var(--muted);
  max-width: 640px;
}

.grid {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--card);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin-top: 0;
}

.callout {
  margin: 40px 0;
  padding: 28px;
  border-radius: 10px;
  background: linear-gradient(120deg, #eef3fb, #dbe5f1);
  border: 1px solid var(--line);
}

.cta-panel {
  background: linear-gradient(180deg, #5b84c2, #3b6aa0);
  color: #fff;
  padding: 32px;
  border-radius: 10px;
  display: grid;
  gap: 16px;
}

.cta-panel .button.primary {
  background: #fff;
  color: #1f2d3d;
}

.login-shell {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 60px 0 80px;
}

.login-card {
  width: min(440px, 92vw);
  background: var(--card);
  padding: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 12px 0 6px;
}

.login-card .muted {
  color: var(--muted);
  margin-bottom: 18px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.input {
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
}

.input:focus {
  outline: 2px solid rgba(79, 129, 189, 0.35);
  border-color: #4f81bd;
}

.input.text-end {
  text-align: right;
}

.error {
  color: #b42318;
  background: #fff1f0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid #f0b1ad;
}

.success {
  color: #116329;
  background: #ecfdf3;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid #a7e1b8;
}

.import-log {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  background: #f7f9fc;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
}

.import-progress {
  height: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.import-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4f81bd, #7ea6d6);
  transition: width 0.3s ease;
}

.import-progress-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.import-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.table-filters {
  margin: 16px 0 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.table-filters .field span {
  color: var(--muted);
  font-size: 12px;
}

.table-summary {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  justify-self: end;
}

.table-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.table-pagination .page-info {
  font-size: 14px;
  color: var(--muted);
}

.input-inline {
  max-width: 100%;
}

.table {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.table thead th {
  background: linear-gradient(180deg, var(--accent-light), var(--accent-mid));
  border-bottom: 1px solid var(--line);
  color: #1f2d3d;
}

.table tbody tr {
  border-bottom: 1px solid var(--line);
}

.table tbody tr:nth-child(even) {
  background: #f7f9fc;
}

.table tbody tr:hover {
  background: #eef3fb;
}

.import-preview-table {
  table-layout: fixed;
  width: 100%;
}

.import-preview-table .description-cell {
  width: 60%;
}

.description-input {
  min-height: 56px;
  resize: vertical;
}

.analytics-panel {
  background: var(--card);
  border-radius: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

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

.analytics-header h3 {
  margin: 0 0 6px;
}

.date-range {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.date-range label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.date-range input[type="date"] {
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-family: inherit;
}

.balance-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef3fb;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.balance-date,
.balance-source {
  font-weight: 500;
  color: var(--muted);
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

.pie {
  width: 100%;
  max-width: 240px;
}

.pie-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 5.5;
}

.pie-slice {
  fill: none;
  stroke-width: 5.5;
  transition: stroke-dasharray 0.4s ease, stroke-dashoffset 0.4s ease;
}

.legend {
  display: grid;
  gap: 10px;
}

.legend-row {
  display: grid;
  grid-template-columns: 40px 36px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.legend-row input[type="color"] {
  width: 34px;
  height: 28px;
  border: none;
  background: none;
  padding: 0;
}

.legend-name {
  color: var(--ink);
}

.legend-value {
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  z-index: 2000;
}

.modal-card {
  width: min(560px, 92vw);
  background: var(--card);
  border-radius: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.modal-row {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.modal-field {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.checkbox-row {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }

  .topbar-links {
    flex-wrap: wrap;
  }
}

#blazor-error-ui {
  background: #fff4c2;
  bottom: 0;
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.1);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

:root {
  --excel-blue-1: #e7eef9;
  --excel-blue-2: #c7d6ec;
  --excel-blue-3: #9fb7d9;
  --excel-blue-4: #5f86b7;
  --excel-gray-1: #f4f5f8;
  --excel-gray-2: #e2e6ef;
  --excel-border: #94a5bc;
  --excel-border-light: #c1ccdc;
  --excel-text: #1d2a35;
}

body {
  background: #dbe4f3;
  color: var(--excel-text);
}

.excel-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.excel-ribbon {
  border-bottom: 1px solid #8398b6;
  background: linear-gradient(180deg, var(--excel-blue-1), var(--excel-blue-2));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  position: sticky;
  top: 0;
  z-index: 20;
}

.ribbon-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: linear-gradient(180deg, #fefefe, var(--excel-blue-1));
  border-bottom: 1px solid var(--excel-border-light);
}

.office-button {
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #7a90b1;
  background: radial-gradient(circle at 30% 30%, #fefefe, #b0c5e3 60%, #6f90bd);
  color: #1c2b3c;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.quick-access {
  display: flex;
  gap: 6px;
  align-items: center;
}

.qat-btn {
  height: 22px;
  padding: 0 10px;
  border-radius: 3px;
  border: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #ffffff, #dde6f4);
  font-size: 11px;
}

.ribbon-title {
  text-align: center;
  font-weight: 600;
  color: #213246;
  font-size: 13px;
}

.window-controls {
  display: flex;
  gap: 4px;
  justify-self: end;
}

.window-btn {
  width: 26px;
  height: 20px;
  border-radius: 2px;
  border: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #ffffff, #e1e7f3);
  font-size: 12px;
  line-height: 1;
}

.window-btn.close {
  background: linear-gradient(180deg, #f8d2d2, #e48787);
  border-color: #c16a6a;
}

.ribbon-tabs {
  display: flex;
  gap: 4px;
  padding: 4px 8px 0 8px;
  background: linear-gradient(180deg, var(--excel-blue-2), var(--excel-blue-3));
  border-bottom: 1px solid #7f97b5;
}

.ribbon-tab {
  padding: 6px 12px 7px;
  border-radius: 4px 4px 0 0;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  font-size: 12px;
  color: #1e2a3a;
}

.ribbon-tab.active {
  border-color: #7f97b5;
  background: linear-gradient(180deg, #ffffff, var(--excel-blue-1));
}

.ribbon-content {
  display: flex;
  gap: 16px;
  padding: 10px 12px 8px;
  background: linear-gradient(180deg, #fefefe, var(--excel-blue-1));
  border-bottom: 1px solid var(--excel-border-light);
  flex-wrap: wrap;
}

.ribbon-group {
  display: grid;
  gap: 6px;
  padding-right: 16px;
  border-right: 1px solid var(--excel-border-light);
  min-width: 140px;
}

.ribbon-group:last-child {
  border-right: none;
}

.ribbon-group-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ribbon-stack {
  display: grid;
  gap: 4px;
}

.ribbon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 2px;
  border: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #ffffff, #dde6f4);
  font-size: 11px;
  text-align: center;
}

.ribbon-btn.large {
  width: 64px;
  height: 56px;
  font-size: 12px;
  font-weight: 600;
}

.ribbon-group-label {
  font-size: 11px;
  color: #3a4b60;
  text-align: center;
}

.formula-bar {
  display: grid;
  grid-template-columns: 70px 36px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(180deg, #fdfdfd, var(--excel-gray-1));
  border-bottom: 1px solid var(--excel-border);
}

.name-box {
  padding: 4px 6px;
  border: 1px solid var(--excel-border);
  background: #ffffff;
  font-size: 12px;
  text-align: center;
}

.fx-label {
  font-weight: 700;
  color: #40556d;
  font-size: 12px;
  text-align: center;
}

.formula-input {
  padding: 6px 8px;
  border-radius: 2px;
  border: 1px solid var(--excel-border);
  background: #ffffff;
  font-size: 13px;
  font-family: inherit;
}

.excel-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 0 40px;
  background:
    linear-gradient(90deg, rgba(148, 165, 188, 0.2) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 165, 188, 0.2) 1px, transparent 1px),
    #fdfdfd;
  background-size: 20px 20px, 20px 20px, auto;
}

.excel-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  background: linear-gradient(180deg, #fefefe, var(--excel-gray-2));
  border-top: 1px solid var(--excel-border);
  font-size: 12px;
  color: #2b3b4f;
}

.excel-status .status-right {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.table {
  border-collapse: collapse;
  border: 1px solid var(--excel-border);
  background: #ffffff;
}

.table thead th {
  background: linear-gradient(180deg, #fefefe, var(--excel-blue-1));
  color: #1d2a35;
  border: 1px solid var(--excel-border);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 8px;
}

.table tbody td {
  border: 1px solid var(--excel-border-light);
  padding: 6px 8px;
  font-size: 13px;
  background: #ffffff;
}

.table tbody tr:nth-child(even) {
  background: #ffffff;
}

.table tbody tr:hover {
  background: #eaf0f9;
}

.table.excel-grid tbody td {
  cursor: cell;
}

.table.excel-grid tbody td:focus,
.table.excel-grid tbody td:focus-within {
  outline: 2px solid #5f86b7;
  outline-offset: -2px;
  background: #f3f7fd;
}

.table.excel-grid tbody td.active {
  outline: 2px solid #5f86b7;
  outline-offset: -2px;
  background: #f3f7fd;
}

.table.excel-grid {
  table-layout: fixed;
}

.table.excel-grid thead th,
.table.excel-grid tbody td {
  height: 22px;
  padding: 2px 6px;
  line-height: 1.2;
}

.table.excel-grid .input,
.table.excel-grid select,
.table.excel-grid textarea {
  height: 20px;
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 12px;
}

.table.excel-grid .description-input {
  height: 20px;
  resize: none;
  overflow: hidden;
}

.excel-sheet {
  margin-top: 0;
  border: 1px solid var(--excel-border);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.excel-sheet-header,
.excel-sheet-body {
  display: grid;
  grid-template-columns: 40px 1fr;
}

.excel-corner {
  height: 20px;
  border-right: 1px solid var(--excel-border);
  border-bottom: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #fefefe, #e6edf7);
}

.excel-col-headers {
  display: grid;
  grid-template-columns: repeat(26, 64px);
}

.excel-col-header {
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 11px;
  border-right: 1px solid var(--excel-border);
  border-bottom: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #fefefe, #e6edf7);
  position: relative;
  user-select: none;
}

.excel-row-headers {
  display: grid;
  grid-template-rows: repeat(40, 20px);
}

.excel-row-header {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 11px;
  border-right: 1px solid var(--excel-border);
  border-bottom: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #fefefe, #e6edf7);
  position: relative;
  user-select: none;
}

.excel-grid-cells {
  display: grid;
  grid-template-columns: repeat(26, 64px);
  grid-auto-rows: 20px;
}

.excel-grid-cells .excel-cell {
  border-right: 1px solid var(--excel-border-light);
  border-bottom: 1px solid var(--excel-border-light);
  padding: 2px 4px;
  font-size: 12px;
  outline: none;
  cursor: cell;
  white-space: normal;
  overflow: hidden;
}

.excel-grid-cells .excel-cell:hover {
  background: #f3f7fd;
}

.excel-grid-cells .excel-cell .input,
.excel-grid-cells .excel-cell select,
.excel-grid-cells .excel-cell textarea,
.excel-grid-cells .excel-cell button {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
}

.excel-grid-cells .excel-cell button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.excel-grid-cells .cell-editor {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  line-height: 1.3;
}

.excel-grid-cells textarea.cell-editor {
  resize: none;
  overflow: hidden;
  min-height: 18px;
}

.excel-grid-cells .excel-cell.selected {
  background: #d9e7fb;
  outline: 1px solid #6e93c8;
}

.excel-grid-cells .excel-cell.ai-suggested {
  background: #e9f4d6;
  outline: 1px solid #a9c87a;
}

.excel-grid-cells .excel-cell.needs-category {
  background: #fde2e2;
  outline: 1px solid #d79a9a;
}

.excel-col-header.selected,
.excel-row-header.selected {
  background: linear-gradient(180deg, #c9dbf2, #a5bfdf);
}

.col-resize-handle {
  position: absolute;
  top: 0;
  right: -2px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
}

.row-resize-handle {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 6px;
  cursor: row-resize;
}

.excel-ribbon {
  background: linear-gradient(180deg, var(--excel-blue-1), var(--excel-blue-2));
  border-bottom: 1px solid var(--excel-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.ribbon-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: linear-gradient(180deg, #ffffff, #e7eef9);
  font-size: 12px;
}

.ribbon-title {
  font-weight: 600;
  color: #2a3a4c;
  margin-right: auto;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 4px;
  border-radius: 999px;
  border: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #ffffff, #e7eef9);
  font-size: 12px;
  color: #2a3a4c;
  position: relative;
  cursor: pointer;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #1b2a3a;
  background: radial-gradient(circle at 30% 30%, #ffffff, #b0c5e3 60%, #6f90bd);
  border: 1px solid #7a90b1;
}

.user-caret {
  font-size: 10px;
  color: #51657c;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--excel-border);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(20, 30, 40, 0.18);
  padding: 8px;
  display: none;
  z-index: 50;
}

.user-menu.open .user-dropdown {
  display: block;
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px;
  margin-bottom: 4px;
}

.menu-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  background: #1b1f23;
  color: #ffffff;
}

.menu-close {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d3dbe7;
  background: #f4f6fb;
  font-weight: 700;
  color: #6a788a;
}

.dropdown-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #2a3a4c;
  background: linear-gradient(180deg, #ffffff, #edf2fb);
  border: 1px solid #d3dbe7;
}

.dropdown-item.logout {
  background: linear-gradient(180deg, #fff6f6, #f6dede);
  border-color: #e1b1b1;
}

.dropdown-divider {
  display: block;
  height: 1px;
  background: #d3dbe7;
  margin: 8px 4px;
}

.item-icon {
  font-size: 12px;
  color: #5a6a7f;
  text-align: center;
}

.ribbon-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 8px 0;
  background: linear-gradient(180deg, var(--excel-blue-2), var(--excel-blue-3));
  border-bottom: 1px solid #7f97b5;
}

.ribbon-tab {
  padding: 4px 10px 6px;
  border-radius: 4px 4px 0 0;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  font-size: 12px;
  color: #1e2a3a;
}

.ribbon-tab.active {
  border-color: #7f97b5;
  background: linear-gradient(180deg, #ffffff, var(--excel-blue-1));
}

.excel-main {
  background: #ffffff;
  background-image: none;
}

.summary-grid {
  margin-top: 18px;
}

.summary-card {
  min-height: 140px;
}

.summary-value {
  font-size: 24px;
  font-weight: 700;
  margin: 10px 0 6px;
  color: #1f2d3d;
}

.settings-page {
  display: grid;
  gap: 24px;
}

.settings-window {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--excel-border);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(20, 30, 40, 0.12);
  min-height: 520px;
}

.settings-nav {
  background: linear-gradient(180deg, #f5f7fb, #e7eef9);
  border-right: 1px solid var(--excel-border);
  padding: 10px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.settings-title {
  font-size: 12px;
  font-weight: 700;
  color: #3a4b60;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 8px 10px;
}

.settings-tab {
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  padding: 6px 10px;
  font-size: 12px;
  color: #2a3a4c;
  border-radius: 4px;
}

.settings-tab.active {
  background: linear-gradient(180deg, #ffe7b3, #f6c97b);
  border-color: #d8a65b;
  font-weight: 600;
}

.settings-content {
  padding: 18px 20px 22px;
  display: grid;
  gap: 18px;
}

.settings-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.settings-section {
  border: 1px solid var(--excel-border-light);
  padding: 14px 16px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  display: grid;
  gap: 10px;
}

.settings-section h3 {
  margin: 0;
  font-size: 14px;
}

.settings-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.settings-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #4a5a6c;
}

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


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

.excel-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.excel-toolbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #2a3a4c;
}

.import-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  margin: -18px -6vw -40px;
  padding: 0 6vw;
}

.import-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #ffffff, #e7eef9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  position: sticky;
  top: 0;
  z-index: 5;
}

.import-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.import-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.import-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2d3d;
}

.import-file {
  display: grid;
  gap: 4px;
}

.import-hint {
  font-size: 12px;
  color: #5a6a7b;
}

.button,
.input,
.card,
.login-card,
.modal-card,
.analytics-panel,
.hero-panel {
  border-radius: 2px;
}

.button {
  border: 1px solid var(--excel-border);
  background: linear-gradient(180deg, #ffffff, #dde6f4);
  box-shadow: none;
}

.button.primary {
  background: linear-gradient(180deg, #9fb7d9, #5f86b7);
  border-color: #567aa6;
}

.button.google {
  background: linear-gradient(180deg, #ffffff, #f2f2f2);
  border-color: #c9c9c9;
  color: #1f1f1f;
}

.button.google:hover {
  background: linear-gradient(180deg, #ffffff, #e6e6e6);
}

.input {
  border: 1px solid var(--excel-border);
  border-radius: 2px;
  background: #ffffff;
}
