/* ===== SilverSHELL App Store — Premium Dark Theme ===== */
/* Aesthetic: Deep-space dark with neon purple/teal — Linear/Raycast caliber */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&display=swap');

/* ===== TOKENS ===== */
:root {
    --as-bg-0: #07091a;
    --as-bg-1: #0d1130;
    --as-bg-2: #131940;
    --as-bg-card: #181e3f;
    --as-accent: #6c63ff;
    --as-accent-hover: #8178ff;
    --as-accent-2: #00e5cc;
    --as-text: #e0e8ff;
    --as-text-muted: #7a86b8;
    --as-border: rgba(108, 99, 255, 0.15);
    --as-border-hover: rgba(108, 99, 255, 0.4);
    --as-radius: 14px;
    --as-radius-sm: 10px;
    --as-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    --as-card-glow: 0 8px 32px rgba(108, 99, 255, 0.18);
    --as-header-h: 64px;
}

/* ===== BASE ===== */
body {
    background: var(--as-bg-0);
    color: var(--as-text);
    font-family: 'General Sans', 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    padding-bottom: 0; /* overridden on mobile */
}

h1, h2, h3, h4 {
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

/* ===== ANIMATIONS ===== */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    from { background-position: -200% 0; }
    to   { background-position: 200% 0; }
}

@keyframes installPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(61,220,132,0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== HEADER ===== */
.appstore-header {
    background: rgba(7, 9, 26, 0.85);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid var(--as-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}

.appstore-header.scrolled {
    background: rgba(7, 9, 26, 0.97);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
    border-bottom-color: rgba(108, 99, 255, 0.25);
}

.appstore-header-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.75rem;
    height: var(--as-header-h);
}

.appstore-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--as-text);
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-icon { color: var(--as-accent); }

.appstore-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.appstore-search .search-input {
    width: 100%;
    background: var(--as-bg-2);
    border: 1px solid var(--as-border);
    border-radius: 24px;
    padding: 0.45rem 1rem 0.45rem 2.6rem;
    color: var(--as-text);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.appstore-search .search-input:focus {
    border-color: var(--as-accent);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--as-text-muted);
    font-size: 1.05rem;
    pointer-events: none;
}

