/* ===== RESET & BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #4f6df5;
    --primary-dark: #3b54c4;
    --primary-glow: rgba(79, 109, 245, 0.3);
    --accent: #a855f7;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --bg: #0a0a0f;
    --bg-card: #13131a;
    --bg-input: #1a1a24;
    --bg-elevated: #1e1e2a;
    --text: #f0f0f5;
    --text-muted: #8888a0;
    --border: #2a2a3a;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="light"] {
    --bg: #f0f2f5;
    --bg-card: #fff;
    --bg-input: #e8eaf0;
    --bg-elevated: #f5f6fa;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --border: #d1d5db;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    transition: background 1s ease;
}

.bg-image {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
}

[data-theme="light"] .bg-image {
    opacity: 0.12;
}

/* ===== TOP BAR ===== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .top-bar {
    background: rgba(240, 242, 245, 0.85);
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.brand-icon {
    font-size: 1.4rem;
    color: var(--primary);
}

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

.top-nav a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.top-nav a:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 24px 60px;
    overflow: hidden;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 50% 0%, var(--primary-glow), transparent),
        radial-gradient(ellipse 400px 300px at 80% 20%, rgba(168, 85, 247, 0.12), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero-logo-wrap {
    text-align: center;
    margin-bottom: 24px;
}

.hero-logo {
    max-height: 120px;
    max-width: 300px;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 4px 20px rgba(79, 109, 245, 0.25));
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #c8c8e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #1a1a2e 0%, #4f6df5 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 32px;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 32px;
}

.stat { text-align: center; }

.stat-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* ===== APPS GRID ===== */
.apps-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
    position: relative;
    z-index: 1;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

[data-theme="light"] .app-card:hover {
    box-shadow: 0 16px 48px rgba(79, 109, 245, 0.12);
}

.card-img-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-elevated);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.app-card:hover .card-img {
    transform: scale(1.05);
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.6);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--warning);
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.01em;
    text-align: center;
}

.app-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.card-meta span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.card-meta i {
    font-size: 0.7rem;
    color: var(--primary);
}

.card-actions {
    display: flex;
    justify-content: center;
}

/* ===== CARD CODE AREA ===== */
.card-code-area {
    text-align: center;
    margin-bottom: 16px;
}

.card-code-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--warning);
    margin-bottom: 8px;
}

.card-code-label i {
    font-size: 0.65rem;
    margin-right: 2px;
}

.card-code-display {
    display: inline-block;
    background: var(--bg-elevated);
    border: 1px dashed var(--warning);
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--warning);
    font-family: 'Inter', monospace;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.btn-dl {
    background: var(--primary);
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
}

.btn-dl:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-dl-full {
    font-size: 1.05rem;
    padding: 14px;
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.btn-glow {
    background: var(--primary);
    color: #fff;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
}

.btn-glow:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 20px var(--primary-glow);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 100px 24px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: flex-end;
    padding: 0;
}

.modal-overlay.active {
    display: flex;
}

.modal-sheet {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 24px 40px;
    position: relative;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--text);
    background: var(--border);
}

.modal-hero {
    text-align: center;
    padding-bottom: 20px;
}

.modal-app-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.modal-app-icon-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.7);
}

.modal-app-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
    text-align: center;
}

.modal-app-size {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

.modal-desc-wrap {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 16px 0;
    text-align: center;
}

.modal-app-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    -webkit-line-clamp: unset;
    text-align: center;
}

.modal-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.tag i {
    color: var(--primary);
    font-size: 0.7rem;
}

/* ===== CODE SECTION IN MODAL ===== */
.modal-code-section {
    text-align: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    margin-bottom: 20px;
}

.modal-code-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--warning);
    margin-bottom: 10px;
}

.modal-code-label i {
    font-size: 0.7rem;
    margin-right: 2px;
}

.modal-code-highlight {
    display: inline-block;
    background: var(--bg-card);
    border: 1px dashed var(--warning);
    border-radius: 10px;
    padding: 10px 32px;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: var(--warning);
    font-family: 'Inter', monospace;
}

.code-lock-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--warning);
}

.modal-code-section > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.code-input-row {
    display: flex;
    gap: 8px;
}

.code-input {
    flex: 1;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1.05rem;
    font-family: var(--font);
    text-align: center;
    letter-spacing: 3px;
    font-weight: 700;
    transition: var(--transition);
}

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

.code-input::placeholder {
    letter-spacing: normal;
    font-weight: 400;
    font-size: 0.9rem;
}

.btn-verify {
    width: 50px;
    flex-shrink: 0;
    padding: 14px;
}

.code-error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 12px;
    font-weight: 600;
}

.modal-dl-section {
    text-align: center;
}

/* ===== DOWNLOAD PAGE ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.1rem;
}

header .logo i { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }

.admin-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

footer, .site-footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

main { padding-top: 32px; padding-bottom: 60px; }

.download-box { max-width: 700px; margin: 0 auto; }
.download-box-inner { text-align: center; }
.download-box-inner h2 { font-size: 1.6rem; margin-bottom: 6px; }
.download-subtitle { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 10px; }

.btn-download-final {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.btn-download-final:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px var(--primary-glow);
}

/* ===== COUNTDOWN ===== */
.countdown-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.countdown-circle svg { width: 100px; height: 100px; transform: rotate(-90deg); }
.circle-bg { fill: none; stroke: var(--border); stroke-width: 6; }
.circle-progress { fill: none; stroke: var(--primary); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.countdown-number { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); font-size: 2rem; font-weight: 800; }
.countdown-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; }

