/* Global Menu Builder - Dark Theme Styles */
/* Matches ModuleGroup / StaffAccountManagement card UI patterns */
/* Prefix: gmb- (Global Menu Builder) */

/* ── Page Container ─────────────────────────────────────────────── */
.gmb-page {
    background: #0F1412;
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* ── Stats Bar ────────────────────────────────────────────────────── */
.gmb-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #2E2E2E;
}

.gmb-stat-card {
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.gmb-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.gmb-stat-icon--categories {
    background: rgba(45, 212, 191, 0.12);
    color: #2DD4BF;
}

.gmb-stat-icon--items {
    background: rgba(34, 197, 94, 0.12);
    color: #22C55E;
}

.gmb-stat-icon--deleted {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
}

.gmb-stat-value {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.gmb-stat-label {
    color: #6B7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Tab Bar ──────────────────────────────────────────────────────── */
.gmb-tabs {
    display: flex;
    gap: 0;
    padding: 0 1.25rem;
    border-bottom: 2px solid #2E2E2E;
    background: #0F1412;
}

.gmb-tab {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s;
}

.gmb-tab:hover {
    color: #D1D5DB;
}

.gmb-tab--active {
    color: #2DD4BF;
    border-bottom-color: #2DD4BF;
}

.gmb-tab i {
    font-size: 0.813rem;
}

/* ── Header ───────────────────────────────────────────────────────── */
.gmb-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #0F1412;
    border-bottom: 2px solid #2E2E2E;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gmb-header-info {
    flex: 1;
    min-width: 0;
}

.gmb-header-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gmb-header-title i {
    color: #2DD4BF;
    font-size: 1.125rem;
}

.gmb-header-subtitle {
    color: #6B7280;
    font-size: 0.813rem;
}

/* ── Search Bar ────────────────────────────────────────────────────── */
.gmb-search-bar {
    padding: 0.75rem 1.25rem;
    border-bottom: 2px solid #2E2E2E;
}

.gmb-search-wrap {
    position: relative;
    max-width: 380px;
}

.gmb-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.813rem;
    color: #6B7280;
    pointer-events: none;
}

.gmb-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 0.625rem;
    color: #fff;
    font-size: 0.875rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gmb-search-input:focus {
    border-color: #2DD4BF;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.08);
}

/* ── Filter Bar ────────────────────────────────────────────────────── */
.gmb-filter-bar {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 2px solid #2E2E2E;
}

.gmb-filter-bar select,
.gmb-filter-select {
    padding: 0.5rem 1rem;
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.gmb-filter-bar select:focus,
.gmb-filter-select:focus {
    border-color: #2DD4BF;
}

/* ── Filter Context Tag ─────────────────────────────────────────── */
.gmb-filter-context {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 0.5rem;
    color: #2DD4BF;
    font-size: 0.813rem;
    font-weight: 600;
    white-space: nowrap;
}

.gmb-btn--clear-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    color: #EF4444;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}

.gmb-btn--clear-filter:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ── Card Grid ────────────────────────────────────────────────────── */
.gmb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 1.25rem;
}

/* ── Category Card ──────────────────────────────────────────────────── */
.gmb-card {
    background: #1A1D1C;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    border: none;
}

.gmb-card:hover {
    transform: translateY(-4px);
}

/* Hide borders on ALL structural card elements — matches ModuleGroup/StaffAccountManagement card UI pattern */
.gmb-card *,
.gmb-card *::before,
.gmb-card *::after {
    border: none !important;
}

.gmb-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.gmb-card-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(45, 212, 191, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #2DD4BF;
    font-size: 1.5rem;
}

.gmb-card-info {
    flex: 1;
    min-width: 0;
}

.gmb-card-title {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmb-card-desc {
    color: #A3A3A3;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Card Badges ──────────────────────────────────────────────────── */
.gmb-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.gmb-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.gmb-card-badge--active {
    background: rgba(34, 197, 94, 0.12);
    color: #22C55E;
}

.gmb-card-badge--deleted {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
}

.gmb-card-badge--items {
    background: rgba(45, 212, 191, 0.12);
    color: #2DD4BF;
}

.gmb-card-badge--type {
    background: #252927;
    color: #6B7280;
}

/* ── Food Item Card Image ─────────────────────────────────────────── */
.gmb-card-image {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    background: #252927;
}

.gmb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gmb-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, #252927 0%, #1A1D1C 100%);
}

.gmb-card-price {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 20, 18, 0.85);
    backdrop-filter: blur(4px);
    color: #2DD4BF;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
}

/* ── Card Actions ──────────────────────────────────────────────────── */
.gmb-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.gmb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.813rem;
    border-radius: 0.5rem;
    transition: all 0.15s;
    font-family: inherit;
}

