:root{
    --bg:#111214;
    --bg-soft:#16171a;
    --surface:#1b1c20;
    --surface-2:#202227;
    --surface-3:#26292f;
    --panel:#181a1f;
    --panel-2:#202329;

    --border:rgba(255,255,255,0.08);
    --border-soft:rgba(255,255,255,0.05);

    --text:#f5f5f7;
    --text-soft:#d2d5db;
    --text-dim:#8f96a3;

    --accent:#0a84ff;
    --accent-soft:rgba(10,132,255,0.12);
    --accent-line:rgba(10,132,255,0.22);

    --green:#30d158;
    --red:#ff5c57;
    --cyan:#64d2ff;
    --yellow:#ffd60a;

    --radius-xl:24px;
    --radius-lg:18px;
    --radius-md:14px;
    --radius-sm:10px;

    --shadow-soft:0 12px 30px rgba(0,0,0,0.22);
    --shadow-elev:0 18px 50px rgba(0,0,0,0.30);

    --glass: saturate(180%) blur(18px);
}

*{
    box-sizing:border-box;
}

html,
body{
    margin:0;
    padding:0;
    min-height:100%;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.04), transparent 20%),
        linear-gradient(180deg, #101113 0%, #141518 100%);
    color:var(--text);
    font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

body{
    overflow:hidden;
}

/* ===== APP LAYOUT ===== */

.app{
    display:flex;
    flex-direction:column;
    height:100vh;
    width:100%;
}

/* ===== TOPBAR ===== */

.topbar{
    height:68px;
    display:grid;
    grid-template-columns:auto 1fr auto auto;
    align-items:center;
    gap:16px;
    padding:0 20px;
    background:rgba(24,26,31,0.86);
    backdrop-filter:var(--glass);
    -webkit-backdrop-filter:var(--glass);
    border-bottom:1px solid var(--border);
    box-shadow:0 1px 0 rgba(255,255,255,0.03);
    flex-shrink:0;
}

.logo-link{
    text-decoration:none;
    display:inline-flex;
    align-items:center;
}

.logo{
    font-size:18px;
    font-weight:700;
    letter-spacing:0.15px;
    color:#f5f5f7;
    cursor:pointer;
}

.logo span{
    color:#0a84ff;
}

.logo-link:hover .logo{
    opacity:0.95;
}

/* ===== TOPBAR CENTER ===== */

.topbar-center{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
}

/* ===== TABS ===== */

.top-tabs{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px;
    background:rgba(255,255,255,0.03);
    border:1px solid var(--border);
    border-radius:999px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.02);
}

.nav-btn{
    position:relative;
    background:transparent;
    border:none;
    color:var(--text-dim);
    padding:10px 14px;
    cursor:pointer;
    border-radius:999px;
    font-size:13px;
    font-weight:600;
    letter-spacing:0.1px;
    transition:all 0.18s ease;
}

.nav-btn:hover{
    color:var(--text-soft);
    background:rgba(255,255,255,0.04);
}

.nav-btn.active{
    color:#ffffff;
    background:linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 6px 18px rgba(0,0,0,0.18);
}

.nav-btn.active::after{
    display:none;
}

/* ===== TERMINAL BUTTON ===== */

.terminal-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:38px;
    padding:0 14px;
    background:linear-gradient(180deg, rgba(15,38,51,0.96), rgba(11,27,36,0.98));
    color:#f5f5f7;
    border:1px solid rgba(10,132,255,0.24);
    border-radius:999px;
    text-decoration:none;
    font-size:13px;
    font-weight:600;
    line-height:1;
    transition:all 0.18s ease;
    white-space:nowrap;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}

.terminal-btn:hover{
    border-color:rgba(10,132,255,0.42);
    background:linear-gradient(180deg, rgba(16,44,58,0.98), rgba(12,31,41,0.98));
    box-shadow:0 0 0 4px rgba(10,132,255,0.08);
}

/* ===== USER INFO ===== */

.user-info{
    display:flex;
    align-items:center;
    gap:10px;
    padding:6px 8px 6px 6px;
    border-radius:999px;
    background:rgba(255,255,255,0.03);
    border:1px solid var(--border);
    min-width:0;
}

.avatar{
    width:34px;
    height:34px;
    border-radius:50%;
    background:linear-gradient(180deg, #0a84ff, #0071e3);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.18);
    flex-shrink:0;
}

.username{
    font-size:13px;
    font-weight:600;
    color:var(--text);
    line-height:1.2;
}

.plan{
    font-size:11px;
    color:var(--text-dim);
    line-height:1.2;
}

/* ===== MAIN ===== */

.main{
    flex:1;
    overflow:auto;
    padding:24px;
}

/* ===== PAGES ===== */

.page{
    display:none;
    max-width:1400px;
    margin:0 auto;
}

.page.active{
    display:block;
}

.page h2{
    margin:0 0 22px;
    font-size:28px;
    font-weight:700;
    letter-spacing:-0.03em;
    color:var(--text);
}

/* ===== ANALYTICS ===== */

.analytics-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:18px;
    margin-bottom:24px;
}

