/* ============================================================
   TOY.CENTRALDEV.AZ — Apple-style dəvətli idarəetmə UI
   ============================================================ */

:root {
    --brand:        #007AFF;
    --brand-2:      #5AC8FA;
    --brand-dark:   #0040DD;
    --brand-soft:   rgba(0, 122, 255, 0.10);
    --brand-grad:   linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);

    --success:      #30D158;
    --danger:       #FF3B30;
    --warning:      #FF9500;
    --indigo:       #5856D6;

    --bg:           #f5f5f7;
    --bg-card:      #ffffff;
    --bg-soft:      #fafafa;
    --border:       #e5e5ea;
    --border-strong:#d2d2d7;
    --text:         #1d1d1f;
    --text-soft:    #6e6e73;
    --text-mute:    #86868b;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px -2px rgba(0,0,0,0.08), 0 2px 6px -1px rgba(0,0,0,0.05);
    --shadow-lg: 0 18px 36px -12px rgba(0,0,0,0.18), 0 8px 16px -6px rgba(0,0,0,0.10);
    --shadow-xl: 0 32px 60px -16px rgba(0,0,0,0.22), 0 14px 28px -10px rgba(0,0,0,0.12);

    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --ease: cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1,h2,h3,h4 { margin: 0 0 .6em; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: 32px; font-weight: 700; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; }
p  { margin: 0 0 .8em; color: var(--text-soft); }

/* ===== LAYOUT ===== */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 20px; }

main { min-height: calc(100vh - 64px); padding: 28px 0 60px; }

/* ===== TOP NAV (post-login) ===== */
.app-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}
.app-nav-inner {
    display: flex; align-items: center; gap: 22px;
    height: 64px;
}
.app-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 17px; color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.app-brand .dot {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--brand-grad);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px;
    box-shadow: 0 4px 12px -3px rgba(0, 122, 255, 0.5);
}

.app-tabs {
    display: flex; gap: 4px; align-items: center;
    margin-left: 14px;
}
.app-tabs a {
    padding: 8px 14px;
    font-size: 14px; font-weight: 500;
    color: var(--text-soft);
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.app-tabs a:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.app-tabs a.active {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}

/* ===== SEARCH (top) ===== */
.app-search {
    flex: 1; max-width: 480px;
    position: relative;
    margin: 0 8px;
}
.app-search input {
    width: 100%;
    height: 38px; padding: 0 14px 0 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.app-search input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.10);
}
.app-search::before {
    content: '';
    position: absolute;
    left: 12px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.5' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>") center/contain no-repeat;
}

.search-results {
    position: absolute;
    top: calc(100% + 6px); left: 0; right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 380px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}
.search-results.open { display: block; }
.search-results .item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.12s;
}
.search-results .item:last-child { border-bottom: 0; }
.search-results .item:hover,
.search-results .item.active { background: var(--brand-soft); }
.search-results .name { font-weight: 600; color: var(--text); font-size: 14px; }
.search-results .meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.search-results .meta .pill {
    display: inline-block;
    padding: 1px 6px;
    background: var(--brand-soft); color: var(--brand);
    border-radius: 5px; font-weight: 600;
    margin-right: 6px;
}
.search-results .empty {
    padding: 16px 14px; color: var(--text-mute); font-size: 13px; text-align: center;
}
mark.search-hit {
    background: linear-gradient(180deg, transparent 55%, rgba(255, 204, 0, 0.55) 55%);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
    font-weight: 700;
}

/* Live page-level filter highlight (guests.php) */
.row-hidden { display: none !important; }
.live-filter-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-mute);
    font-size: 14px;
}
.live-filter-bar {
    padding: 14px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.live-filter-bar .live-input {
    flex: 1; min-width: 200px;
    height: 42px;
    padding: 0 14px 0 40px;
    border-radius: 10px;
    border: 1.5px solid var(--border-strong);
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.5' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat 12px center / 18px;
    font-size: 15px;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.live-filter-bar .live-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.10);
}
.live-filter-bar .live-count {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 600;
    white-space: nowrap;
}
.live-filter-bar .live-count .num { color: var(--brand); font-weight: 800; }

/* ===== NAV STATS ===== */
.nav-stats { display: flex; gap: 10px; align-items: center; }
.stat-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 13px; font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.stat-chip .num { color: var(--brand); font-weight: 700; }
.stat-chip.success .num { color: var(--success); }
.stat-chip.warning .num { color: var(--warning); }

