/**
 * Sipariş Takip — Phase 3 hardening (parity with siparis_v9_final_11.html)
 * Tailwind CDN supplements layout; core look lives here.
 */

:root {
    --bg: #f0f2f7;
    --surface: #ffffff;
    --surface2: #f4f6fb;
    --surface3: #e8ecf5;
    --border: rgba(0, 0, 0, 0.07);
    --border2: rgba(0, 0, 0, 0.13);
    --text: #1a1d2e;
    --text2: #4a5068;
    --text3: #8890aa;
    --green: #1a9e6a;
    --green-bg: rgba(26, 158, 106, 0.1);
    --blue: #2a5fd4;
    --blue-bg: rgba(42, 95, 212, 0.1);
    --amber: #c47f00;
    --amber-bg: rgba(196, 127, 0, 0.1);
    --purple: #7c5cbf;
    --purple-bg: rgba(124, 92, 191, 0.1);
    --gray-bg: rgba(100, 110, 130, 0.09);
    --red: #c0392b;
    --red-bg: rgba(192, 57, 43, 0.1);
    --orange: #d4621a;
    --orange-bg: rgba(212, 98, 26, 0.12);
    --sidebar: #1e2235;
    --radius: 10px;
    --radius-lg: 14px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
}

a,
a:any-link,
a:hover,
a:focus,
a:active,
a:visited {
    text-decoration: none;
}