.appstore-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.nav-link {
    color: var(--as-text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: var(--as-text);
    background: rgba(255,255,255,0.04);
}

.nav-btn-primary {
    background: var(--as-accent);
    color: #fff;
    padding: 0.4rem 1.25rem;
    border-radius: 24px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.15s, transform 0.15s;
}

.nav-btn-primary:hover {
    background: var(--as-accent-hover);
    transform: translateY(-1px);
}

/* Hamburger (hidden on desktop) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--as-text);
    cursor: pointer;
    padding: 0.3rem;
    margin-right: 0.25rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.hamburger-btn:hover { background: rgba(255,255,255,0.06); }
.hamburger-btn .material-icons { font-size: 1.4rem; display: block; }

/* ===== BODY / FOOTER ===== */
.appstore-body { max-width: 1300px; margin: 0 auto; padding: 2rem 1.5rem; }

.appstore-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    font-size: 0.82rem;
    color: var(--as-text-muted);
    border-top: 1px solid var(--as-border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.4rem; }
.footer-links { display: flex; align-items: center; gap: 1rem; }
.footer-links a { color: var(--as-text-muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--as-accent); }
.footer-tag {
    background: rgba(108,99,255,0.1);
    color: var(--as-accent);
    padding: 0.15rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    border: 1px solid rgba(108,99,255,0.2);
}

/* ===== HERO ===== */
.store-hero {
    text-align: center;
    padding: 5rem 2rem 3.5rem;
    background:
        radial-gradient(ellipse 90% 60% at 50% -5%, rgba(108,99,255,0.18) 0%, transparent 65%),
        radial-gradient(ellipse 40% 30% at 90% 90%, rgba(0,229,204,0.07) 0%, transparent 55%);
    border-radius: var(--as-radius);
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.store-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    opacity: 0.6;
}

.store-hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(140deg, #fff 35%, #a89cff 65%, #00e5cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    position: relative;
}

.store-hero p {
    color: var(--as-text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.75rem;
    position: relative;
}

.hero-search {
    width: min(100%, 520px);
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: 32px;
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
    color: var(--as-text);
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-search:focus {
    border-color: var(--as-accent);
    box-shadow: 0 0 0 4px rgba(108,99,255,0.12);
}

/* ===== SECTIONS ===== */
.store-section { margin-bottom: 3.5rem; }

.store-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--as-text);
}

.view-all-link {
    display: inline-block;
    margin-top: 1.25rem;
    color: var(--as-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.view-all-link:hover { color: var(--as-accent-hover); }

/* ===== EMPTY / ERROR ===== */
.store-empty {
    text-align: center;
    padding: 4.5rem 2rem;
    color: var(--as-text-muted);
    animation: fadeIn 0.4s ease;
}

.store-empty .material-icons {
    font-size: 4rem;
    color: var(--as-accent);
    display: block;
    margin-bottom: 0.75rem;
}

.store-empty h3 { margin: 0 0 0.6rem; color: var(--as-text); font-size: 1.4rem; }
.store-empty p  { margin-bottom: 1.5rem; }

/* ===== APP GRID ===== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

/* Staggered card animations — up to 8 visible children */
.app-grid .app-card:nth-child(1) { animation: cardIn 0.4s 0.00s ease both; }
.app-grid .app-card:nth-child(2) { animation: cardIn 0.4s 0.06s ease both; }
.app-grid .app-card:nth-child(3) { animation: cardIn 0.4s 0.12s ease both; }
.app-grid .app-card:nth-child(4) { animation: cardIn 0.4s 0.18s ease both; }
.app-grid .app-card:nth-child(5) { animation: cardIn 0.4s 0.24s ease both; }
.app-grid .app-card:nth-child(6) { animation: cardIn 0.4s 0.30s ease both; }
.app-grid .app-card:nth-child(7) { animation: cardIn 0.4s 0.36s ease both; }
.app-grid .app-card:nth-child(8) { animation: cardIn 0.4s 0.42s ease both; }
.app-grid .app-card:nth-child(n+9) { animation: cardIn 0.4s 0.48s ease both; }

/* ===== APP CARD ===== */
.app-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.1rem;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    position: relative;
    overflow: hidden;
}

.app-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(108,99,255,0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--as-card-glow);
    border-color: var(--as-border-hover);
}

.app-card:hover::after { opacity: 1; }

.app-card-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 0.85rem;
    background: var(--as-bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s;
}

.app-card:hover .app-card-icon {
    box-shadow: 0 0 18px rgba(108,99,255,0.25);
}

.app-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon-placeholder { color: var(--as-text-muted); font-size: 2rem; }
.app-card-name { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; font-size: 0.95rem; margin: 0 0 0.2rem; }
.app-card-publisher { font-size: 0.78rem; color: var(--as-text-muted); margin: 0 0 0.4rem; }
.app-card-desc {
    font-size: 0.82rem;
    color: var(--as-text-muted);
    margin: 0 0 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-meta { display: flex; gap: 0.75rem; font-size: 0.78rem; color: var(--as-text-muted); align-items: center; }
.meta-stat { display: flex; align-items: center; gap: 0.2rem; }
.meta-stat .material-icons { font-size: 0.85rem; color: var(--as-accent-2); }

.platform-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.platform-badge {
    font-size: 0.68rem;
    background: rgba(108,99,255,0.1);
    color: var(--as-accent);
    padding: 0.1rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(108,99,255,0.18);
}

.featured-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: linear-gradient(135deg, #f6c90e, #ff9500);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-badge .material-icons { font-size: 0.85rem; color: #fff; }

/* ===== SKELETON LOADING ===== */
.app-card-skeleton { pointer-events: none; cursor: default; }
.app-card-skeleton .app-card::after { display: none; }

.skeleton-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    margin-bottom: 0.85rem;
    background: linear-gradient(90deg, var(--as-bg-2) 25%, rgba(108,99,255,0.06) 50%, var(--as-bg-2) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-line {
    height: 14px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--as-bg-2) 25%, rgba(108,99,255,0.06) 50%, var(--as-bg-2) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-line--name { width: 65%; }
.skeleton-line--pub  { width: 45%; height: 11px; }
.skeleton-line--desc { width: 100%; }
.skeleton-line--desc.short { width: 75%; }

/* ===== CATEGORIES ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.category-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--as-text);
    font-size: 0.83rem;
    font-weight: 600;
    transition: all 0.18s;
}

.category-card:hover {
    border-color: var(--as-accent);
    color: var(--as-accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(108,99,255,0.12);
}

.category-card .material-icons { font-size: 1.8rem; color: var(--as-accent); }

/* ===== LOADING ===== */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--as-text-muted);
    animation: fadeIn 0.3s ease;
}

.empty-state .material-icons { font-size: 3rem; display: block; margin-bottom: 1rem; color: var(--as-accent); }

/* ===== APP DETAIL ===== */
.app-detail { max-width: 940px; margin: 0 auto; }

.app-detail-header {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.app-icon-large { width: 100px; height: 100px; border-radius: 24px; object-fit: cover; }
.app-icon-placeholder-large { width: 100px; height: 100px; border-radius: 24px; background: var(--as-bg-2); display: flex; align-items: center; justify-content: center; }
.app-icon-placeholder-large .material-icons { font-size: 3rem; color: var(--as-text-muted); }
.app-header-info h1 { font-size: 1.9rem; font-weight: 800; margin: 0 0 0.3rem; }
.app-publisher { color: var(--as-text-muted); margin: 0 0 0.5rem; }
.app-publisher a { color: var(--as-accent); text-decoration: none; }
.app-category-badge { background: rgba(108,99,255,0.1); color: var(--as-accent); padding: 0.15rem 0.75rem; border-radius: 12px; font-size: 0.8rem; border: 1px solid rgba(108,99,255,0.2); }
.app-stats { display: flex; gap: 1.25rem; margin-top: 0.75rem; color: var(--as-text-muted); font-size: 0.85rem; }
.stat { display: flex; align-items: center; gap: 0.3rem; }
.stat .material-icons { font-size: 1rem; color: var(--as-accent-2); }

.screenshots { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.75rem; margin-bottom: 1.75rem; scrollbar-width: thin; scrollbar-color: var(--as-border) transparent; }
.screenshot-thumb { height: 170px; border-radius: 10px; cursor: pointer; object-fit: cover; border: 1px solid var(--as-border); transition: border-color 0.15s, transform 0.15s; }
.screenshot-thumb:hover { border-color: var(--as-accent); transform: scale(1.01); }

.app-description { color: var(--as-text-muted); line-height: 1.75; margin-bottom: 2rem; white-space: pre-wrap; }

/* ===== DOWNLOAD ===== */
.download-section { margin-bottom: 2.5rem; }
.download-section h3, .release-history h3, .reviews-section h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.platform-downloads { display: flex; flex-direction: column; gap: 0.75rem; }

.platform-download-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    padding: 1rem 1.25rem;
    transition: border-color 0.15s;
}

.platform-download-card:hover { border-color: var(--as-border-hover); }
.platform-icon { font-size: 2rem; color: var(--as-accent); }
.platform-info { flex: 1; }
.platform-info strong { display: block; }
.artifact-format, .file-size { font-size: 0.8rem; color: var(--as-text-muted); display: block; }

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--as-accent);
    color: #fff;
    padding: 0.55rem 1.3rem;
    border-radius: 24px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s, transform 0.15s;
}

