*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    background:#0d0f14;
    color:#fff;
}

a{
    text-decoration:none;
    color:inherit;
}

/* container */

.container{
    width:min(1120px,calc(100% - 32px));
    margin:0 auto;
}

/* header */

.site-header{
    position:sticky;
    top:0;
    z-index:20;
    background:rgba(10,12,18,.94);
    backdrop-filter:blur(8px);
    border-bottom:1px solid #242938;
}

.header-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    padding:16px 0;
}

/* branding */

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

.site-logo{
    height:36px;
    width:auto;
    object-fit:contain;
}

.brand-name{
    font-size:1.35rem;
    font-weight:800;
}

.brand-tag{
    color:#b7bfd1;
    font-size:.9rem;
}

/* navigation */

.nav-links{
    display:flex;
    gap:16px;
    flex-wrap:wrap;
}

.nav-links a{
    color:#dfe5f1;
    font-weight:600;
}

.nav-links a:hover{
    color:#fff;
}

/* hero */

.hero{
    background:linear-gradient(180deg,#131925 0%,#0d0f14 100%);
    text-align:center;
    padding:64px 0 36px;
}

.hero h1{
    font-size:clamp(2.2rem,5vw,4rem);
    margin:0 0 12px;
}

.hero p{
    margin:0;
    color:#c1c9da;
}

.hero-lead{
    font-size:1.15rem;
    font-weight:700;
    color:#fff;
}

.hero-desc{
    max-width:860px;
    margin:14px auto 0;
}

.hero-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:22px;
    justify-content:center;
}

/* buttons */

.button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:none;
    border-radius:12px;
    padding:12px 16px;
    font-weight:700;
    cursor:pointer;
    transition:transform .18s ease,box-shadow .18s ease;
}

.button:hover{
    transform:translateY(-1px);
}

.button.primary{
    background:#df2a2a;
    color:#fff;
    box-shadow:0 8px 22px rgba(223,42,42,.35);
}

.button.secondary{
    background:#242b3b;
    color:#fff;
}

.button.danger{
    background:#7d2222;
    color:#fff;
}

.button.full{
    width:100%;
}

/* page wrap */

.page-wrap{
    padding:32px 0;
}

/* cards + boxes */

.content-box,
.stat-box,
.auth-box,
.card-item,
.empty-state{
    background:#151a24;
    border:1px solid #252c3c;
    border-radius:18px;
    padding:18px;
}

/* authentication pages */

.auth-shell{
    min-height:calc(100vh - 95px);
    display:grid;
    place-items:center;
    padding:24px;
}

.auth-box{
    width:min(520px,100%);
}

/* forms */

label{
    font-weight:700;
}

input,
textarea,
select{
    width:100%;
    padding:12px 14px;
    border-radius:12px;
    border:1px solid #2a3142;
    background:#0d0f14;
    color:#fff;
}

textarea{
    resize:vertical;
}

.form-grid{
    display:grid;
    gap:12px;
}

/* alerts */

.alert{
    border-radius:14px;
    padding:12px 14px;
    margin:14px 0;
}

.alert.success{
    background:#203223;
    border:1px solid #2e4f35;
    color:#dbffe0;
}

.alert.error{
    background:#3a2020;
    border:1px solid #5a2a2a;
    color:#ffd6d6;
}

/* dashboard stats */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:16px;
    margin:18px 0 0;
}

.stat-box strong{
    display:block;
    font-size:2rem;
}

.stat-box span{
    display:block;
    color:#b7bfd1;
    margin-top:6px;
}

/* card list */

.table-like{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:18px;
}

.table-row{
    display:grid;
    grid-template-columns:90px 1fr auto;
    gap:16px;
    align-items:center;
    padding:16px;
    background:#111620;
    border:1px solid #252c3c;
    border-radius:14px;
    box-shadow:0 4px 14px rgba(0,0,0,.18);
    transition:transform .15s ease,box-shadow .15s ease;
}

.table-row:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 24px rgba(0,0,0,.28);
}

/* card thumbnail */

.thumb{
    width:90px;
    height:90px;
    object-fit:cover;
    border-radius:12px;
    background:#0d0f14;
    border:1px solid #2a3142;
}

/* card tags */

.card-meta{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:12px;
}

.pill{
    display:inline-block;
    background:#232a3a;
    color:#e6ebf6;
    border-radius:999px;
    padding:6px 10px;
    font-size:.82rem;
    font-weight:600;
}

/* card actions */

.card-actions{
    margin-top:12px;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.comp-button,
.value-button,
.edit-button,
.delete-button{
    display:inline-block;
    padding:8px 12px;
    color:#fff;
    text-decoration:none;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    transition:transform .15s ease,opacity .15s ease,background .15s ease;
}

.comp-button:hover,
.value-button:hover,
.edit-button:hover,
.delete-button:hover{
    transform:translateY(-1px);
    opacity:.95;
}

.comp-button{
    background:#111827;
}

.comp-button:hover{
    background:#c1121f;
    color:#fff;
}

.value-button{
    background:#0f766e;
}

.value-button:hover{
    background:#115e59;
    color:#fff;
}

.edit-button{
    background:#1d4ed8;
}

.edit-button:hover{
    background:#1e40af;
    color:#fff;
}

.delete-button{
    background:#991b1b;
}

.delete-button:hover{
    background:#7f1d1d;
    color:#fff;
}

/* section headings */

.section-head h1,
.section-head h2{
    margin:0 0 8px;
}

.section-head p{
    margin:0;
    color:#b7bfd1;
}

.small-copy{
    color:#b7bfd1;
    font-size:14px;
}

/* search + filters */

.filters-form{
    margin-top:10px;
}

.filters-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:14px;
    align-items:end;
}

.filters-grid label{
    display:block;
    margin-bottom:6px;
    font-size:14px;
    font-weight:600;
}

.filters-grid input,
.filters-grid select{
    width:100%;
    padding:10px 12px;
    border:1px solid #2a3142;
    border-radius:8px;
    font-size:14px;
    box-sizing:border-box;
    background:#0d0f14;
    color:#fff;
}

/* stacked forms */

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

.stack-form input,
.stack-form textarea,
.stack-form select{
    width:100%;
    padding:10px 12px;
    border:1px solid #2a3142;
    border-radius:8px;
    font-size:14px;
    box-sizing:border-box;
    background:#0d0f14;
    color:#fff;
}

/* charts */

.chart-wrap{
    position:relative;
    width:100%;
    min-height:320px;
    margin-top:18px;
}

.chart-wrap canvas{
    width:100% !important;
    max-width:100%;
}

/* footer */

.site-footer{
    margin-top:60px;
    padding:20px;
    border-top:1px solid #333;
    text-align:center;
}

.footer-links{
    margin-top:10px;
}

.footer-links a{
    margin:0 10px;
    color:#aaa;
    text-decoration:none;
}

.footer-links a:hover{
    color:#fff;
}

/* utility */

.profit-positive{
    color:#4be37a;
}

.profit-negative{
    color:#ff6b6b;
}

/* responsive */

@media (max-width:860px){
    .header-row{
        flex-direction:column;
        align-items:flex-start;
    }

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

    .table-row{
        grid-template-columns:1fr;
    }

    .thumb{
        width:100%;
        max-width:120px;
        height:auto;
        aspect-ratio:1 / 1;
    }
}