.material-symbols-outlined{
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
}

.font-data-mono {
    font-family: 'JetBrains Mono', monospace;
}

.container-max{ max-width: 1440px; }

::-webkit-scrollbar{ width:6px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: var(--outline-variant); border-radius: 10px; }

/* ===== Header ===== */

.btn-primary-custom{
    background-color: var(--primary);
    color: var(--on-primary);
    border:none;
    border-radius: var(--radius-lg);
    padding:8px 20px;
    font-size:12px; font-weight:600; letter-spacing:0.05em;
    transition: all .15s ease;
}
.btn-primary-custom:hover{ background-color: var(--primary-container); color:#fff; }
.btn-primary-custom:active{ transform: scale(0.95); }

/* ===== Form elements ===== */
.form-label-custom{
    font-size:11px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase;
    color: var(--on-surface-variant);
    margin-bottom:.5rem;
    display:block;
}
.form-control-custom, .form-select-custom{
    background-color: var(--surface-container-low);
    border:1px solid rgba(189,202,186,0.5);
    border-radius: var(--radius-lg);
    padding:10px 16px;
    font-size:14px;
    width:100%;
}
.form-select-custom {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
}
.form-control-custom:focus, .form-select-custom:focus{
    outline:none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,107,44,0.15);
}

/* ===== Cards ===== */
.section-card{
    background: var(--surface);
    border-radius: var(--radius-2xl);
    border:1px solid rgba(189,202,186,0.3);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.gold-converter-card {
    background: var(--surface);
    border:1px solid rgba(189,202,186,0.3);
    border-radius: var(--radius-2xl);
    padding:1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.alert-info-custom {
    background-color: var(--surface-container-low);
    border: 1px solid rgba(189,202,186,0.5);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.swap-btn {
    background-color: var(--surface-container-low);
    border: 1px solid rgba(189,202,186,0.5);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.swap-btn:hover {
    background-color: rgba(0,107,44,0.1);
    border-color: var(--primary);
}
.swap-btn.rotated {
    transform: rotate(180deg);
}

/* ===== Timeframe Toggle ===== */
.timeframe-toggle{
    display:flex;
    background-color: var(--surface-container-low);
    border-radius: var(--radius-lg);
    padding:4px;
    border:1px solid rgba(189,202,186,0.2);
}
.timeframe-btn{
    padding:6px 16px;
    font-size:11px; font-weight:700;
    border-radius: var(--radius-lg);
    border:none;
    background:transparent;
    color: var(--on-surface-variant);
    transition: all .15s ease;
}
.timeframe-btn:hover{ background-color:#fff; }
.timeframe-btn.active{
    background-color:#fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    color: var(--primary);
}

/* ===== Tables ===== */
.table-custom{ width:100%; text-align:left; }
.table-custom thead tr{
    background-color: rgba(242,244,246,0.5);
    font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em;
    color: var(--on-surface-variant);
    opacity:.8;
}
.table-custom th{ padding:1rem 1rem; }
.table-custom th:first-child{ padding-left:1.5rem; }
.table-custom td{ padding:1rem; vertical-align:middle; }
.table-custom td:first-child{ padding-left:1.5rem; }
.table-custom tbody tr{
    border-top:1px solid rgba(189,202,186,0.2);
    transition: background-color .2s ease, transform .2s ease;
}
.table-custom tbody tr:hover{ background-color: rgba(0,107,44,0.02); }

.trend-icon{
    width:32px; height:32px; border-radius:50%;
    display:inline-flex; align-items:center; justify-content:center;
}
.trend-up{ background-color: rgba(22,163,74,0.1); color: var(--success); }
.trend-flat{  color: var(--on-surface-variant); }
.trend-down{ background-color: rgba(186,26,26,0.1); color: var(--error); }

/* ===== Sidebar ===== */
.sidebar{ width:100%; }
@media (min-width:992px){ .sidebar{ width:340px; flex-shrink:0; } }

.terminal-promo{
    position:relative; border-radius: var(--radius-2xl); overflow:hidden;
    aspect-ratio: 4/3; cursor:pointer;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border:1px solid rgba(189,202,186,0.3);
}
.terminal-promo-bg{
    position:absolute; inset:0; background-size:cover; background-position:center;
    transition: transform .7s ease;
}
.terminal-promo:hover .terminal-promo-bg{ transform: scale(1.1); }
.terminal-promo-overlay{
    position:absolute; inset:0;
    background: linear-gradient(to top, var(--primary), rgba(0,107,44,0.4), transparent);
}
.terminal-promo-content{
    position:absolute; inset:0; padding:1.5rem;
    display:flex; flex-direction:column; justify-content:flex-end;
    color:#fff;
}
.btn-upgrade{
    display:inline-flex; align-items:center; gap:.5rem;
    background:#fff; color: var(--primary);
    padding:8px 16px; border-radius: var(--radius-lg);
    font-size:12px; font-weight:700; width:fit-content;
    transition: background-color .15s ease;
    text-decoration:none;
}
.btn-upgrade:hover{ background-color: var(--primary-fixed); color: var(--primary); }


/* ===== Mobile Bottom Nav ===== */
.mobile-bottom-nav{
    display:flex;
    position:fixed; bottom:0; left:0; right:0;
    background-color: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top:1px solid rgba(189,202,186,0.3);
    z-index:1050;
    padding:1rem 1.5rem;
    justify-content:space-between;
    align-items:center;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.05);
}
@media (min-width:768px){ .mobile-bottom-nav{ display:none; } }
.mobile-nav-link{
    display:flex; flex-direction:column; align-items:center; gap:.25rem;
    color: var(--on-surface-variant);
    text-decoration:none;
}
.mobile-nav-link.active{ color: var(--primary); }
.mobile-nav-link span.label{
    font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:-0.03em;
}

/* Card */
.section-card {
    background: var(--surface);
    border: 1px solid rgba(189, 202, 186, 0.3);
    border-radius: var(--radius-2xl);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Table */
/* ===========================
   TABLE
=========================== */

.table-custom {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Prevents table from growing wider than parent */
    text-align: left;
}

.table-custom thead tr {
    background: rgba(242, 244, 246, 0.5);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--on-surface-variant);
    opacity: .8;
}

.table-custom th,
.table-custom td {
    padding: 1rem;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-custom th:first-child,
.table-custom td:first-child {
    padding-left: 1.5rem;
}

.table-custom tbody tr {
    border-top: 1px solid rgba(189, 202, 186, .2);
    transition: background-color .2s ease;
}

.table-custom tbody tr:hover {
    background: rgba(0, 107, 44, .02);
}

.font-data-mono {
    font-family: "JetBrains Mono", monospace;
}

/* ===========================
   RESPONSIVE
=========================== */

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

    .table-custom th,
    .table-custom td {
        padding: .75rem .5rem;
    }

    .table-custom th:first-child,
    .table-custom td:first-child {
        padding-left: .75rem;
    }
}

/* Phones */
@media (max-width:480px) {

    .table-custom {
        table-layout: fixed;
    }

    .table-custom thead th {
        font-size: 10px !important;
    }

    .table-custom tbody {
        font-size: 12px !important;
    }

    .table-custom th,
    .table-custom td {
        padding: .55rem .35rem;
    }

    .table-custom th:first-child,
    .table-custom td:first-child {
        padding-left: .5rem;
    }

    /* Quantity column */
    .table-custom th:first-child,
    .table-custom td:first-child {
        width: 34%;
    }

    /* Price columns */
    .table-custom th:nth-child(2),
    .table-custom td:nth-child(2),
    .table-custom th:nth-child(3),
    .table-custom td:nth-child(3) {
        width: 33%;
    }

    .font-sans {
        font-size: 12px !important;
    }
}

/* 320px devices */
@media (max-width:360px) {

    .table-custom thead th {
        font-size: 9px !important;
        letter-spacing: 0;
    }

    .table-custom tbody {
        font-size: 12px !important;
    }

    .table-custom th,
    .table-custom td {
        padding: .45rem .2rem;
    }

    .table-custom th:first-child,
    .table-custom td:first-child {
        padding-left: .35rem;
    }

    .font-sans {
        font-size: 11px !important;
    }
}