@import url('https://fonts.cdnfonts.com/css/aktiv-grotesk-cd-trial');

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

body {
    font-family: aktiv-grotesk, sans-serif;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    font-variation-settings: normal;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

a{
    color: var(--link-color);
    cursor: pointer;
    text-decoration: none;
}

a:not(.no-decoration){
    text-decoration: underline;
}

a:hover{
    color: var(--text-secondary);
}

        /* Main Content */
        .main-content {
            margin-top: 44px;
            padding: 24px;
            margin-left: 0;
            transition: margin-left 0.3s ease;
        }

        .sidebar.open ~ .main-content {
            margin-left: var(--sidebar-width);
        }

        .page-header {
            margin-left: 3rem;
        }

        .page-title {
            color: var(--page-title);
            font-size: 22px;
            font-weight: 500;
        }

        .portfolio-stats {
            display: flex;
            gap: 32px;
            align-items: center;
            margin-bottom: 16px;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
        }

        .stat-value {
            font-size: 24px;
            font-weight: 600;
        }

        .stat-change {
            font-size: 14px;
            margin-top: 2px;
        }

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

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

        .stat-label {
            font-size: 12px;
            color: var(--text-tertiary);
            margin-top: 4px;
        }

        .stat-sublabel {
            font-size: 11px;
            color: var(--text-tertiary);
        }

        /* Tabs */
        .tabs-header {
            display: flex;
            gap: 2rem;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 24px;
        }

        .tab-link {
            padding: 12px 0;
            font-size: 14px;
            color: var(--text-secondary);
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.2s;
        }

        .tab-link:hover {
            color: var(--text-primary);
        }

        .tab-link.active {
            color: var(--text-primary);
            border-bottom-color: var(--accent-blue);
        }

        .tab-panel:not(.active){
            display: none;
        }

        /*.tab-panel.active{*/
        /*    display: block;*/
        /*}*/

        /* Toolbar */
        .toolbar {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            margin-bottom: 16px;
        }

        .toolbar-btn {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .toolbar-btn:hover {
            background: var(--bg-hover);
        }

        /* Table */
        .table-container {
            background: var(--bg-secondary);
            overflow: hidden;
            border: 1px solid var(--border-color);
            overflow-x: scroll;

            &.sticky-table{
                overflow: auto;
                position: relative;

                thead{
                    position: sticky;
                    top: 0;
                    z-index: 10;
                }

                tfoot{
                    position: sticky;
                    bottom: 0;
                    z-index: 10;
                }
            }

            &.striped{
                tbody tr:nth-child(odd) {
                    background: var(--bg-tertiary);
                }
            }

        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        thead {
            background: var(--bg-tertiary);
        }

        th {
            padding: 12px 16px;
            text-align: left;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border-color);
        }

        th.sortable {
            cursor: pointer;
            user-select: none;
        }

        th.sortable:hover {
            color: var(--text-primary);
        }

        td {
            padding: 12px 16px;
            font-size: 13px;
            border-bottom: 1px solid var(--border-color);
        }

        tr:last-child td {
            border-bottom: none;
        }

        tbody tr {
            transition: background 0.2s;
        }

        tbody tr:hover {
            background: var(--bg-hover);
        }

        tfoot{
            background: var(--bg-tertiary);
        }

        .ticker-cell {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .expand-icon {
            cursor: pointer;
            color: var(--text-tertiary);
        }

        .ticker-symbol {
            font-weight: 600;
            color: var(--text-primary);
        }

        .company-name {
            color: var(--text-secondary);
        }

        .flag-icon {
            width: 20px;
            height: 14px;
            border-radius: 2px;
        }

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

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

        .neutral {
            color: var(--text-secondary);
        }

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

        /* Search Section */
        .search-section {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 24px;
        }

        .search-section-title {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }

        .search-item {
            display: flex;
            align-items: center;
            padding: 8px 12px;
            background: var(--bg-tertiary);
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.2s;
        }

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

        .search-item-symbol {
            font-weight: 600;
            margin-right: 8px;
        }

        .search-item-name {
            font-size: 12px;
            color: var(--text-secondary);
        }

        /* Scrollbar Styles */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg-secondary);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--bg-tertiary);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--bg-hover);
        }


