/* ============================================================
   style.css - تمام استایل‌های منوی رستوران
   ============================================================ */

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

:root {
    --primary-color: #c0392b;
    --bg-color: #f7f3ef;
    --card-bg: #ffffff;
    --text-color: #2d2a24;
    --border-color: #e5ddd6;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --input-bg: #fcfaf8;
    --panel-bg: #fcf9f6;
    --settings-bg: #f8f4f0;
    --footer-bg: #fcf9f6;
    --category-bg: #f0ece7
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #e8e0d8;
    --border-color: #444;
    --shadow-color: rgba(0, 0, 0, 0.15);
    --input-bg: #3d3d3d;
    --panel-bg: #333;
    --settings-bg: #3d3d3d;
    --footer-bg: #2d2d2d;
    --category-bg: #3d3d3d
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    transition: all .3s ease
}

.app-card {
    max-width: 1200px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px var(--shadow-color);
    padding: 2rem;
    transition: all .3s ease
}

/* ===== هدر ===== */
.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color)
}

.brand {
    display: flex;
    align-items: center;
    gap: .8rem
}

.brand-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease
}

.brand-logo {
    height: 90px;
    width: auto;
    max-height: 90px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    transition: all .3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.06))
}

.brand-logo:hover {
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.12));
    transform: scale(1.02)
}

.brand h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Vazirmatn', sans-serif;
    margin: 0
}

.brand .badge {
    background: var(--primary-color)20;
    padding: .2rem .7rem;
    border-radius: 30px;
    font-size: .7rem;
    color: var(--primary-color);
    border: 1px solid var(--primary-color)30
}

.header-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap
}

/* ===== دکمه‌ها ===== */
.btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: .4rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: all .3s ease;
    font-family: 'Vazirmatn', sans-serif;
    box-shadow: 0 4px 12px var(--primary-color)30
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-color)40;
    filter: brightness(.95)
}

.btn-success {
    background: #1e7e34;
    box-shadow: 0 4px 12px rgba(30, 126, 52, .3)
}

.btn-success:hover {
    background: #146c2a;
    box-shadow: 0 6px 20px rgba(30, 126, 52, .4)
}

.btn-danger {
    background: #b03a2e;
    box-shadow: 0 4px 12px rgba(176, 58, 46, .3)
}

.btn-danger:hover {
    background: #962d22;
    box-shadow: 0 6px 20px rgba(176, 58, 46, .4)
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color)40;
    box-shadow: none
}

.btn-outline:hover {
    background: var(--primary-color)10;
    border-color: var(--primary-color)
}

.btn-sm {
    padding: .25rem .9rem;
    font-size: .75rem
}

.btn-warning {
    background: #e67e22;
    box-shadow: 0 4px 12px rgba(230, 126, 34, .3)
}

.btn-warning:hover {
    background: #d35400;
    box-shadow: 0 6px 20px rgba(230, 126, 34, .4)
}

.btn-ghost {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: .15rem .5rem;
    font-size: .7rem;
    border-radius: 15px;
    box-shadow: none
}

.btn-ghost:hover {
    background: var(--primary-color)10;
    border-color: var(--primary-color)
}

.download-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: .15rem .8rem;
    border-radius: 20px;
    font-size: .6rem;
    cursor: pointer;
    transition: all .3s ease;
    font-family: 'Vazirmatn', sans-serif
}

.download-btn:hover {
    transform: translateY(-1px);
    filter: brightness(.9)
}

.reload-btn {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: .15rem .8rem;
    border-radius: 20px;
    font-size: .6rem;
    cursor: pointer;
    transition: all .3s ease;
    font-family: 'Vazirmatn', sans-serif
}

.reload-btn:hover {
    transform: translateY(-1px);
    filter: brightness(.9)
}

/* ===== لاگین ===== */
#loginPage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1.5rem
}

#loginPage.active {
    display: flex
}

.login-box {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 30px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: var(--text-color)
}

.login-box h2 {
    font-size: 1.6rem;
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif
}

.login-box p {
    color: var(--text-color)70;
    margin-bottom: 1.5rem;
    font-size: .85rem
}

