/* =============================================================
   GSM — Vendor Portal  (isolated from theme, WP-admin style)
   ============================================================= */

/* ── Hard reset: neutralize theme spacing/typography inside portal ── */
.vp-wrap,
.vp-wrap * ,
.vp-wrap *::before,
.vp-wrap *::after {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    text-indent: 0 !important;
    letter-spacing: normal !important;
    float: none !important;
    max-width: none !important;
    line-height: 1.45 !important;
}
.vp-wrap ul, .vp-wrap ol { list-style: none !important; }
.vp-wrap a { text-decoration: none !important; box-shadow: none !important; }
.vp-wrap img { max-width: 100% !important; height: auto; display: block; }
.vp-wrap svg { flex: 0 0 auto; }

/* ── Shell ───────────────────────────────────────────────────── */
.vp-wrap {
    display:     flex !important;
    min-height:  100vh;
    background:  #f0f0f1;
    color:       #1d2327;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size:   13px;
    width:       100vw;
    margin-left: calc(50% - 50vw) !important;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.vp-sidebar {
    width:          210px !important;
    min-width:      210px;
    background:     #1d2327;
    display:        flex !important;
    flex-direction: column !important;
    position:       sticky;
    top:            0;
    height:         100vh;
    overflow-y:     auto;
}

.vp-sidebar__brand {
    display:       flex !important;
    align-items:   center !important;
    gap:           8px;
    padding:       16px 14px !important;
    border-bottom: 1px solid #2c3338;
    font-size:     13px;
    font-weight:   600;
    color:         #c3c4c7;
}

.vp-sidebar__user {
    display:       flex !important;
    align-items:   center !important;
    gap:           10px;
    padding:       14px !important;
    border-bottom: 1px solid #2c3338;
}
.vp-sidebar__avatar {
    width:           34px !important;
    height:          34px !important;
    border-radius:   50% !important;
    background:      #2271b1;
    color:           #fff;
    font-size:       15px;
    font-weight:     700;
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
    flex:            0 0 auto;
}
.vp-sidebar__user-info { display: block; min-width: 0; }
.vp-sidebar__user-info strong { display: block !important; font-size: 13px; color: #f0f0f1; font-weight: 600; }
.vp-sidebar__user-info span   { display: block !important; font-size: 11px; color: #8c8f94; }

/* ── Nav ─────────────────────────────────────────────────────── */
.vp-nav { flex: 1 1 auto; padding: 6px 0 !important; }

.vp-nav__item {
    display:     flex !important;
    align-items: center !important;
    gap:         10px;
    width:       100% !important;
    padding:     10px 14px !important;
    background:  none;
    border:      none !important;
    border-left: 3px solid transparent !important;
    color:       #c3c4c7;
    font-size:   13px;
    font-weight: 500;
    cursor:      pointer;
    transition:  background .15s, color .15s, border-color .15s;
    font-family: inherit !important;
}
.vp-nav__item svg { opacity: .65; }
.vp-nav__item:hover { background: rgba(255,255,255,.06); color: #fff; }
.vp-nav__item--active {
    background:        rgba(34,113,177,.22);
    border-left-color: #2271b1 !important;
    color:             #fff;
    font-weight:       600;
}
.vp-nav__item--active svg { opacity: 1; }

.vp-nav__badge {
    margin-left:   auto !important;
    background:    rgba(255,255,255,.12);
    color:         #8c8f94;
    font-size:     10px;
    font-weight:   700;
    padding:       2px 8px !important;
    border-radius: 9px;
}
.vp-nav__item--active .vp-nav__badge { background: rgba(34,113,177,.4); color: #72aee6; }

.vp-sidebar__footer { flex: 0 0 auto; padding: 12px 14px !important; border-top: 1px solid #2c3338; }
.vp-logout {
    display:     flex !important;
    align-items: center !important;
    gap:         6px;
    color:       #8c8f94 !important;
    font-size:   12px;
    transition:  color .2s;
}
.vp-logout:hover { color: #ff5757 !important; }

/* ── Main ────────────────────────────────────────────────────── */
.vp-main { flex: 1 1 auto; min-width: 0; display: block; }

/* ── Top bar ─────────────────────────────────────────────────── */
.vp-topbar {
    display:         flex !important;
    align-items:     center !important;
    justify-content: space-between !important;
    gap:             16px;
    padding:         14px 20px !important;
    background:      #fff;
    border-bottom:   1px solid #dcdcde;
    flex-wrap:       wrap;
}
.vp-topbar__title { font-size: 20px !important; font-weight: 600 !important; color: #1d2327; line-height: 1.2 !important; }

.vp-stats { display: flex !important; align-items: center !important; gap: 24px; }
.vp-stat  { display: flex !important; flex-direction: column !important; align-items: center !important; }
.vp-stat strong { font-size: 20px !important; font-weight: 700; color: #2271b1; line-height: 1.1 !important; }
.vp-stat span   { font-size: 10px; color: #646970; text-transform: uppercase !important; letter-spacing: .5px !important; margin-top: 2px !important; }

/* ── Tab panels ──────────────────────────────────────────────── */
.vp-tab-panel { display: block; padding: 18px 20px !important; }
.vp-tab-panel--hidden { display: none !important; }

/* ── Empty ───────────────────────────────────────────────────── */
.vp-empty {
    display:       block;
    text-align:    center !important;
    padding:       44px 20px !important;
    color:         #8c8f94;
    background:    #fff;
    border:        1px solid #dcdcde;
    border-radius: 4px;
}
.vp-empty svg { display: block; margin: 0 auto 10px !important; }
.vp-empty p   { font-size: 14px; color: #8c8f94; text-align: center !important; }

/* ── Booking Card ────────────────────────────────────────────── */
.vp-booking-card {
    display:       block;
    background:    #fff;
    border:        1px solid #dcdcde;
    border-radius: 4px;
    margin-bottom: 14px !important;
    box-shadow:    0 1px 2px rgba(0,0,0,.05);
    overflow:      hidden;
}

.vp-booking-card__head {
    display:         flex !important;
    align-items:     center !important;
    justify-content: space-between !important;
    gap:             16px;
    padding:         14px 18px !important;
    border-bottom:   1px solid #f0f0f1;
    background:      #f9fafb;
    flex-wrap:       wrap;
}

.vp-booking-card__info { display: block; min-width: 0; flex: 1 1 auto; }

.vp-booking-card__show {
    display:       block;
    font-size:     16px !important;
    font-weight:   700 !important;
    color:         #1d2327;
    margin-bottom: 6px !important;
    line-height:   1.3 !important;
}

.vp-booking-card__meta {
    display:   flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap:       14px !important;
    font-size: 12px;
    color:     #646970;
}
.vp-booking-card__meta span {
    display:     inline-flex !important;
    align-items: center !important;
    gap:         5px !important;
    color:       #646970;
    white-space: nowrap;
}

.vp-booking-card__amount {
    flex:          0 0 auto;
    font-size:     17px !important;
    font-weight:   700 !important;
    color:         #00a32a;
    white-space:   nowrap;
    background:    #edfaef;
    border:        1px solid #b8e6c1;
    border-radius: 4px;
    padding:       5px 12px !important;
    line-height:   1.2 !important;
}

/* ── QR section ──────────────────────────────────────────────── */
.vp-booking-card__tables {
    display:   flex !important;
    flex-wrap: wrap;
    gap:       12px !important;
    padding:   14px 18px !important;
}

.vp-qr-block {
    display:       block;
    background:    #f6f7f7;
    border:        1px solid #dcdcde;
    border-radius: 4px;
    padding:       12px 14px !important;
}

.vp-qr-block__label {
    display:       flex !important;
    align-items:   center !important;
    gap:           8px !important;
    margin-bottom: 10px !important;
    font-size:     13px;
    color:         #1d2327;
}
.vp-qr-block__label strong { font-weight: 700 !important; }

.vp-qr-block__cat {
    display:        inline-block;
    font-size:      10px;
    font-weight:    700 !important;
    padding:        2px 8px !important;
    border-radius:  9px;
    background:     #e8f0fb;
    color:          #2271b1;
    border:         1px solid #c5d9f1;
    text-transform: uppercase !important;
    letter-spacing: .4px !important;
}

.vp-qr-block__tickets { display: flex !important; gap: 12px !important; flex-wrap: wrap; }

.vp-qr-ticket { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 5px !important; }
.vp-qr-ticket img {
    width:         92px !important;
    height:        92px !important;
    border-radius: 4px;
    background:    #fff;
    border:        1px solid #dcdcde;
    display:       block;
}
.vp-qr-ticket span {
    font-size:      10px;
    color:          #646970;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    font-weight:    700 !important;
}
.vp-qr-save {
    display:         inline-block;
    font-size:       11px;
    font-weight:     600 !important;
    color:           #2271b1 !important;
    background:      #e8f0fb;
    border:          1px solid #c5d9f1;
    border-radius:   3px;
    padding:         3px 10px !important;
    transition:      background .15s;
}
.vp-qr-save:hover { background: #d0e4f7; color: #135e96 !important; }

/* ── Product Form Card ───────────────────────────────────────── */
.vp-card {
    display:       block;
    background:    #fff;
    border:        1px solid #dcdcde;
    border-radius: 4px;
    padding:       18px 20px !important;
    margin-bottom: 14px !important;
    box-shadow:    0 1px 2px rgba(0,0,0,.05);
}
.vp-card__title {
    display:        block;
    font-size:      12px !important;
    font-weight:    700 !important;
    color:          #1d2327;
    margin-bottom:  14px !important;
    padding-bottom: 12px !important;
    border-bottom:  1px solid #f0f0f1;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
}

/* ── Form ────────────────────────────────────────────────────── */
.vp-form-row {
    display:               grid !important;
    grid-template-columns: 1fr 1fr;
    gap:                   14px !important;
    margin-bottom:         14px !important;
}
.vp-form-group {
    display:        flex !important;
    flex-direction: column !important;
    gap:            5px !important;
    margin-bottom:  14px !important;
}
.vp-form-row .vp-form-group { margin-bottom: 0 !important; }

.vp-form-group label {
    font-size:      11px;
    font-weight:    600 !important;
    color:          #3c434a;
    text-transform: uppercase !important;
    letter-spacing: .3px !important;
}
.vp-form-group input[type="text"],
.vp-form-group input[type="number"],
.vp-form-group textarea,
.vp-form-group select {
    background:    #fff !important;
    border:        1px solid #8c8f94 !important;
    border-radius: 4px !important;
    color:         #1d2327 !important;
    font-size:     13px !important;
    padding:       8px 11px !important;
    width:         100% !important;
    outline:       none;
    transition:    border-color .15s, box-shadow .15s;
    font-family:   inherit !important;
}
.vp-form-group input:focus,
.vp-form-group textarea:focus,
.vp-form-group select:focus { border-color: #2271b1 !important; box-shadow: 0 0 0 1px #2271b1 !important; }
.vp-form-group textarea { resize: vertical; min-height: 74px !important; }
.vp-form-group input[type="file"] { padding: 6px 9px !important; font-size: 12px !important; color: #646970 !important; border-style: dashed !important; }

.vp-form-note { display: block; font-size: 11px; color: #646970; margin-bottom: 12px !important; font-style: italic; }

.vp-btn-primary,
.gsm-btn-submit {
    display:         inline-flex !important;
    align-items:     center !important;
    justify-content: center !important;
    gap:             6px;
    padding:         9px 18px !important;
    background:      #2271b1 !important;
    border:          1px solid #2271b1 !important;
    border-radius:   3px !important;
    color:           #fff !important;
    font-size:       13px !important;
    font-weight:     600 !important;
    cursor:          pointer;
    transition:      background .15s;
    font-family:     inherit !important;
}
.gsm-btn-submit { width: 100% !important; }
.vp-btn-primary:hover:not(:disabled),
.gsm-btn-submit:hover:not(:disabled) { background: #135e96 !important; border-color: #135e96 !important; color: #fff !important; }
.vp-btn-primary:disabled,
.gsm-btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── Products list ───────────────────────────────────────────── */
.gsm-products-list { display: flex !important; flex-direction: column !important; gap: 8px !important; }

.vp-product-card {
    display:       flex !important;
    align-items:   center !important;
    gap:           14px !important;
    background:    #fff;
    border:        1px solid #dcdcde;
    border-radius: 4px;
    padding:       12px 14px !important;
    box-shadow:    0 1px 2px rgba(0,0,0,.04);
    flex-wrap:     wrap;
}
.vp-product-card__img,
.vp-product-card__img--empty {
    width:         52px !important;
    height:        52px !important;
    border-radius: 4px;
    border:        1px solid #dcdcde;
    flex:          0 0 auto;
}
.vp-product-card__img { object-fit: cover; }
.vp-product-card__img--empty {
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
    background:      #f6f7f7;
}
.vp-product-card__info { flex: 1 1 auto; min-width: 0; display: block; }
.vp-product-card__info h4 { font-size: 13px !important; font-weight: 600 !important; color: #1d2327; margin-bottom: 3px !important; }
.vp-product-card__info p  { font-size: 11px; color: #646970; }
.vp-product-card__price   { color: #00a32a !important; font-weight: 700 !important; margin-top: 3px !important; font-size: 12px !important; }

.vp-product-card__status { display: flex !important; flex-direction: column !important; align-items: flex-end !important; gap: 6px !important; flex: 0 0 auto; }

.vp-prod-status {
    display:        inline-block;
    font-size:      10px;
    font-weight:    700 !important;
    text-transform: uppercase !important;
    letter-spacing: .4px !important;
    padding:        3px 9px !important;
    border-radius:  9px;
}
.vp-prod-status--pending  { background: #fcf9e8; color: #996800; border: 1px solid #f0c33c; }
.vp-prod-status--approved { background: #edfaef; color: #00a32a; border: 1px solid #68de7c; }
.vp-prod-status--rejected { background: #fceded; color: #d63638; border: 1px solid #f86368; }

.vp-prod-delete {
    background:    #fff !important;
    border:        1px solid #d63638 !important;
    border-radius: 3px;
    color:         #d63638 !important;
    font-size:     11px !important;
    padding:       3px 9px !important;
    cursor:        pointer;
    font-family:   inherit !important;
}
.vp-prod-delete:hover { background: #fceded !important; }

/* ── Legacy pf-* (product form JS still uses these) ──────────── */
.gsm-pf-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: 14px !important; margin-bottom: 14px !important; }
.gsm-pf-group { display: flex !important; flex-direction: column !important; gap: 5px !important; margin-bottom: 14px !important; }
.gsm-pf-row .gsm-pf-group { margin-bottom: 0 !important; }
.gsm-pf-group label { font-size: 11px; font-weight: 600 !important; color: #3c434a; text-transform: uppercase !important; letter-spacing: .3px !important; }
.gsm-pf-group input[type="text"],
.gsm-pf-group input[type="number"],
.gsm-pf-group textarea,
.gsm-pf-group select {
    background:  #fff !important;
    border:      1px solid #8c8f94 !important;
    border-radius: 4px !important;
    color:       #1d2327 !important;
    font-size:   13px !important;
    padding:     8px 11px !important;
    width:       100% !important;
    outline:     none;
    transition:  border-color .15s, box-shadow .15s;
    font-family: inherit !important;
}
.gsm-pf-group input:focus,
.gsm-pf-group textarea:focus,
.gsm-pf-group select:focus { border-color: #2271b1 !important; box-shadow: 0 0 0 1px #2271b1 !important; }
.gsm-pf-group textarea { resize: vertical; min-height: 74px !important; }
.gsm-pf-group select option { background: #fff; color: #1d2327; }
.gsm-pf-group input[type="file"] { padding: 6px 9px !important; font-size: 12px !important; color: #646970 !important; border-style: dashed !important; }

.gsm-img-preview { margin-top: 6px !important; }
.gsm-img-preview img { width: 66px !important; height: 66px !important; object-fit: cover; border-radius: 4px; border: 1px solid #dcdcde; }

.gsm-pf-note { display: block; font-size: 11px; color: #646970; margin-bottom: 12px !important; font-style: italic; }

.gsm-pf-error { background: #fceded; border: 1px solid #f86368; border-radius: 3px; color: #d63638; font-size: 13px; padding: 8px 11px !important; margin-bottom: 10px !important; }
.gsm-pf-error.hidden { display: none !important; }

/* ── Auth gate ───────────────────────────────────────────────── */
.gsm-portal-auth {
    max-width:     400px !important;
    margin:        48px auto !important;
    background:    #fff;
    border:        1px solid #dcdcde;
    border-radius: 4px;
    padding:       32px !important;
    text-align:    center !important;
    box-shadow:    0 1px 3px rgba(0,0,0,.05);
}
.gsm-portal-auth h2 { font-size: 18px !important; font-weight: 600 !important; color: #1d2327; margin-bottom: 8px !important; }
.gsm-portal-auth p  { color: #646970; font-size: 13px; margin-bottom: 20px !important; }
.gsm-login-link {
    display:         inline-block;
    background:      #2271b1 !important;
    border-radius:   3px;
    color:           #fff !important;
    font-size:       13px;
    font-weight:     600 !important;
    padding:         9px 22px !important;
    transition:      background .15s;
}
.gsm-login-link:hover { background: #135e96 !important; }

/* ── Notices ─────────────────────────────────────────────────── */
.gsm-portal-notice { display: block; border-radius: 3px; font-size: 13px; padding: 9px 12px !important; margin-bottom: 12px !important; }
.gsm-portal-notice--success { background: #edfaef; border: 1px solid #68de7c; color: #00a32a; }
.gsm-portal-notice--error   { background: #fceded; border: 1px solid #f86368; color: #d63638; }

/* ── Utility ─────────────────────────────────────────────────── */
.vp-wrap .hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .vp-wrap         { flex-direction: column !important; width: 100% !important; margin-left: 0 !important; }
    .vp-sidebar      { width: 100% !important; min-width: 0; height: auto; position: static; }
    .vp-nav          { display: flex !important; flex-direction: row !important; border-top: 1px solid #2c3338; }
    .vp-nav__item    { flex: 1 1 0 !important; justify-content: center !important; border-left: none !important; border-bottom: 3px solid transparent !important; }
    .vp-nav__item--active { border-bottom-color: #2271b1 !important; }
    .vp-sidebar__footer { display: none !important; }
    .vp-form-row, .gsm-pf-row { grid-template-columns: 1fr !important; }
    .vp-stats        { gap: 16px; }
}