.icon {
    display: inline-block;
    font-size: 1.1em;
    line-height: 1;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

.icon-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon-text > span {
    line-height: 1.3;
}

/* ——— Layout ——— */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    background: var(--sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: #e8eaf0;
    letter-spacing: -0.3px;
}

.logo-sub {
    font-size: 11px;
    color: #555a6e;
    margin-top: 2px;
    font-family: 'DM Mono', ui-monospace, monospace;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

.nav-section {
    font-size: 10px;
    color: #444a60;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 8px 10px 4px;
    text-transform: uppercase;
}

.nav-section--spaced {
    margin-top: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius);
    color: #8b90a0;
    font-size: 13px;
    transition: all 0.15s;
    margin-bottom: 1px;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #e8eaf0;
}

.nav-item.active {
    background: rgba(79, 124, 255, 0.18);
    color: #7ba4ff;
}

.nav-item--status.active {
    background: rgba(79, 124, 255, 0.18);
}

.nav-icon {
    font-size: 16px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-bottom {
    padding: 16px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-bottom-nav {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-bottom-link {
    width: 100%;
}

.add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--blue);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'DM Sans', system-ui, sans-serif;
    transition: opacity 0.15s;
    text-decoration: none;
}

.add-btn:hover {
    opacity: 0.88;
}

.main {
    margin-left: 220px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-wrap: wrap;
}

.topbar-left {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.topbar-title {
    font-size: 15px;
    font-weight: 600;
    margin-right: 8px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.content {
    padding: 24px 28px;
    flex: 1;
}

/* ——— Filters / toggles ——— */
.filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group select,
.filter-group input[type='text'] {
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-family: 'DM Sans', system-ui, sans-serif;
    outline: none;
    transition: border 0.15s;
}

.filter-group select:focus,
.filter-group input[type='text']:focus {
    border-color: var(--blue);
}

.filter-group input[type='text'] {
    width: 160px;
}

.view-toggle {
    display: flex;
    background: var(--surface2);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.view-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text2);
    font-size: 12px;
    font-family: 'DM Sans', system-ui, sans-serif;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-block;
}

.view-btn.active {
    background: var(--surface3);
    color: var(--text);
}

.konsol-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: var(--orange-bg);
    color: var(--orange);
    border: 1px solid rgba(212, 98, 26, 0.25);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: 'DM Sans', system-ui, sans-serif;
    white-space: nowrap;
    transition: all 0.15s;
    text-decoration: none;
}

.konsol-btn:hover {
    background: rgba(212, 98, 26, 0.2);
}

/* ——— Metrics ——— */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 1100px) {
    .metrics-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    transition: border-color 0.15s;
}

.metric-card:hover {
    border-color: var(--border2);
}

.metric-label {
    font-size: 11px;
    color: var(--text3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.metric-val {
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
}

.metric-sub {
    font-size: 11px;
    color: var(--text3);
}

.c-blue { color: var(--blue); }
.c-green { color: var(--green); }
.c-amber { color: var(--amber); }
.c-purple { color: var(--purple); }
.c-orange { color: var(--orange); }
.c-text { color: var(--text); }

/* ——— Cards grid ——— */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 10px;
}

.month-sep {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 2px;
}

.month-sep span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.month-sep hr {
    flex: 1;
    border: none;
    border-top: 1px solid var(--border);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
}

.card.s-vardi::before { background: var(--green); }
.card.s-uretimde::before { background: var(--blue); }
.card.s-hazir::before { background: var(--amber); }
.card.s-yolda::before { background: var(--purple); }
.card.s-cekildi::before { background: var(--text3); }

.card.s-grup::before { background: var(--orange); }

.card.s-grup {
    border-color: rgba(212, 98, 26, 0.3);
    background: #fffaf7;
}

.card.card-late-numune {
    border-color: rgba(192, 57, 43, 0.5) !important;
    background: #fff8f8 !important;
}

.card.card-late-numune::before {
    background: var(--red) !important;
}

.card:hover {
    border-color: var(--border2);
    transform: translateY(-1px);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.card-supplier {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.card-kime {
    font-size: 11px;
    color: var(--text3);
    margin-top: 2px;
}

.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.bv { background: var(--green-bg); color: var(--green); }
.bu { background: var(--blue-bg); color: var(--blue); }
.bh { background: var(--amber-bg); color: var(--amber); }
.by { background: var(--purple-bg); color: var(--purple); }
.bc { background: var(--gray-bg); color: var(--text2); }
.bo { background: var(--orange-bg); color: var(--orange); }

.card-product {
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 10px;
    line-height: 1.45;
}

.card-product-lines {
    margin-bottom: 6px;
}

.card-product-line {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
}

.card-product-totals {
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    margin-bottom: 10px;
}

.product-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.product-line-row {
    display: grid;
    grid-template-columns: 1fr 88px 32px;
    gap: 8px;
    align-items: center;
}

.product-line-name {
    min-width: 0;
}

.product-line-qty {
    text-align: center;
}

.product-line-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface2);
    color: var(--text3);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.product-line-remove:hover {
    color: var(--red);
    border-color: var(--red);
}

.product-line-remove-spacer {
    width: 32px;
    height: 32px;
}

.product-line-add {
    margin-top: 2px;
}

.card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.pill {
    font-size: 11px;
    background: var(--surface2);
    color: var(--text3);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.card-dates {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.card-note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text3);
    line-height: 1.5;
}

.card-gumruk {
    margin-top: 6px;
    font-size: 11px;
    color: var(--red);
    background: var(--red-bg);
    padding: 5px 8px;
    border-radius: 6px;
    line-height: 1.4;
}

.card-gumruk-editor {
    margin-top: 6px;
}

.customs-note-history {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
}

.customs-note-history-title {
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 8px;
}

.customs-note-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.customs-note-history-item {
    padding: 6px 0;
    border-top: 1px solid var(--border);
    line-height: 1.45;
}

.customs-note-history-item:first-child {
    border-top: none;
    padding-top: 0;
}

.customs-note-history-time {
    display: block;
    font-size: 10px;
    color: var(--text3);
    margin-bottom: 2px;
}

.customs-note-history-body {
    color: var(--text2);
    white-space: pre-wrap;
    word-break: break-word;
}

.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    gap: 6px;
    z-index: 10;
}

.card:hover .card-actions {
    display: flex;
}

.card-action-btn {
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text2);
    border-radius: 7px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
    text-decoration: none;
}

.card-action-btn .icon {
    font-size: 14px;
    vertical-align: -0.1em;
}

.card-action-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.card-action-btn.del:hover:not(:disabled) {
    color: var(--red);
    border-color: rgba(192, 57, 43, 0.3);
}

.numune-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* ——— Table ——— */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.table-wrap thead th {
    background: var(--surface2);
    color: var(--text3);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-wrap tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

.table-wrap tbody tr:last-child {
    border-bottom: none;
}

.table-wrap tbody tr:hover {
    background: var(--surface2);
}

.table-wrap td {
    padding: 10px 12px;
    color: var(--text2);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-wrap td.td-main {
    color: var(--text);
    font-weight: 500;
}

/* ——— Empty / alerts ——— */
.no-results {
    text-align: center;
    padding: 48px;
    color: var(--text3);
    font-size: 14px;
    grid-column: 1 / -1;
}

.db-warning-banner {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--amber-bg);
    border: 1px solid rgba(196, 127, 0, 0.25);
    color: var(--amber);
    font-size: 13px;
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}

.chart-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.chart-wrap {
    position: relative;
    height: 180px;
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    font-size: 13px;
    color: var(--text3);
}

#stats-view[hidden],
#stats-view .chart-wrap canvas[hidden] {
    display: none !important;
}

/* ——— Modals ——— */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

.modal--wide {
    width: 680px;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 20px;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close .icon {
    font-size: 22px;
    vertical-align: 0;
}

.card-action-btn,
.numune-btn,
.konsol-btn,
.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.modal-close:hover {
    color: var(--text);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.form-input {
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: 'DM Sans', system-ui, sans-serif;
    outline: none;
    width: 100%;
    transition: border 0.15s;
}

.form-input:focus {
    border-color: var(--blue);
}

.form-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

textarea.form-input {
    resize: vertical;
    min-height: 72px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.btn {
    padding: 9px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'DM Sans', system-ui, sans-serif;
    transition: opacity 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}

.btn-secondary {
    background: var(--surface2);
    color: var(--text2);
    border: 1px solid var(--border2);
}

.btn-danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn:hover:not(:disabled) {
    opacity: 0.85;
}

.dv {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--text);
}

.dl {
    font-size: 10px;
    color: var(--text3);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-body {
    overflow: hidden;
    max-height: 34px;
    transition: max-height 0.3s;
}

.note-body.open {
    max-height: 200px;
}

.note-toggle {
    font-size: 10px;
    color: var(--text3);
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
}

.numune-form {
    display: block;
    margin: 0;
}

.numune-form .numune-btn {
    width: 100%;
    cursor: pointer;
}

.numune-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    font-family: 'DM Sans', system-ui, sans-serif;
    white-space: nowrap;
}

.numune-btn-pending {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid rgba(196, 127, 0, 0.25);
}

.numune-btn-approved {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(26, 158, 106, 0.25);
    cursor: pointer;
}

.numune-btn-approved.countdown-late {
    background: var(--red-bg);
    color: var(--red);
    border-color: rgba(192, 57, 43, 0.35);
}

.countdown-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'DM Mono', monospace;
}

.countdown-ok { background: var(--green-bg); color: var(--green); }
.countdown-warn { background: var(--amber-bg); color: var(--amber); }
.countdown-late { background: var(--red-bg); color: var(--red); animation: pulse-late 1.5s infinite; }

.countdown-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--surface3);
    flex: 1;
    overflow: hidden;
}

