/* ============================================================
   Webvina Marketplace Theme — Main Stylesheet
   Theme: webvina-marketplace | Version: 2.0.0 | Author: Webvina
   Redesigned to match Botble Marketplace style
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --theme-primary:       #1b4ef5;
    --theme-primary-dark:  #1440d4;
    --theme-primary-light: #eff2ff;
    --theme-accent:        #059669;
    --theme-accent-light:  #d1fae5;
    --theme-warn:          #d97706;
    --theme-warn-light:    #fef3c7;
    --theme-text:          #111827;
    --theme-text-muted:    #6b7280;
    --theme-bg:            #ffffff;
    --theme-bg-alt:        #f9fafb;
    --theme-border:        #e5e7eb;
    --theme-radius:        12px;
    --theme-radius-sm:     8px;
    --theme-shadow:        0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.05);
    --theme-shadow-hover:  0 8px 32px rgba(0,0,0,.12);
    --container-max:       1280px;
    --header-height:       64px;
    --font-sans:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    color: var(--theme-text);
    background: var(--theme-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* --- Container --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   HEADER — Light theme (Botble style)
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--theme-border);
    display: flex;
    align-items: center;
}
.site-header .container { width: 100% !important; }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--theme-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-sans);
    flex-shrink: 0;
}
.logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--theme-text);
    letter-spacing: -.3px;
}
.logo-badge {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    background: var(--theme-primary-light);
    color: var(--theme-primary);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(27,78,245,.15);
}

/* Navigation — center */
.site-nav {
    display: flex;
    gap: 4px;
    align-items: center;
}
.site-nav a {
    font-size: .875rem;
    font-weight: 500;
    color: var(--theme-text-muted);
    transition: color .2s;
    padding: 6px 12px;
    border-radius: 6px;
    position: relative;
}
.site-nav a:hover { color: var(--theme-text); background: var(--theme-bg-alt); }
.site-nav a.active { color: var(--theme-primary); font-weight: 600; background: var(--theme-primary-light); }

/* Header right actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.header-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1.5px solid var(--theme-border);
    border-radius: 8px;
    font-size: .875rem;
    color: var(--theme-text-muted);
    background: var(--theme-bg-alt);
    cursor: pointer;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}
.header-search-btn:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.header-search-kbd {
    font-size: .7rem;
    background: var(--theme-border);
    color: var(--theme-text-muted);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: var(--font-sans);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
    border: 1.5px solid transparent;
    line-height: 1;
    white-space: nowrap;
}
.btn-primary {
    background: var(--theme-primary);
    color: #fff;
    border-color: var(--theme-primary);
}
.btn-primary:hover {
    background: var(--theme-primary-dark);
    border-color: var(--theme-primary-dark);
    color: #fff;
}
.btn-outline {
    border-color: var(--theme-border);
    color: var(--theme-text);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    background: var(--theme-primary-light);
}
.btn-upload {
    background: var(--theme-primary);
    color: #fff !important;
    border-color: var(--theme-primary);
}
.btn-upload:hover {
    background: var(--theme-primary-dark);
    border-color: var(--theme-primary-dark);
    color: #fff;
}
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* ============================================================
   HERO SECTION — Light gradient (Botble style)
   ============================================================ */
.hero-section {
    padding: 90px 0 80px;
    background: linear-gradient(160deg, #f0f4ff 0%, #e8ecfd 40%, #f5f7ff 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27,78,245,.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -150px; left: -150px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.05) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.85);
    color: var(--theme-text-muted);
    border: 1px solid var(--theme-border);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 500;
    margin-bottom: 28px;
    animation: fadeInUp .5s ease both;
    background: rgba(var(--theme-primary-rgb, 37,99,235),.08);
}
.hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--theme-primary);
    flex-shrink: 0;
    animation: pulse 2s ease infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(.8); }
}
.hero-title {
    font-family: var(--font-sans);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--theme-text);
    margin-bottom: 20px;
    animation: fadeInUp .5s ease .1s both;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--theme-text-muted);
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    animation: fadeInUp .5s ease .2s both;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp .5s ease .3s both;
    margin-bottom: 56px;
}
.hero-actions .btn-outline {
    background: #fff;
    border-color: var(--theme-border);
    color: var(--theme-text);
}
.hero-actions .btn-outline:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    background: var(--theme-primary-light);
}