.login-box input {
    width: 100%;
    padding: .7rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    margin-bottom: .8rem;
    font-family: 'Vazirmatn', sans-serif;
    font-size: .9rem;
    background: var(--input-bg);
    color: var(--text-color)
}

.login-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color)20
}

.login-box .btn {
    width: 100%;
    padding: .7rem
}

.login-error {
    color: #c0392b;
    font-size: .8rem;
    margin-top: .5rem;
    display: none
}

/* ===== پنل مدیریت ===== */
.admin-panel {
    display: none;
    margin-top: 1.5rem
}

.admin-panel.active {
    display: block;
    animation: fadeIn .3s ease
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color)
}

.admin-toolbar .btn {
    font-size: .8rem;
    padding: .4rem 1.2rem
}

.admin-toolbar .btn.active {
    background: var(--primary-color);
    color: #fff
}

.admin-content {
    display: none;
    animation: fadeIn .3s ease
}

.admin-content.active {
    display: block
}

/* ===== فرم‌ها ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem
}

.form-grid .full-width {
    grid-column: 1/-1
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .2rem
}

.form-group label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-color)75;
    font-family: 'Vazirmatn', sans-serif
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: .45rem .8rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--input-bg);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    font-size: .85rem;
    transition: .2s
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color)15
}

.form-group textarea {
    border-radius: 16px;
    resize: vertical;
    min-height: 50px;
    direction: rtl
}

.form-group input[type=file] {
    padding: .3rem .6rem;
    border: 2px dashed var(--primary-color)50;
    cursor: pointer
}

.form-group .hint {
    font-size: .65rem;
    color: var(--text-color)45;
    font-family: 'Vazirmatn', sans-serif
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem
}

/* ===== مدیریت منو ===== */
.menu-manager .menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem
}

.menu-manager .menu-item-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: .6rem;
    border: 2px solid var(--border-color);
    transition: all .3s ease
}

.menu-manager .menu-item-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 16px var(--shadow-color)
}

.menu-manager .menu-item-card .item-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--border-color);
    cursor: pointer
}

.menu-manager .menu-item-card .item-info {
    margin-top: .4rem
}

.menu-manager .menu-item-card .item-info .name {
    font-weight: 700;
    font-size: .85rem
}

.menu-manager .menu-item-card .item-info .price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: .75rem
}

.menu-manager .menu-item-card .item-info .category {
    font-size: .6rem;
    color: var(--text-color)50;
    background: var(--category-bg);
    padding: .1rem .4rem;
    border-radius: 12px;
    display: inline-block
}

.menu-manager .menu-item-card .item-actions {
    display: flex;
    gap: .3rem;
    margin-top: .4rem
}

.menu-manager .menu-item-card .item-actions .btn {
    flex: 1;
    font-size: .6rem;
    padding: .15rem .3rem;
    text-align: center
}

/* ===== تنظیمات ===== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem
}

.settings-section {
    background: var(--panel-bg);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    border: 2px solid var(--border-color)
}

.settings-section h4 {
    font-size: .95rem;
    color: var(--primary-color);
    margin-bottom: .8rem;
    font-family: 'Vazirmatn', sans-serif;
    display: flex;
    align-items: center;
    gap: .5rem
}

.social-row {
    display: flex;
    align-items: center;
    gap: .5rem
}

.social-row .icon {
    width: 28px;
    color: var(--primary-color);
    font-size: 1rem;
    text-align: center
}

.social-row input {
    flex: 1
}

/* ===== فیلتر دسته‌بندی ===== */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .6rem;
    background: var(--category-bg);
    border-radius: 14px;
    border: 2px solid var(--border-color)
}

.category-filter .cat-btn {
    padding: .25rem .8rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: .75rem;
    transition: all .3s ease;
    font-weight: 500
}

.category-filter .cat-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color)10
}

.category-filter .cat-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 3px 10px var(--primary-color)25
}

.category-filter .cat-btn .badge {
    background: var(--primary-color)20;
    padding: .05rem .4rem;
    border-radius: 12px;
    font-size: .55rem;
    margin-right: .2rem
}

.category-filter .cat-btn.active .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff
}

/* ===== منوی عمومی ===== */
.public-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem
}

