    @font-face {
      font-family: "Geist";
      src: url("../fonts/Geist-Regular.ttf") format("truetype");
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }

    @font-face {
      font-family: "Geist";
      src: url("../fonts/Geist-Medium.ttf") format("truetype");
      font-weight: 500;
      font-style: normal;
      font-display: swap;
    }

    @font-face {
      font-family: "Geist";
      src: url("../fonts/Geist-SemiBold.ttf") format("truetype");
      font-weight: 600;
      font-style: normal;
      font-display: swap;
    }

    @font-face {
      font-family: "Geist";
      src: url("../fonts/Geist-Bold.ttf") format("truetype");
      font-weight: 700;
      font-style: normal;
      font-display: swap;
    }

    :root {
      --bg: #070707;
      --bg-soft: #11100f;
      --panel: rgba(20, 19, 18, 0.94);
      --panel-strong: #151413;
      --panel-muted: #1d1a18;
      --panel-2: #25211e;
      --border: rgba(255, 255, 255, 0.07);
      --border-strong: rgba(210, 193, 175, 0.22);
      --text: #f2eee9;
      --muted: #ada39a;
      --muted-2: #837a72;
      --brand: #d2c1af;
      --brand-strong: #eadfd4;
      --brand-soft: rgba(210, 193, 175, 0.12);
      --green: #7fd2a4;
      --red: #e98a83;
      --blue: #a89686;
      --amber: #d9b88d;
      --radius: 24px;
      --radius-sm: 16px;
      --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
      --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.26);
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      height: 100%;
      color: var(--text);
      background:
        radial-gradient(circle at top left, rgba(210, 193, 175, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(92, 78, 67, 0.18), transparent 24%),
        linear-gradient(180deg, #070707 0%, #0e0c0b 100%);
      font-family: "Geist", "Segoe UI", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    }

    body {
      min-height: 100vh;
      overflow: hidden;
    }

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

    button {
      cursor: pointer;
    }

    img {
      max-width: 100%;
    }

    .app {
      display: grid;
      grid-template-columns: 304px minmax(0, 1fr);
      height: 100vh;
      overflow: hidden;
    }

    .sidebar {
      position: relative;
      height: 100vh;
      padding: 28px 20px 24px;
      border-right: 1px solid var(--border);
      background:
        linear-gradient(180deg, rgba(10, 10, 10, 0.98), rgba(16, 14, 13, 0.98)),
        radial-gradient(circle at top left, rgba(210, 193, 175, 0.06), transparent 45%);
      backdrop-filter: blur(18px);
    }

    .brand-card,
    .card,
    .hero-card {
      border: 1px solid var(--border);
      box-shadow: var(--shadow-soft);
    }

    .brand-card {
      padding: 22px;
      border-radius: 28px;
      margin-bottom: 26px;
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.16), transparent 45%),
        linear-gradient(145deg, rgba(210, 193, 175, 0.12), rgba(255, 255, 255, 0.025)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
      border-color: rgba(210, 193, 175, 0.16);
    }

    .brand-header {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 14px;
    }

    .brand-logo {
      width: 52px;
      height: 52px;
      object-fit: contain;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(210, 193, 175, 0.14);
      padding: 4px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    }

    .brand-kicker {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 999px;
      color: var(--brand-strong);
      background: rgba(210, 193, 175, 0.1);
      border: 1px solid rgba(210, 193, 175, 0.16);
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .brand-title {
      margin: 18px 0 8px;
      font-size: 30px;
      line-height: 1.08;
      letter-spacing: 0.02em;
      font-weight: 700;
    }

    .brand-subtitle {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.72;
    }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-top: 10px;
    }

    .nav-btn {
      width: 100%;
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted);
      border-radius: 14px;
      padding: 11px 12px;
      text-align: left;
      font-size: 13px;
      transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .nav-btn:hover {
      color: var(--text);
      background: rgba(255, 255, 255, 0.03);
      border-color: rgba(255, 255, 255, 0.04);
    }

    .nav-btn.active {
      background:
        linear-gradient(135deg, rgba(210, 193, 175, 0.12), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.018);
      border-color: rgba(210, 193, 175, 0.14);
      color: #faf4ed;
      box-shadow: inset 2px 0 0 rgba(210, 193, 175, 0.9);
    }

    .nav-label {
      flex: 1;
      font-weight: 500;
    }

    .main {
      padding: 30px 34px 56px;
      width: 100%;
      max-width: 1720px;
      height: 100vh;
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: thin;
    }

    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 20px;
      margin-bottom: 28px;
    }

    .topbar-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
      margin-left: auto;
    }

    .btn.is-dirty {
      border-color: rgba(210, 193, 175, 0.26);
      box-shadow: 0 0 0 1px rgba(210, 193, 175, 0.05), 0 10px 28px rgba(210, 193, 175, 0.08);
    }

    .sync-status-badge {
      display: none;
    }

    .system-status-widget {
      position: fixed;
      right: 20px;
      bottom: 20px;
      z-index: 85;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 10px;
      outline: none;
    }

    .system-status-shell {
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 0 14px 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background:
        linear-gradient(180deg, rgba(28, 26, 24, 0.95), rgba(18, 17, 16, 0.98));
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
      transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
    }

    .system-status-widget:hover .system-status-shell,
    .system-status-widget:focus-within .system-status-shell {
      border-color: rgba(210, 193, 175, 0.16);
      box-shadow: 0 0 0 1px rgba(210, 193, 175, 0.05), 0 16px 34px rgba(210, 193, 175, 0.08);
      transform: translateY(-1px);
    }

    .system-status-dot {
      position: relative;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: rgba(210, 193, 175, 0.72);
      box-shadow: 0 0 0 5px rgba(210, 193, 175, 0.08);
      transition: box-shadow 0.4s ease, background 0.4s ease;
    }

    .system-status-dot::after {
      content: "";
      position: absolute;
      inset: -7px;
      border-radius: 50%;
      border: 1px solid rgba(210, 193, 175, 0.2);
      animation: status-pulse 2.8s ease-out infinite;
    }

    .system-status-dot.is-connected {
      background: var(--green);
      box-shadow: 0 0 0 5px rgba(127, 210, 164, 0.08);
    }

    .system-status-dot.is-connected::after {
      border-color: rgba(127, 210, 164, 0.28);
    }

    .system-status-dot.is-warning {
      background: var(--amber);
      box-shadow: 0 0 0 5px rgba(217, 184, 141, 0.08);
    }

    .system-status-dot.is-warning::after {
      border-color: rgba(217, 184, 141, 0.24);
    }

    .system-status-dot.is-error {
      background: var(--red);
      box-shadow: 0 0 0 5px rgba(233, 138, 131, 0.09);
    }

    .system-status-dot.is-error::after {
      border-color: rgba(233, 138, 131, 0.26);
    }

    @keyframes status-pulse {
      0% {
        transform: scale(0.72);
        opacity: 0.42;
      }
      70% {
        transform: scale(1.35);
        opacity: 0;
      }
      100% {
        transform: scale(1.35);
        opacity: 0;
      }
    }

    .system-status-text {
      font-size: 12px;
      color: var(--text);
      letter-spacing: 0.03em;
    }

    .system-status-popover {
      width: min(280px, calc(100vw - 40px));
      padding: 14px;
      border-radius: 18px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(28, 26, 24, 0.97), rgba(16, 15, 14, 0.98));
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
      opacity: 0;
      transform: translateY(8px);
      pointer-events: none;
      transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .system-status-widget:hover .system-status-popover,
    .system-status-widget:focus-within .system-status-popover {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    .system-status-popover-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 6px;
    }

    .system-status-popover-body {
      font-size: 12px;
      line-height: 1.6;
      color: var(--muted);
    }

    .toast-container {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 90;
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: min(360px, calc(100vw - 28px));
      pointer-events: none;
    }

    .toast {
      pointer-events: auto;
      position: relative;
      overflow: hidden;
      display: grid;
      grid-template-columns: 40px 1fr 32px;
      gap: 12px;
      align-items: start;
      padding: 14px;
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.06), transparent 42%),
        linear-gradient(180deg, rgba(28, 26, 24, 0.96), rgba(16, 15, 14, 0.98));
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
      transform: translateY(14px);
      opacity: 0;
      animation: toast-in 240ms ease forwards;
    }

    .toast.is-closing {
      animation: toast-out 220ms ease forwards;
    }

    .toast::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: rgba(210, 193, 175, 0.7);
    }

    .toast-icon-wrap {
      width: 40px;
      height: 40px;
      border-radius: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: var(--brand);
    }

    .toast-icon-wrap .icon {
      width: 18px;
      height: 18px;
    }

    .toast-body {
      min-width: 0;
    }

    .toast-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
      letter-spacing: 0.01em;
    }

    .toast-message {
      font-size: 12px;
      line-height: 1.55;
      color: var(--muted);
    }

    .toast-close {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      min-height: 32px;
    }

    .toast-close:hover {
      border-color: rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
    }

    .toast.success::before,
    .toast.success .toast-icon-wrap {
      background-color: rgba(127, 210, 164, 0.12);
      color: var(--green);
    }

    .toast.success::before {
      background: rgba(127, 210, 164, 0.82);
    }

    .toast.info::before {
      background: rgba(210, 193, 175, 0.82);
    }

    .toast.info .toast-icon-wrap {
      background: rgba(210, 193, 175, 0.1);
      color: var(--brand);
    }

    .toast.warning::before {
      background: rgba(217, 184, 141, 0.82);
    }

    .toast.warning .toast-icon-wrap {
      background: rgba(217, 184, 141, 0.12);
      color: var(--amber);
    }

    .toast.error::before {
      background: rgba(233, 138, 131, 0.86);
    }

    .toast.error .toast-icon-wrap {
      background: rgba(233, 138, 131, 0.12);
      color: var(--red);
    }

    .toggle-row {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 16px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(255, 255, 255, 0.02);
    }

    .toggle {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      user-select: none;
    }

    .toggle input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .toggle-track {
      width: 44px;
      height: 26px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.08);
      position: relative;
      transition: background 180ms ease, border-color 180ms ease;
    }

    .toggle-track::after {
      content: "";
      position: absolute;
      top: 3px;
      left: 3px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #f5f1ec;
      transition: transform 180ms ease;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    }

    .toggle input:checked + .toggle-track {
      background: rgba(210, 193, 175, 0.18);
      border-color: rgba(210, 193, 175, 0.22);
    }

    .toggle input:checked + .toggle-track::after {
      transform: translateX(18px);
      background: var(--brand-strong);
    }

    .toggle-label {
      font-size: 13px;
      color: var(--text);
    }

    .settings-stack {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .toggle-grid {
      display: grid;
      gap: 14px;
    }

    .settings-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
      gap: 20px;
    }

    .fx-rates-card {
      display: grid;
      gap: 12px;
    }

    .fx-rates-shell {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .fx-rates-shell-header {
      justify-content: flex-end;
      flex-wrap: nowrap;
      flex: 0 0 auto;
    }

    .fx-rate-pill {
      min-width: 122px;
      padding: 10px 12px;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.025);
    }

    .fx-rate-label {
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(238, 238, 238, 0.46);
      margin-bottom: 6px;
    }

    .fx-rate-value {
      font-size: 13px;
      font-weight: 600;
      color: rgba(238, 238, 238, 0.9);
    }

    .fx-swap-btn {
      min-width: 36px;
      width: 36px;
      padding: 0;
      justify-content: center;
    }

    .portfolio-layout-grid {
      display: grid;
      gap: 20px;
    }

    .portfolio-lower-grid {
      display: grid;
      grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
      gap: 20px;
      align-items: start;
    }

    .portfolio-auto-refresh-note {
      margin-top: 16px;
      text-align: right;
    }

    .profile-shell {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .profile-view-switch {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .profile-view-pill {
      min-height: 36px;
      padding: 0 14px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.07);
      background: rgba(255, 255, 255, 0.02);
      color: rgba(238, 238, 238, 0.68);
      font-size: 12px;
      letter-spacing: 0.02em;
    }

    .profile-view-pill.active,
    .profile-view-pill:hover {
      color: #f6efe7;
      border-color: rgba(210, 193, 175, 0.16);
      background: rgba(210, 193, 175, 0.08);
    }

    .profile-view-panel {
      display: none;
    }

    .profile-view-panel.active {
      display: block;
    }

    .profile-grid {
      display: grid;
      gap: 20px;
    }

    .profile-overview-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
      gap: 20px;
    }

    .profile-hero-card {
      display: grid;
      gap: 18px;
    }

    .profile-hero-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .profile-hero-identity {
      display: flex;
      align-items: center;
      gap: 16px;
      min-width: 0;
    }

    .profile-hero-avatar-wrap {
      position: relative;
      width: 78px;
      height: 78px;
      border-radius: 9999px;
      overflow: hidden;
      flex: 0 0 auto;
      border: 1px solid rgba(210, 193, 175, 0.18);
      background: rgba(255, 255, 255, 0.03);
    }

    .profile-hero-avatar-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .profile-hero-avatar-fallback {
      position: absolute;
      inset: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      font-weight: 700;
      color: #f4eee7;
      background: linear-gradient(180deg, rgba(210, 193, 175, 0.18), rgba(255, 255, 255, 0.04));
    }

    .profile-hero-copy {
      min-width: 0;
      display: grid;
      gap: 6px;
    }

    .profile-hero-summary {
      max-width: 760px;
      margin-top: 4px;
      font-size: 13px;
      line-height: 1.7;
      color: rgba(238, 238, 238, 0.66);
    }

    .profile-hero-name-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .profile-metrics-row,
    .profile-background-grid,
    .profile-content-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .profile-metric-value {
      margin-top: 6px;
      font-size: 22px;
      font-weight: 700;
      color: var(--text);
    }

    .profile-metric-inline {
      font-size: 14px;
      font-weight: 600;
    }

    .profile-tag-row,
    .profile-social-links {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .profile-section-stack {
      display: grid;
      gap: 16px;
    }

    .section-sub-label {
      margin-bottom: 8px;
      letter-spacing: 0.03em;
    }

    .profile-body-copy {
      color: rgba(238, 238, 238, 0.72);
      line-height: 1.72;
    }

    .profile-contact-list {
      display: grid;
      gap: 12px;
    }

    .profile-contact-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      min-height: 40px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .profile-contact-row:last-child {
      padding-bottom: 0;
      border-bottom: 0;
    }

    .profile-social-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      padding: 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.02);
      color: #eeeeee;
      text-decoration: none;
    }

    .profile-content-column {
      display: grid;
      gap: 10px;
    }

    .profile-content-card {
      display: grid;
      gap: 18px;
    }

    .profile-content-column-title {
      font-size: 12px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: rgba(238, 238, 238, 0.48);
    }

    .profile-edit-actions {
      margin-top: 16px;
    }

    input[readonly],
    textarea[readonly] {
      opacity: 0.78;
      cursor: not-allowed;
    }

    .sync-inline-status {
      padding: 14px;
      border-radius: 18px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(255, 255, 255, 0.02);
    }

    .sync-inline-label {
      margin-top: 6px;
      font-size: 16px;
      font-weight: 700;
      color: var(--text);
    }

    .settings-actions {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
    }

    @keyframes toast-in {
      from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes toast-out {
      from {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
      to {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
      }
    }

    .topbar h1 {
      margin: 0;
      font-size: 38px;
      line-height: 1.05;
      letter-spacing: 0.015em;
      font-weight: 700;
    }

    .topbar p {
      margin: 10px 0 0;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.68;
      max-width: 760px;
    }

    .hero-card {
      min-width: 252px;
      border-radius: 26px;
      padding: 18px 18px 16px;
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
      border-color: rgba(210, 193, 175, 0.14);
    }

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

    .hero-logo {
      width: 34px;
      height: 34px;
      object-fit: contain;
      border-radius: 10px;
      opacity: 0.95;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 12px;
      padding: 6px 10px;
      border-radius: 999px;
      color: var(--brand-strong);
      background: rgba(210, 193, 175, 0.08);
      border: 1px solid rgba(210, 193, 175, 0.14);
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .clock {
      font-size: 13px;
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .hero-name {
      margin-top: 8px;
      font-size: 18px;
      font-weight: 700;
    }

    .section {
      display: none;
    }

    .section.active {
      display: block;
    }

    .grid {
      display: grid;
      gap: 20px;
    }

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

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

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

    .split {
      display: grid;
      grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
      gap: 20px;
    }

    .card {
      border-radius: var(--radius);
      padding: 22px;
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.06), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
        linear-gradient(180deg, rgba(37, 33, 30, 0.28), rgba(13, 12, 11, 0.18));
    }

    .card h2,
    .card h3,
    .card h4 {
      margin: 0 0 10px;
      letter-spacing: 0.01em;
    }

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

    .small {
      font-size: 13px;
    }

    .tiny {
      font-size: 12px;
    }

    .toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px 18px;
      flex-wrap: wrap;
      margin-bottom: 18px;
    }

    .toolbar-left,
    .toolbar-right {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .btn {
      border: 1px solid var(--border);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        var(--panel-muted);
      color: var(--text);
      border-radius: 14px;
      min-height: 44px;
      padding: 11px 16px;
      transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .btn:hover {
      transform: translateY(-1px);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel-2);
    }

    .btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      transform: none;
    }

    .btn-brand {
      background:
        linear-gradient(135deg, rgba(210, 193, 175, 0.18), rgba(210, 193, 175, 0.08)),
        rgba(255, 255, 255, 0.02);
      border-color: rgba(210, 193, 175, 0.28);
      color: #f8f0e8;
      box-shadow: 0 0 0 1px rgba(210, 193, 175, 0.04), 0 10px 28px rgba(210, 193, 175, 0.08);
    }

    .btn-danger {
      background: rgba(233, 138, 131, 0.12);
      border-color: rgba(233, 138, 131, 0.22);
      color: #ffd8d3;
    }

    .btn-ghost {
      background: transparent;
    }

    .icon {
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.75;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .icon-lg {
      width: 20px;
      height: 20px;
    }

    .nav-btn .icon {
      color: rgba(242, 238, 233, 0.72);
    }

    .nav-btn.active .icon {
      color: var(--brand);
      filter: drop-shadow(0 0 6px rgba(210, 193, 175, 0.15));
    }

    .eyebrow .icon,
    .btn-brand .icon,
    .tag .icon {
      color: var(--brand);
    }

    .stat-card {
      min-height: 132px;
    }

    .stat-label {
      color: var(--muted);
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .stat-value {
      margin-top: 14px;
      font-size: 32px;
      font-weight: 700;
      line-height: 1.15;
    }

    .positive {
      color: var(--green);
    }

    .negative {
      color: var(--red);
    }

    .warning {
      color: var(--amber);
    }

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

    .field {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .field.full {
      grid-column: 1 / -1;
    }

    label {
      font-size: 12px;
      color: var(--muted);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    input,
    select,
    textarea {
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 14px;
      min-height: 46px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
        #11100f;
      color: var(--text);
      outline: none;
      transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
    }

    .control-shell {
      position: relative;
      display: inline-flex;
      align-items: center;
    }

    .control-shell .icon {
      position: absolute;
      left: 14px;
      color: var(--muted-2);
      width: 16px;
      height: 16px;
      pointer-events: none;
    }

    .control-shell input {
      padding-left: 40px;
      min-width: 220px;
    }

    .control-shell select {
      padding-left: 40px;
      min-width: 210px;
    }

    input[type="file"] {
      padding: 10px 12px;
    }

    input[type="file"]::file-selector-button {
      margin-right: 12px;
      border: 1px solid rgba(210, 193, 175, 0.18);
      background:
        linear-gradient(135deg, rgba(210, 193, 175, 0.16), rgba(210, 193, 175, 0.06)),
        rgba(255, 255, 255, 0.02);
      color: #f8f0e8;
      border-radius: 12px;
      min-height: 34px;
      padding: 8px 12px;
      font: inherit;
      cursor: pointer;
    }

    .upload-note {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: rgba(210, 193, 175, 0.34);
      box-shadow: 0 0 0 3px rgba(210, 193, 175, 0.08), 0 8px 20px rgba(210, 193, 175, 0.05);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        #141210;
    }

    textarea {
      min-height: 112px;
      resize: vertical;
      padding-top: 13px;
    }

    select {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      min-width: 200px;
      padding-right: 44px;
      background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23d2c1af' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat, no-repeat;
      background-position: 0 0, calc(100% - 14px) 50%;
      background-size: auto, 16px;
    }

    .toolbar select,
    .toolbar-right select,
    .toolbar input,
    .toolbar-right input {
      min-width: 200px;
      min-height: 44px;
    }

    .inline-help {
      color: var(--muted-2);
      font-size: 12px;
      line-height: 1.55;
    }

    .tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 12px;
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid var(--border);
    }

    .tag.expense {
      color: #ffd6d2;
      border-color: rgba(233, 138, 131, 0.24);
      background: rgba(233, 138, 131, 0.1);
    }

    .tag.income {
      color: #def8e8;
      border-color: rgba(127, 210, 164, 0.24);
      background: rgba(127, 210, 164, 0.1);
    }

    .tag.loan {
      color: #f4e7d7;
      border-color: rgba(210, 193, 175, 0.24);
      background: rgba(210, 193, 175, 0.1);
    }

    .tag.pending {
      color: #f2dfc0;
      border-color: rgba(217, 184, 141, 0.24);
      background: rgba(217, 184, 141, 0.1);
    }

    .tag.in_progress {
      color: #f0e5d9;
      border-color: rgba(210, 193, 175, 0.22);
      background: rgba(210, 193, 175, 0.1);
    }

    .tag.completed {
      color: #def8e8;
      border-color: rgba(127, 210, 164, 0.24);
      background: rgba(127, 210, 164, 0.1);
    }

    .table-wrap {
      overflow: auto;
      border-radius: 22px;
      border: 1px solid rgba(238, 238, 238, 0.1);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012)),
        rgba(255, 255, 255, 0.015);
    }

    table {
      width: 100%;
      min-width: 860px;
      border-collapse: collapse;
    }

    th,
    td {
      padding: 16px 18px;
      border-bottom: 1px solid rgba(238, 238, 238, 0.08);
      text-align: left;
      vertical-align: top;
      font-size: 14px;
    }

    th {
      position: sticky;
      top: 0;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028)),
        rgba(255, 255, 255, 0.018);
      color: var(--muted);
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      z-index: 1;
    }

    tbody tr {
      transition: background 160ms ease;
    }

    tbody tr:hover {
      background: rgba(255, 255, 255, 0.025);
    }

    .receipt-thumb {
      width: 50px;
      height: 50px;
      object-fit: cover;
      border-radius: 12px;
      border: 1px solid var(--border);
      display: block;
    }

    .receipt-preview-box {
      min-height: 132px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 20px;
      border: 1px dashed rgba(210, 193, 175, 0.18);
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.08), transparent 55%),
        rgba(255, 255, 255, 0.02);
      padding: 16px;
    }

    .receipt-preview-box img {
      max-height: 180px;
      object-fit: contain;
      border-radius: 12px;
    }

    .mini-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .mini-item {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      border-radius: 18px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .progress-wrap {
      width: 100%;
      height: 10px;
      margin-top: 10px;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 999px;
      overflow: hidden;
    }

    .progress-bar {
      height: 100%;
      background: linear-gradient(90deg, rgba(210, 193, 175, 0.85), rgba(234, 223, 212, 0.96));
      border-radius: 999px;
      box-shadow: 0 0 14px rgba(210, 193, 175, 0.18);
    }

    .task-card {
      padding: 18px;
      border-radius: 22px;
      border: 1px solid var(--border);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
        rgba(255, 255, 255, 0.015);
    }

    .section-heading {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .task-meta {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .chart-card {
      min-height: 350px;
    }

    .chart-canvas {
      width: 100%;
      height: 290px;
      max-height: 290px;
      display: block;
      border-radius: 22px;
      border: 1px solid rgba(255, 255, 255, 0.05);
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.07), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent);
    }

    .calendar-head,
    .calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 12px;
    }

    .calendar-head {
      margin-top: 16px;
      margin-bottom: 12px;
    }

    .calendar-head div {
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      padding: 0 6px;
    }

    .calendar-day {
      min-height: 132px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.06), transparent 55%),
        rgba(255, 255, 255, 0.02);
      padding: 12px;
    }

    .calendar-day.muted-day {
      opacity: 0.35;
    }

    .calendar-day.today {
      border-color: rgba(210, 193, 175, 0.38);
      box-shadow: inset 0 0 0 1px rgba(210, 193, 175, 0.14), 0 0 24px rgba(210, 193, 175, 0.06);
    }

    .calendar-date {
      font-size: 13px;
      color: var(--muted);
      font-weight: 700;
      margin-bottom: 8px;
    }

    .calendar-event {
      padding: 7px 8px;
      border-radius: 12px;
      font-size: 11px;
      line-height: 1.4;
      margin-top: 7px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .calendar-event.task {
      background: rgba(210, 193, 175, 0.14);
      border-color: rgba(210, 193, 175, 0.18);
    }

    .calendar-event.reminder {
      background: rgba(127, 210, 164, 0.12);
      border-color: rgba(127, 210, 164, 0.18);
    }

    .calendar-toolbar-right {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .calendar-view-switch {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 4px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.025);
    }

    .calendar-view-btn {
      min-height: 34px;
      padding: 0 14px;
      border-radius: 999px;
      border: 1px solid transparent;
      background: transparent;
      color: rgba(238, 238, 238, 0.64);
      font-size: 12px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .calendar-view-btn.active,
    .calendar-view-btn:hover {
      color: #f6efe7;
      border-color: rgba(210, 193, 175, 0.16);
      background: rgba(210, 193, 175, 0.08);
    }

    .calendar-grid-week {
      grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .calendar-day-week {
      min-height: 220px;
    }

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

    .calendar-year-card {
      min-height: 128px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.05), transparent 55%),
        rgba(255, 255, 255, 0.02);
      padding: 18px;
      display: grid;
      align-content: space-between;
      gap: 12px;
    }

    .calendar-year-card.today {
      border-color: rgba(210, 193, 175, 0.3);
      box-shadow: inset 0 0 0 1px rgba(210, 193, 175, 0.14);
    }

    .calendar-year-title {
      font-size: 15px;
      font-weight: 600;
      color: rgba(238, 238, 238, 0.9);
    }

    .calendar-year-meta {
      font-size: 12px;
      color: rgba(238, 238, 238, 0.55);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .allocation-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      max-height: 360px;
      overflow: auto;
      padding-right: 4px;
    }

    .allocation-item {
      padding-bottom: 2px;
    }

    .allocation-bar {
      height: 9px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      overflow: hidden;
      margin-top: 9px;
    }

    .allocation-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(210, 193, 175, 0.84), rgba(234, 223, 212, 0.96));
    }

    .status-line {
      min-height: 20px;
      font-size: 12px;
      color: var(--muted);
    }

    .empty {
      padding: 18px;
      border-radius: 20px;
      border: 1px dashed rgba(255, 255, 255, 0.12);
      color: var(--muted);
      text-align: center;
      font-size: 14px;
      background: rgba(255, 255, 255, 0.015);
    }

    .modal {
      position: fixed;
      inset: 0;
      padding: 24px;
      background: rgba(4, 4, 4, 0.78);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 25;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      width: min(980px, 100%);
      max-height: 90vh;
      overflow: auto;
      border-radius: 28px;
      padding: 22px;
      border: 1px solid var(--border);
      background:
        radial-gradient(circle at top right, rgba(210, 193, 175, 0.08), transparent 40%),
        #0f0d0c;
      box-shadow: var(--shadow);
    }

    .preview-image {
      width: 100%;
      max-height: 75vh;
      object-fit: contain;
      border-radius: 18px;
      border: 1px solid var(--border);
      background: #080707;
    }

    .hidden {
      display: none !important;
    }

    .app {
      grid-template-columns: 286px minmax(0, 1fr);
      background: #050505;
    }

    .sidebar {
      display: flex;
      flex-direction: column;
      gap: 26px;
      padding: 22px 18px 18px;
      background: #030303;
      border-right: 1px solid rgba(238, 238, 238, 0.1);
      backdrop-filter: none;
    }

    .sidebar-top {
      display: flex;
      flex-direction: column;
      gap: 14px;
      padding: 4px 6px 0;
    }

    .sidebar-account-menu {
      position: relative;
    }

    .sidebar-identity {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      width: 100%;
      padding: 8px 10px;
      border-radius: 16px;
      border: 1px solid rgba(238, 238, 238, 0.07);
      background: rgba(255, 255, 255, 0.02);
      text-align: left;
      transition: border-color 180ms ease, background 180ms ease;
    }

    .sidebar-identity:hover {
      border-color: rgba(210, 193, 175, 0.14);
      background: rgba(210, 193, 175, 0.05);
    }

    .sidebar-avatar-wrap {
      position: relative;
      flex: 0 0 auto;
      width: 38px;
      height: 38px;
      border-radius: 9999px;
      overflow: hidden;
      border: 1px solid rgba(210, 193, 175, 0.14);
      background: rgba(255, 255, 255, 0.03);
    }

    .sidebar-avatar {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .sidebar-avatar-fallback {
      position: absolute;
      inset: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 700;
      color: #f4eee7;
      background: linear-gradient(180deg, rgba(210, 193, 175, 0.14), rgba(255, 255, 255, 0.04));
    }

    .sidebar-account-copy {
      min-width: 0;
      display: flex;
      flex-direction: column;
    }

    .sidebar-user-label {
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(238, 238, 238, 0.45);
      margin-bottom: 4px;
    }

    .sidebar-user-name {
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 0.01em;
      color: #eeeeee;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sidebar-account-chevron {
      margin-left: auto;
      width: 15px;
      height: 15px;
      color: rgba(238, 238, 238, 0.56);
    }

    .sidebar-time {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      padding: 0 2px;
      font-size: 12px;
      color: rgba(238, 238, 238, 0.62);
    }

    .sidebar-time .icon {
      width: 15px;
      height: 15px;
      color: rgba(210, 193, 175, 0.82);
    }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 2px;
      margin-top: 0;
      padding-top: 6px;
      padding-bottom: 10px;
      border-top: 1px solid rgba(238, 238, 238, 0.07);
      border-bottom: 1px solid rgba(238, 238, 238, 0.07);
    }

    .nav-group {
      display: grid;
      gap: 2px;
      margin-top: 10px;
    }

    .nav-group:first-of-type {
      margin-top: 12px;
    }

    .nav-group-label {
      padding: 6px 12px 8px;
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(238, 238, 238, 0.34);
    }

    .nav-btn {
      min-height: 42px;
      border: 1px solid transparent;
      border-radius: 12px;
      padding: 10px 12px;
      color: rgba(238, 238, 238, 0.68);
      font-size: 13px;
      gap: 11px;
    }

    .nav-btn .icon {
      width: 17px;
      height: 17px;
      color: rgba(238, 238, 238, 0.68);
    }

    .nav-btn:hover {
      color: #eeeeee;
      background: rgba(255, 255, 255, 0.03);
      border-color: rgba(255, 255, 255, 0.03);
    }

    .nav-btn:hover .icon {
      color: rgba(238, 238, 238, 0.88);
    }

    .nav-btn.active {
      color: #f4ede6;
      background: rgba(210, 193, 175, 0.08);
      border-color: rgba(210, 193, 175, 0.12);
      box-shadow: inset 2px 0 0 rgba(210, 193, 175, 0.88);
    }

    .nav-btn.active .icon {
      color: var(--brand);
      filter: none;
    }

    .nav-label {
      font-weight: 500;
      letter-spacing: 0.01em;
    }

    .main {
      position: relative;
      padding: 0 30px 84px;
      max-width: none;
      background:
        linear-gradient(180deg, rgba(8, 8, 8, 0.98), rgba(6, 6, 6, 1));
    }

    .main-header {
      position: sticky;
      top: 0;
      z-index: 16;
      padding: 22px 0 18px;
      margin-bottom: 22px;
      background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.97) 0%, rgba(5, 5, 5, 0.93) 78%, rgba(5, 5, 5, 0));
      backdrop-filter: blur(10px);
    }

    .topbar {
      align-items: flex-end;
      gap: 22px;
      margin-bottom: 14px;
    }

    .header-market-row {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 14px;
      flex-wrap: nowrap;
      width: 100%;
    }

    .brand-header-card {
      min-width: 0;
      max-width: 860px;
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
    }

    .brand-title-main {
      margin: 0;
      font-size: clamp(24px, 2vw, 30px);
      line-height: 1.06;
      letter-spacing: 0.01em;
      color: #f2f2f2;
      font-weight: 650;
    }

    .brand-subtitle-main {
      margin: 14px 0 0;
      max-width: 680px;
      font-size: 10.5px;
      line-height: 1.75;
      letter-spacing: 0.035em;
      font-weight: 400;
      color: rgba(238, 238, 238, 0.42);
    }

    .brand-text-logo {
      display: block;
      height: 26px;
      width: auto;
      max-width: min(320px, 100%);
      object-fit: contain;
      opacity: 0.96;
    }

    .eyebrow {
      margin-bottom: 10px;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: rgba(210, 193, 175, 0.9);
      font-size: 11px;
      letter-spacing: 0.16em;
    }

    .eyebrow .icon {
      width: 14px;
      height: 14px;
    }

    .topbar-actions {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 10px;
      padding-top: 10px;
      padding-bottom: 2px;
      align-self: flex-start;
    }

    .header-market-chip {
      display: block;
      min-width: 136px;
      padding: 10px 12px 8px;
      border-radius: 12px;
      border: 1px solid rgba(238, 238, 238, 0.12);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.01)),
        #0d0d0d;
      text-align: right;
      text-decoration: none;
      transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    }

    .header-market-chip.has-value {
      border-color: rgba(210, 193, 175, 0.16);
    }

    .header-market-chip:hover {
      transform: translateY(-1px);
      border-color: rgba(210, 193, 175, 0.22);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
        #111111;
      box-shadow: 0 8px 18px rgba(210, 193, 175, 0.06);
    }

    .header-market-chip:focus-visible {
      outline: none;
      border-color: rgba(210, 193, 175, 0.28);
      box-shadow: 0 0 0 3px rgba(210, 193, 175, 0.08);
    }

    .header-market-label {
      margin-bottom: 5px;
      font-size: 10px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: rgba(238, 238, 238, 0.46);
    }

    .header-market-value {
      font-size: 12px;
      line-height: 1.15;
      letter-spacing: 0.02em;
      color: rgba(238, 238, 238, 0.86);
      font-weight: 600;
    }

    .header-market-chip.has-value .header-market-value {
      color: var(--brand-strong);
    }

    .header-utility-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 4px;
    }

    .header-notification-menu {
      position: relative;
      z-index: 42;
    }

    .header-notification-btn {
      position: relative;
      min-width: 40px;
      width: 40px;
      padding: 0;
      justify-content: center;
    }

    .notification-badge {
      position: absolute;
      top: -4px;
      right: -3px;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 700;
      color: #fff;
      background: #c96464;
      border: 1px solid rgba(255, 255, 255, 0.12);
      box-shadow: 0 8px 18px rgba(201, 100, 100, 0.24);
    }

    .header-notification-dropdown {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      width: min(360px, calc(100vw - 36px));
      padding: 12px;
      border-radius: 18px;
      border: 1px solid rgba(238, 238, 238, 0.1);
      background:
        linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(8, 8, 8, 0.98));
      box-shadow: 0 22px 40px rgba(0, 0, 0, 0.3);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateY(-8px);
      transition: opacity 280ms ease, transform 280ms ease, visibility 280ms ease;
      z-index: 60;
    }

    .header-notification-menu.is-open .header-notification-dropdown {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateY(0);
    }

    .header-notification-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .header-notification-title {
      font-size: 13px;
      font-weight: 600;
      color: rgba(238, 238, 238, 0.92);
      margin-bottom: 4px;
    }

    .btn-compact {
      min-height: 34px;
      padding: 0 12px;
      font-size: 12px;
    }

    .notification-list {
      display: grid;
      gap: 8px;
      max-height: 360px;
      overflow: auto;
    }

    .notification-item {
      width: 100%;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: 12px;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(255, 255, 255, 0.025);
      color: rgba(238, 238, 238, 0.86);
      text-align: left;
      transition: background 180ms ease, border-color 180ms ease;
    }

    .notification-item:hover {
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(210, 193, 175, 0.12);
    }

    .notification-item.is-unread {
      border-color: rgba(210, 193, 175, 0.16);
      background: rgba(210, 193, 175, 0.07);
    }

    .notification-item-copy {
      min-width: 0;
      display: grid;
      gap: 5px;
    }

    .notification-item-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .notification-item-type {
      font-size: 10px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(210, 193, 175, 0.86);
    }

    .notification-item-time {
      font-size: 11px;
      color: rgba(238, 238, 238, 0.48);
      white-space: nowrap;
    }

    .notification-item-title {
      font-size: 12px;
      font-weight: 600;
      color: rgba(238, 238, 238, 0.92);
    }

    .notification-item-message {
      font-size: 12px;
      line-height: 1.5;
      color: rgba(238, 238, 238, 0.72);
    }

    .notification-item-delete {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: 10px;
      color: rgba(238, 238, 238, 0.5);
      flex: 0 0 auto;
    }

    .notification-item-delete:hover {
      color: rgba(238, 238, 238, 0.88);
      background: rgba(255, 255, 255, 0.05);
    }

    #notificationPermissionStatus {
      margin-top: 6px;
      line-height: 1.55;
    }

    .account-dropdown {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      min-width: 220px;
      display: grid;
      gap: 4px;
      padding: 8px;
      border-radius: 18px;
      border: 1px solid rgba(238, 238, 238, 0.1);
      background:
        linear-gradient(180deg, rgba(22, 22, 22, 0.98), rgba(10, 10, 10, 0.98));
      box-shadow: 0 22px 40px rgba(0, 0, 0, 0.28);
      z-index: 22;
    }

    .sidebar-account-dropdown {
      left: 0;
      right: 0;
      min-width: 0;
      top: calc(100% + 10px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateY(-6px);
      transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
    }

    .sidebar-account-menu.is-open .sidebar-account-dropdown {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateY(0);
    }

    .account-dropdown-item {
      min-height: 40px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      width: 100%;
      padding: 0 12px;
      border-radius: 12px;
      border: 1px solid transparent;
      background: transparent;
      color: rgba(238, 238, 238, 0.78);
      text-align: left;
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.01em;
    }

    .dropdown-item-icon {
      width: 14px;
      height: 14px;
      color: rgba(238, 238, 238, 0.46);
      flex: 0 0 auto;
    }

    .account-dropdown-item:hover {
      color: #eeeeee;
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(238, 238, 238, 0.05);
    }

    .account-dropdown-item:hover .dropdown-item-icon {
      color: rgba(210, 193, 175, 0.9);
    }

    .account-dropdown-item-danger {
      color: #f0b5ae;
    }

    .account-dropdown-item-danger:hover {
      background: rgba(233, 138, 131, 0.1);
      border-color: rgba(233, 138, 131, 0.15);
    }

    .btn-utility {
      min-height: 36px;
      padding: 8px 11px;
      border-radius: 11px;
      font-size: 12px;
      color: rgba(238, 238, 238, 0.78);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.008)),
        #0e0e0e;
    }

    .btn-utility .icon {
      width: 15px;
      height: 15px;
      color: rgba(210, 193, 175, 0.82);
    }

    .btn-utility span {
      letter-spacing: 0.01em;
    }

    .btn-utility:hover {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
        #121212;
    }

    .section-header-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding-top: 16px;
      border-top: 1px solid rgba(238, 238, 238, 0.1);
    }

    .section-header-title {
      font-size: 18px;
      font-weight: 600;
      letter-spacing: 0.01em;
      color: #efefef;
      margin-bottom: 6px;
    }

    #pageSubtitle {
      margin: 0;
      font-size: 13px;
      line-height: 1.6;
      color: rgba(238, 238, 238, 0.56);
    }

    .system-status-widget {
      position: relative;
      margin-top: auto;
      align-self: stretch;
      right: auto;
      bottom: auto;
      z-index: 6;
      align-items: stretch;
      padding-top: 2px;
    }

    .system-status-shell {
      min-height: 42px;
      width: 100%;
      justify-content: flex-start;
      padding: 0 14px 0 12px;
      border-radius: 14px;
      border: 1px solid rgba(238, 238, 238, 0.09);
      background: rgba(255, 255, 255, 0.025);
      box-shadow: none;
    }

    .system-status-widget:hover .system-status-shell,
    .system-status-widget:focus-within .system-status-shell {
      border-color: rgba(210, 193, 175, 0.14);
      background: rgba(210, 193, 175, 0.06);
      box-shadow: 0 0 0 1px rgba(210, 193, 175, 0.04), 0 10px 22px rgba(210, 193, 175, 0.05);
      transform: translateY(-1px);
    }

    .system-status-text {
      color: rgba(238, 238, 238, 0.82);
      font-size: 12px;
    }

    .system-status-popover {
      position: absolute;
      left: 0;
      bottom: calc(100% + 10px);
      width: 100%;
      min-width: 248px;
      max-width: 320px;
      border-radius: 16px;
      border: 1px solid rgba(238, 238, 238, 0.11);
      background:
        linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(8, 8, 8, 0.98));
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
    }

    .system-status-popover-title {
      color: #f1f1f1;
    }

    .system-status-popover-body {
      color: rgba(238, 238, 238, 0.64);
    }

    .card {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.012)),
        rgba(12, 12, 12, 0.94);
      border-color: rgba(238, 238, 238, 0.1);
      box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    }

    .stat-card {
      min-height: 126px;
    }

    .table-wrap,
    .task-card,
    .mini-item,
    .calendar-day,
    .chart-canvas,
    .sync-inline-status,
    .profile-social-link,
    .toggle-row {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.01)),
        rgba(10, 10, 10, 0.92);
      border-color: rgba(238, 238, 238, 0.09);
    }

    input,
    select,
    textarea {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.008)),
        #0b0b0b;
      color: #eeeeee;
      border-color: rgba(238, 238, 238, 0.09);
    }

    input:focus,
    select:focus,
    textarea:focus {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012)),
        #111111;
    }

    .btn {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.012)),
        #101010;
      border-color: rgba(255, 255, 255, 0.07);
      color: #eeeeee;
      box-shadow: none;
    }

    .btn:hover {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.016)),
        #141414;
    }

    .btn-brand {
      background:
        linear-gradient(135deg, rgba(210, 193, 175, 0.17), rgba(210, 193, 175, 0.06)),
        #111111;
      border-color: rgba(210, 193, 175, 0.24);
      color: #f6efe7;
    }

    .settings-grid {
      grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
      align-items: start;
    }

    .app-footer {
      position: fixed;
      left: 286px;
      right: 0;
      bottom: 0;
      z-index: 10;
      min-height: 38px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 0 30px;
      border-top: 1px solid rgba(238, 238, 238, 0.1);
      background: rgba(5, 5, 5, 0.94);
      color: rgba(238, 238, 238, 0.42);
      font-size: 11px;
      letter-spacing: 0.02em;
      backdrop-filter: blur(10px);
    }

    @media (max-width: 1180px) {
      .app {
        grid-template-columns: 240px minmax(0, 1fr);
      }

      .topbar {
        flex-direction: column;
        align-items: flex-start;
      }

      .topbar-actions {
        width: 100%;
        align-items: flex-start;
        padding-top: 4px;
      }

      .header-market-row {
        justify-content: flex-start;
      }

      .fx-rates-shell-header {
        justify-content: flex-start;
      }

      .header-market-chip {
        text-align: left;
      }

      .header-utility-row {
        justify-content: flex-start;
      }

      .settings-grid,
      .split,
      .grid-4,
      .grid-3,
      .grid-2,
      .profile-metrics-row,
      .profile-background-grid,
      .profile-content-grid {
        grid-template-columns: 1fr;
      }

      .app-footer {
        left: 240px;
      }
    }

    @media (max-width: 860px) {
      body {
        overflow: auto;
      }

      .app {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
      }

      .sidebar,
      .main {
        height: auto;
      }

      .main {
        overflow: visible;
        padding: 0 18px 84px;
      }

      .main-header {
        position: static;
      }

      .system-status-popover {
        width: min(320px, calc(100vw - 36px));
      }

      .app-footer {
        position: static;
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 14px 18px 20px;
        min-height: 0;
        border-top: 0;
      }
    }

    @media (max-width: 1260px) {
      .profile-overview-grid,
      .grid-4,
      .grid-3,
      .grid-2,
      .split,
      .form-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 980px) {
      .app {
        grid-template-columns: 1fr;
        height: auto;
      }

      .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
      }

      .main {
        padding: 20px;
        height: auto;
        overflow: visible;
      }

      .topbar {
        flex-direction: column;
      }

      .topbar-actions {
        justify-content: flex-start;
        margin-left: 0;
      }
    }

    @media (max-width: 760px) {
      .header-market-row {
        gap: 10px;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
      }

      .calendar-head,
      .calendar-grid {
        gap: 6px;
      }

      .calendar-toolbar-right {
        width: 100%;
        justify-content: space-between;
      }

      .profile-overview-grid {
        grid-template-columns: 1fr;
      }

      .profile-shell,
      .profile-hero-header,
      .profile-hero-identity {
        flex-direction: column;
        align-items: flex-start;
      }

      .calendar-day {
        min-height: 96px;
        padding: 8px;
      }

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

      .topbar h1 {
        font-size: 30px;
      }

      .toolbar select,
      .toolbar-right select,
      .toolbar input,
      .toolbar-right input {
        min-width: 100%;
      }

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

      .portfolio-lower-grid {
        grid-template-columns: 1fr;
      }
    }

    body.app-shell-loading {
      overflow: hidden;
    }

    body.app-shell-loading .app,
    body.app-shell-loading .app-footer,
    body.app-shell-loading .toast-container {
      visibility: hidden;
    }

    .app-loading-overlay {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background:
        radial-gradient(circle at top, rgba(210, 193, 175, 0.08), transparent 42%),
        rgba(5, 5, 5, 0.96);
      z-index: 200;
      transition: opacity 320ms ease, visibility 320ms ease;
    }

    .app-loading-overlay.is-hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .app-loading-card {
      width: min(460px, 100%);
      padding: 28px;
      border-radius: 22px;
      border: 1px solid rgba(238, 238, 238, 0.12);
      background:
        linear-gradient(180deg, rgba(20, 20, 20, 0.96), rgba(10, 10, 10, 0.96));
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
      text-align: center;
    }

    .app-loading-spinner {
      width: 36px;
      height: 36px;
      margin: 0 auto 18px;
      border-radius: 999px;
      border: 2px solid rgba(255, 255, 255, 0.08);
      border-top-color: rgba(210, 193, 175, 0.94);
      box-shadow: 0 0 12px rgba(210, 193, 175, 0.15);
      animation: spin 1.2s linear infinite;
    }

    .app-loading-title {
      font-size: 18px;
      font-weight: 600;
      color: rgba(238, 238, 238, 0.94);
      letter-spacing: 0.01em;
    }

    .app-loading-copy {
      margin-top: 10px;
      font-size: 13px;
      line-height: 1.7;
      color: rgba(238, 238, 238, 0.58);
    }

    .app-loading-actions {
      display: flex;
      justify-content: center;
      margin-top: 20px;
    }

    .app-loading-overlay.is-error .app-loading-spinner {
      border-top-color: #d87979;
      animation: none;
    }

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