/* ═══════════════════════════════════════════════════════════════
   Admin Layout — Google Material 3 + RTL + Design Tokens
   ═══════════════════════════════════════════════════════════════ */

/* ═══ Base ═══ */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
    direction: rtl;
}

/* ═══ Sidebar (Desktop) ═══ */
.admin-sidebar {
    width: 260px;
    background: #ffffff;
    border-inline-start: 1px solid #e8ecf5;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    z-index: 40;
    padding-bottom: 20px;
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 12px;
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.sidebar-brand-name {
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
}

/* Nav */
.sidebar-nav {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Item */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-item.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 800;
}

/* App-style Icon */
.sidebar-item__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s;
}

.sidebar-item:hover .sidebar-item__icon {
    transform: scale(1.08);
}

.sidebar-item__icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 60%);
    pointer-events: none;
}

.sidebar-item__icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    position: relative;
    z-index: 1;
}

/* Icon colors */
.sidebar-item__icon--indigo  { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.sidebar-item__icon--emerald { background: linear-gradient(135deg, #10b981, #059669); }
.sidebar-item__icon--violet  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.sidebar-item__icon--blue    { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.sidebar-item__icon--amber   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.sidebar-item__icon--rose    { background: linear-gradient(135deg, #ec4899, #be185d); }
.sidebar-item__icon--cyan    { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.sidebar-item__icon--slate   { background: linear-gradient(135deg, #64748b, #334155); }
.sidebar-item__icon--red     { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.sidebar-item__icon--fuchsia { background: linear-gradient(135deg, #d946ef, #a21caf); }
.sidebar-item__icon--sky     { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.sidebar-item__icon--orange  { background: linear-gradient(135deg, #f97316, #c2410c); }

/* ═══ Main ═══ */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ═══ Header ═══ */
.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #e8ecf5;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 10px;
    transition: background 0.15s;
}

.header-logo:hover {
    background: #f1f5f9;
}

.header-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.header-logo-text {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
}

/* Search */
.header-search {
    flex: 1;
    max-width: 720px;
    position: relative;
    margin: 0 auto;
}

.header-search input {
    width: 100%;
    height: 42px;
    padding: 0 48px 0 18px;
    border: 1px solid transparent;
    border-radius: 21px;
    background: #f1f5f9;
    font-family: inherit;
    font-size: 13.5px;
    color: #0f172a;
    transition: all 0.2s;
}

.header-search input:focus {
    outline: none;
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.header-search svg {
    position: absolute;
    inset-inline-end: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: #94a3b8;
    pointer-events: none;
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}

.header-icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.header-icon-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.header-icon-btn .badge {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.header-avatar:hover {
    transform: scale(1.05);
}

/* Touri Button */
.admin-header .touri-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.admin-header .touri-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    transform: scale(1.05);
}

/* Content */
.admin-content {
    flex: 1;
    padding: 24px 20px 80px;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   Touri Menu (Start Menu Style)
   ═══════════════════════════════════════════════════════════════ */

.touri-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.touri-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.touri-menu {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.98);
    transition: opacity 0.25s, visibility 0.25s, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    top: 50%;
    left: 50%;
    width: 880px;
    max-width: 94vw;
    height: 620px;
    max-height: 88vh;
}

.touri-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.touri-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.touri-menu__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.touri-menu__logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.touri-menu__title {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
}

.touri-menu__subtitle {
    font-size: 11.5px;
    color: #94a3b8;
    margin: 2px 0 0;
}

.touri-menu__close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.touri-menu__close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.touri-menu__search {
    position: relative;
    padding: 12px 22px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.touri-menu__search input {
    width: 100%;
    height: 40px;
    padding: 0 42px 0 14px;
    border: 1px solid #e8ecf5;
    border-radius: 10px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 13px;
    color: #0f172a;
    transition: all 0.2s;
}

.touri-menu__search input:focus {
    outline: none;
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.touri-menu__search svg {
    position: absolute;
    inset-inline-end: 34px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #94a3b8;
    pointer-events: none;
}

.touri-menu__body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px 20px;
    scrollbar-width: thin;
}

.touri-menu__body::-webkit-scrollbar { width: 6px; }
.touri-menu__body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.touri-group {
    margin-bottom: 22px;
}

.touri-group:last-child { margin-bottom: 0; }

.touri-group__title {
    font-size: 11.5px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 2px;
}

.touri-group__items {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.touri-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 6px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    text-align: center;
}

.touri-item:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.touri-item__icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s;
}

.touri-item:hover .touri-item__icon {
    transform: scale(1.08);
}

.touri-item__icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 60%);
    pointer-events: none;
}

.touri-item__icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    position: relative;
    z-index: 1;
}

.touri-item__label {
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    line-height: 1.3;
}

/* Icon colors */
.touri-item__icon--indigo  { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.touri-item__icon--emerald { background: linear-gradient(135deg, #10b981, #059669); }
.touri-item__icon--violet  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.touri-item__icon--red     { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.touri-item__icon--amber   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.touri-item__icon--cyan    { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.touri-item__icon--rose    { background: linear-gradient(135deg, #ec4899, #be185d); }
.touri-item__icon--slate   { background: linear-gradient(135deg, #64748b, #334155); }
.touri-item__icon--blue    { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.touri-item__icon--fuchsia { background: linear-gradient(135deg, #d946ef, #a21caf); }
.touri-item__icon--sky     { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.touri-item__icon--orange  { background: linear-gradient(135deg, #f97316, #c2410c); }

.touri-menu__footer {
    display: flex;
    gap: 8px;
    padding: 12px 22px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
    flex-shrink: 0;
}

.touri-footer-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e8ecf5;
    color: #334155;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    transition: all 0.2s;
}

.touri-footer-btn:hover {
    background: #f1f5f9;
}

.touri-footer-btn--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.touri-footer-btn--danger:hover {
    background: #fee2e2;
}

/* ═══════════════════════════════════════════════════════════════
   📱 Responsive
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    /* Sidebar Off-canvas */
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        inset-inline-start: 0;
        width: 280px;
        max-width: 85vw;
        transform: translateX(100%);
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
        z-index: 100;
    }

    [dir="rtl"] .admin-sidebar {
        transform: translateX(100%);
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    /* Header */
    .admin-header {
        padding: 0 12px;
        gap: 8px;
    }

    .header-logo-text { display: none; }
    .header-logo { padding: 4px; }
    .header-logo-icon { width: 36px; height: 36px; }

    .header-search {
        max-width: none;
        flex: 1;
    }

    .header-search input {
        height: 38px;
        font-size: 12.5px;
        padding: 0 40px 0 14px;
    }

    .header-icon-btn { width: 36px; height: 36px; }
    .header-icon-btn svg { width: 20px; height: 20px; }

    .header-avatar { width: 36px; height: 36px; font-size: 13px; }

    /* Touri */
    .touri-menu {
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        transform: translateY(100%);
    }

    .touri-menu.is-open {
        transform: translateY(0) !important;
    }

    .touri-menu__header { padding: 14px 16px; }
    .touri-menu__logo { width: 40px; height: 40px; font-size: 18px; }
    .touri-menu__search { padding: 10px 16px; }
    .touri-menu__body { padding: 14px 16px 20px; }

    .touri-group__items {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .touri-item { padding: 10px 4px; gap: 6px; }
    .touri-item__icon { width: 42px; height: 42px; border-radius: 12px; }
    .touri-item__icon svg { width: 20px; height: 20px; }
    .touri-item__label { font-size: 10px; }

    .touri-menu__footer { padding: 10px 16px; }
}

@media (max-width: 480px) {
    .admin-content { padding: 16px 12px 80px; }
    .touri-group__items { grid-template-columns: repeat(3, 1fr); }
}

ize: 9.5px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   موبایل — Touri Menu تمام‌صفحه (تقویت‌شده)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .touri-overlay {
        z-index: 9998 !important;
        background: rgba(15, 23, 42, 0.7) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    .touri-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        transform: translateY(100%) !important;
        z-index: 9999 !important;
        background: #ffffff !important;
    }

    .touri-menu.is-open {
        transform: translateY(0) !important;
    }

    .touri-menu__header {
        padding: 16px 18px !important;
        flex-shrink: 0 !important;
    }

    .touri-menu__logo {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    .touri-menu__title { font-size: 16px !important; }
    .touri-menu__subtitle { font-size: 11px !important; }

    .touri-menu__search {
        padding: 10px 18px !important;
        flex-shrink: 0 !important;
    }

    .touri-menu__body {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 16px 18px 24px !important;
    }

    .touri-group__items {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
    }

    .touri-item {
        padding: 10px 4px !important;
        gap: 6px !important;
    }

    .touri-item__icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 13px !important;
    }

    .touri-item__icon svg {
        width: 20px !important;
        height: 20px !important;
    }

    .touri-item__label {
        font-size: 10px !important;
    }

    .touri-menu__footer {
        padding: 12px 18px !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    .touri-group__items {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Bottom Navigation (Mobile) — App-style with Center Highlight
   ═══════════════════════════════════════════════════════════════ */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: #ffffff;
    border-top: 1px solid #e8ecf5;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
    display: none;
}

@media (max-width: 900px) {
    .mobile-bottom-nav {
        display: block;
    }
}

.mobile-bottom-nav .nav-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 500px;
    margin: 0 auto;
    padding: 6px 4px;
    direction: rtl;
    position: relative;
}

/* ─── آیتم معمولی ─── */
.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    transition: all 0.2s;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    min-width: 0;
    max-width: 70px;
    position: relative;
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.95);
}

.mobile-bottom-nav .nav-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: all 0.2s;
}

.mobile-bottom-nav .nav-item.active {
    color: #6366f1;
}

.mobile-bottom-nav .nav-item.active svg {
    transform: translateY(-2px);
}

.mobile-bottom-nav .nav-item span:not(.nav-item__icon-center) {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

/* ─── آیتم وسط — برجسته ─── */
.mobile-bottom-nav .nav-item--center {
    flex: 1.2;
    max-width: 80px;
    color: #6366f1;
    position: relative;
    margin-top: -20px;
}

.mobile-bottom-nav .nav-item--center .nav-item__icon-center {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    border: 4px solid #ffffff;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 2px;
}

.mobile-bottom-nav .nav-item--center svg {
    width: 26px;
    height: 26px;
    fill: currentColor !important;
    transform: none !important;
}

.mobile-bottom-nav .nav-item--center.active .nav-item__icon-center {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.55);
    transform: scale(1.05);
}

.mobile-bottom-nav .nav-item--center span:not(.nav-item__icon-center) {
    font-size: 10px;
    font-weight: 800;
    color: #4f46e5;
    margin-top: -2px;
}

/* ─── فاصله Content ─── */
@media (max-width: 900px) {
    .admin-content {
        padding-bottom: 90px !important;
    }
}

/* ─── موبایل کوچک ─── */
@media (max-width: 480px) {
    .mobile-bottom-nav .nav-item svg {
        width: 20px;
        height: 20px;
    }
    .mobile-bottom-nav .nav-item span:not(.nav-item__icon-center) {
        font-size: 9px;
    }
    .mobile-bottom-nav .nav-item--center .nav-item__icon-center {
        width: 52px;
        height: 52px;
    }
    .mobile-bottom-nav .nav-item--center svg {
        width: 24px;
        height: 24px;
    }
}