.text-bold {
    font-weight: bold;
}

.text-left {
    text-align: left;
}

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

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

.capitalize{
    text-transform: capitalize;
}
.uppercase {
    text-transform: uppercase;
}

.error{
    color: var(--accent-red) !important;
}

.text-red, .text-red-500,.error-message {
    color: var(--accent-red) !important;
}

.text-green{
    color: var(--accent-green) !important;
}

.text-blue{
    color: var(--info-color) !important;
}

.text-gray{
    color: var(--text-tertiary) !important;
}

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

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

.text-link-fg {
    color: var(--link-fg);
}

.text-white {
    color: white;
}

.text-inline {
    display: inline;
}

.nowrap,.text-nowrap {
    text-wrap: nowrap;
}

.bg-buy{
    background-color: var(--buy-color) !important;
    color: white;
}

.bg-sell{
    background-color: var(--sell-color) !important;
    color: white;
}

.text-buy{
    color: var(--buy-color) !important;
}

.text-sell{
    color: var(--sell-color) !important;
}

.bg-red{
    background-color: var(--accent-red) !important;
}

.bg-green{
    background-color: var(--accent-green) !important;
}

.text-sm {
    font-size: 0.75rem; /* 14px */
    line-height: 1rem; /* 20px */
}

.hidden{
    display: none;
}

.h-full {
    height: 100% !important;
}

.w-full:not(select.tom-select) {
    width: 100% !important;
}

.w-70 {
    width: 70% !important;
}

.w-50 {
    width: 50% !important;
}

.w-34 {
    width: 34% !important;
}

/* margin */
.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.my-2 {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.my-1 {
    margin-top: 0.16rem !important;
    margin-bottom: 0.16rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.p-4{margin:1rem !important}

.px-2 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

        /** flex */

.flex {
    display: flex;
    width: 100%;
}

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

.flex-grow{
    flex-grow: 1;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

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

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: end;
}

.items-center {
    align-items: center;
}

.item-start {
    align-items: start;
}

.item-end {
    align-items: end;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 1.5rem;
}

[class^="column-"],
[class*=" column-"] {
    display: grid;
    gap: 1rem;
    align-items: start;
}

.column-2{
    grid-template-columns: repeat(2, 1fr);
}
.column-3{
    grid-template-columns: repeat(3, 1fr);
}
.column-4{
    grid-template-columns: repeat(4, 1fr);
}
.column-2-1{
    grid-template-columns: 2fr 1fr;
}

/* Responsive */
@media (max-width: 768px) {

    .main-content {
        margin-left: 0;
    }

    .portfolio-stats {
        flex-wrap: wrap;
    }

    .trial-notice {
        display: none;
    }
}

input[type="checkbox"] {
  accent-color: #e1e1e1; /* Modern blue checkbox */
  /*width: 20px;*/
  /*height: 20px;*/
}

label:has(input[type="checkbox"]){
    display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

/*input[type="checkbox"]:checked {*/
/*  background-color: #3b82f6;*/
/*  border-color: #3b82f6;*/
/*}*/

/*input[type="checkbox"]:checked::after {*/
/*  content: "";*/
/*  position: absolute;*/
/*  left: 5px;*/
/*  top: 1px;*/
/*  width: 5px;*/
/*  height: 10px;*/
/*  border: solid white;*/
/*  border-width: 0 2px 2px 0;*/
/*  transform: rotate(45deg);*/
/*}*/

.highcharts-credits{display: none}

.highcharts-background{fill: transparent}

.centered-container{
    display: flex;
    flex-direction: column;
    margin: 0 auto 20px;
    max-width: 900px;
    width: 100%;
}

/* ========================================
   BADGE STYLES
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 0.375rem; /* rounded-md */
  padding-left: 0.5rem; /* px-2 */
  padding-right: 0.5rem; /* px-2 */
  padding-top: 0.25rem; /* py-1 */
  padding-bottom: 0.25rem; /* py-1 */
  font-size: 0.75rem; /* text-xs */
  line-height: 1rem;
  font-weight: 500; /* font-medium */
  box-shadow: 0 0 0 1px inset; /* ring-1 ring-inset */
  white-space: nowrap;
}

/* Default Badge */
.badge.default {
  background-color: #f9fafb; /* bg-gray-50 */
  color: #4b5563; /* text-gray-600 */
  box-shadow: 0 0 0 1px rgba(107, 114, 128, 0.1) inset; /* ring-gray-500/10 */
}

/* Success Badge */
.badge.success {
  background-color: #f0fdf4; /* bg-green-50 */
  color: #15803d; /* text-green-700 */
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2) inset; /* ring-green-600/20 */
}

/* Pending Badge */
.badge.pending {
  background-color: #fefce8; /* bg-yellow-50 */
  color: #a16207; /* text-yellow-700 */
  box-shadow: 0 0 0 1px rgba(202, 138, 4, 0.2) inset; /* ring-yellow-600/20 */
}

/* Info Badge */
.badge.info {
  background-color: #eff6ff; /* bg-blue-50 */
  color: #1d4ed8; /* text-blue-700 */
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2) inset; /* ring-blue-600/20 */
}