.metric{
    background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    padding:22px;
    box-shadow:var(--shadow-soft);
    color:var(--text-soft);
    font-size:14px;
    font-weight:600;
}

.value{
    font-size:34px;
    font-weight:700;
    color:var(--accent);
    margin-top:8px;
    letter-spacing:-0.03em;
}

/* ===== CARD GRID ===== */

.card-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

.card{
    background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    padding:22px;
    border-radius:var(--radius-lg);
    border:1px solid var(--border);
    box-shadow:var(--shadow-soft);
}

.card h3{
    margin:0 0 16px;
    font-size:18px;
    font-weight:700;
    color:var(--text);
}

.card label{
    display:block;
    font-size:13px;
    font-weight:600;
    color:var(--text-soft);
    margin:0 0 8px;
}

/* ===== INPUTS ===== */

input,
select{
    width:100%;
    padding:12px 14px;
    margin-bottom:12px;
    background:rgba(255,255,255,0.025);
    border:1px solid var(--border);
    color:var(--text);
    border-radius:12px;
    font-size:14px;
    outline:none;
    transition:all 0.18s ease;
}

input::placeholder{
    color:var(--text-dim);
}

input:focus,
select:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 4px rgba(10,132,255,0.10);
    background:rgba(255,255,255,0.04);
}

/* ===== BUTTONS ===== */

button{
    appearance:none;
    border:none;
    outline:none;
    background:rgba(255,255,255,0.04);
    border:1px solid var(--border);
    color:var(--text-soft);
    padding:11px 14px;
    border-radius:12px;
    cursor:pointer;
    font-size:13px;
    font-weight:600;
    transition:all 0.18s ease;
}

button:hover{
    background:rgba(255,255,255,0.06);
    color:var(--text);
    border-color:rgba(255,255,255,0.12);
}

.btn-primary{
    background:linear-gradient(180deg, #0a84ff 0%, #0071e3 100%);
    color:#ffffff;
    border:none;
    box-shadow:0 10px 24px rgba(10,132,255,0.18);
}

.btn-primary:hover{
    background:linear-gradient(180deg, #2893ff 0%, #0a84ff 100%);
    color:#fff;
    box-shadow:0 12px 28px rgba(10,132,255,0.24);
}

/* ===== TABLES ===== */

.data-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    margin-top:20px;
    background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border:1px solid var(--border);
    border-radius:18px;
    overflow:hidden;
    box-shadow:var(--shadow-soft);
}

.data-table thead th{
    text-align:left;
    padding:14px 16px;
    font-size:12px;
    font-weight:700;
    color:var(--text-dim);
    text-transform:uppercase;
    letter-spacing:0.08em;
    background:rgba(255,255,255,0.02);
    border-bottom:1px solid var(--border);
}

.data-table tbody td{
    padding:14px 16px;
    border-bottom:1px solid rgba(255,255,255,0.05);
    color:var(--text-soft);
    font-size:14px;
}

.data-table tbody tr:last-child td{
    border-bottom:none;
}

.data-table tbody tr:hover{
    background:rgba(255,255,255,0.025);
}

/* ===== TRADE FORM ===== */

.trade-form{
    display:grid;
    grid-template-columns:repeat(5, minmax(0,1fr));
    gap:10px;
    margin-bottom:18px;
    align-items:start;
}

/* ===== DATA TOOLBAR ===== */

.data-toolbar{
    display:grid;
    grid-template-columns:repeat(3, minmax(180px, 1fr));
    gap:16px;
    margin:20px 0 24px;
}

.filter-card,
.calendar-card{
    background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    padding:18px;
    box-shadow:var(--shadow-soft);
}

.filter-card label{
    display:block;
    font-size:13px;
    font-weight:600;
    margin-bottom:8px;
    color:var(--text-soft);
}

.filter-card select,
.filter-card input[type="file"]{
    width:100%;
    background:rgba(255,255,255,0.025);
    border:1px solid var(--border);
    color:var(--text);
    padding:11px 12px;
    border-radius:12px;
    font-size:14px;
    outline:none;
}

.filter-card select:focus,
.filter-card input[type="file"]:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 4px rgba(10,132,255,0.10);
}

/* ===== CALENDAR ===== */

.calendar-card{
    margin-bottom:24px;
}

.calendar-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:16px;
    gap:12px;
}

.calendar-header h3{
    font-size:20px;
    font-weight:700;
    margin:0;
    color:var(--text);
    letter-spacing:-0.02em;
}

