@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #231459;
  --primary-dark: #110247;
  --accent: #FFB23A;
  --text: #2b2740;
  --muted: #6a6482;
  --bg: #ffffff;
  --bg-soft: #f6f4fb;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Sora', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--primary-dark); }
h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 20px; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(35,20,89,.15); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  z-index: 100;
  border-bottom: 1px solid #eee;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.site-header .logo img { height: 42px; }
.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-menu a {
  font-weight: 500;
  font-size: 15px;
  color: var(--primary-dark);
}
.nav-menu a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; color: var(--primary); cursor: pointer; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 90px 0;
}
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero p { font-size: 18px; color: #d9d4ee; margin-bottom: 32px; max-width: 480px; }
.hero-img { position: relative; }
.hero-img > img:first-child { border-radius: var(--radius); }
.hero-card { position: absolute; border-radius: 12px; box-shadow: 0 14px 30px rgba(0,0,0,.2); width: 46%; }
.hero-card-1 { top: 62%; right: -8%; }
.hero-card-2 { top: -6%; left: -10%; width: 40%; }

/* Plataformas */
.platforms { padding: 44px 0; background: var(--bg-soft); }
.platforms-row { display: flex; align-items: center; justify-content: center; gap: 50px; flex-wrap: wrap; text-align: center; }
.platforms-label { font-weight: 700; color: var(--primary-dark); white-space: nowrap; font-size: 18px; }
.platforms-logos { display: flex; align-items: center; justify-content: center; gap: 46px; flex-wrap: wrap; opacity: .85; }
.platforms-logos img { height: 48px; width: auto; object-fit: contain; }

/* Features (Atendimento online etc) */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.feature-box img { width: 72px; height: 72px; margin: 0 auto 18px; object-fit: contain; }
.feature-box h5 { font-size: 18px; margin-bottom: 10px; }
.feature-box p { color: var(--muted); font-size: 14px; }

/* Service rows (imagem + texto alternado) */
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 70px; }
.service-row.reverse .service-row-img { order: 2; }
.service-row.reverse .service-row-text { order: 1; }
.service-row-text h3 { margin-bottom: 16px; }
.service-row-text ul { border-top: 1px solid #eee; padding-top: 16px; margin-bottom: 22px; }
.service-row-text ul li {
  font-size: 15px; color: var(--muted); padding: 7px 0 7px 26px; position: relative;
}
.service-row-text ul li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Steps com mockup */
.steps-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.step-item { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid #e6e2f3; }
.step-item .num { color: var(--primary); font-weight: 700; }
.step-item p { font-weight: 600; color: var(--primary-dark); }

.testimonial-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; }

/* Sections */
section { padding: 80px 0; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-title span { color: var(--accent); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; font-size: 14px; }
.section-title p { color: var(--muted); margin-top: 12px; }

/* Cards de serviços */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(35,20,89,.12); }
.service-card h3 { margin-bottom: 14px; }
.service-card ul li {
  font-size: 14px;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}
.service-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.service-card a { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--primary); }

/* Passos */
.steps { background: var(--bg-soft); }
.steps-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.step { text-align: center; }
.step .num {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin: 0 auto 14px;
}