.download-btn:hover { background: var(--as-accent-hover); transform: translateY(-1px); }

/* ===== RELEASE HISTORY ===== */
.release-history { margin-bottom: 2rem; }
.release-row { padding: 0.75rem 0; border-bottom: 1px solid var(--as-border); }
.release-date { font-size: 0.8rem; color: var(--as-text-muted); margin-left: 0.75rem; }
.release-notes { font-size: 0.85rem; color: var(--as-text-muted); margin: 0.25rem 0 0; }

/* ===== REVIEWS ===== */
.review-card { background: var(--as-bg-card); border: 1px solid var(--as-border); border-radius: var(--as-radius-sm); padding: 1rem; margin-bottom: 0.75rem; }
.review-stars { display: flex; gap: 0.1rem; margin-bottom: 0.5rem; }
.review-stars .star { font-size: 1rem; color: var(--as-text-muted); }
.review-stars .star.filled { color: #f6c90e; }
.review-date { font-size: 0.75rem; color: var(--as-text-muted); }
.no-reviews { color: var(--as-text-muted); }

/* ===== BROWSE ===== */
.browse-page { display: flex; gap: 2rem; }

.browse-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--as-header-h) + 1rem);
    max-height: calc(100vh - var(--as-header-h) - 2rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--as-border) transparent;
}

.browse-sidebar h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; color: var(--as-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.filter-group { margin-bottom: 1.5rem; }
.filter-group label { display: block; font-size: 0.78rem; color: var(--as-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }

.sidebar-category-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 7px;
    text-decoration: none;
    color: var(--as-text-muted);
    font-size: 0.85rem;
    transition: all 0.12s;
}

.sidebar-category-link:hover, .sidebar-category-link.active {
    color: var(--as-accent);
    background: rgba(108,99,255,0.08);
}

.sidebar-category-link .material-icons { font-size: 1rem; }
.browse-main { flex: 1; min-width: 0; }
.browse-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.browse-search { flex: 1; }
.result-count { font-size: 0.85rem; color: var(--as-text-muted); white-space: nowrap; }

/* ===== INSTALL GUIDES ===== */
.install-guide { max-width: 720px; margin: 0 auto; }
.install-guide-section h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; margin-bottom: 1.75rem; }
.install-step { display: flex; gap: 1.1rem; margin-bottom: 1.75rem; align-items: flex-start; }
.step-number { width: 30px; height: 30px; background: var(--as-accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; margin-top: 2px; }

.download-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 2rem;
    border-radius: 32px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0.75rem;
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}

.download-btn-large:hover { transform: translateY(-2px); opacity: 0.93; }
.download-btn-large:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.download-btn-large.android {
    background: #3ddc84;
    color: #000;
}

.download-btn-large.android:not(:disabled) {
    animation: installPulse 2.5s infinite;
}