/* Warning & Danger Badge */
.badge.warning,
.badge.danger {
  background-color: #fef2f2; /* bg-red-50 */
  color: #b91c1c; /* text-red-700 */
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2) inset; /* ring-red-600/20 */
}

/* ========================================
   DARK MODE BADGE STYLES
   ======================================== */

[data-theme="dark"] .badge.default {
  background-color: rgba(75, 85, 99, 0.2); /* Darker gray background */
  color: #d1d5db; /* Lighter gray text */
  box-shadow: 0 0 0 1px rgba(156, 163, 175, 0.2) inset;
}

[data-theme="dark"] .badge.success {
  background-color: rgba(16, 185, 129, 0.1); /* Darker green background */
  color: #34d399; /* Lighter green text */
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3) inset;
}

[data-theme="dark"] .badge.pending {
  background-color: rgba(245, 158, 11, 0.1); /* Darker yellow background */
  color: #fbbf24; /* Lighter yellow text */
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3) inset;
}

[data-theme="dark"] .badge.info {
  background-color: rgba(59, 130, 246, 0.1); /* Darker blue background */
  color: #60a5fa; /* Lighter blue text */
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3) inset;
}

[data-theme="dark"] .badge.warning,
[data-theme="dark"] .badge.danger {
  background-color: rgba(239, 68, 68, 0.1); /* Darker red background */
  color: #f87171; /* Lighter red text */
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3) inset;
}

/* ========================================
   BADGE SIZES
   ======================================== */

.badge-sm {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  font-size: 0.625rem;
  line-height: 0.875rem;
}

