/* =====================================================================
   Wasabi Admin — a wasabi.hu arculatára hangolt felület
   Színek:  grafit #373B45 · piros #EA1212 · sárga #ffd10b · háttér #f5f5f5
   Betűk:   Hammersmith One (címsorok) · Open Sans (szövegtörzs)
   ===================================================================== */

:root {
    --wasabi-red:         #EA1212;
    --wasabi-red-dark:    #c50f0f;
    --wasabi-red-soft:    #fdeaea;
    --charcoal:           #373B45;
    --charcoal-dark:      #2b2e36;
    --charcoal-deep:      #23262d;
    --brand-yellow:       #ffd10b;
    --page-bg:            #f5f5f5;
    --card-shadow:        0 1px 2px rgba(55, 59, 69, .05), 0 10px 30px rgba(55, 59, 69, .07);
    --font-display:       'Hammersmith One', sans-serif;
    --font-body:          'Open Sans', sans-serif;
    --sidebar-width:      248px;
}

html, body {
    height: 100%;
}

body.admin-body {
    font-family: var(--font-body);
    background: var(--page-bg);
    color: var(--charcoal);
    font-size: .925rem;
}

h1, h2, h3, h4, h5, .font-display {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: .01em;
    color: var(--charcoal);
}

a { color: var(--wasabi-red-dark); }
a:hover { color: var(--wasabi-red); }

/* ------------------------------------------------------------------ */
/* Oldalsáv                                                            */
/* ------------------------------------------------------------------ */

.sidebar {
    --bs-offcanvas-width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--charcoal) 0%, var(--charcoal-deep) 100%) !important;
    color: #cfd2d8;
}

@media (min-width: 992px) {
    .sidebar {
        width: var(--sidebar-width);
        min-height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }
}

.sidebar-brand {
    display: block;
    padding: 1.35rem 1.4rem 1.1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sidebar-brand .brand-logo {
    display: block;
    width: 158px;
    max-width: 100%;
    height: auto;
}

.sidebar-brand .brand-sub {
    display: inline-block;
    margin-top: .45rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--wasabi-red);
}

.sidebar .nav-section {
    padding: 1.05rem 1.4rem .35rem;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .32);
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .52rem 1.4rem;
    color: #b9bdc6;
    font-size: .875rem;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}

.sidebar .nav-link .bi {
    font-size: 1rem;
    width: 1.15rem;
    text-align: center;
    opacity: .8;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .05);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(234, 18, 18, .16);
    border-left-color: var(--wasabi-red);
}

.sidebar .nav-link.active .bi { color: var(--wasabi-red); opacity: 1; }

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.4rem 1.2rem;
    font-size: .72rem;
    color: rgba(255, 255, 255, .35);
    border-top: 1px solid rgba(255, 255, 255, .07);
}

/* ------------------------------------------------------------------ */
/* Fő tartalom és fejléc                                               */
/* ------------------------------------------------------------------ */

.main-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .main-wrap { margin-left: var(--sidebar-width); }
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e7e8ea;
    padding: .8rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar .page-title {
    font-family: var(--font-display);
    font-size: 1.28rem;
    margin: 0;
    position: relative;
    padding-bottom: .1rem;
}

.topbar .page-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -.35rem;
    width: 2rem;
    height: 3px;
    border-radius: 2px;
    background: var(--wasabi-red);
}

.tenant-switcher {
    display: flex;
    align-items: center;
    gap: .45rem;
    background: #f6f6f7;
    border: 1px solid #e7e8ea;
    border-radius: 10px;
    padding: .28rem .55rem;
}

.tenant-switcher .tenant-icon { color: var(--wasabi-red); }

.tenant-switcher .form-select {
    border: none;
    background-color: transparent;
    font-weight: 600;
    font-size: .82rem;
    max-width: 260px;
    padding-top: .15rem;
    padding-bottom: .15rem;
}

.tenant-switcher .form-select:focus { box-shadow: none; }

.tenant-switcher .tenant-fixed {
    font-weight: 600;
    font-size: .82rem;
    padding: .15rem .3rem;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scope-all-badge {
    background: var(--charcoal);
    color: #fff;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--charcoal);
}

.user-chip .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--wasabi-red);
    color: #fff;
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}

.user-chip .user-name { font-weight: 600; font-size: .85rem; line-height: 1.1; }
.user-chip .user-role { font-size: .7rem; color: #8a8e97; }

.content {
    padding: 1.6rem;
    flex: 1;
}

/* ------------------------------------------------------------------ */
/* Kártyák, táblázatok, gombok                                         */
/* ------------------------------------------------------------------ */

.card {
    border: none;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
}

.card .card-header {
    background: #fff;
    border-bottom: 1px solid #eef0f1;
    border-radius: 14px 14px 0 0 !important;
    font-family: var(--font-display);
    font-size: 1rem;
    padding: .95rem 1.25rem;
}

.stat-card { overflow: hidden; position: relative; }

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--wasabi-red-soft);
    color: var(--wasabi-red-dark);
}