.download-btn-large.linux { background: #f7c500; color: #000; }
.download-btn-large.macos { background: #555; color: #fff; }
.download-btn-large.web   { background: var(--as-accent-2); color: #000; }
.download-btn-large:not([class*="android"]):not([class*="linux"]):not([class*="macos"]):not([class*="web"]) { background: var(--as-accent); color: #fff; }

.integrity-check { background: var(--as-bg-1); border: 1px solid var(--as-border); border-radius: var(--as-radius-sm); padding: 1rem 1.25rem; margin-top: 1.25rem; }
.integrity-check code, .integrity-check pre { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.8rem; word-break: break-all; color: var(--as-accent-2); }
.back-link { display: inline-flex; align-items: center; gap: 0.25rem; margin-bottom: 1.75rem; color: var(--as-text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.15s; }
.back-link:hover { color: var(--as-accent); }
.silverdroid-note, .update-available-note, .installed-note { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.6rem; font-size: 0.85rem; color: var(--as-text-muted); }

/* Install error banner */
.install-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(255,72,72,0.08);
    border: 1px solid rgba(255,72,72,0.25);
    border-radius: var(--as-radius-sm);
    padding: 0.85rem 1rem;
    margin-top: 0.75rem;
    animation: slideDown 0.25s ease;
}

.install-error-banner .material-icons { color: #ff4848; font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.install-error-banner strong { display: block; color: #ff6868; font-size: 0.9rem; margin-bottom: 0.2rem; }
.install-error-banner p { margin: 0; font-size: 0.83rem; color: var(--as-text-muted); line-height: 1.4; }

/* ===== ADMIN NAV ===== */
.admin-nav { display:flex; flex-wrap:wrap; gap:1rem; margin:1.5rem 0 2rem; }
.admin-nav-card { display:flex; flex-direction:column; align-items:center; gap:0.4rem; background:var(--as-bg-card); border:1px solid var(--as-border); border-radius:var(--as-radius-sm); padding:1.25rem 1.5rem; text-decoration:none; color:var(--as-text-muted); font-size:0.85rem; font-weight:600; min-width:110px; transition:all 0.15s; }
.admin-nav-card:hover { border-color:var(--as-accent); color:var(--as-accent); transform:translateY(-2px); box-shadow: var(--as-card-glow); }
.admin-nav-card .material-icons { font-size:1.8rem; color:var(--as-accent); }

/* ===== NO DOWNLOADS ===== */
.no-downloads { display:flex; align-items:center; gap:0.75rem; padding:1.25rem; background:var(--as-bg-2); border:1px solid var(--as-border); border-radius:var(--as-radius-sm); color:var(--as-text-muted); }
.no-downloads .material-icons { font-size:1.5rem; color:var(--as-accent); }

/* ===== PUBLISHER GUIDE ===== */
.publish-guide { margin-top:2rem; background:var(--as-bg-card); border:1px solid var(--as-border); border-radius:var(--as-radius); padding:1rem 1.5rem; }
.publish-guide summary { cursor:pointer; font-weight:600; color:var(--as-text); display:flex; align-items:center; gap:0.5rem; list-style:none; }
.publish-guide summary .material-icons { font-size:1.1rem; color:var(--as-accent); }
.publish-steps { margin:1rem 0 1rem 1.25rem; display:flex; flex-direction:column; gap:0.5rem; color:var(--as-text-muted); }
.publish-steps li strong { color:var(--as-text); }
.publish-ci { display:flex; align-items:center; gap:0.5rem; font-size:0.85rem; color:var(--as-text-muted); margin-top:0.5rem; }
.publish-ci .material-icons { font-size:1rem; color:var(--as-accent-2); }
.publish-ci code { background:var(--as-bg-2); padding:0.1rem 0.35rem; border-radius:4px; font-size:0.82rem; }
.publish-ci a { color:var(--as-accent); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; margin-top: 2.5rem; }

/* ===== LIGHTBOX ===== */
.lightbox-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; cursor: pointer; animation: fadeIn 0.2s ease; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; cursor: default; }
.lightbox-content img { max-width: 100%; max-height: 90vh; border-radius: var(--as-radius); box-shadow: 0 0 60px rgba(108,99,255,0.25); }
.lightbox-close { position: absolute; top: -2rem; right: -2rem; background: var(--as-bg-card); border: 1px solid var(--as-border); border-radius: 50%; width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--as-text); transition: background 0.15s; }
.lightbox-close:hover { background: var(--as-accent); color: #fff; }

/* ===== ADMIN PAGES ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h1 { margin: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.stat-card { background: var(--as-bg-card); border: 1px solid var(--as-border); border-radius: var(--as-radius-sm); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; transition: border-color 0.15s; }
.stat-card:hover { border-color: var(--as-border-hover); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--as-accent); line-height: 1; font-family: 'Bricolage Grotesque', system-ui, sans-serif; }
.stat-label { font-size: 0.8rem; color: var(--as-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.admin-nav-card--highlight { border-color: rgba(0,229,204,0.3); color: var(--as-accent-2) !important; }
.admin-nav-card--highlight .material-icons { color: var(--as-accent-2) !important; }

/* ===== STATUS BADGES ===== */
.status-badge { display: inline-block; padding: 0.15rem 0.65rem; border-radius: 10px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.status-draft       { background: rgba(120,120,140,0.15); color: #9999bb; border: 1px solid rgba(120,120,140,0.25); }
.status-underreview { background: rgba(246,201,14,0.12); color: #f6c90e;  border: 1px solid rgba(246,201,14,0.25); }
.status-approved    { background: rgba(0,229,204,0.12);  color: var(--as-accent-2); border: 1px solid rgba(0,229,204,0.25); }
.status-published   { background: rgba(61,220,132,0.12); color: #3ddc84; border: 1px solid rgba(61,220,132,0.25); }
.status-rejected    { background: rgba(255,72,72,0.12);  color: #ff4848; border: 1px solid rgba(255,72,72,0.25); }

/* ===== ADMIN APP DETAIL ===== */
.admin-app-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.app-title-row { display: flex; align-items: center; gap: 1rem; }
.app-title-row h1 { margin: 0 0 0.2rem; font-size: 1.6rem; }
.app-icon { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.app-slug { font-size: 0.85rem; color: var(--as-text-muted); font-family: 'JetBrains Mono', monospace; }
.app-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* ===== FORMS ===== */
.edit-form { max-width: 760px; padding: 1rem 0; }
.edit-form h3 { margin-bottom: 1.25rem; font-size: 1.1rem; }
.form-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.form-row > * { flex: 1 1 220px; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.releases-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.releases-header h3 { margin: 0; font-size: 1.1rem; }
.release-body { padding: 0.5rem 0; }
.release-body h4, .release-body h5 { margin: 1rem 0 0.5rem; font-size: 0.95rem; color: var(--as-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.artifact-upload { background: var(--as-bg-1); border: 1px dashed var(--as-border); border-radius: var(--as-radius-sm); padding: 1rem; }
.create-app-form, .upload-release-form { max-width: 760px; padding: 1rem 0; }
.create-app-form h1, .upload-release-form h1 { margin-bottom: 1.5rem; }

/* ===== MOBILE DRAWER ===== */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.65);
    animation: fadeIn 0.2s ease;
}

.mobile-drawer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--as-bg-1);
    border-right: 1px solid var(--as-border);
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    animation: slideDown 0.22s ease;
    overflow-y: auto;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem 1.25rem;
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--as-border);
    margin-bottom: 0.5rem;
}

.mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.25rem;
    color: var(--as-text-muted);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
}

.mobile-drawer-item:hover { background: rgba(108,99,255,0.06); color: var(--as-text); }
.mobile-drawer-item .material-icons { font-size: 1.2rem; }
.mobile-drawer-item--accent { color: var(--as-accent); }
.mobile-drawer-item--danger  { color: #ff6868; margin-top: auto; }

/* ===== MOBILE BOTTOM NAV (hidden on desktop) ===== */
.mobile-bottom-nav { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body { padding-bottom: 70px; }

    /* Header */
    .hamburger-btn { display: flex; }
    .appstore-nav-actions { display: none; }

    .appstore-header-content {
        gap: 0.75rem;
        padding: 0 1rem;
        flex-wrap: wrap;
        height: auto;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .appstore-search {
        order: 3;
        max-width: 100%;
        width: 100%;
        flex-basis: 100%;
    }

    /* Bottom nav */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 150;
        background: rgba(13,17,48,0.97);
        backdrop-filter: blur(16px);
        border-top: 1px solid var(--as-border);
        height: 62px;
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        color: var(--as-text-muted);
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 600;
        transition: color 0.15s;
        min-height: 48px;
    }

    .mobile-nav-item:hover, .mobile-nav-item.active { color: var(--as-accent); }
    .mobile-nav-item .material-icons { font-size: 1.3rem; }

    /* Browse */
    .browse-page { flex-direction: column; }
    .browse-sidebar { width: 100%; position: static; max-height: none; overflow: visible; }

    /* Grids */
    .app-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }

    /* Body padding */
    .appstore-body { padding: 1.25rem 1rem; }

    /* Install guide */
    .install-guide { max-width: 100%; }

    /* Footer */
    .appstore-footer { flex-direction: column; align-items: flex-start; }
    .footer-links { flex-wrap: wrap; gap: 0.75rem; }

    /* App detail header */
    .app-detail-header { flex-direction: column; }
}

@media (max-width: 480px) {
    .app-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }

    /* Horizontal card layout on very small screens */
    .app-card {
        display: flex;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .app-card-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .app-card-content { flex: 1; min-width: 0; }

    /* Touch-friendly buttons */
    .download-btn-large { width: 100%; justify-content: center; min-height: 52px; }
    .nav-btn-primary, .download-btn { min-height: 44px; }

    .store-hero { padding: 3rem 1.25rem 2rem; }
    .store-hero h1 { font-size: 2rem; }
}

/* ======================================================
   ADMIN & PUBLISHER DESIGN SYSTEM
   ====================================================== */

/* ===== ADMIN/PUBLISHER PAGE SHELLS ===== */
.admin-page, .publisher-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 0;
    animation: fadeIn 0.3s ease;
}

.admin-page-header, .publisher-page-header {
    background: linear-gradient(135deg, rgba(108,99,255,0.12) 0%, rgba(0,229,204,0.06) 100%);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}

.admin-page-header::before, .publisher-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108,99,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,99,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.5;
}

.admin-page-header > *, .publisher-page-header > * {
    position: relative;
    z-index: 1;
}

.admin-page-header h1, .publisher-page-header h1 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0 0;
}

.admin-page-header h1 .material-icons, .publisher-page-header h1 .material-icons {
    font-size: 1.6rem;
    color: var(--as-accent);
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.admin-section, .publisher-section {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.15s;
}

.admin-section:hover, .publisher-section:hover {
    border-color: var(--as-border-hover);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--as-text-muted);
    margin-bottom: 0.25rem;
}

.breadcrumb a {
    color: var(--as-accent);
    text-decoration: none;
    transition: color 0.12s;
}

.breadcrumb a:hover { color: var(--as-accent-hover); }

.breadcrumb .separator {
    color: var(--as-text-muted);
    opacity: 0.5;
}

/* ===== FORM CARDS ===== */
.form-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 2rem;
    max-width: 760px;
}

.form-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--as-text-muted);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--as-border);
}

