/* ── Brand Colors
   Primary  : #0052CC  (MakroPOS Blue)
   Secondary: #F97316  (MakroPi Orange)
   Dark bg  : #1c2333
   Surface  : #f0f2f5
─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0; padding: 0;
    background: #f0f2f5;
    color: #1a1f36;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Blazor error ─────────────────────────────── */
#blazor-error-ui {
    background: #c82333; bottom: 0; display: none;
    left: 0; padding: 0.5rem 1rem; position: fixed;
    width: 100%; z-index: 9999; color: white; font-size: 0.875rem;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* ── Sidebar ──────────────────────────────────── */
.rz-sidebar {
    background: #0d1b2e !important;
    border-right: none !important;
    transition: width 0.2s ease !important;
    overflow: hidden !important;
}

.rz-sidebar .rz-panel-menu { padding: 0.25rem 0 1rem; }

.rz-panel-menu-item > a,
.rz-panel-menu-item-link {
    color: rgba(255,255,255,.5) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    padding: 0.55rem 1.25rem !important;
    border-radius: 0 !important;
    transition: all 0.15s !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    border-left: 3px solid transparent !important;
    margin: 1px 0 !important;
}

.rz-panel-menu-item > a:hover,
.rz-panel-menu-item-link:hover {
    background: rgba(255,255,255,.06) !important;
    color: rgba(255,255,255,.85) !important;
}

.rz-panel-menu-item-selected > a,
.rz-panel-menu-item-selected > .rz-panel-menu-item-link {
    background: rgba(249,115,22,.12) !important;
    color: #F97316 !important;
    border-left-color: #F97316 !important;
}

/* ── Header ───────────────────────────────────── */
.rz-header {
    background: #0d1b2e !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.2) !important;
    height: 56px !important;
}

/* Hamburger toggle - beyaz arka planı kaldır */
.rz-sidebar-toggle,
button.rz-sidebar-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: rgba(255,255,255,.55) !important;
}
.rz-sidebar-toggle:hover {
    background: rgba(255,255,255,.08) !important;
    color: rgba(255,255,255,.9) !important;
    border-radius: 6px !important;
}

/* ── Page body ────────────────────────────────── */
.admin-content {
    padding: 1rem;
    background: #f0f2f5;
    min-height: calc(100vh - 56px);
}

/* ── Page header ──────────────────────────────── */
.page-header {
    margin-bottom: 1rem;
}
.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1f36;
    margin: 0 0 0.125rem;
}
.page-subtitle {
    font-size: 0.8rem;
    color: #8896b3;
    margin: 0;
}

/* ── Section label ────────────────────────────── */
.section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #a0aec0;
    margin: 0 0 0.5rem;
}

/* ── Stat grid ────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border: 1px solid #eaecf0;
    transition: box-shadow .15s, transform .15s;
    cursor: default;
}
.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-1px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.175rem;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.775rem;
    color: #8896b3;
    font-weight: 500;
}

/* ── Data card wrapper ────────────────────────── */
.data-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #eaecf0;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    overflow: hidden;
}

/* ── Sidebar brand ────────────────────────────── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 1rem;
    height: 56px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 0.5rem;
    text-decoration: none;
}
.sidebar-brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}
.sidebar-brand-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}
.sidebar-brand-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #F97316;
    color: white;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin-left: auto;
}

/* ── Header internals ─────────────────────────── */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.header-brand-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.header-brand-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}
.header-brand-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #F97316;
    color: white;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}
.header-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,.15);
    margin: 0 0.25rem;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-user-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px;
    padding: 0.3rem 0.75rem 0.3rem 0.4rem;
}
.header-user-dot {
    width: 22px;
    height: 22px;
    background: #0052CC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.header-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,.85);
}

/* ── Modül grid (şube formu) ──────────────────── */
.modul-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem 0.75rem;
}
.modul-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #3d4a5c;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0.35rem;
}

/* ── Ödeme Grupları ───────────────────────────── */
.og-grup-item {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    margin: 1px 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 0.5rem;
    border-left: 3px solid transparent;
}
.og-grup-item:hover {
    background: #f3f4f6;
}
.og-grup-secili {
    background: rgba(249,115,22,.08) !important;
    border-left-color: #F97316 !important;
}
.og-grup-secili .stat-label,
.og-grup-secili div[style*="color:#8896b3"] {
    color: #c2410c !important;
}
.og-form-panel {
    padding: 0.75rem;
    background: #f8f9fb;
    border-bottom: 1px solid #eaecf0;
}

/* ── Login ────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0d1b2e 0%, #0a3060 60%, #1a4a8a 100%);
}
.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.25rem 2rem;
    width: 360px;
    box-shadow: 0 32px 80px rgba(0,0,0,.35);
}
.login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}
.login-brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    display: block;
}
.login-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0052CC;
    letter-spacing: -0.3px;
}
.login-brand-sub {
    font-size: 0.8rem;
    color: #8896b3;
    margin-top: 0.125rem;
}
.login-btn {
    background: #0052CC !important;
    border-color: #0052CC !important;
}
.login-btn:hover {
    background: #003d99 !important;
}