.countdown-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

@keyframes pulse-late {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.konsol-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border2);
    border-radius: 8px;
    margin: 8px 0;
}

.konsol-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.konsol-item:hover {
    background: var(--surface2);
}

.konsol-item:last-child {
    border-bottom: none;
}

.konsol-cb {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    flex-shrink: 0;
}

.konsol-item-info {
    flex: 1;
}

.konsol-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.konsol-item-sub {
    font-size: 11px;
    color: var(--text3);
    margin-top: 1px;
}

.konsol-empty {
    padding: 20px;
    text-align: center;
    color: var(--text3);
    font-size: 12px;
}

.grup-members {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(212, 98, 26, 0.4);
}

.grup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.grup-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.grup-count {
    font-size: 10px;
    background: var(--orange-bg);
    color: var(--orange);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.grup-member-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    background: var(--surface2);
    border-radius: 7px;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--text2);
}

.grup-member-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    flex-shrink: 0;
}

.grup-member-name {
    font-weight: 500;
    color: var(--text);
}

.grup-member-product {
    color: var(--text3);
}

.grup-member-kap {
    margin-left: auto;
}

.grup-expand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--orange);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: 'DM Sans', system-ui, sans-serif;
}

.grup-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.grup-actions-spacer {
    flex: 1;
}