.gmb-btn--primary {
    padding: 0.625rem 1rem;
    border: none;
    background: linear-gradient(135deg, #2DD4BF, #22C55E);
    color: #0F1412;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.2);
}

.gmb-btn--primary:hover {
    box-shadow: 0 4px 16px rgba(45, 212, 191, 0.3);
    transform: translateY(-1px);
}

.gmb-btn--edit {
    flex: 1;
    padding: 10px;
    background: #252927;
    border: 1px solid #2E2E2E;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.gmb-btn--edit:hover {
    background: #2E2E2E;
}

.gmb-btn--items {
    flex: 1;
    padding: 10px;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 12px;
    color: #2DD4BF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.gmb-btn--items:hover {
    background: rgba(45, 212, 191, 0.2);
}

.gmb-btn--delete {
    flex: 1;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #EF4444;
    border-radius: 12px;
    color: #EF4444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.gmb-btn--delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.gmb-btn--restore {
    flex: 1;
    padding: 10px;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 12px;
    color: #2DD4BF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.gmb-btn--restore:hover {
    background: rgba(45, 212, 191, 0.2);
}

.gmb-btn--pdelete {
    flex: 1;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #EF4444;
    border-radius: 12px;
    color: #EF4444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.gmb-btn--pdelete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.gmb-btn--cancel {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.625rem;
    border: 1px solid #2E2E2E;
    font-weight: 600;
    font-size: 0.875rem;
    background: #1A1D1C;
    color: #D1D5DB;
    cursor: pointer;
    font-family: inherit;
}

.gmb-btn--cancel:hover {
    background: #252927;
}

.gmb-btn--danger {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.625rem;
    border: none;
    font-weight: 700;
    font-size: 0.875rem;
    background: #EF4444;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

.gmb-btn--danger:hover {
    background: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.gmb-btn--back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #252927;
    border: 1px solid #2E2E2E;
    border-radius: 10px;
    color: #D1D5DB;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}

.gmb-btn--back:hover {
    background: #2E2E2E;
}

.gmb-btn--loadmore {
    padding: 0.75rem 2rem;
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 12px;
    color: #D1D5DB;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    display: block;
    margin: 1rem auto 0;
}

.gmb-btn--loadmore:hover {
    background: #252927;
    border-color: #2DD4BF;
    color: #2DD4BF;
}

/* ── Empty State ───────────────────────────────────────────────────── */
.gmb-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.gmb-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: #4B5563;
    display: block;
}

.gmb-empty-icon--large {
    font-size: 3rem;
    color: #6B7280;
}

.gmb-empty-title {
    color: #fff;
    font-size: 1.063rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gmb-empty-desc {
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ── Delete Confirmation Overlay ─────────────────────────────────── */
.gmb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gmb-overlay-card {
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 0.875rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gmb-overlay-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    color: #EF4444;
}

.gmb-overlay-title {
    color: #fff;
    font-size: 1.063rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gmb-overlay-desc {
    color: #9CA3AF;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.gmb-overlay-actions {
    display: flex;
    gap: 0.75rem;
}

/* ── Detail View ──────────────────────────────────────────────────── */
.gmb-detail-header {
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #2E2E2E;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gmb-detail-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gmb-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(45, 212, 191, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #2DD4BF;
    flex-shrink: 0;
}

.gmb-detail-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}

.gmb-detail-subtitle {
    color: #6B7280;
    font-size: 0.813rem;
    margin-top: 2px;
}

.gmb-detail-body {
    padding: 1.25rem;
}

/* ── Detail Section ─────────────────────────────────────────────────── */
.gmb-detail-section {
    margin-bottom: 1.5rem;
}

.gmb-detail-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #2E2E2E;
    color: #fff;
    font-size: 0.938rem;
    font-weight: 600;
}

.gmb-detail-section-header i {
    color: #2DD4BF;
    font-size: 0.875rem;
}

/* ── Food Item Detail Fields ──────────────────────────────────────── */
.gmb-detail-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.gmb-detail-label {
    color: #6B7280;
    font-size: 0.813rem;
    font-weight: 600;
    min-width: 120px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gmb-detail-value {
    color: #D1D5DB;
    font-size: 0.875rem;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .gmb-stats {
        grid-template-columns: 1fr;
    }

    .gmb-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .gmb-btn--primary {
        width: 100%;
        justify-content: center;
    }

    .gmb-grid {
        grid-template-columns: 1fr;
    }

    .gmb-card-actions {
        flex-direction: column;
    }

    .gmb-overlay-card {
        margin: 1rem;
    }

    .gmb-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gmb-filter-bar {
        flex-direction: column;
    }

    .gmb-btn--back {
        width: 100%;
        justify-content: center;
    }

    .gmb-filter-context {
        width: 100%;
    }
}