.form-section-title:first-child { margin-top: 0; }

/* Radzen form field overrides within admin/publisher */
.admin-page .rz-form-field, .publisher-page .rz-form-field,
.form-card .rz-form-field {
    margin-bottom: 0.75rem;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.5rem 1.25rem;
    text-decoration: none;
    color: var(--as-text);
    transition: all 0.18s;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.dashboard-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(108,99,255,0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    border-color: var(--as-accent);
    box-shadow: var(--as-card-glow);
}

.dashboard-card:hover::after { opacity: 1; }

.dashboard-card .material-icons {
    font-size: 2rem;
    color: var(--as-accent);
    transition: transform 0.18s;
}

.dashboard-card:hover .material-icons { transform: scale(1.1); }

.dashboard-card .card-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.dashboard-card .card-desc {
    font-size: 0.78rem;
    color: var(--as-text-muted);
    line-height: 1.4;
}

.dashboard-card .card-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: rgba(255,72,72,0.15);
    color: #ff6868;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255,72,72,0.25);
}

/* ===== DASHBOARD STAT CARDS ===== */
.dashboard-stat-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border-left: 3px solid var(--as-accent);
    transition: all 0.18s;
}

.dashboard-stat-card:hover {
    border-color: var(--as-border-hover);
    border-left-color: var(--as-accent);
    box-shadow: 0 4px 20px rgba(108,99,255,0.12);
}

