/* [project]/app/globals.css [app-client] (css) */
:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #22d3ee;
  --accent: #60a5fa;
  --success: #34d399;
  --danger: #f87171;
  --border: #1f2937;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: radial-gradient(1200px 600px at 10% -10%, #60a5fa26, transparent 40%), radial-gradient(1000px 500px at 90% 0%, #22d3ee1f, transparent 45%), var(--bg);
  color: var(--text);
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

.glass {
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: linear-gradient(#ffffff0f, #ffffff05);
  border-radius: 16px;
  box-shadow: 0 8px 30px #00000040;
}

.card .title {
  letter-spacing: .2px;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  display: flex;
}

.card .title span:first-child {
  white-space: normal;
  word-break: break-word;
  text-overflow: clip;
  max-width: none;
  overflow: visible;
}

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

.grid {
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  display: grid;
}

.col-12 {
  grid-column: span 12;
}

.col-6 {
  grid-column: span 6;
}

.col-4 {
  grid-column: span 4;
}

.col-3 {
  grid-column: span 3;
}

@media (max-width: 1024px) {
  .col-6, .col-4, .col-3 {
    grid-column: span 12;
  }
}

.navbar {
  z-index: 50;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  display: flex;
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
}

.brand {
  align-items: center;
  gap: 8px;
  font-weight: 600;
  display: flex;
}

.content {
  padding-top: 100px;
}

@media (max-width: 640px) {
  .content {
    padding-top: 90px;
  }

  .navbar {
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
    top: 0;
    left: 0;
    right: 0;
  }

  .add-fund-section {
    margin-top: 60px;
  }
}

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

.input {
  border: 1px solid var(--border);
  height: 44px;
  color: var(--text);
  background: #0b1220;
  border-radius: 12px;
  outline: none;
  flex: 1;
  padding: 0 14px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #60a5fa33;
}

input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.button {
  border: 1px solid var(--border);
  color: #05263b;
  cursor: pointer;
  background: linear-gradient(#0ea5e9, #22d3ee);
  border-radius: 12px;
  height: 44px;
  padding: 0 16px;
  font-weight: 600;
  transition: transform .15s, box-shadow .2s;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px #22d3ee40;
}

.button:active {
  transform: translateY(0);
}

.card {
  padding: 16px;
}

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

.badge {
  border: 1px solid var(--border);
  background: #0b1220;
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  display: inline-flex;
}

.badge-v {
  border: 1px solid var(--border);
  background: #0b1220;
  border-radius: 8px;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
}

.badge-v span {
  color: var(--muted);
  font-size: 10px;
}

.badge-v strong {
  font-size: 11px;
}

.stat {
  align-items: baseline;
  gap: 8px;
  display: flex;
}

.stat .label {
  color: var(--muted);
  font-size: 12px;
}

.stat .value {
  font-size: 20px;
  font-weight: 700;
}

.stat .badge {
  padding: 4px 8px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .input {
    font-size: 16px;
  }

  .container {
    padding: 16px;
  }

  .grid {
    gap: 12px;
  }

  .card {
    padding: 12px;
  }

  .stat {
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }

  .stat .label {
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 11px;
    overflow: hidden;
  }

  .stat .value {
    white-space: nowrap;
    font-size: 15px;
    line-height: 1.2;
  }

  .stat .badge {
    width: fit-content;
    padding: 2px 6px;
    font-size: 13px;
  }

  .card .title {
    flex-wrap: wrap;
  }

  .item .name {
    max-width: 100px;
    font-size: 14px;
  }

  .item .badge {
    padding: 2px 4px;
    font-size: 14px;
  }
}

.up {
  color: var(--danger);
}

.down {
  color: var(--success);
}

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

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

.item {
  border: 1px solid var(--border);
  background: #0b1220;
  border-radius: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  display: flex;
}

.item .name {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.modal .item .name {
  white-space: normal;
  text-overflow: clip;
  word-break: break-word;
  max-width: none;
  overflow: visible;
}

.item .weight {
  color: var(--accent);
  font-weight: 600;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.error-text {
  color: var(--danger);
  margin-top: 4px;
  font-size: 12px;
}

.feedback-modal {
  max-width: 420px !important;
}

.link-button:hover {
  opacity: .8;
  color: var(--accent) !important;
}

.footer {
  color: var(--muted);
  text-align: center;
  margin-top: 24px;
  padding-bottom: 60px;
  font-size: 12px;
}

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

.icon-button {
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  color: var(--muted);
  cursor: pointer;
  background: #0b1220;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  transition: box-shadow .2s, border-color .2s, transform .15s, color .2s;
  display: inline-flex;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.icon-button:active {
  transform: translateY(0);
}

.icon-button.danger {
  color: #2b0b0b;
  background: linear-gradient(#ef4444, #f87171);
}

.icon-button.danger:hover {
  box-shadow: 0 10px 20px #f8717140;
}

.fav-button {
  color: var(--muted);
  background: none;
  border: none;
  width: auto;
  height: auto;
  margin-right: 4px;
  padding: 4px;
  transition: all .2s;
}

.fav-button:hover, .fav-button.active {
  color: var(--accent);
}

.tabs {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: none;
  border-radius: 0;
  gap: 4px;
  width: fit-content;
  padding: 4px 0;
  display: flex;
}

.card.list-mode {
  padding: 12px 16px;
  position: relative;
}

.table-container {
  grid-column: span 12;
  padding: 0;
  overflow: hidden;
}

.table-row-wrapper {
  width: 100%;
}

.table-row {
  border-bottom: 1px solid var(--border);
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr 1.2fr 1.2fr 60px;
  align-items: center;
  gap: 12px;
  transition: background-color .2s;
  display: grid;
  padding: 12px 24px !important;
}

.table-row:hover {
  background: #ffffff08;
}

.table-row:last-child {
  border-bottom: none;
}

.table-header-row {
  border-bottom: 1px solid var(--border);
  background: #ffffff0d;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr 1.2fr 1.2fr 60px;
  gap: 12px;
  padding: 16px 24px;
  display: grid;
}

.table-header-cell {
  color: var(--text);
  letter-spacing: .5px;
  font-size: 13px;
  font-weight: 700;
}

.table-cell {
  align-items: center;
  display: flex;
}

.text-right {
  text-align: right;
  justify-content: flex-end;
}

.text-center {
  text-align: center;
  justify-content: center;
}

.name-cell {
  gap: 8px;
}

.title-text {
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.name-text {
  white-space: normal;
  word-break: break-all;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.name-text.updated:after {
  content: "✓";
  color: #22c55e;
  vertical-align: middle;
  background: #22c55e33;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  font-size: 10px;
  display: inline-flex;
  transform: translateY(-1px);
}

.code-text {
  font-size: 11px;
}

@media (max-width: 768px) {
  .table-header-row {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr 80px 100px;
    grid-template-areas: "name value change"
                         "name time profit";
    gap: 4px 12px;
    padding: 12px !important;
  }

  .name-cell {
    grid-area: name;
  }

  .value-cell {
    grid-area: value;
  }

  .change-cell {
    grid-area: change;
  }

  .profit-cell {
    grid-area: profit;
  }

  .time-cell {
    grid-area: time;
    justify-content: flex-end;
  }

  .action-cell, .holding-cell, .holding-amount-cell {
    display: none;
  }

  .table-cell.time-cell span {
    font-size: 10px !important;
  }
}

.stat-compact .up {
  color: var(--danger);
}

@media (max-width: 768px) {
  .action-cell .danger {
    display: none;
  }
}

.swipe-action-bg {
  color: #2b0b0b;
  z-index: 0;
  cursor: pointer;
  background: linear-gradient(#ef4444, #f87171);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 80px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  position: absolute;
  top: 1px;
  bottom: 1px;
  right: 0;
  box-shadow: inset 10px 0 20px -10px #0003;
}

.stat-compact .down {
  color: var(--success);
}

.filter-bar {
  transition: all .3s;
}

@media (max-width: 640px) {
  .filter-bar {
    z-index: 40;
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    background: #0f172ae6;
    flex-direction: column;
    width: calc(100% + 32px);
    margin: 0 -16px 16px;
    padding: 10px 16px;
    display: flex;
    position: sticky;
    top: 60px;
    align-items: center !important;
  }

  .tabs {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: none;
    border-radius: 0;
    justify-content: flex-start;
    width: 100%;
    padding: 0;
  }

  .input.no-zoom {
    font-size: 16px !important;
  }
}

.tab {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 8px;
  align-items: center;
  height: 32px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 32px;
  transition: all .2s;
  display: inline-flex;
}

.tab:hover {
  color: var(--primary);
  background: #22d3ee14;
}

.tab.active {
  color: var(--primary);
  box-shadow: none;
  background: #22d3ee26;
}

@media (hover: none) {
  .tab:hover {
    color: var(--muted);
    background: none;
  }

  .tab.active, .tab.active:hover {
    color: var(--primary);
    box-shadow: none;
    background: #22d3ee26;
  }
}

.modal-overlay {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 60;
  background: #02061799;
  justify-content: center;
  align-items: center;
  display: flex;
  position: fixed;
  inset: 0;
}

.modal {
  width: 560px;
  max-width: 92vw;
  padding: 16px;
}

.pending-list {
  scrollbar-width: none;
}

.pending-list::-webkit-scrollbar {
  display: none;
}

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

.chip {
  border: 1px solid var(--border);
  height: 32px;
  color: var(--text);
  cursor: pointer;
  background: #0b1220;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 0 12px;
  transition: border-color .2s, transform .15s;
  display: inline-flex;
}

.chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.chip.active {
  color: #05263b;
  background: linear-gradient(#0ea5e9, #22d3ee);
  border-color: #0000;
}

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

  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: .8s linear infinite spin;
}

.icon-button[aria-busy="true"] {
  border-color: var(--accent);
  cursor: default;
  box-shadow: 0 0 0 3px #60a5fa26;
}

@media (prefers-reduced-motion: reduce) {
  .spin {
    animation: none;
  }
}

.loading-bar {
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  z-index: 100;
  border-radius: 16px 16px 0 0;
  width: 100%;
  height: 2px;
  animation: 1.5s infinite loading;
  position: absolute;
  top: 0;
  left: 0;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.search-container {
  z-index: 45;
  width: 100%;
  position: relative;
}

.search-input-wrapper {
  flex-wrap: wrap;
  align-items: center;
  display: flex;
  position: relative;
}

.search-spinner {
  border: 2px solid #ffffff1a;
  border-top-color: var(--primary);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: .8s linear infinite spin;
  position: absolute;
  right: 12px;
}

.search-dropdown {
  z-index: 46;
  max-height: 320px;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  overflow-y: auto;
  background: #0f172af2 !important;
}

.search-results {
  flex-direction: column;
  gap: 4px;
  display: flex;
}

.search-item {
  cursor: pointer;
  border-radius: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  transition: all .2s;
  display: flex;
}

.search-item:hover:not(.added) {
  background: #ffffff14;
}

.search-item.selected {
  background: #22d3ee1a;
  border: 1px solid #22d3ee33;
}

.search-item.added {
  cursor: not-allowed;
  opacity: .6;
}

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

.fund-name {
  font-size: 14px;
  font-weight: 600;
}

.fund-code {
  font-size: 11px;
}

.checkbox {
  border: 2px solid var(--border);
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  transition: all .2s;
  display: flex;
}

.search-item.selected .checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.checked-mark {
  border-bottom: 2px solid #05263b;
  border-left: 2px solid #05263b;
  width: 10px;
  height: 6px;
  transform: rotate(-45deg)translateY(-1px);
}

.added-label {
  color: var(--muted);
  background: #ffffff1a;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
}

.no-results {
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

.selected-funds-bar {
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  display: flex;
}

.selected-chips, .selected-inline-chips {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}

.fund-chip {
  color: var(--primary);
  background: #22d3ee26;
  border: 1px solid #22d3ee4d;
  border-radius: 8px;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  display: flex;
}

.remove-chip {
  color: var(--primary);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  padding: 2px;
  display: flex;
}

.remove-chip:hover {
  background: #22d3ee33;
}

.batch-add-button {
  width: 100%;
}

.add-fund-section {
  z-index: 41;
  position: relative;
}

.group-item:hover {
  background: #ffffff14;
}

.group-item.selected {
  color: var(--primary);
  background: #22d3ee1a;
}

.tabs-container {
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  position: relative;
}

.tabs-scroll-area {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: none;
  mask-image: none;
}

.tabs-scroll-area[data-mask-left="true"][data-mask-right="true"] {
  -webkit-mask-image: linear-gradient(to right, #0000, #000 40px calc(100% - 40px), #0000);
  mask-image: linear-gradient(to right, #0000, #000 40px calc(100% - 40px), #0000);
}

.tabs-scroll-area[data-mask-left="true"][data-mask-right="false"] {
  -webkit-mask-image: linear-gradient(to right, #0000, #000 40px, #000);
  mask-image: linear-gradient(to right, #0000, #000 40px, #000);
}

.tabs-scroll-area[data-mask-left="false"][data-mask-right="true"] {
  -webkit-mask-image: linear-gradient(to right, #000, #000 calc(100% - 40px), #0000);
  mask-image: linear-gradient(to right, #000, #000 calc(100% - 40px), #0000);
}

.tabs {
  white-space: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  gap: 4px;
  padding: 4px 0;
  display: flex;
  overflow-x: auto;
}

.tabs:after {
  content: "";
  flex: 0 0 16px;
}

.tabs:active {
  cursor: grabbing;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.group-manage-list {
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.group-manage-item {
  border: 1px solid var(--border);
  background: #ffffff08;
  border-radius: 12px;
  align-items: center;
  gap: 12px;
  padding: 8px;
  display: flex;
}

.group-manage-item:hover {
  border-color: var(--primary);
  background: #ffffff0f;
}

.group-manage-item.selected {
  border-color: var(--primary);
  background: #22d3ee1a;
}

.group-manage-item.selected .checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.group-rename-input {
  font-weight: 500;
  box-shadow: none !important;
  background: none !important;
  border: none !important;
}

.group-rename-input:focus {
  background: #ffffff0d !important;
}

.drag-handle:active {
  cursor: grabbing;
}

.add-group-btn {
  border: 1px dashed var(--border);
  background: #ffffff0d;
  border-radius: 8px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  transition: all .2s;
  display: flex;
}

.add-group-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.add-group-row-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: #ffffff0d !important;
}

.tabs-nav-btn {
  border: 1px solid var(--border);
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: #ffffff14;
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  transition: all .2s;
  display: flex;
}

.tabs-nav-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.tabs-nav-btn.disabled {
  opacity: .4;
  pointer-events: none;
}

.tabs-fixed {
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  display: inline-flex;
}

.group-selector-popup {
  box-shadow: 0 10px 25px -5px #0000004d, 0 8px 10px -6px #0000004d;
  background: #0f172af2 !important;
}

@media (max-width: 768px) {
  .tabs-container {
    width: 100%;
    margin-bottom: 8px;
  }

  .tabs {
    max-width: none !important;
  }
}

.user-menu-container, .user-menu-trigger {
  position: relative;
}

.user-avatar-small {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #05263b;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
}

.user-menu-dropdown {
  z-index: 100;
  background: #0f172af2;
  min-width: 200px;
  padding: 8px;
  position: fixed;
  top: 76px;
  right: 16px;
  box-shadow: 0 10px 25px -5px #00000080;
}

.user-menu-header {
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  display: flex;
}

.user-avatar-large {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #05263b;
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
}

.user-info {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.user-email {
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.user-status {
  color: var(--success);
  font-size: 11px;
}

.user-menu-divider {
  background: var(--border);
  height: 1px;
  margin: 4px 0;
}

.user-menu-item {
  width: 100%;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 10px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  transition: all .2s;
  display: flex;
}

.user-menu-item:hover {
  background: #ffffff14;
}

.user-menu-item.danger {
  color: var(--danger);
}

.user-menu-item.danger:hover {
  background: #f871711a;
}

.login-modal {
  max-width: 400px !important;
}

.login-message {
  border-radius: 10px;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
}

.login-message.error {
  color: var(--danger);
  background: #f8717126;
  border: 1px solid #f871714d;
}

.login-message.success {
  color: var(--success);
  background: #34d39926;
  border: 1px solid #34d3994d;
}

.button.secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: none;
}

.button.secondary:hover {
  border-color: var(--muted);
  box-shadow: none;
  background: #ffffff0d;
}

@media (max-width: 640px) {
  .user-menu-header {
    padding: 16px 8px;
  }

  .user-menu-item {
    padding: 14px 12px;
    font-size: 15px;
  }

  .login-modal {
    margin: 16px;
    max-width: 100% !important;
  }
}

/*# sourceMappingURL=app_globals_71f961d1.css.map*/