/* Hero Stats — White card row */
.hero-stats {
    display: inline-flex;
    background: #fff;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--theme-shadow);
    animation: fadeInUp .5s ease .4s both;
}
.hero-stat-item {
    padding: 18px 36px;
    border-right: 1px solid var(--theme-border);
    text-align: center;
}
.hero-stat-item:last-child { border-right: none; }
.hero-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--theme-text);
    line-height: 1;
    font-family: var(--font-sans);
}
.hero-stat-label {
    font-size: .78rem;
    color: var(--theme-text-muted);
    margin-top: 5px;
    white-space: nowrap;
}

/* Hero Search */
.hero-search {
    margin-bottom: 32px;
    animation: fadeInUp .5s ease .15s both;
}
.hero-search-box {
    display: flex;
    background: #fff;
    border: 1.5px solid var(--theme-border);
    border-radius: 10px;
    overflow: hidden;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: var(--theme-shadow);
    transition: border-color .2s, box-shadow .2s;
}
.hero-search-box:focus-within {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(27,78,245,.12);
}
.hero-search-box input {
    flex: 1;
    padding: 13px 18px;
    border: none;
    outline: none;
    font-size: .95rem;
    background: transparent;
    color: var(--theme-text);
}
.hero-search-box input::placeholder { color: var(--theme-text-muted); }
.hero-search-box button {
    padding: 9px 20px;
    margin: 5px;
    background: var(--theme-primary);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    transition: background .2s;
}
.hero-search-box button:hover { background: var(--theme-primary-dark); }

/* ============================================================
   SECTION LABELS & HEADERS
   ============================================================ */
.section-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--theme-primary);
    margin-bottom: 8px;
}
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}
.section-header h2 {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--theme-text);
}
.section-header p { color: var(--theme-text-muted); font-size: .9rem; margin-top: 5px; }
.section-link {
    font-size: .875rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: color .2s;
}
.section-link:hover { color: var(--theme-text); }

/* ============================================================
   FILTER TABS (legacy — kept for backward compat)
   ============================================================ */
.filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.filter-tab {
    padding: 7px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--theme-border);
    font-size: .85rem;
    font-weight: 500;
    color: var(--theme-text-muted);
    cursor: pointer;
    transition: all .2s;
    background: transparent;
    text-decoration: none;
    display: inline-block;
}
.filter-tab:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    background: var(--theme-primary-light);
}
.filter-tab.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: #fff;
}

/* ============================================================
   LISTING TOOLBAR — compact filter bar for packages listing
   ============================================================ */
.listing-toolbar {
    background: #fff;
    border-bottom: 1px solid var(--theme-border);
    padding: 14px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

/* Row 1: chips */
.toolbar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.chip-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.toolbar-sep {
    width: 1px;
    height: 22px;
    background: var(--theme-border);
    flex-shrink: 0;
    margin: 0 4px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 50px;
    border: 1.5px solid var(--theme-border);
    font-size: .82rem;
    font-weight: 500;
    color: var(--theme-text-muted);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    white-space: nowrap;
    line-height: 1.4;
}
.chip:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    background: var(--theme-primary-light);
}
.chip.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: #fff;
}
.chip-sm {
    padding: 3px 10px;
    font-size: .75rem;
}

/* Row 2: search form */
.toolbar-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.toolbar-search-form .form-input {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: .875rem;
}
.toolbar-select {
    padding: 8px 12px;
    border: 1.5px solid var(--theme-border);
    border-radius: 8px;
    font-size: .875rem;
    background: #fff;
    color: var(--theme-text);
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
    transition: border-color .15s;
}
.toolbar-select:focus { border-color: var(--theme-primary); }