.grup-status-btn--yolda {
    background: #e6f1fb;
    color: #2a5fd4;
}

.grup-status-btn--vardi {
    background: #eaf3de;
    color: #1a9e6a;
}

.grup-status-btn--cekildi {
    background: #f1efe8;
    color: #5f5e5a;
}

.grup-note-btn {
    background: var(--red-bg);
    color: var(--red);
}

.grup-note-preview {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 9px;
    background: var(--red-bg);
    border-radius: 7px;
    font-size: 11px;
    color: var(--red);
    line-height: 1.5;
}

.grup-note-editor {
    margin-top: 8px;
}

.grup-note-textarea {
    font-size: 12px;
    width: 100%;
}

.grup-note-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    justify-content: flex-end;
}

.card-product--muted {
    color: var(--text2);
}

.inline-form {
    display: inline;
}

.card-actions .inline-form {
    display: inline-flex;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.konsol-summary {
    background: var(--orange-bg);
    border-radius: 8px;
    padding: 9px 13px;
    font-size: 12px;
    color: var(--orange);
    margin: 6px 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text2);
}

.flash-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
}

.flash-banner .icon {
    margin-top: 1px;
}

.flash-success {
    background: var(--green-bg);
    border: 1px solid rgba(26, 158, 106, 0.25);
    color: var(--green);
}

.flash-error {
    background: var(--red-bg);
    border: 1px solid rgba(192, 57, 43, 0.2);
    color: var(--red);
}

.flash-warning {
    background: var(--amber-bg);
    border: 1px solid rgba(196, 127, 0, 0.25);
    color: var(--amber);
}

.form-errors {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--red-bg);
    border: 1px solid rgba(192, 57, 43, 0.2);
    color: var(--red);
    font-size: 13px;
}

.form-errors ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.inline-delete-form {
    display: inline;
}

.card-actions form.inline-delete-form {
    display: inline-flex;
}

/* ——— Auth (Faz 9) ——— */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo .logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.auth-logo .logo-sub {
    font-size: 12px;
    color: var(--text3);
    margin-top: 4px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding: 11px 16px;
    border: none;
    border-radius: var(--radius);
    background: var(--blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', system-ui, sans-serif;
}

.auth-submit:hover:not(:disabled) {
    filter: brightness(1.05);
}

.auth-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text2);
    padding-right: 8px;
    border-right: 1px solid var(--border);
    margin-right: 4px;
}

.topbar-user-name {
    font-weight: 600;
    color: var(--text);
}

.topbar-user-role {
    color: var(--text3);
    font-size: 11px;
}

.topbar-logout-form {
    margin: 0;
}

.topbar-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border2);
    background: var(--surface2);
    color: var(--text2);
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'DM Sans', system-ui, sans-serif;
}

.topbar-logout-btn:hover {
    background: var(--surface3);
}

.numune-section--readonly .numune-btn {
    cursor: default;
    pointer-events: none;
}

.health-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.health-table th {
    text-align: left;
    padding: 8px 12px 8px 0;
    color: var(--text3);
    font-weight: 500;
    width: 45%;
    vertical-align: top;
}

.admin-panel {
    max-width: 1200px;
}

.admin-panel-desc {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 16px;
}

.admin-form {
    max-width: 560px;
    margin: 0;
}

.admin-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text2);
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--surface2);
    border-radius: 8px;
}

.admin-filters {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.admin-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

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

.admin-result-meta {
    font-size: 12px;
    color: var(--text3);
    margin-bottom: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.admin-table th {
    color: var(--text3);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--surface2);
}

.admin-table tbody tr:hover {
    background: var(--surface2);
}

.admin-table .log-desc {
    max-width: 320px;
    word-break: break-word;
}

.admin-table .mono {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 11px;
    color: var(--text2);
}

.pagination {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.health-table td {
    padding: 8px 0;
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: 12px;
}