/* ===== CODE FORM ===== */
.code-required p { color: var(--text-muted); margin-bottom: 12px; font-size: 0.9rem; }
.code-required p i { color: var(--warning); }

.code-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.code-form-landing { width: 100%; }
.code-row { display: flex; gap: 8px; }

.code-row input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font);
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
}

.code-row input:focus { outline: none; border-color: var(--primary); }
.code-row input::placeholder { letter-spacing: normal; font-weight: 400; }

/* ===== DOWNLOAD INFO ===== */
.download-info-row { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.download-info-row span { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.download-info-row span i { color: var(--success); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== ADMIN AREA ===== */
.admin-body {
    background: var(--bg);
    font-family: var(--font);
    color: var(--text);
    padding: 0;
}

.admin-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.admin-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.1rem;
}

.admin-header .logo i { color: var(--primary); }

.admin-nav { display: flex; gap: 6px; }

.admin-nav a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.admin-nav a:hover { color: var(--text); background: var(--bg-elevated); }

.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.admin-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-card h2 i { color: var(--primary); }

.admin-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 14px;
    font-family: var(--font);
    transition: var(--transition);
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus { outline: none; border-color: var(--primary); }
.admin-form select { cursor: pointer; }

.form-hint { display: block; color: var(--text-muted); font-size: 0.78rem; margin-top: -8px; margin-bottom: 14px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg-input); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #000; }
.btn-info { background: var(--info); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.form-actions .btn { flex: 1; }

/* Theme options */
.theme-options { display: flex; gap: 10px; margin-bottom: 14px; }

.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-input);
    transition: var(--transition);
}

.theme-option:hover { border-color: var(--primary); }
.theme-option.active { border-color: var(--primary); background: rgba(79, 109, 245, 0.1); color: var(--primary); }
.theme-option i { font-size: 1.3rem; }
.theme-swatch { width: 32px; height: 22px; border-radius: 6px; border: 1px solid var(--border); background: #000; }
.theme-swatch-light { background: #f5f5f5; border-color: #ccc; }

/* File drop */
.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    margin-bottom: 14px;
}

.file-drop:hover { border-color: var(--primary); color: var(--primary); }
.file-drop.file-selected { border-color: var(--success); color: var(--success); border-style: solid; }
.file-drop input { display: none; }
.file-drop i { font-size: 1.5rem; }
.file-drop span { font-size: 0.85rem; }

/* App list admin */
.app-list-admin { display: flex; flex-direction: column; gap: 8px; }

.app-admin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.app-admin-item:hover { border-color: var(--text-muted); }

.app-admin-thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--bg); }
.app-admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); color: var(--text-muted); font-size: 1.2rem; }

.app-admin-info { flex: 1; min-width: 0; }
.app-admin-info strong { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-admin-info small { color: var(--text-muted); font-size: 0.75rem; }
.code-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--warning) !important; margin-top: 2px; }
.app-admin-actions { display: flex; gap: 4px; flex-shrink: 0; }
.inline-form { display: inline; }
.no-apps { color: var(--text-muted); text-align: center; padding: 20px; }
.section-divider { margin: 24px 0; border: none; border-top: 1px solid var(--border); }

/* Alerts */
.alert { padding: 14px 20px; border-radius: 8px; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(34, 197, 94, 0.1); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.25); }
.alert-error { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.25); }
.alert-close { margin-left: auto; background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer; opacity: 0.7; }
.alert-close:hover { opacity: 1; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 48px 40px; width: 100%; max-width: 400px; text-align: center; }
.login-icon { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; }
.login-box h1 { font-size: 1.4rem; margin-bottom: 6px; }
.login-box > p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.95rem; }
.login-input-group { display: flex; gap: 8px; }
.login-input-group input { flex: 1; padding: 14px 18px; border-radius: 8px; border: 2px solid var(--border); background: var(--bg-input); color: var(--text); font-size: 1rem; font-family: var(--font); transition: var(--transition); }
.login-input-group input:focus { outline: none; border-color: var(--primary); }
.login-error { color: var(--danger); margin-top: 12px; font-size: 0.9rem; }
.login-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); text-decoration: none; margin-top: 20px; font-size: 0.9rem; transition: var(--transition); }
.login-back:hover { color: var(--text); }

.image-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px; background: var(--bg-input); border-radius: 8px; border: 1px solid var(--border); }
.image-preview img { max-height: 100px; border-radius: 8px; flex: 1; }
.btn-remove-img { background: var(--danger); color: #fff; border: none; width: 28px; height: 28px; border-radius: 50%; font-size: 1rem; cursor: pointer; flex-shrink: 0; }
.current-image-box { margin-bottom: 14px; }
.current-image-box img { max-height: 70px; border-radius: 8px; border: 1px solid var(--border); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero { padding: 60px 20px 40px; }
    .hero-title { font-size: 2rem; }
    .apps-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .card-img-wrap { height: 140px; }
    .card-body { padding: 14px; }
    .card-title { font-size: 1rem; }
    .admin-grid { grid-template-columns: 1fr; }
    .admin-nav { display: none; }
    .modal-sheet { border-radius: 20px 20px 0 0; padding: 28px 20px 36px; }
    .hero-stats { gap: 16px; padding: 12px 24px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.7rem; }
    .apps-grid { grid-template-columns: 1fr; }
    .card-img-wrap { height: 180px; }
    .form-row-2 { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; }
    .modal-tags { flex-wrap: wrap; justify-content: center; }
}