.public-menu-item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: .8rem;
    border: 2px solid var(--border-color);
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px var(--shadow-color)
}

.public-menu-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px var(--shadow-color);
    transform: translateY(-3px)
}

.public-menu-item .item-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--border-color);
    cursor: pointer
}

.public-menu-item .item-img:hover {
    filter: brightness(0.92);
    transform: scale(1.01)
}

.public-menu-item .item-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 700;
    font-size: .95rem;
    margin-top: .4rem
}

.public-menu-item .item-title .price {
    background: var(--primary-color)10;
    padding: .1rem .6rem;
    border-radius: 20px;
    color: var(--primary-color);
    font-size: .75rem;
    border: 1px solid var(--primary-color)20;
    white-space: nowrap
}

.public-menu-item .item-category {
    font-size: .65rem;
    color: var(--text-color)45;
    background: var(--category-bg);
    padding: .1rem .5rem;
    border-radius: 12px;
    display: inline-block;
    margin: .2rem 0 .1rem;
    align-self: flex-start
}

.public-menu-item .item-desc {
    font-size: .75rem;
    color: var(--text-color)60;
    margin: .2rem 0 0;
    line-height: 1.5;
    flex: 1
}

/* ===== هدر دسته‌بندی ===== */
.category-header {
    grid-column: 1/-1;
    margin-top: 0.6rem;
    margin-bottom: 0.3rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color)08, var(--primary-color)03);
    border-radius: 12px;
    border-right: 5px solid var(--primary-color);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: .95rem;
    color: var(--primary-color);
    font-family: 'Vazirmatn', sans-serif;
    display: flex;
    align-items: center;
    gap: .6rem;
    letter-spacing: .3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all .3s ease
}

.category-header:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateX(-3px)
}

.category-header .cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-color)15;
    border-radius: 8px;
    font-size: .85rem;
    color: var(--primary-color);
    flex-shrink: 0
}

.category-header .cat-count {
    font-size: .7rem;
    font-weight: 400;
    color: var(--text-color)45;
    background: var(--card-bg);
    padding: .05rem .6rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin-right: auto
}

.category-header .cat-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, var(--primary-color)20, transparent);
    margin: 0 .3rem
}

/* ===== QR Code ===== */
.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem;
    background: var(--panel-bg);
    border-radius: 16px;
    border: 2px solid var(--border-color)
}

.qr-section .qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem
}

.qr-section .qr-container .qr-image-wrapper {
    background: #fff;
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    min-width: 220px;
    border: 2px solid var(--border-color)
}

.qr-section .qr-container .qr-image-wrapper img {
    max-width: 200px;
    max-height: 200px;
    width: 200px;
    height: 200px;
    display: block
}

.qr-section .qr-container .qr-image-wrapper .qr-placeholder {
    color: var(--text-color)30;
    font-size: .85rem;
    font-family: 'Vazirmatn', sans-serif
}

.qr-section .qr-url {
    font-size: .7rem;
    color: var(--text-color)50;
    word-break: break-all;
    text-align: center;
    direction: ltr;
    max-width: 260px;
    background: var(--input-bg);
    padding: .2rem .8rem;
    border-radius: 20px;
    border: 1px solid var(--border-color)
}

.qr-section .qr-actions {
    display: flex;
    gap: .5rem;
    margin-top: .3rem;
    flex-wrap: wrap;
    justify-content: center
}

.qr-section .qr-actions .btn {
    font-size: .7rem;
    padding: .25rem .8rem
}

/* ===== فوتر ===== */
.footer-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: .5rem;
    cursor: pointer;
    transition: all .3s ease
}

.footer-qr-wrapper:hover {
    transform: scale(1.05)
}

.footer-qr-wrapper .footer-qr-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: #fff;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all .3s ease;
    object-fit: contain;
    border: 1px solid var(--border-color)
}

.footer-qr-wrapper .footer-qr-image:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15)
}

.footer-qr-wrapper .qr-label {
    font-size: .55rem;
    color: var(--text-color)40;
    margin-top: .2rem;
    font-family: 'Vazirmatn', sans-serif
}

.footer {
    margin-top: 2rem;
    padding: 1.5rem 1.2rem 1rem;
    border-top: 2px solid var(--primary-color);
    background: var(--footer-bg);
    border-radius: 16px
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1.5rem
}

