:root {
    --bg: #08080c;
    --sidebar: #050507;
    --neon: #d4a94a;
    --neon-2: #e8c273;
    --accent-grad: linear-gradient(135deg, #d4a94a 0%, #e8c273 100%);
    --muted: #9a9ab0;
    --card-bg: #0d0d13;
    --border: rgba(212,169,74,.25);
    --radius: 14px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: #cfcfe0;
}
h1, h2, h3, .sidebar-brand, .page-title { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--sidebar);
    color: #a9a9c0;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--border);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 17px;
    color: #fff;
    padding: 0 10px 28px;
    letter-spacing: .01em;
}
.brand-badge {
    width: 34px; height: 34px;
    border-radius: 50%;
    flex-shrink: 0; object-fit: cover;
    box-shadow: 0 0 16px rgba(212,169,74,.5);
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #8f8fa8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .18s ease, color .18s ease, transform .12s ease;
}
.nav-link i { width: 18px; text-align: center; }
.nav-badge { margin-left: auto; background: #f87171; color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.nav-link:hover { background: rgba(212,169,74,.08); color: #fff; transform: translateX(2px); }
.nav-link.active { background: var(--accent-grad); color: var(--sidebar); box-shadow: 0 4px 14px rgba(212,169,74,.4); }
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 12px; }
.nav-link.logout:hover { background: rgba(239,68,68,.15); color: #fca5a5; }

.main { flex: 1; min-width: 0; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: rgba(8,8,12,.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
}
.page-title { margin: 0; font-size: 20px; font-weight: 700; color: #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #cfcfe0; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent-grad); color: var(--sidebar);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
}

/* ---------- sininho de notificações ---------- */
.topbar-acoes { display: flex; align-items: center; gap: 10px; }
.notif-menu { position: relative; }
.notif-bell {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; border: none; background: none;
    color: #cfcfe0; font-size: 16px; cursor: pointer; transition: background .15s ease;
}
.notif-bell:hover { background: rgba(255,255,255,.06); }
.notif-badge {
    position: absolute; top: 3px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 800;
    display: none; align-items: center; justify-content: center; line-height: 1;
    box-shadow: 0 0 0 2px var(--bg);
}
.notif-badge.tem-novas { display: flex; }
.notif-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 12px;
    box-shadow: 0 20px 50px -12px rgba(0,0,0,.6);
    width: 330px; max-height: 400px; overflow-y: auto; padding: 6px;
    display: none; z-index: 30;
}
.notif-menu.open .notif-dropdown { display: block; }
.notif-dropdown-titulo { padding: 9px 10px 5px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.notif-item { display: block; position: relative; padding: 10px 30px 10px 10px; border-radius: 9px; text-decoration: none; }
.notif-item:hover { background: rgba(255,255,255,.04); }
.notif-item + .notif-item { border-top: 1px solid #1c1c24; }
.notif-item strong { display: block; font-size: 13px; color: #fff; margin-bottom: 2px; }
.notif-item span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.notif-item time { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif-item-excluir {
    position: absolute; top: 8px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
    border: none; background: none; color: var(--muted); font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background .15s ease, color .15s ease;
}
.notif-item-excluir:hover { background: rgba(239,68,68,.2); color: #f87171; }
.notif-vazio { padding: 20px 10px; text-align: center; font-size: 13px; color: var(--muted); }

.content { max-width: 1080px; margin: 0 auto; padding: 32px; }
.auth-page {
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, rgba(212,169,74,.15), var(--bg) 55%), var(--bg);
}

/* ---------- misc text ---------- */
.muted { color: var(--muted); }
.erro {
    color: #fca5a5; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); padding: 10px 14px; border-radius: 8px;
    display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.ok {
    color: #6ee7b7; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); padding: 10px 14px; border-radius: 8px;
    display: flex; align-items: center; gap: 8px; font-size: 14px;
}

/* ---------- auth card ---------- */
.auth-box {
    width: 100%;
    max-width: 380px;
    margin: 24px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    padding: 40px 36px;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(212,169,74,.18), 0 30px 60px -20px rgba(0,0,0,.6);
    text-align: center;
}
.auth-icon {
    width: 56px; height: 56px; margin: 0 auto 18px;
    border-radius: 50%;
    object-fit: cover; display: block;
    box-shadow: 0 0 24px rgba(212,169,74,.5);
}
.auth-box h1 { font-size: 21px; margin: 0 0 6px; color: #fff; }
.auth-box form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; text-align: left; }
.auth-box label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #b3b3c6; }
.auth-box p { margin: 12px 0 0; }

/* ---------- inputs & buttons ---------- */
input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    min-width: 0;
    padding: 11px 14px;
    border: 1.5px solid #24242e;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    background: #131319;
    color: #fff;
}
input::placeholder { color: #5c5c72; }
input:focus { border-color: var(--neon); box-shadow: 0 0 0 4px rgba(212,169,74,.18); }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 11px 22px;
    border: none;
    border-radius: 10px;
    background: var(--accent-grad);
    color: var(--sidebar);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(212,169,74,.4);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(212,169,74,.55); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-block { width: 100%; }

.btn-outline {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    padding: 10px 18px; border: 1.5px solid var(--border); border-radius: 10px;
    background: transparent; color: #cfcfe0; font-weight: 700; font-size: 13.5px;
    text-decoration: none; cursor: pointer; transition: all .15s ease;
}
.btn-outline:hover { border-color: var(--neon); color: #fff; background: rgba(212,169,74,.08); }
.btn-outline.active { border-color: var(--neon); color: #fff; background: rgba(212,169,74,.12); }
.btn-small { padding: 6px 12px; font-size: 12.5px; }

.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 4px; }
.details-grid dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 3px; }
.details-grid dd { font-size: 14px; font-weight: 600; color: #fff; margin: 0; }

/* ---------- dashboard ---------- */
.welcome-banner {
    background: linear-gradient(135deg, #151027, var(--bg));
    color: #fff;
    padding: 28px 32px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1.5px solid var(--border);
}
.welcome-banner h2 { margin: 0 0 6px; font-size: 20px; }
.welcome-banner p { margin: 0; color: var(--muted); font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1.5px solid var(--border);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(212,169,74,.55); box-shadow: 0 0 26px rgba(212,169,74,.18); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; color: #fff; flex-shrink: 0;
}
.icon-blue { background: linear-gradient(135deg,#2b6ca8,#4f8fc2); }
.icon-purple { background: linear-gradient(135deg,#0891b2,#22d3ee); }
.icon-green { background: linear-gradient(135deg,#1f8a56,#2fbf71); }
.card-num { display: block; font-size: 24px; font-weight: 800; line-height: 1.2; color: #fff; }
.card-label { display: block; color: var(--muted); font-size: 13px; }

.panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 26px;
    margin-bottom: 20px;
    border: 1.5px solid var(--border);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.panel:hover { border-color: rgba(212,169,74,.45); }
.panel h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; color: #fff; }
.panel h3 i { color: var(--muted); }
.panel > p.muted { margin-top: 0; margin-bottom: 16px; font-size: 13px; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.inline-form input { flex: 1; min-width: 160px; }

.lista-clientes-backup { max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.cliente-backup-linha {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border-radius: 8px; border: 1px solid #1c1c24; text-decoration: none;
    transition: background .12s, border-color .12s;
}
.cliente-backup-linha:hover { background: #1c1c24; border-color: #2a2a35; }
.cliente-backup-nome { color: #fff; font-weight: 600; font-size: 13.5px; }
.cliente-backup-linha i { color: var(--muted); font-size: 12px; margin-left: auto; }

.tabela { width: 100%; border-collapse: collapse; margin-top: 14px; }
.tabela th, .tabela td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #1c1c24; font-size: 14px; color: #cfcfe0; }
.tabela th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tabela tbody tr { transition: background .15s ease; }
.tabela tbody tr:hover { background: rgba(212,169,74,.05); }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}
.badge-ativo { background: rgba(52,211,153,.15); color: #34d399; }
.badge-suspenso { background: rgba(251,191,36,.15); color: #fbbf24; }
.badge-cancelado { background: rgba(239,68,68,.15); color: #f87171; }
.badge-sol-pendente { background: rgba(251,191,36,.15); color: #fbbf24; }
.badge-sol-em_andamento { background: rgba(96,165,250,.15); color: #60a5fa; }
.badge-sol-concluido { background: rgba(52,211,153,.15); color: #34d399; }
.badge-sol-cancelado { background: rgba(239,68,68,.15); color: #f87171; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #cfcfe0; }
.feature-list i { color: #34d399; margin-top: 3px; }

/* ---------- recursos / infra ---------- */
.info-box {
    background: rgba(96,165,250,.1);
    border: 1px solid rgba(96,165,250,.3);
    color: #93c5fd;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.info-box i { margin-top: 2px; }
.plan-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 14px; }
.plan-col { border: 1.5px solid var(--border); border-radius: 12px; padding: 20px; }
.plan-col h4 { font-size: 15px; margin-bottom: 14px; color: #fff; }
.plan-col dl { display: flex; flex-direction: column; gap: 10px; }
.plan-col dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.plan-col dd { font-size: 15px; font-weight: 700; margin: 0; color: #fff; }
.capacity-bar { margin-top: 8px; height: 8px; border-radius: 999px; background: #1c1c24; overflow: hidden; }
.capacity-bar span { display: block; height: 100%; background: var(--accent-grad); }

/* ---------- fotos enviadas pelo cliente ("Recursos") ---------- */
.recursos-secao { margin-top: 18px; }
.recursos-titulo { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.recursos-titulo .fm-count { background: rgba(212,169,74,.15); color: var(--neon); font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.recursos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.recursos-foto { display: block; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--border); aspect-ratio: 1; background: #131319; transition: border-color .15s ease, transform .15s ease; }
.recursos-foto:hover { border-color: var(--neon); transform: translateY(-2px); }
.recursos-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recursos-foto.recursos-foto-final { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon); }

.envios-lista { display: flex; flex-direction: column; gap: 8px; }
.envio-card { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #131319; flex-wrap: wrap; }
.envio-thumb { width: 46px; height: 46px; border-radius: 9px; overflow: hidden; background: #1c1c24; border: 1px solid var(--border); flex-shrink: 0; display: block; }
.envio-thumb img { width: 100%; height: 100%; object-fit: cover; }
.envio-thumb-icone { display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--muted); }
.envio-info { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 2px; }
.envio-info strong { font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.envio-prazo { font-size: 11.5px; color: var(--muted); }
.envio-acoes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.envio-form-enviar { display: flex; align-items: center; gap: 6px; }
.envio-form-enviar select { padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 12.5px; font-family: inherit; background: #131319; color: #fff; max-width: 160px; }

/* ---------- explorador de arquivos do site do cliente (admin) ---------- */
.fm-tema-banner { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 12px; background: var(--accent-grad); color: var(--sidebar); margin-bottom: 18px; font-size: 13.5px; }
.fm-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fm-add-btn { cursor: pointer; }
.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.breadcrumb > i { font-size: 9px; color: var(--muted); }
.crumb { color: var(--muted); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.crumb i { color: var(--neon); font-size: 13px; }
.crumb:hover { color: #fff; }
.crumb.current { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
#fmDropzone { border-radius: 12px; padding: 4px; transition: background .15s ease, box-shadow .15s ease; }
#fmDropzone.dragover { background: rgba(212,169,74,.06); box-shadow: inset 0 0 0 2px var(--neon); }
.fm-section-label { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 14px 4px 8px; }
.fm-section-label:first-child { margin-top: 4px; }
.fm-section-label i { color: var(--neon); font-size: 12px; }
.fm-count { background: #1c1c24; color: var(--muted); font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; text-transform: none; letter-spacing: 0; }
.fm-grid { display: flex; flex-wrap: wrap; gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px; }
.fm-grid-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; align-content: start; }
.fm-card { text-decoration: none; color: #cfcfe0; cursor: pointer; }
.fm-card-folder { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border: 1.5px solid var(--border); border-radius: 12px; background: #131319; transition: background .15s ease, border-color .15s ease; }
.fm-card-folder:hover { background: #1c1c24; border-color: var(--neon); }
.fm-card-folder.dragover-target { background: rgba(212,169,74,.1); border-color: var(--neon); box-shadow: inset 0 0 0 2px var(--neon); }
.fm-card-folder .fm-card-icon { color: var(--neon); font-size: 18px; }
.fm-card-folder .fm-card-name { font-size: 13.5px; font-weight: 700; color: #fff; }
.fm-card-file { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 6px 4px; border: 1px solid var(--border); border-radius: 12px; background: #131319; text-align: center; transition: border-color .15s ease; }
.fm-card-file:hover { border-color: var(--neon); }
.fm-card-file .fm-card-icon { width: 46px; height: 46px; border-radius: 10px; background: #1c1c24; color: var(--muted); font-size: 21px; flex-shrink: 0; }
.fm-card-thumb { border-radius: 10px; overflow: hidden; background: #1c1c24; border: 1px solid var(--border); }
.fm-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fm-card-file .fm-card-name { width: 100%; font-size: 13.5px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-card-acoes { display: flex; align-items: center; justify-content: center; gap: 5px; }
.fm-card-file .fm-card-edit, .fm-card-file .fm-card-rename, .fm-card-file .fm-card-delete { flex-shrink: 0; width: 27px; height: 27px; border-radius: 8px; border: 1.5px solid transparent; display: flex; align-items: center; justify-content: center; font-size: 11px; text-decoration: none; cursor: pointer; transition: filter .15s ease, transform .15s ease; }
.fm-card-file .fm-card-edit { background: rgba(96,165,250,.15); color: #60a5fa; }
.fm-card-file .fm-card-rename { background: rgba(167,139,250,.15); color: #a78bfa; }
.fm-card-file .fm-card-delete { background: rgba(248,113,113,.15); color: #f87171; }
.fm-card-file .fm-card-edit:hover, .fm-card-file .fm-card-rename:hover, .fm-card-file .fm-card-delete:hover { filter: brightness(1.2); transform: translateY(-1px); }
.fm-empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.fm-empty i { font-size: 32px; color: #24242e; margin-bottom: 10px; display: block; }
.fm-empty p { margin: 2px 0; font-size: 13.5px; }
.text-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13.5px; color: #cfcfe0; }
.text-editor textarea { width: 100%; font-family: 'SF Mono', Consolas, monospace; font-size: 12.5px; }
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.campo small { color: var(--muted); font-size: 11.5px; }

@media (max-width: 860px) {
    .sidebar { display: none; }
    .content { padding: 20px; }
    .topbar { padding: 16px 20px; }
    .plan-cols { grid-template-columns: 1fr; }
}