/* Row 3: tag chips */
.toolbar-tags {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 10px 0 13px;
    border-top: 1px solid var(--theme-border);
    overflow-x: auto;
    scrollbar-width: none;
}
.toolbar-tags::-webkit-scrollbar { display: none; }
.toolbar-tags-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--theme-text-muted);
    flex-shrink: 0;
    margin-right: 4px;
}


/* ============================================================
   PACKAGE CARDS
   ============================================================ */
.packages-section {
    padding: 80px 0;
    background: var(--theme-bg-alt);
}
.packages-section:nth-child(even) { background: var(--theme-bg); }

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

/* Package Card */
.pkg-card {
    background: #fff;
    border-radius: var(--theme-radius);
    border: 1px solid var(--theme-border);
    overflow: hidden;
    transition: transform .2s ease;
    display: flex;
    flex-direction: column;
}
.pkg-card:hover {
    transform: translateY(-2px);
}

/* Thumbnail with badge overlay */
.pkg-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #f0f4ff, #e8ecfd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--theme-primary);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.pkg-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Category badge — overlaid on image top-left */
.pkg-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(27,78,245,.9);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.5;
}

.pkg-card-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.pkg-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-text);
    margin-bottom: 4px;
    line-height: 1.3;
    transition: color .2s;
}
.pkg-card-title a:hover { color: var(--theme-primary); }
.pkg-card-author {
    font-size: .8rem;
    color: var(--theme-text-muted);
    margin-bottom: 14px;
    flex: 1;
}
.pkg-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.pkg-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-primary);
    line-height: 1;
}
.pkg-price-free {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-accent);
}
.pkg-price-original {
    font-size: .8rem;
    color: var(--theme-text-muted);
    text-decoration: line-through;
    margin-left: 4px;
    font-weight: 400;
}
.pkg-meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .78rem;
    color: var(--theme-text-muted);
}
.pkg-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #f59e0b;
    font-weight: 600;
}
.pkg-rating span { color: var(--theme-text-muted); font-weight: 400; }
.pkg-views {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Type badges (kept for backward compat but mostly hidden in card) */
.pkg-type-badge {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 2px 7px;
    border-radius: 4px;
}
.pkg-type-plugin  { background: #dbeafe; color: #1d4ed8; }
.pkg-type-theme   { background: #fce7f3; color: #9d174d; }
.pkg-type-package { background: #d1fae5; color: #065f46; }

/* ============================================================
   CTA SECTION — Light (Botble style)
   ============================================================ */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(160deg, #f0f4ff 0%, #e8ecfd 40%, #f5f7ff 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -200px; right: -100px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27,78,245,.06) 0%, transparent 70%);
    pointer-events: none;
}
.cta-section h2 {
    font-family: var(--font-sans);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--theme-text);
    margin-bottom: 16px;
    letter-spacing: -.5px;
    position: relative;
}
.cta-section p {
    color: var(--theme-text-muted);
    font-size: 1.05rem;
    margin-bottom: 40px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.cta-section .cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
    position: relative;
}
/* Newsletter in CTA */
.cta-newsletter {
    display: flex;
    max-width: 420px;
    margin: 0 auto;
    gap: 0;
    background: #fff;
    border: 1.5px solid var(--theme-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--theme-shadow);
}
.cta-newsletter input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: .875rem;
    background: transparent;
    color: var(--theme-text);
}
.cta-newsletter input::placeholder { color: var(--theme-text-muted); }
.cta-newsletter button {
    padding: 8px 20px;
    margin: 5px;
    background: var(--theme-primary);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.cta-newsletter button:hover { background: var(--theme-primary-dark); }

/* ============================================================
   FOOTER — Light theme (Botble style)
   ============================================================ */
.site-footer {
    background: var(--theme-bg-alt);
    border-top: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
    padding: 56px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand .logo-icon { background: var(--theme-text); }
.footer-brand .logo-text { color: var(--theme-text); }
.footer-brand p {
    margin-top: 14px;
    font-size: .875rem;
    line-height: 1.7;
    color: var(--theme-text-muted);
    max-width: 260px;
}
.footer-col h4 {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--theme-text);
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
    font-size: .875rem;
    color: var(--theme-text-muted);
    transition: color .2s;
}
.footer-col ul a:hover { color: var(--theme-text); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--theme-border);
    flex-wrap: wrap;
    gap: 12px;
    font-size: .8rem;
    color: var(--theme-text-muted);
}
.footer-bottom a { color: var(--theme-text-muted); }
.footer-bottom a:hover { color: var(--theme-text); }

/* Footer social icons */
.footer-social {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.footer-social a {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--theme-bg);
    color: var(--theme-text-muted);
    transition: background .2s, color .2s;
    border: 1px solid var(--theme-border);
}
.footer-social a:hover {
    background: var(--theme-primary);
    color: #fff;
    border-color: var(--theme-primary);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--theme-text-muted);
}
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.25rem; font-weight: 600; color: var(--theme-text); margin-bottom: 8px; }
.empty-state p { font-size: .95rem; }