.dashboard-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    background: linear-gradient(135deg, var(--as-accent), var(--as-accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.dashboard-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--as-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-stat-card--teal { border-left-color: var(--as-accent-2); }
.dashboard-stat-card--amber { border-left-color: #f6c90e; }
.dashboard-stat-card--green { border-left-color: #3ddc84; }
.dashboard-stat-card--red { border-left-color: #ff4848; }

/* ===== DATAGRID DARK THEME OVERRIDES ===== */
.admin-page .rz-datatable, .publisher-page .rz-datatable {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    overflow: hidden;
}

.admin-page .rz-datatable thead th, .publisher-page .rz-datatable thead th {
    background: var(--as-bg-2) !important;
    color: var(--as-text-muted) !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--as-border) !important;
}

.admin-page .rz-datatable tbody tr, .publisher-page .rz-datatable tbody tr {
    border-bottom: 1px solid rgba(108,99,255,0.06);
    transition: background 0.12s;
}

.admin-page .rz-datatable tbody tr:hover, .publisher-page .rz-datatable tbody tr:hover {
    background: rgba(108,99,255,0.04) !important;
}

.admin-page .rz-datatable tbody tr:nth-child(even), .publisher-page .rz-datatable tbody tr:nth-child(even) {
    background: rgba(108,99,255,0.02);
}

/* ===== PUBLISHER-SPECIFIC ===== */
.publisher-profile-card {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 2rem;
    max-width: 640px;
}

.publisher-profile-card .profile-field {
    margin-bottom: 1.25rem;
}

.publisher-profile-card .profile-field label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--as-text-muted);
    margin-bottom: 0.35rem;
}

.publisher-profile-card .profile-field .value {
    font-size: 1rem;
    color: var(--as-text);
}

.publisher-status-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--as-radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.publisher-status-banner .material-icons { font-size: 1.3rem; }

.publisher-status-banner--pending {
    background: rgba(246,201,14,0.08);
    border: 1px solid rgba(246,201,14,0.2);
    color: #f6c90e;
}

.publisher-status-banner--active {
    background: rgba(61,220,132,0.08);
    border: 1px solid rgba(61,220,132,0.2);
    color: #3ddc84;
}

.publisher-status-banner--suspended {
    background: rgba(255,72,72,0.08);
    border: 1px solid rgba(255,72,72,0.2);
    color: #ff4848;
}

.ci-integration-card {
    background: var(--as-bg-2);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}

.ci-integration-card h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    margin: 0 0 1rem;
}

.ci-integration-card h3 .material-icons {
    font-size: 1.1rem;
    color: var(--as-accent-2);
}

.ci-integration-card .api-key-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ci-integration-card code {
    background: var(--as-bg-0);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--as-accent-2);
    border: 1px solid var(--as-border);
}

