/* =============================================================================
   Jastip Marketplace — Public Styles
   ============================================================================= */

:root {
    --jastip-primary:      #2d6a4f;
    --jastip-primary-dark: #1b4332;
    --jastip-primary-light:#52b788;
    --jastip-accent:       #f4a261;
    --jastip-danger:       #e63946;
    --jastip-warning:      #e9c46a;
    --jastip-success:      #2d6a4f;
    --jastip-text:         #2b2b2b;
    --jastip-muted:        #6c757d;
    --jastip-border:       #dee2e6;
    --jastip-bg:           #f8f9fa;
    --jastip-white:        #ffffff;
    --jastip-radius:       8px;
    --jastip-shadow:       0 2px 12px rgba(0,0,0,.08);
    --jastip-shadow-hover: 0 6px 24px rgba(0,0,0,.14);
    --jastip-transition:   .2s ease;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
.jastip-dashboard *,
.jastip-catalog-wrap *,
.jastip-tracking-wrap *,
.jastip-auth-wrap *,
.jastip-customs-calc * {
    box-sizing: border-box;
}

/* ── Typography helpers ──────────────────────────────────────────────────── */
.jastip-text-center { text-align: center; }
.jastip-text-right  { text-align: right; }

/* ── Flash / Notice ──────────────────────────────────────────────────────── */
.jastip-flash {
    padding: 12px 16px;
    border-radius: var(--jastip-radius);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.jastip-flash.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.jastip-flash.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.jastip-flash.info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.jastip-notice        { padding: 12px 16px; border-radius: var(--jastip-radius); margin: 16px 0; }
.jastip-error         { background: #f8d7da; color: #721c24; }
.jastip-warning       { background: #fff3cd; color: #856404; }
.jastip-info          { background: #d1ecf1; color: #0c5460; }
.jastip-warning-inline{ font-size: 13px; color: #856404; background: #fff3cd; padding: 6px 12px; border-radius: 4px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.jastip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--jastip-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background var(--jastip-transition), transform var(--jastip-transition);
    white-space: nowrap;
}
.jastip-btn:hover { transform: translateY(-1px); text-decoration: none; }
.jastip-btn:active{ transform: translateY(0); }
.jastip-btn-primary   { background: var(--jastip-primary); color: #fff; }
.jastip-btn-primary:hover{ background: var(--jastip-primary-dark); color: #fff; }
.jastip-btn-secondary { background: #e9ecef; color: var(--jastip-text); }
.jastip-btn-secondary:hover{ background: #ced4da; }
.jastip-btn-success   { background: #28a745; color: #fff; }
.jastip-btn-success:hover{ background: #218838; color: #fff; }
.jastip-btn-warning   { background: var(--jastip-warning); color: #333; }
.jastip-btn-danger    { background: var(--jastip-danger); color: #fff; }
.jastip-btn-danger:hover{ background: #c0392b; color: #fff; }
.jastip-btn-sm        { padding: 5px 10px; font-size: 12px; }
.jastip-btn-full      { width: 100%; justify-content: center; }
.jastip-btn:disabled  { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.jastip-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--jastip-border);
    border-radius: var(--jastip-radius);
    font-size: 14px;
    color: var(--jastip-text);
    background: var(--jastip-white);
    transition: border-color var(--jastip-transition), box-shadow var(--jastip-transition);
    outline: none;
}
.jastip-input:focus    { border-color: var(--jastip-primary); box-shadow: 0 0 0 3px rgba(45,106,79,.15); }
.jastip-input:disabled { background: #e9ecef; color: var(--jastip-muted); cursor: not-allowed; }
.jastip-input-wrap     { position: relative; }
.jastip-input-wrap .jastip-input { padding-right: 40px; }
.jastip-pw-toggle      { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; line-height: 1; }

/* Password strength bar */
.jastip-pw-strength { height: 4px; border-radius: 2px; margin-top: 6px; background: #dee2e6; transition: width .3s, background .3s; }
.jastip-pw-strength.weak   { background: var(--jastip-danger); width: 33%; }
.jastip-pw-strength.medium { background: var(--jastip-warning); width: 66%; }
.jastip-pw-strength.strong { background: var(--jastip-success); width: 100%; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.jastip-form-group   { display: flex; flex-direction: column; gap: 6px; }
.jastip-form-group label { font-size: 13px; font-weight: 600; color: var(--jastip-text); }
.jastip-form-group label .required { color: var(--jastip-danger); }
.jastip-form-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.jastip-form-row     { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.jastip-form-actions { display: flex; gap: 10px; margin-top: 16px; }
.jastip-form-box     { background: var(--jastip-bg); border: 1px solid var(--jastip-border); border-radius: var(--jastip-radius); padding: 20px; margin-bottom: 20px; }
.jastip-full-width   { grid-column: 1 / -1; }
.jastip-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.jastip-card {
    background: var(--jastip-white);
    border: 1px solid var(--jastip-border);
    border-radius: var(--jastip-radius);
    padding: 24px;
    box-shadow: var(--jastip-shadow);
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.jastip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 8px;
}
.jastip-table th {
    background: var(--jastip-bg);
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--jastip-muted);
    border-bottom: 2px solid var(--jastip-border);
}
.jastip-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--jastip-border);
    vertical-align: middle;
    color: var(--jastip-text);
}
.jastip-table tbody tr:last-child td { border-bottom: none; }
.jastip-table tbody tr:hover td { background: rgba(45,106,79,.03); }
.jastip-empty { text-align: center; color: var(--jastip-muted); font-style: italic; padding: 24px; }
.jastip-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.jastip-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.jastip-badge-active    { background: #d4edda; color: #155724; }
.jastip-badge-inactive  { background: #e9ecef; color: #495057; }
.jastip-badge-suspended { background: #f8d7da; color: #721c24; }
.jastip-badge-open      { background: #cce5ff; color: #004085; }
.jastip-badge-confirmed { background: #d1ecf1; color: #0c5460; }
.jastip-badge-purchasing{ background: #fff3cd; color: #856404; }
.jastip-badge-shipped   { background: #d4edda; color: #155724; }
.jastip-badge-delivered { background: #c3e6cb; color: #1b5e20; }
.jastip-badge-completed { background: var(--jastip-primary); color: #fff; }
.jastip-badge-cancelled { background: #f8d7da; color: #721c24; }
.jastip-badge-pay-unpaid  { background: #fff3cd; color: #856404; }
.jastip-badge-pay-paid    { background: #d4edda; color: #155724; }
.jastip-badge-pay-partial { background: #cce5ff; color: #004085; }
.jastip-badge-pay-refunded{ background: #e9ecef; color: #495057; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.jastip-dashboard        { max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color: var(--jastip-text); }
.jastip-dash-header      { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 2px solid var(--jastip-border); }
.jastip-dash-logo        { display: flex; align-items: center; gap: 16px; }
.jastip-dash-logo img    { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--jastip-border); }
.jastip-dash-logo h2     { margin: 0 0 4px; font-size: 22px; color: var(--jastip-primary-dark); }
.jastip-dash-logo p      { margin: 0; color: var(--jastip-muted); font-size: 14px; }

/* Stats grid */
.jastip-stats-grid       { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.jastip-stat-card        { background: var(--jastip-white); border: 1px solid var(--jastip-border); border-radius: var(--jastip-radius); padding: 20px; text-align: center; box-shadow: var(--jastip-shadow); }
.jastip-stat-icon        { font-size: 28px; display: block; margin-bottom: 8px; }
.jastip-stat-value       { font-size: 26px; font-weight: 800; color: var(--jastip-primary); display: block; margin-bottom: 4px; }
.jastip-stat-label       { font-size: 12px; color: var(--jastip-muted); text-transform: uppercase; letter-spacing: .06em; }

/* Tabs */
.jastip-tabs             { display: flex; gap: 0; border-bottom: 2px solid var(--jastip-border); margin-bottom: 24px; overflow-x: auto; }
.jastip-tab              { background: none; border: none; padding: 12px 20px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--jastip-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color var(--jastip-transition), border-color var(--jastip-transition); white-space: nowrap; }
.jastip-tab:hover        { color: var(--jastip-primary); }
.jastip-tab.active       { color: var(--jastip-primary); border-bottom-color: var(--jastip-primary); }
.jastip-tab-content      { display: none; }
.jastip-tab-content.active{ display: block; }

/* Section header */
.jastip-section-header   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.jastip-section-header h3{ margin: 0; font-size: 18px; }

/* ── Trip Catalog ────────────────────────────────────────────────────────── */
.jastip-catalog-wrap     { max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.jastip-catalog-filters  { background: var(--jastip-white); border: 1px solid var(--jastip-border); border-radius: var(--jastip-radius); padding: 16px; margin-bottom: 20px; box-shadow: var(--jastip-shadow); }
.jastip-filter-row       { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.jastip-filter-group     { flex: 1; min-width: 160px; }
.jastip-catalog-meta     { font-size: 13px; color: var(--jastip-muted); margin-bottom: 16px; }

/* Trip grid */
.jastip-trip-grid        { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.jastip-trip-cards       { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.jastip-trip-card        { background: var(--jastip-white); border: 1px solid var(--jastip-border); border-radius: var(--jastip-radius); overflow: hidden; box-shadow: var(--jastip-shadow); transition: box-shadow var(--jastip-transition), transform var(--jastip-transition); display: flex; flex-direction: column; }
.jastip-trip-card:hover  { box-shadow: var(--jastip-shadow-hover); transform: translateY(-3px); }
.jastip-trip-img-wrap    { position: relative; height: 180px; overflow: hidden; }
.jastip-trip-img         { width: 100%; height: 100%; object-fit: cover; display: block; }
.jastip-trip-img-placeholder { height: 180px; background: linear-gradient(135deg,var(--jastip-primary),var(--jastip-primary-light)); display: flex; align-items: center; justify-content: center; font-size: 48px; font-weight: 900; color: rgba(255,255,255,.4); position: relative; }
.jastip-trip-badge       { position: absolute; top: 10px; right: 10px; background: var(--jastip-primary); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; }
.jastip-trip-body        { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.jastip-trip-meta        { display: flex; gap: 8px; flex-wrap: wrap; }
.jastip-trip-category    { background: var(--jastip-bg); color: var(--jastip-muted); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.jastip-trip-seller      { font-size: 12px; color: var(--jastip-muted); }
.jastip-trip-title       { margin: 0; font-size: 15px; font-weight: 700; color: var(--jastip-text); line-height: 1.3; }
.jastip-trip-destination { font-size: 13px; color: var(--jastip-primary); font-weight: 600; }
.jastip-trip-desc        { font-size: 13px; color: var(--jastip-muted); line-height: 1.5; margin: 0; }
.jastip-trip-details     { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--jastip-text); }
.jastip-trip-fee         { color: var(--jastip-primary); font-weight: 600; }
.jastip-trip-footer      { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--jastip-border); }
.jastip-trip-actions     { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.jastip-catalog-pagination{ text-align: center; margin-top: 32px; }
.jastip-empty-state      { grid-column: 1/-1; text-align: center; padding: 60px 20px; }
.jastip-empty-icon       { font-size: 56px; display: block; margin-bottom: 16px; }
.jastip-empty-state h3   { color: var(--jastip-muted); margin: 0 0 8px; }
.jastip-empty-state p    { color: var(--jastip-muted); }

/* ── Order Tracking ──────────────────────────────────────────────────────── */
.jastip-tracking-wrap       { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.jastip-tracking-search-box { background: var(--jastip-white); border: 1px solid var(--jastip-border); border-radius: var(--jastip-radius); padding: 28px; margin-bottom: 24px; box-shadow: var(--jastip-shadow); }
.jastip-tracking-search-box h2 { margin: 0 0 8px; color: var(--jastip-primary-dark); }
.jastip-tracking-card    { background: var(--jastip-white); border: 1px solid var(--jastip-border); border-radius: var(--jastip-radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--jastip-shadow); }
.jastip-tracking-card h3 { margin: 0 0 16px; font-size: 16px; color: var(--jastip-primary-dark); border-bottom: 1px solid var(--jastip-border); padding-bottom: 10px; }
.jastip-tracking-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jastip-tracking-summary > div { display: flex; flex-direction: column; gap: 2px; }
.jastip-tracking-summary .label { font-size: 11px; text-transform: uppercase; color: var(--jastip-muted); font-weight: 700; }

/* Status timeline */
.jastip-status-timeline  { display: flex; align-items: center; margin-top: 20px; overflow-x: auto; padding-bottom: 8px; }
.jastip-timeline-step    { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 70px; }
.jastip-timeline-step .step-dot { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--jastip-border); background: var(--jastip-white); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.jastip-timeline-step.done .step-dot { border-color: var(--jastip-primary); background: var(--jastip-primary); color: #fff; }
.jastip-timeline-step.current .step-dot { border-color: var(--jastip-accent); background: var(--jastip-accent); }
.jastip-timeline-step .step-label { font-size: 11px; color: var(--jastip-muted); text-align: center; font-weight: 600; }
.jastip-timeline-step.done .step-label { color: var(--jastip-primary); }
.jastip-timeline-line    { flex: 1; height: 3px; background: var(--jastip-border); min-width: 20px; }
.jastip-timeline-line.done { background: var(--jastip-primary); }

/* Shipment card */
.jastip-shipment-card    { border: 1px solid var(--jastip-border); border-radius: var(--jastip-radius); padding: 16px; margin-bottom: 12px; }
.jastip-shipment-card h4 { margin: 0 0 10px; font-size: 14px; }
.jastip-shipment-detail  { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
.jastip-total-row td     { padding-top: 12px; }

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.jastip-auth-wrap        { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.jastip-auth-card        { background: var(--jastip-white); border: 1px solid var(--jastip-border); border-radius: 12px; padding: 36px; width: 100%; max-width: 480px; box-shadow: var(--jastip-shadow-hover); }
.jastip-auth-logo        { text-align: center; margin-bottom: 20px; }
.jastip-auth-logo img    { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.jastip-auth-title       { text-align: center; margin: 0 0 8px; font-size: 22px; color: var(--jastip-primary-dark); }
.jastip-auth-subtitle    { text-align: center; color: var(--jastip-muted); font-size: 14px; margin-bottom: 24px; }
.jastip-auth-footer      { text-align: center; margin-top: 20px; font-size: 13px; color: var(--jastip-muted); }
.jastip-auth-footer a    { color: var(--jastip-primary); font-weight: 600; }

/* ── Customs Calc ────────────────────────────────────────────────────────── */
.jastip-customs-calc     { max-width: 560px; margin: 0 auto; padding: 0 16px 60px; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.jastip-calc-card        { background: var(--jastip-white); border: 1px solid var(--jastip-border); border-radius: var(--jastip-radius); padding: 28px; box-shadow: var(--jastip-shadow); }
.jastip-calc-card h3     { margin: 0 0 8px; color: var(--jastip-primary-dark); }
.jastip-calc-note        { color: var(--jastip-muted); font-size: 13px; margin-bottom: 20px; }
.jastip-customs-result   { margin-top: 24px; background: var(--jastip-bg); border-radius: var(--jastip-radius); padding: 16px; }
.jastip-customs-result h4{ margin: 0 0 12px; color: var(--jastip-primary-dark); }
.jastip-calc-disclaimer  { font-size: 12px; color: var(--jastip-muted); margin-top: 16px; line-height: 1.5; }

/* ── Login Prompt ────────────────────────────────────────────────────────── */
.jastip-login-prompt     { max-width: 400px; margin: 40px auto; text-align: center; padding: 0 16px; }
.jastip-icon             { font-size: 48px; display: block; margin-bottom: 16px; }

/* ── Admin styles (basic) ────────────────────────────────────────────────── */
.jastip-admin-stats      { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.jastip-stat-box         { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px; text-align: center; }
.jastip-stat-box .dashicons { font-size: 32px; color: #2d6a4f; width: 32px; height: 32px; }
.jastip-stat-box strong  { display: block; font-size: 28px; color: #2d6a4f; margin: 8px 0 4px; }
.jastip-stat-box p       { margin: 0; color: #6c757d; font-size: 13px; }
.jastip-admin-wrap h1    { margin-bottom: 20px; }

/* Status colors in admin */
.jastip-status-active    { color: #28a745; font-weight: bold; }
.jastip-status-inactive  { color: #6c757d; }
.jastip-status-completed { color: #2d6a4f; font-weight: bold; }
.jastip-status-cancelled { color: #e63946; }
.jastip-pay-paid         { color: #28a745; font-weight: bold; }
.jastip-pay-unpaid       { color: #856404; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .jastip-stats-grid           { grid-template-columns: repeat(2, 1fr); }
    .jastip-trip-grid,
    .jastip-trip-cards           { grid-template-columns: 1fr; }
    .jastip-tracking-summary     { grid-template-columns: 1fr; }
    .jastip-filter-row           { flex-direction: column; }
    .jastip-filter-row .jastip-btn { width: 100%; }
    .jastip-form-row             { flex-direction: column; }
    .jastip-dash-header          { flex-direction: column; align-items: flex-start; }
    .jastip-table                { font-size: 12px; }
    .jastip-table th,
    .jastip-table td             { padding: 8px 10px; }
}