/* ============================================================
   PACKAGE DETAIL PAGE
   ============================================================ */
.pkg-detail-header {
    background: #fff;
    border-bottom: 1px solid var(--theme-border);
    padding: 48px 0 40px;
}
.pkg-detail-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: flex-start;
}
.pkg-detail-icon {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--theme-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
    border: 1px solid var(--theme-border);
}
.pkg-detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.pkg-detail-info h1 {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -.4px;
}
.pkg-detail-info .pkg-meta-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: .875rem;
    color: var(--theme-text-muted);
}
.pkg-detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ============================================================
   DEVELOPER PORTAL — CSS Classes
   ============================================================ */
.dev-page {
    background: var(--theme-bg-alt);
    min-height: calc(100vh - var(--header-height) - 260px);
    padding: 48px 0 80px;
}
.dev-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: var(--theme-text-muted);
    margin-bottom: 28px;
}
.dev-breadcrumb a { color: var(--theme-primary); }
.dev-breadcrumb a:hover { text-decoration: underline; }
.dev-breadcrumb-sep { color: var(--theme-border); }

/* Stat cards with accent left border */
.stat-card {
    background: #fff;
    border-radius: var(--theme-radius);
    border: 1px solid var(--theme-border);
    border-left: 3px solid var(--card-accent, var(--theme-primary));
    padding: 20px 24px;
    transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: var(--theme-shadow-hover); }
.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    font-family: var(--font-sans);
    color: var(--card-accent, var(--theme-primary));
}
.stat-card-label {
    font-size: .8rem;
    color: var(--theme-text-muted);
    margin-top: 7px;
    font-weight: 500;
}

/* Form classes */
.form-card {
    background: #fff;
    border-radius: var(--theme-radius);
    border: 1px solid var(--theme-border);
    padding: 32px;
}
.form-field { margin-bottom: 22px; }
.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--theme-text);
}
.form-label-req { color: #ef4444; margin-left: 2px; }
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    font-size: .875rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    color: var(--theme-text);
    background: #fff;
    font-family: var(--font-sans);
}
.form-input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(27,78,245,.1);
}
.form-input.is-error { border-color: #ef4444; }
.form-hint {
    font-size: .78rem;
    color: var(--theme-text-muted);
    margin-top: 5px;
}
.form-error {
    font-size: .78rem;
    color: #ef4444;
    margin-top: 5px;
}

/* Toggle Cards (Free / Paid) */
.type-cards {
    display: flex;
    gap: 12px;
}
.type-card {
    flex: 1;
    border: 2px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
    text-align: center;
    position: relative;
}
.type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.type-card:hover { border-color: var(--theme-primary); }
.type-card.selected {
    border-color: var(--theme-primary);
    background: var(--theme-primary-light);
    box-shadow: 0 0 0 1px var(--theme-primary);
}
.type-card-icon { font-size: 1.5rem; margin-bottom: 6px; }
.type-card-label { font-size: .875rem; font-weight: 600; color: var(--theme-text); }
.type-card-sub { font-size: .75rem; color: var(--theme-text-muted); margin-top: 2px; }

/* Drag & drop upload zone */
.upload-zone {
    border: 2px dashed var(--theme-border);
    border-radius: var(--theme-radius-sm);
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--theme-bg-alt);
    position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--theme-primary);
    background: var(--theme-primary-light);
}
.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.upload-zone-icon { font-size: 2rem; margin-bottom: 8px; color: var(--theme-text-muted); }
.upload-zone-text { font-size: .875rem; font-weight: 600; color: var(--theme-text); }
.upload-zone-sub { font-size: .78rem; color: var(--theme-text-muted); margin-top: 4px; }

