html, body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* ---- Genel ---- */
.brand { font-weight: 700; letter-spacing: -.01em; }
.app-drawer { border-right: 1px solid #e5e7eb; }
.page-title { font-weight: 700; letter-spacing: -.02em; }
.muted { color: #6b7280; }
.small { font-size: .8rem; }

.card {
    border: 1px solid #e5e7eb;
    border-radius: 14px !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04) !important;
}
.card-title { font-weight: 600; font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title .n { color: #6b7280; font-weight: 500; font-size: .85rem; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.pill {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
    font-size: .75rem; font-weight: 600; white-space: nowrap; line-height: 1.6; border: 0;
}
button.pill { cursor: pointer; font-family: inherit; }
button.pill:hover { filter: brightness(.96); }
.pill.late { background: #fee2e2; color: #b91c1c; }
.pill.due { background: #eef2ff; color: #4338ca; }
.pill.urgent { background: #fee2e2; color: #b91c1c; }
.pill.firm { background: #f1f5f9; color: #334155; text-decoration: none; }
.pill.firm:hover { background: #e2e8f0; }

.pill.client { background: #ede9fe; color: #5b21b6; }

/* ---- Firma altı müşteriler ---- */
.clients { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clients .sp { flex: 1; }
.chip { border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip:hover { background: #f3f4f6; }
.chip b { font-size: .72rem; background: #e5e7eb; border-radius: 999px; padding: 0 7px; line-height: 1.6; }
.chip.on { background: #4338ca; border-color: #4338ca; color: #fff; }
.chip.on b { background: rgba(255,255,255,.25); color: #fff; }
.chip.add { border-style: dashed; color: #4338ca; }
.chip.link { border-color: transparent; background: transparent; color: #6b7280; padding: 6px 8px; }
.chip.link:hover { color: #1f2937; text-decoration: underline; background: transparent; }

/* ---- Rapor ---- */
.report-text { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .92rem; line-height: 1.7; color: #1f2937; }
.check-label { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: #374151; cursor: pointer; }

/* ---- Sol menüde firmalar ---- */
.nav-section { padding: 18px 16px 6px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9ca3af; }
.firm-nav { display: flex; flex-direction: column; padding: 0 8px 16px; }
.firm-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #374151; text-decoration: none; font-size: .9rem; }
.firm-link:hover { background: #f3f4f6; }
.firm-link.active { background: #eef2ff; color: #3730a3; font-weight: 600; }
.firm-link .firm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.firm-link .count { font-size: .72rem; font-weight: 700; background: #e5e7eb; color: #374151; border-radius: 999px; padding: 1px 8px; }
.firm-link .count.late { background: #fee2e2; color: #b91c1c; }

/* ---- Özet kartları ---- */
.stat-card .stat-label { color: #6b7280; font-size: .8rem; font-weight: 500; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat-card .stat-sub { font-size: .8rem; color: #6b7280; }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }

.firm-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 16px 18px; border-left-width: 5px; height: 100%; transition: box-shadow .15s, transform .15s; }
.firm-card:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .08); transform: translateY(-1px); }
.firm-card .name { font-weight: 700; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.firm-card .nums { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.firm-card .num span { white-space: nowrap; }
.stat-card { height: 100%; }
.firm-card .num b { display: block; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.firm-card .num span { font-size: .74rem; color: #6b7280; }
.firm-card .num.late b { color: #b91c1c; }
.firm-card .last { margin-top: 10px; font-size: .76rem; color: #9ca3af; }

/* ---- Hızlı ekleme ---- */
.quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.quick select, .quick input[type=text] {
    border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: .92rem; background: #fff; color: #1f2937;
}
.quick select { max-width: 220px; }
.quick input[type=text] { flex: 1; min-width: 200px; }
.quick select:focus, .quick input[type=text]:focus { outline: 2px solid #4338ca; outline-offset: 1px; border-color: transparent; }
.seg { display: inline-flex; border: 1px solid #d1d5db; border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 0 14px; font: inherit; font-size: .88rem; font-weight: 600; color: #6b7280; cursor: pointer; min-height: 42px; }
.seg button + button { border-left: 1px solid #d1d5db; }
.seg button.on { background: #4338ca; color: #fff; }
.quick .send { border: 0; border-radius: 10px; background: #4338ca; color: #fff; font: inherit; font-weight: 600; padding: 0 18px; cursor: pointer; min-height: 42px; }
.quick .send:hover { background: #3730a3; }
.quick .send:disabled { background: #c7d2fe; cursor: default; }

/* ---- İş satırı ---- */
.work-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #f1f3f6; }
.work-row:last-child { border-bottom: 0; }
.work-row .check {
    width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; border: 2px solid #9ca3af; background: #fff; flex-shrink: 0;
    cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; color: transparent; font-size: 13px; line-height: 1;
}
.work-row .check:hover { border-color: #059669; color: #059669; }
.work-row .check.done { background: #059669; border-color: #059669; color: #fff; }
.work-row .body { flex: 1; min-width: 0; }
.work-row .title { font-size: .94rem; font-weight: 500; cursor: pointer; word-break: break-word; }
.work-row .title:hover { color: #4338ca; }
.work-row.done .title { color: #6b7280; text-decoration: line-through; }
.work-row .details { font-size: .82rem; color: #6b7280; margin-top: 2px; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-row .result { font-size: .82rem; color: #047857; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.work-row .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.work-row .meta .when { font-size: .75rem; color: #9ca3af; }

.group-label { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #9ca3af; margin: 14px 0 2px; }
.group-label:first-child { margin-top: 0; }
.empty { color: #9ca3af; font-size: .9rem; padding: 18px 4px; text-align: center; }

/* ---- Notlar ---- */
.note { padding: 12px 14px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; margin-bottom: 10px; }
.note.pinned { background: #fef3c7; border-color: #f59e0b; }
.note .text { font-size: .92rem; white-space: pre-wrap; word-break: break-word; }
.note .foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .75rem; color: #92400e; }
.note .foot .sp { flex: 1; }
.note .foot button { border: 0; background: transparent; color: #92400e; cursor: pointer; font: inherit; font-size: .75rem; padding: 0 2px; }
.note .foot button:hover { text-decoration: underline; }

.about { white-space: pre-wrap; word-break: break-word; font-size: .9rem; color: #374151; }
.firm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.firm-head .swatch { width: 14px; height: 38px; border-radius: 6px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input[type=search] { border: 1px solid #d1d5db; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .9rem; background: #fff; min-height: 42px; }
.filters input[type=search] { flex: 1; min-width: 180px; }

/* ---- Giriş / kayıt sayfaları ---- */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 55%, #312e81 100%); padding: 24px;
}
.auth-card { background: #fff; border-radius: 18px; padding: 36px 32px; width: 100%; max-width: 440px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-card.wide { max-width: 860px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.35rem; color: #4338ca; margin-bottom: 4px; }
.auth-sub { color: #6b7280; margin-bottom: 24px; font-size: .95rem; }
.auth-card .btn-primary { background: #4338ca; border-color: #4338ca; font-weight: 600; }
.auth-card .btn-primary:hover, .auth-card .btn-primary:focus { background: #3730a3; border-color: #3730a3; }
.auth-card a { color: #4338ca; }

.validation-message { color: #dc2626; font-size: .85rem; }
.invalid { outline: 1px solid #dc2626; }

#blazor-error-ui {
    background: #fef3c7; 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: 2000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