.stat-card .stat-icon.red    { background: var(--wasabi-red-soft); color: var(--wasabi-red); }
.stat-card .stat-icon.yellow { background: #fff7d6; color: #a8860a; }
.stat-card .stat-icon.dark   { background: #e8e9eb; color: var(--charcoal); }

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.7rem;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #8a8e97;
    font-weight: 700;
}

.table-wasabi thead th {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #8a8e97;
    font-weight: 700;
    border-bottom: 2px solid #eef0f1;
    white-space: nowrap;
}

.table-wasabi tbody td { vertical-align: middle; }

.table-wasabi tbody tr:hover { background: #fafbf9; }

.btn { border-radius: 9px; font-weight: 600; }

.btn-wasabi {
    background: var(--wasabi-red);
    border-color: var(--wasabi-red);
    color: #fff;
}

.btn-wasabi:hover, .btn-wasabi:focus {
    background: var(--wasabi-red-dark);
    border-color: var(--wasabi-red-dark);
    color: #fff;
}

.btn-outline-wasabi {
    border-color: var(--wasabi-red);
    color: var(--wasabi-red-dark);
}

.btn-outline-wasabi:hover {
    background: var(--wasabi-red);
    border-color: var(--wasabi-red);
    color: #fff;
}

.btn-charcoal {
    background: var(--charcoal);
    border-color: var(--charcoal);
    color: #fff;
}

.btn-charcoal:hover { background: var(--charcoal-dark); border-color: var(--charcoal-dark); color: #fff; }

.form-control:focus, .form-select:focus {
    border-color: var(--wasabi-red);
    box-shadow: 0 0 0 .2rem rgba(234, 18, 18, .15);
}

.form-check-input:checked {
    background-color: var(--wasabi-red);
    border-color: var(--wasabi-red);
}

/* Státusz-jelvények */
.status-badge {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    padding: .38em .7em;
    border-radius: 20px;
}

.status-new       { background: var(--brand-yellow); color: #5a4a00; }
.status-preparing { background: var(--charcoal);     color: #fff; }
.status-served    { background: var(--wasabi-red);   color: #fff; }
.status-cancelled { background: #9aa0a8;             color: #fff; }

.badge-unavailable { background: var(--wasabi-red);      color: #fff; }
.badge-available   { background: var(--wasabi-red-soft); color: var(--wasabi-red-dark); }

.label-pill { background: var(--wasabi-red); }

.item-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    background: #eee;
}

.label-pill {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    color: #fff;
    border-radius: 20px;
    padding: .25em .7em;
    margin: 0 .15rem .15rem 0;
}

/* WYSIWYG editor (Quill) a leírás mezőkhöz */
.wysiwyg-editor {
    min-height: 140px;
    background: #fff;
    font-family: var(--font-body);
    font-size: .925rem;
}

/* A Quill alapból height:100%-ot ad a konténernek, ami kilógna a kártyából —
   a tartalomhoz igazodó magasságot kényszerítjük ki. */
.wysiwyg-editor.ql-container {
    height: auto;
}

.wysiwyg-editor .ql-editor {
    min-height: 140px;
}

.ql-toolbar.ql-snow {
    border-radius: 9px 9px 0 0;
    border-color: #dee2e6;
    background: #fafafa;
}

.ql-container.ql-snow {
    border-radius: 0 0 9px 9px;
    border-color: #dee2e6;
}

/* ------------------------------------------------------------------ */
/* Bejelentkező oldal                                                  */
/* ------------------------------------------------------------------ */

body.login-body {
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(234, 18, 18, .12) 0, transparent 26rem),
        radial-gradient(circle at 85% 80%, rgba(234, 18, 18, .08) 0, transparent 22rem),
        radial-gradient(rgba(255, 255, 255, .028) 2px, transparent 2.6px),
        linear-gradient(160deg, var(--charcoal) 0%, var(--charcoal-deep) 100%);
    background-size: auto, auto, 26px 26px, auto;
}

.login-wrap {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-logo {
    display: block;
    width: 240px;
    max-width: 75%;
    height: auto;
    margin: 0 auto 1.7rem;
}

.login-card {
    width: 100%;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .4);
    padding: 2.4rem 2.2rem 2rem;
    border-top: 5px solid var(--wasabi-red);
}

.login-sub {
    text-align: center;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: var(--wasabi-red);
    margin: 0 0 1.8rem;
}

/* ------------------------------------------------------------------ */
/* Reszponzív viselkedés                                               */
/* ------------------------------------------------------------------ */

@media (max-width: 991.98px) {
    .content { padding: 1rem; }
}

@media (min-width: 992px) {
    .sidebar-toggle { display: none; }
}