.footer-section h4 {
    font-size: .9rem;
    color: var(--primary-color);
    margin-bottom: .6rem;
    font-family: 'Vazirmatn', sans-serif;
    position: relative;
    padding-bottom: .3rem
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 10px
}

.footer-brand-top {
    display: flex;
    align-items: center;
    gap: .6rem
}

.footer-brand-top .brand-logo-small {
    height: 70px;
    width: auto;
    max-height: 70px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    transition: all .3s ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.05))
}

.footer-brand-top .brand-logo-small:hover {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transform: scale(1.02)
}

.footer-brand-top h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-family: 'Vazirmatn', sans-serif
}

.footer-desc {
    font-size: .8rem;
    color: var(--text-color)55;
    line-height: 1.6
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem 0;
    color: var(--text-color)65;
    font-size: .8rem
}

.footer-contact-item i {
    width: 18px;
    color: var(--primary-color);
    font-size: .9rem
}

.footer-contact-item a {
    color: inherit;
    text-decoration: none
}

.footer-contact-item a:hover {
    color: var(--primary-color)
}

.footer-social-links {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: .3rem
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color)10;
    color: var(--primary-color);
    border: 2px solid var(--primary-color)20;
    transition: all .3s ease;
    font-size: .85rem;
    text-decoration: none
}

.footer-social-links a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px)
}

.footer-links a {
    color: var(--text-color)65;
    text-decoration: none;
    font-size: .8rem;
    display: block;
    padding: .15rem 0;
    transition: all .3s ease
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: .3rem
}

.footer-bottom {
    margin-top: 1rem;
    padding-top: .8rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem
}

.footer-copyright {
    font-size: .75rem;
    color: var(--text-color)45
}

.footer-copyright .highlight {
    color: var(--primary-color);
    font-weight: 600
}

.footer-credit {
    font-size: .75rem;
    color: var(--text-color)45
}

.footer-credit a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600
}

.footer-credit a:hover {
    text-decoration: underline
}

/* ===== وضعیت داده‌ها ===== */
.data-status {
    font-size: .65rem;
    color: var(--text-color)35;
    text-align: center;
    margin-top: .5rem;
    padding: .3rem;
    background: var(--category-bg);
    border-radius: 10px
}

.status-buttons {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: .3rem
}

.public-menu-section.hidden {
    display: none !important
}

/* ===== توست ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: #fff;
    padding: .8rem 1.5rem;
    border-radius: 30px;
    font-size: .85rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: none;
    animation: slideUp .3s ease;
    font-family: 'Vazirmatn', sans-serif
}

.toast.show {
    display: block
}

.toast.success {
    background: #1e7e34
}

.toast.error {
    background: #c0392b
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0
    }
    to {
        transform: translateY(0);
        opacity: 1
    }
}

/* ===== تگ‌های دسته‌بندی ===== */
.cat-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--primary-color)10;
    padding: .2rem .7rem;
    border-radius: 20px;
    border: 1px solid var(--primary-color)20;
    color: var(--text-color);
    font-size: .8rem
}

.cat-tag .remove-cat {
    cursor: pointer;
    color: #e74c3c;
    font-weight: bold;
    font-size: .9rem;
    padding: 0 .2rem;
    transition: all .3s ease
}

.cat-tag .remove-cat:hover {
    transform: scale(1.2)
}

.cat-tag .move-btn {
    cursor: pointer;
    color: #2ecc71;
    font-size: .7rem;
    padding: 0 .2rem;
    transition: all .3s ease;
    font-weight: bold
}

.cat-tag .move-btn:hover {
    transform: scale(1.2)
}

/* ===== کاربران ===== */
.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3rem .6rem;
    border-bottom: 1px solid var(--border-color)
}

.user-item:last-child {
    border-bottom: none
}

.user-item .username {
    font-weight: 600
}

.editing-badge {
    background: #e67e22;
    color: #fff;
    padding: .1rem .6rem;
    border-radius: 20px;
    font-size: .7rem;
    margin-right: .5rem
}

.image-preview-container {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: .3rem
}

