/* ============================================================
   GEOTRACK PRO — Páginas internas (apps / download / upload)
   Compartilha as variáveis e componentes do style.css
   ============================================================ */

/* ---------- Navbar fixa das subpáginas ---------- */
.nav.sub-nav {
    background: rgba(5,7,15,0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 10px 40px -14px rgba(0,0,0,0.6);
    padding: 14px 0;
}
.sub-nav .menu { gap: 26px; }
.sub-nav .menu a { color: var(--muted); }
.sub-nav .menu a:hover { color: #fff; }

/* CTA "Publicar app" dentro da navbar */
.nav-upload { margin-left: 6px; }

/* ---------- Área de conteúdo ---------- */
.page-wrap { min-height: 100vh; padding-top: 92px; display: flex; flex-direction: column; }
.page-wrap main { flex: 1; }

.page-hero {
    position: relative;
    padding: 90px 0 34px;
    text-align: center;
    background: radial-gradient(700px 420px at 50% -10%, rgba(79,139,255,0.2), transparent 65%), var(--bg);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.page-hero h1 {
    font-family: 'Sora', var(--font);
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -1.2px;
    line-height: 1.12;
    margin: 6px 0 14px;
}
.page-hero p { color: var(--muted); font-size: 17px; max-width: 640px; margin-inline: auto; }

/* ---------- Base de cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 34px 32px;
}

/* ---------- Página de upload ---------- */
.upload-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 26px;
    align-items: start;
}

.upload-card .field { margin-bottom: 20px; }
.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #d6def0;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}
.field input[type="text"] {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.field input[type="text"]:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0,212,255,0.15);
}

/* Dropzone */
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    background: rgba(255,255,255,0.035);
    border: 2px dashed rgba(255,255,255,0.22);
    border-radius: 16px;
    padding: 44px 22px;
    cursor: pointer;
    transition: border-color .25s, background .25s, transform .2s;
}
.dropzone:hover { border-color: var(--cyan); background: rgba(0,212,255,0.05); }
.dropzone.drag { border-color: var(--cyan); background: rgba(0,212,255,0.09); transform: scale(1.01); }
.dropzone.has-file { border-color: var(--green); background: rgba(43,217,124,0.06); }
.dropzone input[type="file"] { display: none; }
.dz-icon { font-size: 42px; margin-bottom: 8px; filter: drop-shadow(0 6px 18px rgba(0,212,255,0.35)); }
.dz-main { font-weight: 700; font-size: 16px; color: var(--text); }
.dz-main u { color: var(--cyan); text-underline-offset: 3px; }
.dz-sub { font-size: 13px; color: var(--muted); }
.dz-name { font-weight: 600; font-size: 14px; color: var(--green); margin-top: 10px; }

.form-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }
.center-note { text-align: center; }

/* Card lateral — publicados */
.side-card h3 { font-size: 18px; margin-bottom: 4px; }
.side-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.count-badge {
    min-width: 28px; height: 28px; padding: 0 8px;
    display: inline-grid; place-items: center;
    background: var(--grad);
    color: #fff;
    border-radius: 999px;
    font-size: 13px; font-weight: 800;
}
.empty-note { color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.pub-list { display: grid; gap: 12px; }
.pub-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color .2s, background .2s;
}
.pub-item:hover { border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.05); }
.pub-info { min-width: 0; }
.pub-name { display: block; font-weight: 700; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-meta { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pub-meta a { color: var(--cyan); font-weight: 600; }
.pub-meta a:hover { text-decoration: underline; }

/* ---------- Lista de apps (central de downloads) ---------- */
.apps-list { display: grid; gap: 16px; max-width: 900px; margin-inline: auto; }
.app-row {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 20px 24px;
    transition: transform .25s, border-color .25s, background .25s;
}
.app-row:hover { transform: translateY(-4px); border-color: rgba(0,212,255,0.4); background: rgba(255,255,255,0.07); }

/* Ícone do tipo de arquivo */
.app-ico {
    width: 62px; height: 62px;
    flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(0,212,255,0.18), rgba(124,58,237,0.22));
    border: 1px solid rgba(0,212,255,0.35);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--cyan);
    box-shadow: 0 10px 26px -12px rgba(0,212,255,0.5);
}
.app-row-info { flex: 1; min-width: 0; }
.app-row-info h3 { font-size: 17.5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row-info .pub-meta { font-size: 13px; }
.app-row-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- Página de download ---------- */
.dl-card {
    max-width: 760px;
    margin: 30px auto 0;
    padding: 40px 38px;
}
.dl-top {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 30px;
}
.dl-card .app-ico { width: 74px; height: 74px; font-size: 16px; border-radius: 20px; }
.dl-info { min-width: 0; }
.dl-info h1 { font-family: 'Sora', var(--font); font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.8px; line-height: 1.2; margin-bottom: 4px; }
.dl-file { color: var(--muted); font-size: 14.5px; }
.dl-meta {
    display: flex; flex-wrap: wrap; gap: 18px;
    margin-top: 10px;
    font-size: 13.5px;
    color: #c3cde4;
}
.dl-btn { margin-bottom: 18px; font-size: 17px; }

.copy-row {
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 8px 8px 8px 16px;
}
.copy-row input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
}
.copy-row input:focus { color: var(--cyan); }

/* ---------- Estados vazios / erro ---------- */
.not-found { text-align: center; padding: 70px 20px; }
.nf-icon { font-size: 60px; margin-bottom: 16px; }
.not-found h1, .not-found h2 { font-family: 'Sora', var(--font); font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.8px; margin-bottom: 10px; }
.not-found p { color: var(--muted); font-size: 16px; margin-bottom: 26px; }

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}
.alert-error {
    background: rgba(255,93,143,0.12);
    border: 1px solid rgba(255,93,143,0.45);
    color: #ffb3c9;
}

/* ---------- Footer das subpáginas ---------- */
.footer.sub-footer { padding: 26px 0; }
.footer.sub-footer .container p { color: var(--muted); font-size: 13.5px; text-align: center; }
.footer.sub-footer a { color: var(--muted); transition: color .2s; }
.footer.sub-footer a:hover { color: var(--cyan); }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
    .upload-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .page-wrap { padding-top: 84px; }
    .page-hero { padding: 64px 0 26px; }
    .card { padding: 26px 20px; }
    .dl-card { padding: 28px 20px; margin-top: 16px; }
    .dl-top { flex-direction: column; text-align: center; }
    .app-row { flex-wrap: wrap; padding: 18px; }
    .app-row-info h3 { white-space: normal; }
    .app-row-actions { width: 100%; justify-content: flex-end; }
    .copy-row { flex-direction: column; padding: 12px; }
    .copy-row input { padding: 8px; text-align: center; }
}