.calendar-nav-btn{
    background:rgba(255,255,255,0.04);
    border:1px solid var(--border);
    color:var(--text-soft);
    padding:9px 13px;
    border-radius:12px;
    cursor:pointer;
}

.calendar-nav-btn:hover{
    color:var(--text);
    border-color:rgba(10,132,255,0.28);
    box-shadow:0 0 0 4px rgba(10,132,255,0.08);
}

.calendar-weekdays,
.calendar-grid{
    display:grid;
    grid-template-columns:repeat(7, 1fr);
    gap:8px;
}

.calendar-weekdays{
    margin-bottom:10px;
}

.calendar-weekdays div{
    text-align:center;
    font-size:12px;
    font-weight:700;
    color:var(--text-dim);
    padding:8px 0;
    text-transform:uppercase;
    letter-spacing:0.05em;
}

.calendar-day{
    min-height:76px;
    background:rgba(255,255,255,0.02);
    border:1px solid rgba(255,255,255,0.05);
    border-radius:14px;
    padding:10px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    font-size:13px;
    color:var(--text-soft);
    transition:all 0.18s ease;
}

.calendar-day:hover{
    border-color:rgba(10,132,255,0.28);
    transform:translateY(-1px);
    background:rgba(255,255,255,0.03);
}

.calendar-day.empty{
    background:transparent;
    border:1px dashed rgba(255,255,255,0.04);
}

.calendar-day.has-data{
    background:rgba(10,132,255,0.10);
    border-color:rgba(10,132,255,0.35);
    box-shadow:inset 0 0 0 1px rgba(10,132,255,0.08);
}

.calendar-day.today{
    outline:1px solid rgba(48,209,88,0.8);
    outline-offset:0;
}

.day-count{
    font-size:11px;
    color:var(--accent);
    font-weight:700;
}

.calendar-legend{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:14px;
    font-size:13px;
    color:var(--text-dim);
    flex-wrap:wrap;
}

.legend-box{
    width:14px;
    height:14px;
    border-radius:4px;
    display:inline-block;
    margin-left:12px;
}

.has-data-box{
    background:rgba(10,132,255,0.18);
    border:1px solid rgba(10,132,255,0.45);
}

.no-data-box{
    background:rgba(255,255,255,0.02);
    border:1px solid rgba(255,255,255,0.06);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1180px){
    .topbar{
        grid-template-columns:auto 1fr;
        height:auto;
        padding:14px 18px;
    }

    .user-info{
        justify-self:end;
    }

    .topbar-center{
        grid-column:1 / -1;
        justify-content:flex-start;
    }
}

@media (max-width: 900px){
    body{
        overflow:auto;
    }

    .topbar{
        grid-template-columns:1fr;
        height:auto;
        gap:12px;
        padding:14px 16px;
    }

    .topbar-center{
        justify-content:flex-start;
    }

    .top-tabs{
        width:100%;
        overflow:auto;
        padding:4px;
    }

    .main{
        padding:16px;
    }

    .analytics-grid{
        grid-template-columns:1fr;
    }

    .card-grid{
        grid-template-columns:1fr;
    }

    .trade-form{
        grid-template-columns:1fr;
    }

    .data-toolbar{
        grid-template-columns:1fr;
    }

    .calendar-day{
        min-height:64px;
        font-size:12px;
    }
}

@media (max-width: 640px){
    .logo{
        font-size:17px;
    }

    .page{
        padding:0;
    }

    .page h2{
        font-size:24px;
        margin-bottom:18px;
    }

    .metric{
        padding:18px;
    }

    .value{
        font-size:30px;
    }

    .calendar-weekdays,
    .calendar-grid{
        gap:6px;
    }

    .calendar-day{
        padding:8px;
        min-height:58px;
    }

    .data-table thead th,
    .data-table tbody td{
        padding:12px 12px;
        font-size:13px;
    }
}
/* ===== HASHWARE LOGO ===== */

.terminal-title{
    font-family: "Inter", "SF Pro Display", system-ui;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.4px;

    color: #ffffff;

    display: inline-flex;
    align-items: center;

    white-space: nowrap;

    transition: all .2s ease;
}

/* .in highlight */

.terminal-title span{
    color: #0a84ff;

    font-weight: 900;

    margin-left: 2px;

    text-shadow:
        0 0 6px rgba(10,132,255,0.4),
        0 0 14px rgba(10,132,255,0.25);
}

/* hover effect */

.logo-link:hover .terminal-title{
    opacity: 0.9;
}

.logo-link:hover .terminal-title span{
    text-shadow:
        0 0 8px rgba(10,132,255,0.6),
        0 0 18px rgba(10,132,255,0.35);
}