.ci-integration-card .code-block {
    background: var(--as-bg-0);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    padding: 1rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--as-text-muted);
    line-height: 1.6;
    white-space: pre;
}

/* ===== UPLOAD ZONE ===== */
.upload-zone {
    border: 2px dashed var(--as-border);
    border-radius: var(--as-radius);
    padding: 2rem;
    text-align: center;
    color: var(--as-text-muted);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.upload-zone:hover {
    border-color: var(--as-accent);
    background: rgba(108,99,255,0.04);
}

.upload-zone .material-icons {
    font-size: 2.5rem;
    color: var(--as-accent);
    display: block;
    margin-bottom: 0.5rem;
}

.upload-zone .upload-hint {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.upload-zone.active {
    border-color: var(--as-accent-2);
    background: rgba(0,229,204,0.04);
}

/* ===== ARTIFACT ROW ===== */
.artifact-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--as-bg-2);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    margin-bottom: 0.5rem;
    transition: border-color 0.12s;
}

.artifact-row:hover { border-color: var(--as-border-hover); }

.artifact-row .platform-icon {
    font-size: 1.5rem;
    color: var(--as-accent);
}

.artifact-row .artifact-info {
    flex: 1;
    min-width: 0;
}

.artifact-row .artifact-info strong { display: block; font-size: 0.9rem; }
.artifact-row .artifact-info .artifact-meta {
    font-size: 0.78rem;
    color: var(--as-text-muted);
}

.upload-progress {
    height: 4px;
    background: var(--as-bg-2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.upload-progress .bar {
    height: 100%;
    background: linear-gradient(90deg, var(--as-accent), var(--as-accent-2));
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ===== CHANNEL BADGES ===== */
.channel-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    vertical-align: middle;
}

.channel-badge.channel-alpha {
    background: rgba(156, 39, 176, 0.2);
    color: #ce93d8;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.channel-badge.channel-beta {
    background: rgba(255, 152, 0, 0.15);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.channel-badge.channel-releasecandidate {
    background: rgba(0, 229, 204, 0.15);
    color: var(--as-accent-2);
    border: 1px solid rgba(0, 229, 204, 0.3);
}

.download-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.download-section-header h3 { margin: 0; }

.channel-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

/* ===== FORM ENHANCEMENTS ===== */
.form-field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--as-text-muted);
    margin-top: 0.2rem;
    line-height: 1.4;
}

.form-section-title {
    border-left: 3px solid var(--as-accent);
    padding-left: 0.75rem;
}

/* Validation messages */
.validation-message {
    color: var(--as-error, #f44336);
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

/* Screenshot grid for EditApp */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.screenshot-grid-item {
    position: relative;
    border-radius: var(--as-radius-sm);
    overflow: hidden;
    border: 1px solid var(--as-border);
    aspect-ratio: 16 / 10;
}

.screenshot-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}

.screenshot-remove-btn .material-icons { font-size: 16px; }
.screenshot-grid-item:hover .screenshot-remove-btn { opacity: 1; }

/* Upload grid for NewRelease */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.upload-platform-card {
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.25rem;
    background: var(--as-bg-2);
    transition: border-color 0.15s;
}

.upload-platform-card:hover { border-color: var(--as-border-hover); }
.upload-platform-card.uploaded { border-color: #3ddc84; }
.upload-platform-card.uploading { border-color: var(--as-accent); }

.upload-platform-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.upload-platform-header .platform-icon {
    font-size: 1.4rem;
    color: var(--as-accent);
}

.upload-platform-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--as-text-muted);
}

.upload-platform-status.upload-success {
    color: #3ddc84;
}

.upload-platform-status.upload-success .material-icons {
    font-size: 1.1rem;
}

/* Styled file input inside upload card */
.upload-dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem;
    border: 2px dashed var(--as-border);
    border-radius: var(--as-radius-sm);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    color: var(--as-text-muted);
}

.upload-dropzone-label:hover {
    border-color: var(--as-accent);
    background: rgba(108,99,255,0.04);
}

.upload-dropzone-label .material-icons {
    font-size: 1.5rem;
    color: var(--as-accent);
}

.upload-dropzone-label .upload-dropzone-text {
    font-size: 0.78rem;
}

.upload-dropzone-label input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* CI/CD Profile card improvements */
.ci-integration-card .ci-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--as-text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 0.35rem;
}

.ci-integration-card .profile-field {
    margin-bottom: 0.75rem;
}

.api-key-actions {
    display: flex;
    gap: 0.25rem;
}

/* ===== RELEASE TIMELINE ===== */
.release-timeline {
    position: relative;
    padding-left: 2rem;
}

.release-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--as-border);
}

.release-timeline-item {
    position: relative;
    padding: 1rem 0 1.5rem;
}

.release-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.65rem;
    top: 1.3rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--as-accent);
    border: 2px solid var(--as-bg-0);
    z-index: 1;
}

.release-timeline-item:first-child::before {
    background: var(--as-accent-2);
    box-shadow: 0 0 0 4px rgba(0,229,204,0.15);
}