.badge-lg {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* ========================================
   BADGE WITH ICON
   ======================================== */

.badge-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.badge-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

/* ========================================
   BADGE WITH DOT
   ======================================== */

.badge-with-dot::before {
  content: '';
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  margin-right: 0.375rem;
  flex-shrink: 0;
}

.badge.default.badge-with-dot::before {
  background-color: #6b7280; /* gray-500 */
}

.badge.success.badge-with-dot::before {
  background-color: #16a34a; /* green-600 */
}

.badge.pending.badge-with-dot::before {
  background-color: #ca8a04; /* yellow-600 */
}

.badge.info.badge-with-dot::before {
  background-color: #2563eb; /* blue-600 */
}

.badge.warning.badge-with-dot::before,
.badge.danger.badge-with-dot::before {
  background-color: #dc2626; /* red-600 */
}

/* ========================================
   BADGE PILL (Rounded Full)
   ======================================== */

.badge-pill {
  border-radius: 9999px;
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

/* ========================================
   BADGE OUTLINE (No Background)
   ======================================== */

.badge-outline.default {
  background-color: transparent;
  color: #6b7280;
  box-shadow: 0 0 0 1px #6b7280 inset;
}

.badge-outline.success {
  background-color: transparent;
  color: #16a34a;
  box-shadow: 0 0 0 1px #16a34a inset;
}

.badge-outline.pending {
  background-color: transparent;
  color: #ca8a04;
  box-shadow: 0 0 0 1px #ca8a04 inset;
}

.badge-outline.info {
  background-color: transparent;
  color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb inset;
}

.badge-outline.warning,
.badge-outline.danger {
  background-color: transparent;
  color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626 inset;
}

/* ========================================
   BADGE REMOVABLE (With Close Button)
   ======================================== */

.badge-removable {
  padding-right: 0.25rem;
}

.badge-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
  padding: 0.125rem;
  border-radius: 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-remove-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .badge-remove-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.badge-remove-btn svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* ========================================
   BADGE GROUP
   ======================================== */

.badge-group {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

/* ========================================
   BADGE TRANSITIONS
   ======================================== */

.badge {
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* ========================================
   BADGE CLICKABLE
   ======================================== */

.badge-clickable {
  cursor: pointer;
  user-select: none;
}

.badge-clickable:hover {
  opacity: 0.9;
}

.badge-clickable:active {
  transform: translateY(0);
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


    .filter-toolbar{
        label{
            color: var(--text-secondary);
        }
        input, select {
            background-color: var(--bg-primary);
            border: 1px solid var(--border-color);
            outline: none;
            padding: .25rem;
            color: var(--text-color);
        }
    }

    .summary-strip {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0;
        background: var(--bg-primary);
        margin: 24px 32px;
        /*border-radius: 1rem;*/
        overflow: hidden;
        box-shadow: var(--shadow);
    }

    .scard {
        padding: 18px 20px;
        border-right: 1px solid #2a2a2a;
        position: relative;
    }

    .scard-label{
        font-size: 0.6rem;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: #888;
        margin-bottom: 6px;
    }

    .scard-val.buy {
        color: var(--accent-green);
    }

    .scard-val.sell {
        color: var(--accent-red);
    }

    .scard-val.acc {
        color: var(--accent-blue);
    }

    .scard-val.gold {
        color: var(--warning-color);
    }

    .scard-val {
        font-size: 1.55rem;
        font-weight: 700;
        color: #fff;
        line-height: 1;
    }

    .scard-sub {
        font-size: 0.68rem;
        color: #666;
        margin-top: 4px;
    }

    [data-controller="data-table"]{
        /* Sorting icons container */
        .sort-icon {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          margin-left: 0.175rem;
          height: 1.25rem;
          opacity: 0.2;
          transition: all 0.2s ease;
          font-family: system-ui, -apple-system, sans-serif;
        }

        .sort-icon:hover {
          opacity: 0.4;
          background-color: rgba(0, 0, 0, 0.05);
        }

        /* Active sort state */
        th.asc .sort-icon,
        th.desc .sort-icon {
          opacity: 1;
          background-color: rgba(59, 130, 246, 0.1);
          color: var(--accent-blue);
        }

        /* Icon inside the container */
        .sort-icon-inner {
          font-size: 0.875rem;
          line-height: 1;
          transition: transform 0.2s ease, opacity 0.2s ease;
        }

        /* Hover effect for better discoverability */
        th:hover .sort-icon {
          opacity: 0.4;
        }

        /* Make headers with icons look clean */
        th {
          position: relative;
          transition: background-color 0.2s ease;
            text-wrap-mode: nowrap;
        }

        /* Visual feedback on click */
        th:active {
          background-color: rgba(0, 0, 0, 0.02);
        }

        th, td{
            border: 1px solid var(--border-color);
        }
    }