/* =========================================================
   Yörük Mehmet'in Yeri — Adisyon Sistemi
   Tema: Sıcak ahşap + pirinç (brass) — meyhane/lokanta havası
========================================================= */

:root {
    --bg: #170f0a;
    --panel: #241810;
    --panel-2: #2e1f14;
    --gold: #c99a3a;
    --gold-light: #e9c46a;
    --cream: #f2e6cc;
    --muted: #b3a284;
    --green: #4a9152;
    --green-dark: #35703b;
    --red: #b5432f;
    --red-dark: #8c3323;
    --border: rgba(242, 230, 204, 0.10);
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
    --radius: 14px;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Work Sans', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(1200px 600px at 15% -10%, #2a1c11 0%, transparent 60%),
        radial-gradient(900px 500px at 100% 0%, #241a10 0%, transparent 55%),
        var(--bg);
    color: var(--cream);
    font-family: var(--font-body);
    min-height: 100vh;
}

a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); color: var(--gold-light); margin: 0 0 6px; }
h1 { font-size: 1.9em; font-weight: 700; }
h2 { font-size: 1.35em; font-weight: 700; margin-top: 0; }
p { line-height: 1.5; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }

/* ---------- Topbar ---------- */
.topbar {
    background: linear-gradient(180deg, #1c130c, #170f0a);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.topbar-inner {
    max-width: 1180px; margin: 0 auto; padding: 12px 20px;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(145deg, var(--gold-light), var(--gold));
    color: #241810; font-family: var(--font-display); font-weight: 700;
    display: flex; align-items: center; justify-content: center; font-size: 0.95em;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15em; color: var(--gold-light); letter-spacing: 0.2px; }
.topnav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topnav a {
    text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 8px;
    font-weight: 500; font-size: 0.95em; transition: all 0.15s;
}
.topnav a:hover { color: var(--cream); background: rgba(255,255,255,0.05); }
.topnav a.active { color: #241810; background: var(--gold-light); }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-name { color: var(--muted); font-size: 0.9em; }

/* ---------- Buttons ---------- */
.btn, button, input[type=submit] {
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    color: #241810; border: none; padding: 11px 18px; border-radius: 9px;
    font-weight: 600; font-family: var(--font-body); font-size: 0.95em;
    cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none;
}
.btn:hover, button:hover, input[type=submit]:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active, button:active { transform: translateY(0); }
.btn-sm { padding: 7px 12px; font-size: 0.85em; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--cream); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }
.btn-danger { background: linear-gradient(180deg, #cf5a44, var(--red)); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-success { background: linear-gradient(180deg, #5cad64, var(--green)); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
button[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- Forms ---------- */
input[type=text], input[type=number], input[type=password], input[type=search], select, textarea {
    background: rgba(0,0,0,0.25); border: 1px solid var(--border); color: var(--cream);
    padding: 10px 12px; border-radius: 8px; font-family: var(--font-body); font-size: 0.95em;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
label { font-size: 0.85em; color: var(--muted); display: block; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }

/* ---------- Cards / Panels ---------- */
.card {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.5px; }
.kpi .value { font-family: var(--font-display); font-size: 1.6em; color: var(--gold-light); font-weight: 700; margin-top: 4px; }

/* ---------- Masa grid ---------- */
.seri-block { margin-bottom: 26px; }
.seri-title { color: var(--muted); font-size: 0.85em; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.masa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.masa {
    position: relative;
    padding: 16px 12px 14px;
    border-radius: 12px;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    border: 1px solid rgba(255,255,255,0.12);
    min-height: 88px;
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.masa::before {
    content: ''; position: absolute; top: 0; left: 12px; right: 12px; height: 4px;
    background: rgba(255,255,255,0.35); border-radius: 0 0 4px 4px;
}
.masa .ad { font-family: var(--font-display); font-weight: 700; font-size: 1.15em; }
.masa .durum-etiket { font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; }
.masa .musteri { font-size: 0.85em; margin-top: 4px; opacity: 0.9; }
.masa .tutar { font-size: 0.85em; font-weight: 600; margin-top: 6px; }
.masa.bos { background: linear-gradient(160deg, #4a9152, #2e5f34); color: #eafbea; }
.masa.dolu {
    background: linear-gradient(160deg, #b5432f, #7f2d1f);
    color: #ffece7;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3), 0 0 0 rgba(255,95,70,0);
}

/* Dolu masalarda sürekli kayan parlama efekti */
.masa.dolu::after {
    content: '';
    position: absolute;
    top: -35%;
    left: -75%;
    width: 45%;
    height: 170%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.08),
        rgba(255,255,255,0.42),
        rgba(255,255,255,0.08),
        transparent
    );
    transform: rotate(18deg);
    pointer-events: none;
    animation: doluMasaParlama 2.8s ease-in-out infinite;
}

.masa.dolu:hover {
    transform: translateY(-6px) scale(1.035);
    filter: brightness(1.08);
    box-shadow:
        0 10px 24px rgba(0,0,0,0.38),
        0 0 18px rgba(255,82,58,0.42);
}

.masa.bos:hover {
    transform: translateY(-4px) scale(1.02);
}

@keyframes doluMasaParlama {
    0%, 25% { left: -75%; opacity: 0; }
    35% { opacity: 1; }
    70% { opacity: 1; }
    100% { left: 135%; opacity: 0; }
}

/* ---------- Order screen (POS) ---------- */
.pos-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 880px) { .pos-layout { grid-template-columns: 1fr; } }

.kategori-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.kategori-tabs button { background: rgba(255,255,255,0.06); color: var(--cream); border: 1px solid var(--border); font-weight: 500; }
.kategori-tabs button.active { background: var(--gold-light); color: #241810; border-color: transparent; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.menu-item {
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px; text-align: left; cursor: pointer; color: var(--cream); transition: all 0.15s;
}
.menu-item:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.menu-item .ad { font-weight: 600; font-size: 0.95em; display: block; margin-bottom: 4px; }
.menu-item .fiyat { color: var(--gold-light); font-weight: 700; font-size: 0.9em; }

.sepet { position: sticky; top: 90px; }
.sepet-list { max-height: 340px; overflow-y: auto; margin-bottom: 12px; }
.sepet-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); gap: 8px; }
.sepet-row .ad { font-weight: 500; font-size: 0.92em; }
.sepet-row .meta { color: var(--muted); font-size: 0.8em; }
.sepet-toplam { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; font-family: var(--font-display); font-size: 1.3em; color: var(--gold-light); font-weight: 700; }
.sil-link { color: var(--red); text-decoration: none; font-size: 0.85em; font-weight: 600; }
.sil-link:hover { text-decoration: underline; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.03); border-radius: 12px; overflow: hidden; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92em; }
th { background: rgba(0,0,0,0.25); color: var(--gold-light); font-weight: 600; text-transform: uppercase; font-size: 0.78em; letter-spacing: 0.4px; }
tr:hover td { background: rgba(255,255,255,0.02); }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75em; font-weight: 600; }
.badge-green { background: rgba(74,145,82,0.2); color: #7fd188; }
.badge-red { background: rgba(181,67,47,0.2); color: #ff8b73; }
.badge-gold { background: rgba(201,154,58,0.2); color: var(--gold-light); }

/* ---------- Admin tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 10px 18px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--gold-light); border-color: var(--gold-light); }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.92em; }
.alert-success { background: rgba(74,145,82,0.15); border: 1px solid rgba(74,145,82,0.4); color: #a3e0a8; }
.alert-error { background: rgba(181,67,47,0.15); border: 1px solid rgba(181,67,47,0.4); color: #ffb3a0; }

/* ---------- Login page ---------- */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card .brand-mark { margin: 0 auto 14px; width: 56px; height: 56px; font-size: 1.3em; border-radius: 14px; }
.login-card h1 { font-size: 1.5em; }
.login-card .sub { color: var(--muted); margin-bottom: 22px; font-size: 0.9em; }
.login-card form { text-align: left; }

/* ---------- Footer ---------- */
.footer { text-align: center; color: var(--muted); font-size: 0.82em; padding: 20px; }

/* ---------- Mobil sabit toplam çubuğu ---------- */
.mobile-cart-bar { display: none; }
@media (max-width: 880px) {
    .wrap { padding-bottom: 92px; }
    .mobile-cart-bar {
        display: block;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 50;
        background: linear-gradient(180deg, var(--gold-light), var(--gold));
        box-shadow: 0 -6px 20px rgba(0,0,0,0.4);
        padding: env(safe-area-inset-bottom, 0) 0 0;
    }
    .mobile-cart-bar-btn {
        width: 100%;
        display: flex; justify-content: space-between; align-items: center;
        padding: 16px 20px;
        background: none; border: none; border-radius: 0;
        color: #241810; font-weight: 700; font-size: 1.02em;
        cursor: pointer;
    }
    .mobile-cart-bar-btn:hover { transform: none; filter: none; }
    .pos-layout { margin-bottom: 0; }
}

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.gap-8 { gap: 8px; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.85em; }

@media print {
    .topbar, .footer, .no-print { display: none !important; }
}
