@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #ffffff;
    --bg-alt: #f7f8fa;
    --text: #1a1a1a;
    --text-light: #555555;
    --text-muted: #888888;
    --border: #e0e0e0;
    --accent: #059669;
    --accent-hover: #047857;
    --accent-light: #d1fae5;
    --sidebar-w: 260px;
    --header-h: 50px;
    --red: #dc2626;
    --red-light: #fee2e2;
    --blue: #2563eb;
    --blue-light: #e0e7ff;
    --orange: #d97706;
    --orange-light: #fef3c7;
    --radius: 6px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.6;
    background: var(--bg-alt);
    min-height: 100vh;
}

/* ==================== HEADER ==================== */
.guide-header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; z-index: 1000;
}
.guide-header .logo {
    font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none;
}
.guide-header .version-badge {
    font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-light);
    border: 1px solid #bbf7d0; padding: 1px 8px; border-radius: 12px; margin-left: 6px;
}
.guide-header .header-actions {
    display: flex; align-items: center; gap: 12px; font-size: 13px;
}

/* ==================== SIDEBAR ==================== */
.guide-sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0; width: var(--sidebar-w);
    border-right: 1px solid var(--border); overflow-y: auto; padding: 16px 0; background: var(--bg-alt);
    z-index: 900;
}
.guide-sidebar .nav-group { margin-bottom: 12px; }
.guide-sidebar .nav-group-title {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: #888; padding: 6px 18px 4px;
}
.guide-sidebar .nav-link {
    display: flex; align-items: center; justify-content: space-between; padding: 8px 18px;
    color: var(--text-light); text-decoration: none; font-size: 13px; font-weight: 500;
    border-left: 3px solid transparent; transition: all 0.15s;
}
.guide-sidebar .nav-link:hover { color: var(--text); background: #eef1f5; }
.guide-sidebar .nav-link.active {
    color: var(--accent); border-left-color: var(--accent); background: #eef1f5; font-weight: 600;
}
.guide-sidebar .nav-count {
    font-size: 11px; background: #e2e8f0; color: #475569; padding: 1px 6px; border-radius: 10px;
}

/* ==================== MAIN CONTENT ==================== */
.guide-content {
    margin-left: var(--sidebar-w);
    padding: calc(var(--header-h) + 20px) 28px 60px;
    min-height: 100vh;
}
.guide-content-full {
    padding: calc(var(--header-h) + 20px) 28px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== HERO / SECTION TITLE ==================== */
.hero {
    padding: 16px 0 20px; margin-bottom: 24px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px;
}
.hero h1 { font-size: 20px; font-weight: 700; color: var(--text); }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-light); font-size: 13px; margin-top: 2px; }

/* ==================== BUTONLAR ==================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 14px; font-size: 13px; font-weight: 600; border-radius: var(--radius);
    border: 1px solid transparent; cursor: pointer; transition: all 0.15s; text-decoration: none;
    font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--bg-alt); }
.btn-danger { background: var(--red-light); color: var(--red); border-color: #fca5a5; }
.btn-danger:hover { background: #fee2e2; color: #b91c1c; }
.btn-warning { background: var(--orange-light); color: var(--orange); border-color: #fcd34d; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* ==================== FORMLAR ==================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-light); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 8px 12px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: 13.5px; font-family: inherit; outline: none; transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent); box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

/* ==================== KARTLAR ==================== */
.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 16px;
}
.card-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 12px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }

/* ==================== MASA GRID & KARTLARI ==================== */
.table-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px;
}
.table-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 16px; cursor: pointer; transition: all 0.15s; position: relative;
}
.table-card:hover {
    border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-1px);
}
.table-card.status-bos { border-top: 4px solid #94a3b8; }
.table-card.status-dolu { border-top: 4px solid var(--red); }
.table-card.status-hesap_istendi { border-top: 4px solid var(--orange); }

.table-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.table-no { font-size: 16px; font-weight: 700; color: var(--text); }
.table-status-pill {
    font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; text-transform: uppercase;
}
.pill-bos { background: #f1f5f9; color: #64748b; }
.pill-dolu { background: var(--red-light); color: var(--red); }
.pill-hesap_istendi { background: var(--orange-light); color: var(--orange); }

.table-amount { font-size: 18px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.table-meta { font-size: 11.5px; color: var(--text-muted); }

/* ==================== KDS GRID & KARTLARI ==================== */
.kds-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start;
}
.kds-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04); overflow: hidden;
}
.kds-card-header {
    padding: 10px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.kds-table-title { font-size: 15px; font-weight: 700; color: var(--text); }
.kds-timer {
    font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; font-family: 'JetBrains Mono', monospace;
}
.timer-normal { background: var(--accent-light); color: var(--accent); }
.timer-warning { background: var(--orange-light); color: var(--orange); }
.timer-danger { background: var(--red-light); color: var(--red); animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.kds-card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.kds-item-row {
    display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0;
}
.kds-item-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.kds-item-note { font-size: 11.5px; color: var(--orange); margin-top: 2px; }
.kds-card-footer {
    padding: 10px 14px; background: var(--bg-alt); border-top: 1px solid var(--border);
}

/* ==================== TABLOLAR ==================== */
.guide-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.guide-table th {
    text-align: left; padding: 8px 12px; background: var(--bg-alt); font-weight: 600; font-size: 11px;
    text-transform: uppercase; border-bottom: 1px solid var(--border); color: #64748b;
}
.guide-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.guide-table tr:hover td { background: #fafafa; }

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center; z-index: 2000;
}
.modal-box {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column;
    overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.modal-header {
    padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg-alt);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 12px 18px; border-top: 1px solid var(--border); background: var(--bg-alt);
    display: flex; justify-content: flex-end; gap: 8px;
}

.order-items-list { list-style: none; margin-bottom: 12px; }
.order-item-row {
    display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0;
}

/* ==================== AUTH BODY ==================== */
.auth-body {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: var(--bg-alt); padding: 20px;
}
.auth-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 32px; width: 100%; max-width: 400px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.auth-header { text-align: center; margin-bottom: 24px; }
.brand-logo { font-size: 36px; margin-bottom: 6px; }
.auth-header h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.auth-header p { font-size: 13px; color: var(--text-muted); }

.alert { padding: 10px 12px; border-radius: var(--radius); font-size: 12.5px; margin-bottom: 14px; }
.alert-error { background: var(--red-light); border: 1px solid #fca5a5; color: #991b1b; }

.quick-demo-logins {
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center;
}
.quick-title { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; font-weight: 600; }
.quick-buttons { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.btn-demo {
    background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-light);
    padding: 4px 10px; border-radius: 4px; font-size: 11.5px; cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.btn-demo:hover { background: #eef1f5; color: var(--text); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .guide-sidebar { transform: translateX(-100%); transition: transform 0.2s; }
    .guide-sidebar.open { transform: translateX(0); }
    .guide-content { margin-left: 0; padding: calc(var(--header-h) + 14px) 16px 40px; }
}
