/* ==========================================================================
   SnoStore — Design System & Mobile-First Stylesheet
   ========================================================================== */

:root,
[data-theme="dark"] {
    --bg-body: #0b1120;
    --bg-surface: #131c31;
    --bg-surface-hover: #1b2742;
    --bg-elevated: #1e293b;
    --bg-glass: rgba(19, 28, 49, 0.85);
    --border-color: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.28);

    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --primary: #10b981;       /* Vert émeraude Android moderne */
    --primary-hover: #059669;
    --primary-soft: rgba(16, 185, 129, 0.14);
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.15);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.16);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

[data-theme="light"] {
    --bg-body: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f8fafc;
    --bg-elevated: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.88);
    --border-color: rgba(15, 23, 42, 0.09);
    --border-strong: rgba(15, 23, 42, 0.18);

    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --primary: #059669;
    --primary-hover: #047857;
    --primary-soft: rgba(5, 150, 105, 0.12);
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.1);

    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a {
    color: var(--primary);
    text-decoration: none;
}

code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    background: var(--bg-elevated);
    padding: 0.15rem 0.4rem;
    border-radius: 5px;
    font-size: 0.86em;
    border: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================================================
   Topbar Navigation
   ========================================================================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
}

.topbar-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    font-weight: 700;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.brand-badge {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.16s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-main);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    background: var(--bg-elevated);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-elevated);
    color: var(--text-main);
}

.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-update {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.btn-sm {
    padding: 0.42rem 0.8rem;
    font-size: 0.84rem;
}

.btn-lg {
    padding: 0.8rem 1.4rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-icon:hover {
    border-color: var(--border-strong);
}

.icon-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.78rem;
}

/* ==========================================================================
   Auth Screen (Login Visitor & Admin)
   ========================================================================== */
.auth-body {
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 50%),
                radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.1), transparent 50%),
                var(--bg-body);
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.2rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.auth-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 2.75rem;
}

.btn-toggle-pwd {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem;
    opacity: 0.7;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
}

.link-muted {
    color: var(--text-muted);
}

.link-muted:hover {
    color: var(--text-main);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

/* ==========================================================================
   Hero & Search / Filter Toolbar
   ========================================================================== */
.main-content {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

.hero-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hero-content h2 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    max-width: 680px;
}

.toolbar-section {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.82rem 2.6rem 0.82rem 2.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 0.98rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.clear-search-btn {
    position: absolute;
    right: 0.8rem;
    background: var(--bg-elevated);
    border: none;
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
}

.category-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.pill:hover {
    border-color: var(--border-strong);
    color: var(--text-main);
}

.pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pill-count {
    font-size: 0.75rem;
    padding: 0.05rem 0.42rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Apps Grid & App Cards (Storefront)
   ========================================================================== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.15rem;
}

.app-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.app-card-top {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

.app-icon-fallback {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.app-meta {
    flex: 1;
    min-width: 0;
}

.app-title-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.app-name {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-featured {
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
    background: var(--warning-soft);
    color: var(--warning);
    font-weight: 700;
    flex-shrink: 0;
}

.app-submeta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.version-pill {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    padding: 0.08rem 0.45rem;
    border-radius: 6px;
    font-size: 0.76rem;
}

.app-short-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.app-info-chips {
    display: flex;
    flex-direction: column;
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Modals (App Detail, Install Guide, Admin Editor)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.2s ease-out;
}

.modal-lg {
    max-width: 740px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: sticky;
    top: 1rem;
    float: right;
    margin: 1rem 1rem 0 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-main);
    cursor: pointer;
    z-index: 5;
    font-size: 0.95rem;
}

.modal-header {
    padding: 1.5rem 1.5rem 0.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* Detail Modal Specifics */
.detail-header {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.detail-icon {
    width: 82px;
    height: 82px;
    border-radius: 20px;
    object-fit: cover;
    flex-shrink: 0;
}

.detail-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.detail-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.detail-stat-item {
    display: flex;
    flex-direction: column;
}

.detail-stat-val {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.detail-stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detail-section {
    margin-top: 1.35rem;
}

.detail-section h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.changelog-box {
    background: var(--primary-soft);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-md);
    padding: 0.95rem 1.1rem;
    font-size: 0.9rem;
    white-space: pre-line;
}

.description-text {
    white-space: pre-line;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.screenshots-strip {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.screenshot-thumb {
    height: 220px;
    width: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: transform 0.15s ease;
}

.screenshot-thumb:hover {
    transform: scale(1.02);
}

.tech-meta-box {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    word-break: break-all;
}

/* Guide Steps */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.75rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-elevated);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text h4 {
    margin-bottom: 0.25rem;
    font-size: 0.98rem;
}

.step-text p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox-overlay img {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ==========================================================================
   Admin Specific Styles
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.admin-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-apps-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.admin-app-row {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-app-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 240px;
    flex: 1;
}

.admin-app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Forms */
.settings-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.68rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 0.94rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    font-size: 0.92rem;
    user-select: none;
}

.checkbox-label input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.25rem 0;
}

/* File Drop Area */
.file-drop-area {
    position: relative;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    text-align: center;
    background: var(--bg-elevated);
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.file-drop-area:hover {
    border-color: var(--primary);
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-drop-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.86rem;
}

.existing-screenshots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.existing-shot-item {
    position: relative;
    width: 72px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
}

.existing-shot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-shot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
}

/* Upload Progress Bar */
.upload-progress-wrapper {
    margin: 1rem 0;
    padding: 0.9rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.upload-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.45rem;
}

.upload-progress-bar {
    height: 10px;
    background: var(--bg-body);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #0ea5e9);
    transition: width 0.15s ease;
}

/* Alerts & Empty States */
.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin: 0.75rem 0;
}

.alert-danger {
    background: var(--danger-soft);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .alert-danger {
    color: #b91c1c;
}

.alert-success {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    background: var(--bg-surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .hide-xs {
        display: none;
    }
    .apps-grid {
        grid-template-columns: 1fr;
    }
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .modal-dialog {
        max-height: 92vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}