.release-timeline-item .version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--as-text);
}

.release-timeline-item .release-meta {
    font-size: 0.82rem;
    color: var(--as-text-muted);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.release-timeline-item .release-platforms {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.release-timeline-item .release-notes-text {
    font-size: 0.85rem;
    color: var(--as-text-muted);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.release-timeline-item .release-artifacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.release-artifact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: rgba(108,99,255,0.08);
    border: 1px solid rgba(108,99,255,0.15);
    border-radius: 8px;
    color: var(--as-accent);
    text-decoration: none;
    transition: all 0.12s;
}

.release-artifact-link:hover {
    background: rgba(108,99,255,0.15);
    border-color: var(--as-accent);
}

.release-artifact-link .material-icons { font-size: 0.85rem; }

.show-all-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.75rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    color: var(--as-accent);
    background: none;
    border: 1px solid var(--as-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.12s;
}

.show-all-toggle:hover {
    background: rgba(108,99,255,0.06);
    border-color: var(--as-accent);
}

/* ===== PRIMARY DOWNLOAD CTA ===== */
.primary-download-cta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--as-bg-card);
    border: 2px solid var(--as-accent);
    border-radius: var(--as-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.18s;
}

.primary-download-cta:hover {
    box-shadow: 0 4px 24px rgba(108,99,255,0.25);
}

.primary-download-cta .platform-icon {
    font-size: 2.5rem;
    color: var(--as-accent);
}

.primary-download-cta .cta-info { flex: 1; }
.primary-download-cta .cta-info .cta-title {
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.primary-download-cta .cta-info .cta-meta {
    font-size: 0.82rem;
    color: var(--as-text-muted);
    margin-top: 0.15rem;
}

.primary-download-cta .download-btn {
    padding: 0.65rem 1.75rem;
    font-size: 0.95rem;
}

.other-platforms-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--as-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0;
    margin-bottom: 0.75rem;
    transition: color 0.12s;
}

.other-platforms-toggle:hover { color: var(--as-accent); }
.other-platforms-toggle .material-icons { font-size: 1rem; transition: transform 0.2s; }
.other-platforms-toggle.expanded .material-icons { transform: rotate(180deg); }

/* ===== COLLAPSIBLE SECTION ===== */
.collapsible-section {
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.collapsible-section summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    color: var(--as-text);
    transition: background 0.12s;
}

.collapsible-section summary:hover { background: rgba(108,99,255,0.04); }
.collapsible-section summary .material-icons { color: var(--as-accent); font-size: 1.1rem; }
.collapsible-section .section-content { padding: 0 1.25rem 1.25rem; }

/* ===== EMPTY STATE ENHANCED ===== */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 2rem;
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    text-align: center;
    color: var(--as-text-muted);
}

.empty-state-card .material-icons {
    font-size: 3rem;
    color: var(--as-accent);
    opacity: 0.7;
}

.empty-state-card h3 {
    color: var(--as-text);
    font-size: 1.15rem;
    margin: 0;
}

.empty-state-card p { margin: 0; font-size: 0.9rem; }

/* ===== BADGE GROUP ===== */
.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* ===== REJECTION / WARNING CARDS ===== */
.rejection-alert-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(255,72,72,0.06);
    border: 1px solid rgba(255,72,72,0.2);
    border-radius: var(--as-radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.rejection-alert-card .material-icons { color: #ff4848; font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.rejection-alert-card strong { color: #ff6868; display: block; margin-bottom: 0.2rem; }
.rejection-alert-card p { color: var(--as-text-muted); margin: 0; font-size: 0.88rem; }

/* ===== PUBLISHER QUICK ACTIONS (restyle of action-card) ===== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.action-card-styled {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: var(--as-bg-card);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: var(--as-text);
    text-align: center;
    transition: all 0.18s;
}

.action-card-styled:hover {
    border-color: var(--as-accent);
    transform: translateY(-3px);
    box-shadow: var(--as-card-glow);
}

.action-card-styled .material-icons {
    font-size: 2rem;
    color: var(--as-accent);
}

.action-card-styled span:last-child {
    font-weight: 600;
    font-size: 0.88rem;
}

/* ===== SEARCH BAR ADMIN ===== */
.admin-search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.admin-search-bar .rz-textbox {
    flex: 1;
}

/* ===== BULK ACTION TOOLBAR ===== */
.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(108,99,255,0.06);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    margin-bottom: 1rem;
    animation: slideDown 0.2s ease;
}

.bulk-toolbar .selected-count {
    font-size: 0.85rem;
    color: var(--as-text-muted);
    font-weight: 600;
}

/* ===== ADMIN RESPONSIVE ===== */
@media (max-width: 768px) {
    .admin-page-header, .publisher-page-header {
        padding: 1rem 1.25rem;
    }

    .admin-page-header h1, .publisher-page-header h1 {
        font-size: 1.2rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-card {
        padding: 1.25rem;
    }

    .publisher-profile-card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .dashboard-grid, .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}