.image-preview-container img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    object-fit: cover
}

.image-upload-info {
    font-size: .7rem;
    color: var(--text-color)50
}

/* ===== آیتم‌های داینامیک ===== */
.dynamic-item {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    background: var(--input-bg);
    border-radius: 12px;
    padding: .6rem .8rem;
    margin-bottom: .4rem;
    border: 1px solid var(--border-color);
    transition: all .3s ease
}

.dynamic-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-color)
}

.dynamic-item .item-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5rem
}

.dynamic-item .item-fields .full-width {
    grid-column: 1/-1
}

.dynamic-item .item-fields input,
.dynamic-item .item-fields textarea {
    padding: .3rem .6rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    font-size: .8rem;
    width: 100%;
    transition: .2s
}

.dynamic-item .item-fields input:focus,
.dynamic-item .item-fields textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color)15
}

.dynamic-item .item-fields textarea {
    resize: vertical;
    min-height: 38px
}

.dynamic-item .item-remove {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 1.1rem;
    padding: .2rem .3rem;
    transition: all .3s ease;
    flex-shrink: 0;
    margin-top: .2rem
}

.dynamic-item .item-remove:hover {
    transform: scale(1.2);
    color: #e74c3c
}

.dynamic-item .item-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0
}

/* ===== مودال‌ها ===== */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    animation: modalFadeIn .3s ease
}

.image-modal.active {
    display: flex
}

.image-modal img {
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: modalZoomIn .35s ease;
    user-select: none;
    -webkit-user-drag: none
}

.image-modal .close-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: .8rem;
    font-family: 'Vazirmatn', sans-serif;
    background: rgba(0, 0, 0, 0.3);
    padding: .4rem 1.2rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
    animation: modalFadeIn .5s ease
}

.image-modal .close-icon {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    cursor: pointer;
    transition: all .3s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
    font-family: sans-serif
}

.image-modal .close-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(90deg)
}

@keyframes modalFadeIn {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

@keyframes modalZoomIn {
    from {
        transform: scale(.85);
        opacity: .4
    }
    to {
        transform: scale(1);
        opacity: 1
    }
}

.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    z-index: 99998;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    animation: modalFadeIn .3s ease
}

.qr-modal.active {
    display: flex
}

.qr-modal .qr-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 2rem 2rem 1.8rem;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: modalZoomIn .35s ease;
    max-width: 90%;
    min-width: 280px
}

.qr-modal .qr-modal-content img {
    max-width: 380px;
    max-height: 380px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #fff;
    padding: 8px
}

.qr-modal .qr-modal-content .qr-modal-label {
    margin-top: .8rem;
    font-size: .8rem;
    color: #2d2a24;
    font-family: 'Vazirmatn', sans-serif;
    text-align: center;
    direction: ltr;
    word-break: break-all;
    background: #f5f5f5;
    padding: .3rem .8rem;
    border-radius: 20px;
    max-width: 100%
}

.qr-modal .close-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: .8rem;
    font-family: 'Vazirmatn', sans-serif;
    background: rgba(0, 0, 0, 0.3);
    padding: .4rem 1.2rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
    animation: modalFadeIn .5s ease
}

.qr-modal .close-icon {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    cursor: pointer;
    transition: all .3s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
    font-family: sans-serif
}

.qr-modal .close-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(90deg)
}

/* ===== اسکلتون ===== */
.skeleton-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
    padding: 1rem 0
}

.skeleton-item {
    background: var(--border-color);
    border-radius: 16px;
    height: 220px;
    animation: skeleton-pulse 1.5s ease-in-out infinite
}

@keyframes skeleton-pulse {
    0% {
        opacity: 1
    }
    50% {
        opacity: .4
    }
    100% {
        opacity: 1
    }
}

.skeleton-wrapper.hidden {
    display: none
}

