/* Dosya: public/assets/css/bento.css */
/* Masaüstü tam ekran Bento düzeni, üst tek satır sekme çubuğu, sağ off-canvas çekmece, açık/koyu tema ve erişilebilir kontrast */

:root[data-theme="dark"] {
    --bg-main: #0b1120;
    --bg-card: #111827;
    --bg-elevated: #1e293b;
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --accent-primary: #38bdf8;
    --accent-danger: #ef4444;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
}

:root[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-elevated: #f8fafc;
    --border-color: #cbd5e1;
    --text-primary: #0f172a;
    --text-muted: #475569;
    --accent-primary: #0284c7;
    --accent-danger: #dc2626;
    --accent-success: #059669;
    --accent-warning: #d97706;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
}

:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.tk-engineer-context-bar {
    background: #7f1d1d;
    color: #fef2f2;
    padding: 8px 24px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ef4444;
}

.tk-link-subtle {
    color: #fecaca;
    text-decoration: underline;
}

.tk-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

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

.tk-brand-title {
    font-weight: 800;
    letter-spacing: 0.04em;
}

.tk-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tk-sr-status {
    padding: 6px 24px;
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 1600px;
    margin: 0 auto;
}

/* Üstte Yan Yana Tek Satır Sekmeli Buton Yapısı */
.tk-panel-tabs-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 12px 24px 0 24px;
    max-width: 1600px;
    margin: 0 auto;
    overflow-x: auto;
}

.tk-panel-tab-btn {
    flex: 1 1 0;
    white-space: nowrap;
    text-align: center;
    padding: 11px 16px;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tk-panel-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.tk-panel-tab-btn.active {
    background: var(--accent-primary);
    color: #0f172a;
    border-color: var(--accent-primary);
}

.tk-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tk-badge-observer {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.tk-badge-engineer {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
}

.tk-badge-customer {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border: 1px solid var(--accent-success);
}

.tk-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
    padding: 18px 24px 28px 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.tk-bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    overflow: hidden;
}

.tk-col-12 { grid-column: span 12; }
.tk-col-8 { grid-column: span 8; }
.tk-col-7 { grid-column: span 7; }
.tk-col-5 { grid-column: span 5; }
.tk-col-4 { grid-column: span 4; }

@media (max-width: 1024px) {
    .tk-col-8, .tk-col-7, .tk-col-5, .tk-col-4 {
        grid-column: span 12;
    }
}

.tk-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
    flex-wrap: wrap;
}

.tk-card-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.tk-text-muted {
    color: var(--text-muted);
}

.tk-table-wrap {
    overflow-x: auto;
}

.tk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.tk-kv-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.tk-kv-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.tk-kv-list li > span:first-child {
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}

.tk-kv-list li > strong,
.tk-kv-list li > code {
    text-align: right;
}

@media (max-width: 768px) {
    .tk-kv-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .tk-kv-list li > strong,
    .tk-kv-list li > code {
        text-align: left;
    }
}

.tk-btn {
    cursor: pointer;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.86rem;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-block;
}

.tk-btn-primary {
    background: var(--accent-primary);
    color: #0f172a;
}

.tk-btn-danger {
    background: var(--accent-danger);
    color: #ffffff;
}

.tk-btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Auth Layout */
.tk-auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tk-auth-container {
    width: 100%;
    max-width: 500px;
}

.tk-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.tk-tab {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.tk-tab.active {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.tk-tab-engineer.active {
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.tk-mode-banner {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 16px;
}

.tk-banner-observer {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--accent-primary);
}

.tk-banner-engineer {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid var(--accent-danger);
}

.tk-alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--accent-danger);
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.88rem;
}

.tk-form {
    display: grid;
    gap: 14px;
}

.tk-form-inline {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tk-field {
    display: grid;
    gap: 6px;
}

.tk-field input, .tk-form-inline input, .tk-form-inline select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.tk-auth-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 0.85rem;
}

.tk-auth-footer a {
    color: var(--accent-primary);
}

.tk-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 18px 0;
}

/* Off-Canvas Drawer */
.tk-drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 440px;
    max-width: 92vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
    transition: right 0.22s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.tk-drawer.open {
    right: 0;
}

.tk-drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tk-drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}