/* Info box (sidebar notes) */
.info-box {
    background: #fff;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    padding: 24px;
    font-size: .875rem;
}
.info-box-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--theme-text);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.info-box ul li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--theme-text-muted);
    line-height: 1.5;
}
.info-box ul li::before {
    content: '✓';
    color: var(--theme-accent);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Section box */
.version-section {
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    overflow: hidden;
    margin-bottom: 22px;
}
.version-section-header {
    padding: 14px 18px;
    background: var(--theme-bg-alt);
    border-bottom: 1px solid var(--theme-border);
    font-size: .9rem;
    font-weight: 700;
    color: var(--theme-text);
}
.version-section-body {
    padding: 20px 18px;
    background: #fff;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.data-table thead th {
    text-align: left;
    padding: 10px 16px;
    background: var(--theme-bg-alt);
    border-bottom: 1.5px solid var(--theme-border);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--theme-text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--theme-border);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--theme-bg-alt); }
.data-table tfoot td {
    padding: 12px 16px;
    background: var(--theme-bg-alt);
    font-weight: 700;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .73rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-approved { background: var(--theme-accent-light); color: var(--theme-accent); }
.status-pending  { background: var(--theme-warn-light);   color: var(--theme-warn); }
.status-draft    { background: #f1f5f9; color: #64748b; }
.status-rejected { background: #fee2e2; color: #ef4444; }

/* Flash messages */
.flash-success {
    background: var(--theme-accent-light);
    color: var(--theme-accent);
    border-radius: var(--theme-radius-sm);
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: .875rem;
    border-left: 3px solid var(--theme-accent);
}
.flash-error {
    background: #fee2e2;
    color: #ef4444;
    border-radius: var(--theme-radius-sm);
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: .875rem;
    border-left: 3px solid #ef4444;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: linear-gradient(160deg, #f0f4ff 0%, #e8ecfd 50%, #f5f7ff 100%);
}
.auth-card {
    width: 100%;
    max-width: 420px;
}
.auth-card-inner {
    background: #fff;
    border-radius: var(--theme-radius);
    border: 1px solid var(--theme-border);
    padding: 36px;
    box-shadow: var(--theme-shadow);
}
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--theme-text);
}
.auth-header p { color: var(--theme-text-muted); font-size: .9rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .hero-section { padding: 60px 0 56px; text-align: center; }
    .hero-stats { display: flex; flex-wrap: wrap; }
    .hero-stat-item { flex: 1; min-width: 120px; padding: 14px 20px; }
    .site-nav { gap: 4px; }
    .packages-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .cta-section { padding: 64px 0; }
    .hero-actions { flex-direction: column; align-items: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    /* Toolbar responsive */
    .listing-toolbar { position: static; }
    .toolbar-sep { display: none; }
    .toolbar-row { gap: 6px; }
    .toolbar-search-form { flex-wrap: wrap; }
    .toolbar-search-form > div { min-width: 100%; }
    .toolbar-select { flex: 1; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .pkg-detail-inner { grid-template-columns: 1fr; }
    .pkg-detail-icon { width: 80px; height: 80px; font-size: 2rem; }
    .hero-stats { flex-direction: column; width: 100%; }
    .type-cards { flex-direction: column; }
    .header-search-btn .header-search-kbd { display: none; }
}
@media (max-width: 480px) {
    .site-nav { display: none; }
}