/* Stats */
.stats { background: var(--primary-dark); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-grid .num { font-size: 40px; font-weight: 800; color: var(--accent); }
.stats-grid .label { color: #cfc9e6; font-size: 15px; margin-top: 6px; }

/* Depoimento */
.testimonial { text-align: center; max-width: 700px; margin: 0 auto; }
.testimonial .stars { color: var(--accent); font-size: 20px; margin-bottom: 16px; }
.testimonial blockquote { font-size: 22px; color: var(--primary-dark); font-weight: 600; margin-bottom: 20px; }

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  padding: 60px 30px;
  margin: 0 24px;
}
.cta h2 { color: #fff; }
.cta p { color: #d9d4ee; max-width: 560px; margin: 16px auto 30px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* FAQ */
.faq-item { border-bottom: 1px solid #eee; padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 17px; color: var(--primary-dark); list-style: none; display: flex; justify-content: space-between; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--accent); font-size: 22px; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 12px; color: var(--muted); }

/* Preços */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card { border: 1px solid #eee; border-radius: var(--radius); padding: 34px 28px; text-align: center; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 14px 30px rgba(255,178,58,.18); }
.price-card .price { font-size: 34px; font-weight: 800; color: var(--primary-dark); margin: 14px 0; }
.price-card ul { margin: 20px 0; text-align: left; }
.price-card ul li { padding: 6px 0; font-size: 14px; color: var(--muted); }

/* Contato */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 13px 16px; border: 1px solid #ddd; border-radius: 10px;
  font-family: inherit; font-size: 15px;
}
.form-field textarea { resize: vertical; min-height: 120px; }

/* Footer */
.site-footer { background: var(--primary-dark); color: #cfc9e6; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; margin-bottom: 16px; font-size: 16px; }
.footer-grid ul li { margin-bottom: 10px; font-size: 14px; }
.footer-grid ul li a:hover { color: var(--accent); }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; text-align: center; font-size: 13px; }
.newsletter-form { display: flex; gap: 8px; margin-top: 10px; }
.newsletter-form input { flex: 1; padding: 10px 14px; border-radius: 8px; border: none; }
.newsletter-form button { padding: 10px 18px; border-radius: 8px; border: none; background: var(--accent); font-weight: 600; cursor: pointer; }

/* Admin */
.admin-body { background: var(--bg-soft); min-height: 100vh; }
.admin-header {
  background: var(--primary-dark); color: #fff; padding: 18px 0;
}
.admin-header .container { display: flex; justify-content: space-between; align-items: center; }
.admin-header a.logout { color: var(--accent); font-weight: 600; }
.admin-wrap { max-width: 960px; margin: 40px auto; padding: 0 24px; }
.card { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: 0 4px 20px rgba(35,20,89,.06); margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; }
table th, table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #eee; font-size: 14px; }
table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 12px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-admin { background: #fde3c8; color: #a05a00; }
.badge-cliente { background: #e3ddf7; color: var(--primary); }
.login-box { max-width: 400px; margin: 100px auto; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert-error { background: #fde3e3; color: #a02020; }
.alert-success { background: #dcf7e3; color: #1a7a3a; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: #e3453b; color: #fff; }
form .form-field { margin-bottom: 16px; }

/* Explorador de arquivos — layout estilo gerenciador de arquivos (app shell) */
.explorer-page { max-width: 1280px; margin: 32px auto; padding: 0 24px; }
.explorer-alert { margin-bottom: 16px; }

.explorer-shell {
  display: grid; grid-template-columns: 240px 1fr;
  background: #fff; border-radius: var(--radius); box-shadow: 0 4px 20px rgba(35,20,89,.06);
  overflow: hidden; min-height: 560px;
}

/* Sidebar / árvore */
.explorer-sidebar { background: var(--bg-soft); border-right: 1px solid #eee; padding: 18px 10px; overflow-y: auto; }
.sidebar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 0 10px 10px; letter-spacing: .5px; }
.tree-empty { padding: 0 10px; font-size: 13px; color: var(--muted); }
.tree-children { padding-left: 18px; }
.tree-row {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px;
  cursor: default; font-size: 13px;
}
.tree-row:hover { background: #ece7f8; }
.tree-row.active { background: var(--primary); }
.tree-row.active .tree-label { color: #fff; font-weight: 600; }
.tree-toggle {
  width: 14px; flex-shrink: 0; cursor: pointer; color: var(--muted); font-size: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tree-toggle-spacer { width: 14px; flex-shrink: 0; }
.tree-icon { width: 16px; height: 14px; flex-shrink: 0; display: flex; }
.tree-icon svg { width: 100%; height: 100%; }
.tree-label {
  color: var(--primary-dark); text-decoration: none; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; flex: 1; min-width: 0;
}

/* Área principal */
.explorer-main { display: flex; flex-direction: column; min-width: 0; }
.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid #eee;
}
.toolbar-left { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tb-icon {
  border: none; background: none; cursor: pointer; font-size: 15px;
  width: 34px; height: 34px; border-radius: 8px; color: var(--primary-dark);
  display: inline-flex; align-items: center; justify-content: center;
}
.tb-icon:hover { background: var(--bg-soft); }
.tb-icon.active { background: #ece7f8; color: var(--primary); }
.tb-sep { width: 1px; height: 22px; background: #e6e2f3; margin: 0 6px; }
.busca-input {
  padding: 8px 14px; border: 1px solid #ddd; border-radius: 999px; font-size: 13px;
  width: 220px; max-width: 100%;
}

.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 12px 20px 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.upload-progress {
  background: var(--bg-soft); border-radius: 8px; padding: 10px 16px; margin: 14px 20px 0;
  font-size: 13px; color: var(--primary-dark); font-weight: 600;
}

.dropzone { position: relative; flex: 1; padding: 20px; transition: background .15s ease; }
.dropzone.dragging { background: #ece7f8; }
.dropzone-overlay {
  display: none; position: absolute; inset: 10px; z-index: 5; border-radius: 10px;
  align-items: center; justify-content: center; pointer-events: none; border: 2px dashed var(--primary);
}
.dropzone.dragging .dropzone-overlay { display: flex; }
.dropzone-msg {
  background: var(--primary); color: #fff; padding: 14px 28px; border-radius: 10px; font-weight: 600;
}
.empty-msg { color: var(--muted); padding: 60px 0; text-align: center; }

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.item-card {
  position: relative; border-radius: 10px; padding: 14px 10px 10px;
  text-align: center; transition: background .12s ease;
}
.item-card:hover { background: var(--bg-soft); }
.item-link { display: block; color: inherit; text-decoration: none; }
.item-icon {
  width: 52px; height: 52px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.icon-pasta svg { width: 100%; height: 100%; }
.item-thumb { border-radius: 8px; overflow: hidden; border: 1px solid #eee; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Ícone estilo "ribbon" com canto dobrado, por tipo de arquivo */
.item-file {
  position: relative; width: 46px; height: 52px; margin: 0 auto 8px; background: #fff;
  border-radius: 4px 4px 4px 4px; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.item-file::before {
  content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0;
  border-style: solid; border-width: 0 12px 12px 0; border-color: transparent #fff transparent transparent;
  filter: brightness(.85);
}
.ribbon-ext {
  position: absolute; bottom: 6px; left: 0; right: 0; text-align: center;
  font-size: 9px; font-weight: 800; letter-spacing: .3px; color: #fff;
  padding: 2px 0; border-radius: 3px; margin: 0 3px;
}
.ribbon-pdf .ribbon-ext { background: #e25c4d; }
.ribbon-doc .ribbon-ext { background: #4a7fe0; }
.ribbon-xls .ribbon-ext { background: #3fa66a; }
.ribbon-arquivo .ribbon-ext { background: #9c96ad; }

.item-name {
  font-size: 12.5px; font-weight: 600; color: var(--primary-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.item-actions {
  position: absolute; top: 6px; right: 6px; display: flex; gap: 2px;
  opacity: 0; transition: opacity .15s ease; background: rgba(255,255,255,.95); border-radius: 8px; padding: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.item-card:hover .item-actions { opacity: 1; }
.icon-btn {
  background: none; border: none; cursor: pointer; font-size: 13px;
  padding: 4px 6px; border-radius: 6px; line-height: 1; text-decoration: none;
}
.icon-btn:hover { background: rgba(35,20,89,.1); }

/* Visualização em lista */
.item-grid.lista-view { display: block; }
.item-grid.lista-view .item-card {
  display: flex; align-items: center; text-align: left; gap: 12px;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 2px;
}
.item-grid.lista-view .item-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.item-grid.lista-view .item-icon, .item-grid.lista-view .item-file { width: 28px; height: 32px; font-size: 15px; margin: 0; flex-shrink: 0; }
.item-grid.lista-view .item-name { flex: 1; }
.item-grid.lista-view .item-meta { margin: 0; flex-shrink: 0; }
.item-grid.lista-view .item-actions { position: static; opacity: 1; background: none; box-shadow: none; margin-left: 8px; }

/* Barra de status */
.status-bar {
  padding: 10px 20px; border-top: 1px solid #eee; font-size: 12px; color: var(--muted);
  background: var(--bg-soft);
}

/* Menu de contexto (botão direito) */
.context-menu {
  position: absolute; z-index: 300; background: #fff; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; min-width: 160px;
}
.context-menu-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 8px 12px; font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--text);
}
.context-menu-item:hover { background: var(--bg-soft); }

/* Modal simples */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17,2,71,.4); z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.modal-box { background: #fff; border-radius: 14px; padding: 26px; width: 320px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal-box h4 { margin-bottom: 14px; }
.modal-box input[type="text"] { width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 800px) {
  .explorer-shell { grid-template-columns: 1fr; }
  .explorer-sidebar { display: none; }
}
@media (max-width: 640px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .busca-input { width: 100%; }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); }
}

/* Permissões (admin/usuarios.php) */
.permissoes-grid { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.check-label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.check-label input { width: 16px; height: 16px; }
.perm-row { display: none; background: var(--bg-soft); }
.perm-row.open { display: table-row; }
.perm-row td { padding: 16px 10px; }

/* Responsivo */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .service-row, .service-row.reverse { grid-template-columns: 1fr; }
  .service-row.reverse .service-row-img, .service-row.reverse .service-row-text { order: initial; }
  .steps-layout { grid-template-columns: 1fr; }
  .hero-card { position: static; width: 70%; margin-top: 14px; }
  .platforms-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .nav-menu {
    display: none;
    position: absolute; top: 84px; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; width: 100%; }
  .nav-toggle { display: block; }
  .services-grid, .steps-grid, .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
