html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2937;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #d21e6d;
}

.btn-primary {
    color: #fff;
    background-color: #e11d80;
    border-color: #c8196f;
}
.btn-primary:hover { background-color: #c8196f; border-color: #b0145f; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 0.15rem rgba(225, 29, 128, 0.25);
  border-color: #e11d80;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Xəta baş verdi."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #e11d80;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Yüklənir");
    }

code {
    color: #c02d76;
}

/* ==================== FanSales hesabat paneli ==================== */

:root {
    --brand1: #fb923c;
    --brand2: #e11d80;
    --bar-h: 52px;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
}

.app-shell { min-height: 100vh; }

/* ---- üst zolaq ---- */
.app-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--bar-h);
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 .75rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.app-bar-title {
    font-weight: 700;
    font-size: 1.05rem;
    background: linear-gradient(45deg, var(--brand1), var(--brand2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.app-bar-spacer { flex: 1; }
.app-bar-user { font-size: .85rem; color: var(--muted); max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 8px;
    padding: .3rem .7rem;
    font-size: .82rem;
    cursor: pointer;
}
.btn-logout:hover { background: #f9fafb; }

/* ---- hamburger ---- */
.hamburger {
    width: 38px; height: 38px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 4px;
    border: none; background: transparent; cursor: pointer;
    border-radius: 8px;
}
.hamburger:hover { background: #f3f4f6; }
.hamburger span {
    display: block;
    width: 20px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* ---- çekmece (drawer) ---- */
.drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(78%, 288px);
    background: #fff;
    border-right: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    transform: translateX(-102%);
    transition: transform .22s ease;
    z-index: 50;
    overflow-y: auto;
    padding-bottom: 1rem;
}
.drawer.open { transform: translateX(0); }

.drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(17, 24, 39, .45);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
    z-index: 40;
}
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }

.drawer-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: .4rem;
}
.drawer-head img { border-radius: 8px; }
.drawer-brand { font-weight: 700; }
.drawer-sub { font-size: .78rem; color: var(--muted); }

.nav-section {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    padding: .9rem 1.1rem .3rem;
}

.drawer .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem 1.1rem;
    color: var(--ink);
    text-decoration: none;
    font-size: .95rem;
    border-left: 3px solid transparent;
}
.drawer .nav-link .ni { width: 1.3rem; text-align: center; }
.drawer .nav-link:hover { background: #f9fafb; }
.drawer .nav-link.active {
    background: #fdf2f8;
    color: var(--brand2);
    border-left-color: var(--brand2);
    font-weight: 600;
}

/* ---- məzmun ---- */
.app-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.1rem 1rem 3rem;
}
.app-content h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

/* ---- login ---- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2937, #111827);
    padding: 1rem;
}
.login-card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-card h1 {
    background: linear-gradient(45deg, var(--brand1), var(--brand2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    display: inline-block;
}

/* ---- filtr zolağı ---- */
.period-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .6rem;
    margin: 0 0 1.1rem;
    padding: .8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.pb-field { display: flex; flex-direction: column; }
.pb-field label { font-size: .72rem; color: var(--muted); margin-bottom: .15rem; }
.pb-field.pb-grow { flex: 1 1 180px; }
.pb-field input, .pb-field select { min-width: 130px; }

/* ---- KPI ---- */
.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .7rem;
    margin-bottom: 1.1rem;
}
.kpi {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .7rem .9rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.kpi span { font-size: .72rem; color: var(--muted); }
.kpi b { font-size: 1.2rem; }

/* ---- cədvəl ---- */
.table-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-wrap .table { margin: 0; }
.table thead th {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td, .table th { padding: .55rem .7rem; vertical-align: middle; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
table.clickable tbody tr { cursor: pointer; }
table.clickable tbody tr:hover { background: #fdf2f8; }
tr.row-cancelled td { text-decoration: line-through; opacity: .5; }
.badge { font-weight: 600; }

/* ---- səhifələmə ---- */
.pager {
    display: flex;
    align-items: center;
    gap: .8rem;
    justify-content: center;
    margin: 1rem 0 0;
    font-size: .85rem;
    color: var(--muted);
}

/* ---- modal ---- */
.modal-backdrop-c { position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 1050; }
.modal-c {
    position: fixed; z-index: 1060;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, calc(100vw - 1.5rem));
    max-height: calc(100vh - 2rem);
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.4);
}
.modal-c-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--line);
}
.modal-c-body { padding: 1.1rem; overflow-y: auto; }
.detail-meta {
    display: flex; flex-wrap: wrap; gap: .25rem 1.2rem;
    font-size: .85rem; color: var(--muted);
}

/* ---- ana ekran ---- */
.home-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.home-head h1 { margin: 0 0 .15rem; }
.home-date { color: var(--muted); font-size: .88rem; }
.home-datepick { width: 150px; flex: none; }

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .8rem;
    margin-bottom: .9rem;
}
.tile {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: 12px;
    padding: .9rem 1rem;
}
.tile-ic { font-size: 1.7rem; line-height: 1; }
.tile-body { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.tile-body span { font-size: .78rem; color: var(--muted); }
.tile-body b { font-size: 1.35rem; }
.tile-body small { font-size: .74rem; color: var(--muted); }
.tile-sales   { border-left-color: #16a34a; }
.tile-returns { border-left-color: #dc2626; }
.tile-cash    { border-left-color: var(--brand1); }
.tile-bank    { border-left-color: #2563eb; }

.net-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 12px;
    padding: .7rem 1.1rem;
    margin-bottom: 1.4rem;
}
.net-strip span { font-size: .85rem; color: #9d174d; }
.net-strip b { font-size: 1.2rem; color: #9d174d; }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--line);
}
.panel-head a { font-size: .82rem; text-decoration: none; }
.panel .table td { padding: .6rem 1rem; }
.rs-time { color: var(--muted); white-space: nowrap; width: 3.5rem; }
.rs-sub { font-size: .74rem; color: var(--muted); }

@media (max-width: 640px) {
    .app-content { padding-left: .7rem; padding-right: .7rem; }
    .app-content h1 { font-size: 1.15rem; }
    .kpi b { font-size: 1.05rem; }
    .table { font-size: .82rem; }
    .app-bar-user { display: none; }
    .tile-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .tile { flex-direction: column; align-items: flex-start; gap: .3rem; padding: .7rem .8rem; }
    .tile-ic { font-size: 1.3rem; }
    .tile-body b { font-size: 1.1rem; }
    .home-datepick { width: 130px; }
}