/* ===== انیمیشن آیتم‌ها ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.public-menu-item {
    animation: fadeInUp .4s ease forwards
}

.public-menu-item:nth-child(1) {
    animation-delay: .05s
}
.public-menu-item:nth-child(2) {
    animation-delay: .1s
}
.public-menu-item:nth-child(3) {
    animation-delay: .15s
}
.public-menu-item:nth-child(4) {
    animation-delay: .2s
}
.public-menu-item:nth-child(5) {
    animation-delay: .25s
}
.public-menu-item:nth-child(6) {
    animation-delay: .3s
}
.public-menu-item:nth-child(7) {
    animation-delay: .35s
}
.public-menu-item:nth-child(8) {
    animation-delay: .4s
}
.public-menu-item:nth-child(9) {
    animation-delay: .45s
}
.public-menu-item:nth-child(10) {
    animation-delay: .5s
}
.public-menu-item:nth-child(11) {
    animation-delay: .55s
}
.public-menu-item:nth-child(12) {
    animation-delay: .6s
}

/* ===== جستجو ===== */
.search-wrapper {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: .5rem;
    background: var(--panel-bg);
    border-radius: 16px;
    border: 2px solid var(--border-color)
}

.search-wrapper .search-input {
    flex: 1;
    min-width: 200px;
    padding: .5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--input-bg);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    font-size: .9rem;
    transition: .2s
}

.search-wrapper .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color)15
}

.search-wrapper .search-filters {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap
}

.search-wrapper .search-filters select {
    padding: .4rem .8rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--input-bg);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    font-size: .8rem;
    transition: .2s
}

.search-wrapper .search-filters select:focus {
    outline: none;
    border-color: var(--primary-color)
}

.search-wrapper .search-clear {
    background: transparent;
    border: none;
    color: var(--text-color)40;
    cursor: pointer;
    font-size: .9rem;
    padding: 0 .5rem;
    transition: .2s
}

.search-wrapper .search-clear:hover {
    color: var(--primary-color)
}

.search-result-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-color)50;
    grid-column: 1/-1
}

/* ===== ریسپانسیو ===== */
@media(max-width:600px) {
    .qr-modal .qr-modal-content {
        padding: 1rem 1rem .8rem
    }
    .qr-modal .qr-modal-content img {
        max-width: 260px;
        max-height: 260px
    }
    .qr-modal .close-icon {
        top: 1rem;
        left: 1rem;
        font-size: 1.4rem;
        width: 38px;
        height: 38px
    }
    .qr-modal .close-hint {
        font-size: .65rem;
        padding: .25rem .8rem;
        bottom: 1rem
    }
}

@media(max-width:768px) {
    .app-card {
        padding: 1rem
    }
    .form-grid {
        grid-template-columns: 1fr
    }
    .settings-grid {
        grid-template-columns: 1fr
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1rem
    }
    .public-menu-grid {
        grid-template-columns: 1fr 1fr
    }
    .menu-manager .menu-grid {
        grid-template-columns: 1fr 1fr
    }
    .header {
        flex-direction: column;
        align-items: stretch
    }
    .brand h1 {
        font-size: 1.3rem
    }
    .admin-toolbar {
        justify-content: center
    }
    .admin-toolbar .btn {
        font-size: .7rem;
        padding: .3rem .8rem
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center
    }
    .search-wrapper {
        flex-direction: column
    }
    .search-wrapper .search-filters {
        flex-wrap: wrap
    }
}

@media(max-width:480px) {
    .app-card {
        padding: .7rem;
        border-radius: 20px
    }
    .brand-logo {
        height: 65px;
        max-height: 65px
    }
    .brand h1 {
        font-size: 1.1rem
    }
    .btn {
        font-size: .75rem;
        padding: .3rem .8rem
    }
    .login-box {
        padding: 1.5rem
    }
    .public-menu-grid {
        grid-template-columns: 1fr
    }
    .menu-manager .menu-grid {
        grid-template-columns: 1fr
    }
    .public-menu-item .item-img {
        height: 100px
    }
    .menu-manager .menu-item-card .item-img {
        height: 80px
    }
    .footer-brand-top .brand-logo-small {
        height: 50px;
        max-height: 50px
    }
    .image-modal .close-icon {
        top: 1rem;
        left: 1rem;
        font-size: 1.4rem;
        width: 38px;
        height: 38px
    }
    .image-modal .close-hint {
        font-size: .65rem;
        padding: .25rem .8rem;
        bottom: 1rem
    }
    .image-modal img {
        max-width: 96%;
        max-height: 85%
    }
}