.nav-user {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px; color: var(--text-soft);
}
.nav-user a { color: var(--danger); margin-left: 8px; font-weight: 600; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    height: 38px; padding: 0 18px;
    border: 0; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    color: var(--text); background: #fff;
    border: 1px solid var(--border);
    cursor: pointer; text-decoration: none;
    transition: transform 0.15s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
    white-space: nowrap;
    font-family: inherit;
}
.btn:hover { box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px -2px rgba(0, 122, 255, 0.30);
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 6px 16px -2px rgba(0, 122, 255, 0.45); text-decoration: none; }
.btn-danger {
    background: #fff;
    color: var(--danger);
    border-color: rgba(255, 59, 48, 0.30);
}
.btn-danger:hover { background: rgba(255, 59, 48, 0.08); border-color: var(--danger); }
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-soft);
}
.btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-success { background: var(--success); color: #fff; border-color: transparent; }
.btn-success:hover { background: #28a745; color: #fff; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* ===== STATS GRID (Dashboard) ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.stat-card .icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    margin-bottom: 14px;
    font-size: 18px;
}
.stat-card.blue   .icon { background: linear-gradient(135deg, #007AFF, #5AC8FA); }
.stat-card.green  .icon { background: linear-gradient(135deg, #30D158, #5CE885); }
.stat-card.orange .icon { background: linear-gradient(135deg, #FF9500, #FFC062); }
.stat-card.red    .icon { background: linear-gradient(135deg, #FF3B30, #FF7062); }
.stat-card.purple .icon { background: linear-gradient(135deg, #5856D6, #8B89E6); }
.stat-card.gray   .icon { background: linear-gradient(135deg, #8E8E93, #C7C7CC); }
.stat-card.gold {
    background: #FFFBF0;
    border-color: #E6D3A8;
}
.stat-card.gold .icon { background: linear-gradient(135deg, #C9A14E, #E3C77E); }

.stat-card .num {
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0;
}
.stat-card .lbl {
    color: var(--text-soft);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* ===== TABLES ===== */
.tbl {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.tbl th, .tbl td {
    padding: 13px 16px;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}
.tbl thead th {
    background: var(--bg-soft);
    color: var(--text-mute);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    border-bottom: 1px solid var(--border);
}
.tbl tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s; }
.tbl tbody tr:last-child { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--bg-soft); }
.tbl .right { text-align: right; }
.tbl .center { text-align: center; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
    border: 1px solid transparent;
}
.badge-blue    { background: var(--brand-soft); color: var(--brand); }
.badge-success { background: rgba(48, 209, 88, 0.12); color: #1f8a3b; }
.badge-warn    { background: rgba(255, 149, 0, 0.12); color: #b76a00; }
.badge-mute    { background: var(--bg-soft); color: var(--text-soft); border-color: var(--border); }

/* ===== CHECK-IN TOGGLE ===== */
.check-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    background: #fff;
    border: 1.6px solid var(--border-strong);
    color: var(--text-mute);
    transition: all 0.18s var(--ease);
}
.check-toggle:hover { border-color: var(--success); color: var(--success); }
.check-toggle.checked {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px -3px rgba(48, 209, 88, 0.45);
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: #fff;
    font-size: 15px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.form-control:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.10);
}
textarea.form-control { padding: 10px 14px; height: auto; min-height: 80px; resize: vertical; }
select.form-control { padding-right: 36px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

/* ===== LOGIN PAGE ===== */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f5f5f7 0%, #fff 100%);
    padding: 24px;
}
.login-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 42px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
}
.login-logo {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: var(--brand-grad);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px;
    color: #fff;
    font-size: 32px;
    box-shadow: 0 12px 28px -6px rgba(0, 122, 255, 0.4);
}
.login-card h1 {
    font-size: 22px;
    text-align: center;
    margin-bottom: 8px;
}
.login-card .subtitle {
    color: var(--text-soft);
    text-align: center;
    font-size: 14px;
    margin-bottom: 28px;
}

/* ===== FLASH MESSAGES ===== */
.flash {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
}
.flash-success { background: rgba(48, 209, 88, 0.10); color: #1f7d36; border: 1px solid rgba(48, 209, 88, 0.30); }
.flash-error   { background: rgba(255, 59, 48, 0.10); color: #c1271d; border: 1px solid rgba(255, 59, 48, 0.30); }
.flash-info    { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid rgba(0, 122, 255, 0.30); }

/* ===== MODAL ===== */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.40);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center; justify-content: center;
    padding: 24px;
    animation: fadeIn 0.18s ease;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: #fff;
    border-radius: 22px;
    padding: 28px;
    width: 100%; max-width: 460px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.22s var(--ease);
}
.modal h2 { font-size: 19px; margin-bottom: 6px; }
.modal .modal-sub { color: var(--text-soft); font-size: 14px; margin-bottom: 22px; }
.modal-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 22px; padding-top: 18px;
    border-top: 1px solid var(--border);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== PAGE HEADER ===== */
.page-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.page-head .sub { color: var(--text-soft); font-size: 14px; margin-top: 4px; }

/* ===== TABLE CARD (masa kartı) ===== */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.table-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    transition: box-shadow 0.18s, transform 0.18s;
    cursor: default;
}
.table-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* === Bizə məxsus masalar — yüngül qızılı ton === */
.table-card.ours {
    background: #FFFBF0;
    border-color: #E6D3A8;
    box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(212, 165, 70, 0.08);
}
.table-card.ours:hover { box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(212, 165, 70, 0.12); }
.ours-chip {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 6px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10.5px; font-weight: 700;
    background: rgba(212, 165, 70, 0.14);
    color: #8A6B3F;
    border: 1px solid rgba(212, 165, 70, 0.35);
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.table-card-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 14px;
}
.table-card-num {
    font-size: 28px; font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text);
}
.table-card-loc {
    font-size: 12px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    font-weight: 600;
}
.table-card-cap {
    background: var(--brand-soft);
    color: var(--brand);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.seats-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
    margin: 10px 0 6px;
}
.seats-bar-fill {
    height: 100%;
    background: var(--brand-grad);
    border-radius: 999px;
    transition: width 0.4s var(--ease);
}
.seats-bar.full .seats-bar-fill { background: linear-gradient(90deg, #FF9500, #FF3B30); }
.seats-info {
    font-size: 12px;
    color: var(--text-soft);
    display: flex; justify-content: space-between;
}

/* ===== EMPTY SEATS BADGE (qırmızı) ===== */
.empty-seats {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    margin-top: 10px;
    border: 1.5px solid;
    letter-spacing: -0.1px;
}
.empty-seats.has-free {
    background: rgba(255, 59, 48, 0.10);
    color: var(--danger);
    border-color: rgba(255, 59, 48, 0.40);
    animation: pulse-red 2.4s ease-in-out infinite;
}
.empty-seats.full {
    background: rgba(48, 209, 88, 0.10);
    color: #1f7d36;
    border-color: rgba(48, 209, 88, 0.40);
}
@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.0); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 59, 48, 0.10); }
}
.empty-seats .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor;
}

.table-guests {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.table-guest {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0;
    font-size: 13.5px;
    border-bottom: 1px dotted transparent;
}
.table-guest:not(:last-child) { border-bottom-color: rgba(0,0,0,0.04); }
.table-guest .check-toggle { width: 22px; height: 22px; border-width: 1.4px; flex-shrink: 0; }
.table-guest .check-toggle svg { width: 13px; height: 13px; }
.table-guest .num {
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 12px;
    min-width: 22px;
    text-align: right;
}
.table-guest .nm { flex: 1; color: var(--text); line-height: 1.35; word-break: break-word; }
.table-guest.arrived .nm { color: var(--text-mute); text-decoration: line-through; }

/* === BOŞ SLOT (qırmızı, kursiv) — kliklənən === */
.table-guest.empty-slot {
    opacity: 0.85;
    cursor: pointer;
    border-radius: 6px;
    padding: 5px 6px;
    margin: 0 -6px;
    transition: background 0.15s, opacity 0.15s, transform 0.1s;
}
.table-guest.empty-slot:hover {
    opacity: 1;
    background: rgba(255, 59, 48, 0.06);
}
.table-guest.empty-slot:active { transform: scale(0.98); }
.table-guest.empty-slot .nm {
    color: var(--danger);
    font-style: italic;
    font-weight: 600;
    font-size: 13px;
    display: flex; align-items: center; gap: 6px;
}
.table-guest.empty-slot .nm::after {
    content: '+ qonaq əlavə et';
    margin-left: auto;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    color: var(--danger);
    opacity: 0;
    transition: opacity 0.15s;
    background: rgba(255, 59, 48, 0.12);
    padding: 2px 8px;
    border-radius: 99px;
}
.table-guest.empty-slot:hover .nm::after { opacity: 1; }
.table-guest.empty-slot .num { color: rgba(255, 59, 48, 0.55); }
.empty-circle {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1.4px dashed rgba(255, 59, 48, 0.45);
    flex-shrink: 0;
    background: rgba(255, 59, 48, 0.04);
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(255, 59, 48, 0.55);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.empty-circle::before { content: '+'; }

/* "Öz adamı" guest — slight visual distinction */
.table-guest .nm.is-placeholder {
    color: var(--text-mute);
    font-style: italic;
}

.table-card-actions {
    display: flex; gap: 8px; margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.table-card-actions .btn { flex: 1; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-mute);
}
.empty-state .icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: var(--bg-soft);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-mute);
    margin-bottom: 14px;
    font-size: 26px;
}
.empty-state h3 { color: var(--text); margin-bottom: 6px; }

/* ================================================================
   RESPONSIVE — Tablet · Mobil · Touch
   Breakpoints: 992 · 768 · 600 · 480 · 380
   ================================================================ */

/* ===== TABLET (≤992px) ===== */
@media (max-width: 992px) {
    .app-nav-inner {
        gap: 10px;
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }
    .app-search {
        order: 99;
        flex-basis: 100%;
        max-width: 100%;
        margin: 0;
    }
    .app-tabs {
        margin-left: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .app-tabs::-webkit-scrollbar { display: none; }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    main { padding: 24px 0 60px; }
    h1 { font-size: 26px; }
    h2 { font-size: 20px; }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .page-head > div:last-child {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== TABLET TIGHT (≤768px) ===== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }

    /* Top nav — 2 rows: brand+chips, tabs scroll, search */
    .app-brand .dot { width: 26px; height: 26px; font-size: 13px; }
    .app-brand { font-size: 15px; gap: 8px; }
    .nav-stats { gap: 6px; flex-wrap: wrap; }
    .stat-chip {
        font-size: 11.5px;
        padding: 5px 10px;
        border-radius: 7px;
    }
    .nav-user {
        font-size: 12px;
        padding: 5px 8px;
        gap: 6px;
    }
    .app-tabs a { font-size: 13px; padding: 7px 12px; }

    /* Stats — 3-col still good */
    .stat-card { padding: 16px 14px; }
    .stat-card .num { font-size: 26px; }
    .stat-card .icon { width: 32px; height: 32px; font-size: 16px; margin-bottom: 10px; }
    .stat-card .lbl { font-size: 12px; }

    /* Tables grid */
    .tables-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
    .table-card { padding: 16px; }
    .table-card-num { font-size: 24px; }

    /* Tables (data tables) */
    .tbl th, .tbl td { padding: 10px 12px; font-size: 13px; }
    .tbl thead th { font-size: 10.5px; }
}

/* ===== MOBILE (≤600px) ===== */
@media (max-width: 600px) {
    main { padding: 18px 0 80px; }   /* extra bottom for fixed mobile nav air */

    /* Stats: 2x3 grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 22px;
    }
    .stat-card { padding: 14px 12px; border-radius: 14px; }
    .stat-card .num { font-size: 24px; }
    .stat-card .icon { width: 30px; height: 30px; font-size: 15px; margin-bottom: 8px; }
    .stat-card .lbl { font-size: 11.5px; }

    /* Tables grid: 1-col, denser */
    .tables-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .table-card { padding: 16px; border-radius: 14px; }
    .table-card-num { font-size: 22px; }
    .table-card-cap { font-size: 11px; padding: 3px 8px; }

    /* Table guest rows — denser */
    .table-guest { font-size: 13px; padding: 4px 0; }
    .table-guest .check-toggle { width: 22px; height: 22px; }
    .table-guest.empty-slot { padding: 4px 6px; }

    /* PAGE HEAD */
    .page-head h1 { font-size: 22px; }
    .page-head .sub { font-size: 13px; }
    .page-head > div:last-child { flex-wrap: wrap; gap: 8px; }
    .page-head > div:last-child .btn { flex: 1 1 auto; min-width: 0; justify-content: center; }
    .page-head > div:last-child .btn-primary { flex-basis: 100%; }

    /* CARDS */
    .card { padding: 16px; border-radius: 14px; }

    /* DATA TABLE — scrollable card */
    .tbl-wrap {
        margin: 0 -16px;        /* edge-to-edge scroll on mobile */
        padding: 0 16px;
    }
    .tbl { border-radius: 0; border-left: 0; border-right: 0; }
    .tbl th, .tbl td { padding: 9px 10px; font-size: 12.5px; }

    /* FILTER BAR */
    .card[style*="display: flex"] {
        flex-direction: column;
        align-items: stretch;
    }
    .card[style*="display: flex"] > * { width: 100%; }
    .card[style*="display: flex"] > div:last-child {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .card[style*="display: flex"] > div:last-child .btn-sm {
        font-size: 12px;
        padding: 0 8px;
    }

    /* MODAL → bottom sheet */
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }
    .modal {
        max-width: 100%;
        width: 100%;
        border-radius: 18px 18px 0 0;
        padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
        max-height: 92vh;
        animation: slideUpSheet 0.25s cubic-bezier(.2,.8,.2,1);
    }
    .modal h2 { font-size: 18px; }
    .modal-actions { gap: 8px; }
    .modal-actions .btn { flex: 1; }
    @keyframes slideUpSheet {
        from { opacity: 0; transform: translateY(100%); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* LOGIN */
    .login-card { padding: 28px 22px; border-radius: 20px; }
    .login-card h1 { font-size: 20px; }
    .login-logo { width: 56px; height: 56px; font-size: 28px; border-radius: 14px; }

    /* SEARCH RESULTS dropdown can be tall */
    .search-results { max-height: 60vh; }

    /* Top counter chip more compact */
    .stat-chip {
        font-size: 11px;
        padding: 4px 8px;
        gap: 4px;
    }
    .stat-chip .num { font-size: 13px; }
}

/* ===== SMALL MOBILE (≤480px) ===== */
@media (max-width: 480px) {
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    .container { padding: 0 14px; }

    /* Tabs: smaller, denser */
    .app-tabs a { padding: 6px 10px; font-size: 12.5px; }

    /* Logout abbreviation */
    .nav-user { font-size: 11.5px; padding: 4px 6px; }

    /* Buttons — touch target */
    .btn { height: 40px; font-size: 14px; padding: 0 14px; }
    .btn-sm { height: 32px; font-size: 12px; padding: 0 10px; }
    .btn-lg { height: 48px; font-size: 15px; padding: 0 18px; }

    /* Form inputs — large touch */
    .form-control { height: 44px; font-size: 16px; }   /* 16px prevents iOS zoom */

    /* App search input — keep readable */
    .app-search input { height: 40px; font-size: 14px; }

    /* Page head buttons stack better */
    .page-head > div:last-child {
        grid-template-columns: 1fr 1fr;
        display: grid;
        gap: 8px;
        width: 100%;
    }
    .page-head > div:last-child .btn-primary {
        grid-column: 1 / -1;
    }

    /* Stat card — even denser */
    .stat-card { padding: 12px 10px; }
    .stat-card .num { font-size: 22px; }
    .stat-card .lbl { font-size: 11px; }

    /* Table guests row */
    .table-guest { font-size: 12.5px; gap: 6px; }
    .table-guest .num { min-width: 18px; font-size: 11.5px; }

    /* Empty slot button hint shrinks */
    .table-guest.empty-slot .nm::after { font-size: 10px; padding: 2px 6px; }

    /* PDF/Excel buttons — icon-only on smallest? Keep label, smaller font */
    .page-head .btn svg { width: 14px; height: 14px; }
}

/* ===== TINY (≤380px) ===== */
@media (max-width: 380px) {
    .container { padding: 0 12px; }
    .stat-chip { font-size: 10.5px; padding: 4px 7px; }
    .stat-chip .num { font-size: 12px; }
    .nav-user a { font-size: 11px; }

    /* Brand text shrinks */
    .app-brand { font-size: 14px; }
    .app-brand .dot { width: 24px; height: 24px; font-size: 12px; }

    /* Stats can shrink more */
    .stat-card .num { font-size: 20px; }

    /* Table tbody on tiny — try to keep readable */
    .tbl th, .tbl td { padding: 8px 8px; font-size: 12px; }
}

/* ===== TOUCH device — hover effects disabled ===== */
@media (hover: none) and (pointer: coarse) {
    .table-card:hover { transform: none; box-shadow: var(--shadow-sm); }
    .btn:hover { box-shadow: none; }
    .check-toggle:hover { border-color: var(--border-strong); color: var(--text-mute); }
    .check-toggle.checked:hover { border-color: var(--success); color: #fff; }
    .table-guest.empty-slot:hover .nm::after { opacity: 1; }   /* always show hint on touch */
    .stat-card:hover { transform: none; }
}

/* ===== iOS SAFE AREA (notch / home indicator) ===== */
@supports (padding: env(safe-area-inset-top)) {
    .app-nav { padding-top: env(safe-area-inset-top); }
    main { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}

/* ===== LANDSCAPE phone — keep nav compact ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .app-nav { position: relative; }   /* don't stick — small height already */
    .login-card { padding: 22px 20px; }
}
