/* ============================================================
   Yellow Contabilidade - Sistema de Gestão
   style.css — Public Form + Admin Panel
   ============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --yellow:       #F5C518;
  --yellow-dark:  #e6b800;
  --dark:         #1a1a2e;
  --dark-2:       #16213e;
  --dark-3:       #0f3460;
  --white:        #ffffff;
  --gray-50:      #f8f9fa;
  --gray-100:     #f0f2f5;
  --gray-200:     #e9ecef;
  --gray-400:     #ced4da;
  --gray-500:     #adb5bd;
  --gray-600:     #6c757d;
  --gray-700:     #495057;
  --gray-800:     #343a40;
  --text:         #1a1a2e;
  --text-muted:   #6c757d;
  --success:      #28a745;
  --danger:       #dc3545;
  --warning:      #ffc107;
  --info:         #0d6efd;
  --orange:       #fd7e14;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.08);
  --shadow:       0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.18);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --sidebar-w:    260px;
  --topbar-h:     64px;
  --transition:   .2s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; color: var(--text); background: var(--gray-100); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3, h4, h5 { line-height: 1.3; font-weight: 700; }
.text-muted   { color: var(--text-muted) !important; }
.text-center  { text-align: center; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

/* ── Utilities ─────────────────────────────────────────── */
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.ms-1 { margin-left: .25rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.p-0  { padding: 0 !important; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary   { background: var(--yellow); color: var(--dark); }
.btn-primary:hover { background: var(--yellow-dark); box-shadow: 0 4px 12px rgba(245,197,24,.4); }
.btn-outline   { background: transparent; color: var(--dark); border: 2px solid var(--gray-400); }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow-dark); }
.btn-outline-success { background: transparent; color: var(--success); border: 2px solid var(--success); }
.btn-outline-success:hover { background: var(--success); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #218838; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-sm        { padding: 6px 14px; font-size: .82rem; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: var(--radius-sm);
  background: var(--gray-100); color: var(--gray-700);
  font-size: .85rem; transition: background var(--transition), color var(--transition);
}
.btn-icon:hover { background: var(--yellow); color: var(--dark); }
.btn-icon.btn-success { background: #d4edda; color: var(--success); }
.btn-icon.btn-success:hover { background: var(--success); color: #fff; }
.btn-icon.btn-danger  { background: #f8d7da; color: var(--danger); }
.btn-icon.btn-danger:hover  { background: var(--danger);  color: #fff; }
.btn-icon.btn-info    { background: #cfe2ff; color: var(--info); }
.btn-icon.btn-info:hover    { background: var(--info);    color: #fff; }

/* ── Badge ─────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.badge-success { background: #d4edda; color: var(--success); }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger  { background: #f8d7da; color: var(--danger); }
.badge-info    { background: #cfe2ff; color: var(--info); }

/* ── Tag ───────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 600; color: #fff;
  white-space: nowrap;
}
.tag[style*="#ffc107"] { color: #1a1a2e !important; }
.tag[style*="#F5C518"] { color: #1a1a2e !important; }
.tag-removable { padding-right: 6px; }
.tag-remove {
  background: none; border: none; color: inherit;
  font-size: 1rem; line-height: 1; cursor: pointer; opacity: .7;
  padding: 0 2px; margin-left: 2px;
}
.tag-remove:hover { opacity: 1; }
.tag-add-btn {
  background: var(--yellow); color: var(--dark) !important;
  border: none; margin: 3px; font-size: .78rem; font-weight: 600;
  padding: 4px 12px; border-radius: 20px; cursor: pointer;
  transition: opacity var(--transition);
}
.tag-add-btn:hover { opacity: .85; }

/* ── Card ──────────────────────────────────────────────── */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--gray-200); }
.card-title  { font-size: 1rem; font-weight: 600; color: var(--dark); }
.card-body   { padding: 20px 24px; }

/* ── Avatar ────────────────────────────────────────────── */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: var(--dark); font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: .8rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }

/* ── Table ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table th { background: var(--gray-50); color: var(--gray-600); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 2px solid var(--gray-200); }
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Cliente col */
.client-row { display: flex; align-items: center; gap: 8px; min-width: 150px; max-width: 210px; }
.client-row strong { display: block; font-size: .83rem; line-height: 1.3; word-break: break-word; }

/* Tags */
.tags-cell { min-width: 100px; max-width: 190px; }
.tags-wrap  { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }

/* Ações — sempre visível, largura fixa */
.data-table .col-action { width: 52px; min-width: 52px; text-align: center; padding: 9px 8px; }

/* Colunas opcionais por breakpoint */
@media (max-width: 1100px) {
  .col-date, .th-date { display: none; }
}
@media (max-width: 900px) {
  .col-plan, .th-plan, .col-cnpj, .th-cnpj { display: none; }
  .client-row { max-width: 180px; }
}
@media (max-width: 680px) {
  .col-contact, .th-contact { display: none; }
}

/* ============================================================
   ADMIN LAYOUT — TOP NAVBAR
   ============================================================ */
.admin-body {
  display: flex; flex-direction: column; min-height: 100vh;
  background: var(--gray-100);
}

/* ── Navbar ─────────────────────────────────────────────── */
.admin-navbar {
  background: #fff;
  border-bottom: 3px solid var(--yellow);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
}
.navbar-inner {
  display: flex; align-items: stretch;
  height: 64px; padding: 0 28px;
  max-width: 1500px; margin: 0 auto; width: 100%;
}

/* Brand */
.navbar-brand {
  display: flex; align-items: center; flex-shrink: 0;
  padding-right: 24px;
}
.navbar-brand img { height: 38px; width: auto; display: block; }

/* Menu wrapper — flex: 1 para ocupar espaço restante */
.navbar-menu {
  flex: 1; display: flex; align-items: stretch;
}

/* Nav links — centralizados dentro do menu */
.navbar-nav {
  flex: 1; display: flex; align-items: stretch;
  justify-content: center; gap: 0;
}
.navbar-nav .nav-item {
  display: flex; align-items: stretch; position: relative;
}
.navbar-nav .nav-item a {
  display: flex; align-items: center; gap: 7px;
  padding: 0 20px;
  color: #868e96; font-size: .875rem; font-weight: 500;
  transition: color .18s, background .18s;
  white-space: nowrap; position: relative;
}
.navbar-nav .nav-item a i {
  font-size: .8rem; color: #ced4da; transition: color .18s;
}
.navbar-nav .nav-item a::after {
  content: '';
  position: absolute; bottom: -3px; left: 10px; right: 10px; height: 3px;
  background: var(--yellow); border-radius: 3px 3px 0 0;
  transform: scaleX(0); transition: transform .22s ease;
}
.navbar-nav .nav-item a:hover { color: var(--dark); background: #f8f9fa; }
.navbar-nav .nav-item a:hover i { color: var(--yellow-dark); }
.navbar-nav .nav-item a:hover::after { transform: scaleX(.55); }
.navbar-nav .nav-item.active a { color: var(--dark); font-weight: 700; background: #fffcf0; }
.navbar-nav .nav-item.active a i { color: var(--yellow-dark); }
.navbar-nav .nav-item.active a::after { transform: scaleX(1); }

/* Right side */
.navbar-end {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; padding-left: 20px; position: relative;
}
.navbar-end::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 28px; background: #e9ecef;
}

/* Site link */
.navbar-link {
  display: flex; align-items: center; gap: 5px;
  color: #868e96; font-size: .78rem; font-weight: 500;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid #e9ecef;
  transition: all .18s; white-space: nowrap;
}
.navbar-link:hover { color: var(--dark); border-color: #adb5bd; background: #f8f9fa; }
.navbar-link i { font-size: .72rem; }

/* User chip */
.navbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 3px; border-radius: 30px;
  background: #f8f9fa; border: 1.5px solid #e9ecef;
  cursor: default;
  transition: border-color .18s, box-shadow .18s;
}
.navbar-user:hover { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245,197,24,.12); }
.navbar-user .avatar-sm {
  width: 30px; height: 30px; font-size: .78rem; font-weight: 700;
  background: linear-gradient(135deg, var(--yellow), #e6a000);
  color: var(--dark); flex-shrink: 0;
}
.navbar-user-name {
  font-size: .8rem; color: #495057; font-weight: 600;
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Settings icon btn */
.navbar-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  color: #6c757d; font-size: .88rem;
  transition: background .18s, color .18s;
  text-decoration: none;
}
.navbar-icon-btn:hover,
.navbar-icon-btn.active { background: rgba(245,197,24,.15); color: var(--yellow); }

/* Logout btn */
.navbar-logout {
  display: flex; align-items: center; gap: 5px;
  color: #dc3545; font-size: .78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 6px;
  border: 1.5px solid rgba(220,53,69,.2);
  background: rgba(220,53,69,.04);
  transition: all .18s; white-space: nowrap;
}
.navbar-logout:hover { background: #dc3545; color: #fff; border-color: #dc3545; }
.navbar-logout i { font-size: .78rem; }

/* ── Hamburger (mobile) ──────────────────────────────────── */
.navbar-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
  padding: 8px; margin-left: auto; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 8px;
  transition: background .18s;
}
.navbar-toggle:hover { background: #f0f0f0; }
.navbar-toggle span {
  display: block; width: 20px; height: 2px;
  background: #495057; border-radius: 2px;
  transition: all .25s ease; margin: 0 auto;
}
.navbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Overlay mobile ─────────────────────────────────────── */
.navbar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99; }
.navbar-overlay.active { display: block; }

/* ── Admin Content ───────────────────────────────────────── */
.admin-main { display: contents; } /* wrapper legado — transparente */
.admin-content { flex: 1; padding: 28px; max-width: 1500px; margin: 0 auto; width: 100%; }
.page-header { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.page-title    { font-size: 1.5rem; color: var(--dark); font-weight: 700; }
.page-subtitle { font-size: .88rem; color: var(--text-muted); margin-top: 3px; }

/* ── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px; margin-bottom: 24px;
}
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px 22px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-value { display: block; font-size: 1.9rem; font-weight: 700; color: var(--dark); line-height: 1.2; }
.stat-label { display: block; font-size: .82rem; color: var(--text-muted); font-weight: 500; }

/* ── Search ─────────────────────────────────────────────── */
.search-bar-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-input-wrap { position: relative; flex: 1; min-width: 220px; }
.search-input-wrap i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-500); z-index: 2; pointer-events: none;
}
.search-input {
  width: 100%; padding: 10px 14px 10px 40px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .9rem; font-family: inherit; background: #fff;
  transition: border-color var(--transition); position: relative; z-index: 1;
}
.search-input:focus { outline: none; border-color: var(--yellow); }

/* Tag filters */
.tag-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-label { font-size: .82rem; color: var(--text-muted); font-weight: 600; margin-right: 4px; }
.tag-filter {
  padding: 4px 12px; border-radius: 20px; font-size: .78rem; font-weight: 600;
  border: 2px solid var(--gray-200); color: var(--gray-700); background: #fff;
  transition: all var(--transition);
}
.tag-filter:hover, .tag-filter.active {
  border-color: var(--yellow); background: var(--yellow); color: var(--dark);
}

/* ── Tabs ───────────────────────────────────────────────── */
.tabs-wrapper { margin-top: 0; }
.tabs-nav {
  display: flex; gap: 4px; background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 12px 16px 0; border-bottom: 2px solid var(--gray-200);
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 18px; background: none; border: none;
  font-size: .88rem; font-weight: 600; color: var(--gray-600);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition); display: flex; align-items: center; gap: 6px;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab-btn:hover { color: var(--dark); background: var(--gray-50); }
.tab-btn.active { color: var(--dark); border-bottom-color: var(--yellow); background: var(--gray-50); }
.tab-badge {
  background: var(--yellow); color: var(--dark);
  border-radius: 20px; font-size: .7rem; font-weight: 700;
  padding: 1px 7px; min-width: 18px; text-align: center;
}
.tab-content { display: none; padding-top: 16px; }
.tab-content.active { display: block; }

/* ── Client Header Card ─────────────────────────────────── */
.client-header-card {
  background: #fff; border-radius: var(--radius); padding: 24px 28px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .85rem; margin-bottom: 16px; }
.back-link:hover { color: var(--yellow-dark); }
.client-header-info { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.client-name   { font-size: 1.5rem; font-weight: 700; color: var(--dark); }
.client-code   { font-size: .85rem; color: var(--text-muted); margin: 2px 0; }
.client-since  { font-size: .8rem; color: var(--text-muted); }
.client-header-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Info Grid ──────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px 24px; }
.info-item { min-width: 0; }
.info-label { display: block; font-size: .72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-value { display: block; font-size: .9rem; color: var(--dark); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-value a { color: inherit; text-decoration: none; }
.info-value a:hover { text-decoration: underline; }
/* Campo de nome completo e email — ocupa 2 colunas */
.info-item.full { grid-column: span 2; }
.info-item.full .info-value { white-space: normal; word-break: break-word; }
.edit-actions { display: flex; gap: 10px; padding-top: 4px; }
#form-pessoais .info-item label,
#form-endereco .info-item label,
#form-empresa  .info-item label { display:block; font-size:.72rem; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:4px; }
.credential-value { position: relative; }
.section-label { font-size: .85rem; font-weight: 600; color: var(--dark); }

/* ── Note Cards ─────────────────────────────────────────── */
.note-form textarea { resize: vertical; min-height: 80px; }
.note-form-actions { display: flex; justify-content: flex-end; }
.note-card {
  background: #fff; border-radius: var(--radius); padding: 16px 20px;
  margin-top: 12px; box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--yellow);
}
.note-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.note-author { font-size: .82rem; font-weight: 600; color: var(--dark); margin-right: 10px; }
.note-date   { font-size: .78rem; color: var(--text-muted); }
.note-body   { font-size: .9rem; line-height: 1.7; color: var(--gray-700); white-space: pre-wrap; }

/* ── Files ──────────────────────────────────────────────── */
.upload-dropzone {
  border: 2.5px dashed var(--gray-400); border-radius: var(--radius);
  padding: 36px 20px; text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--gray-50);
}
.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--yellow); background: #fffbeb;
}
.upload-icon { font-size: 2.5rem; color: var(--yellow); display: block; margin-bottom: 10px; }
.upload-text { font-size: .95rem; color: var(--gray-700); margin-bottom: 4px; }
.upload-hint { font-size: .8rem; color: var(--text-muted); }
.progress-bar-wrap { background: var(--gray-200); border-radius: 20px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--yellow); width: 0; transition: width .3s; }

.files-list li { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--gray-100); }
.files-list li:last-child { border-bottom: none; }
.file-icon { width: 36px; height: 36px; background: var(--gray-100); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--gray-600); flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { display: block; font-size: .88rem; font-weight: 600; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: .75rem; color: var(--text-muted); }
.file-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Tags Section (client.php) ──────────────────────────── */
.tags-current { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; min-height: 32px; }
.predefined-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.new-client-toggle { }
.custom-tag-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.color-picker { width: 44px; height: 38px; padding: 2px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm); cursor: pointer; }

/* ── Form Controls ──────────────────────────────────────── */
.form-control {
  width: 100%; padding: 11px 14px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .92rem; font-family: inherit; color: var(--text);
  background: #fff; transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--yellow); }
textarea.form-control { resize: vertical; }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.8);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-box { position: relative; background: #fff; border-radius: var(--radius); padding: 20px; max-width: 90vw; }
.modal-close {
  position: absolute; top: -14px; right: -14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--danger); color: #fff; border: none;
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; color: #fff !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.25); animation: toastIn .3s ease;
  max-width: 360px; min-width: 220px;
  background: #1a1a2e; /* fallback escuro */
}
.toast.success { background: #1e7e34 !important; color: #fff !important; }
.toast.error   { background: #c82333 !important; color: #fff !important; }
.toast.info    { background: #0056b3 !important; color: #fff !important; }
@keyframes toastIn { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }

/* ============================================================
   PUBLIC FORM
   ============================================================ */
body.public-body {
  background: #f5f5ee;
}

.public-page { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Hero: faixa única do topo ───────────────────────────── */
.public-hero {
  width: 100%;
  background: #f5f5ee;
  border-bottom: 3px solid var(--yellow);
}
.public-hero-inner {
  max-width: 960px; margin: 0 auto; padding: 0 20px;
}

/* ── Header (logo) ───────────────────────────────────────── */
.public-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid rgba(0,0,0,.09);
}
.public-header img {
  max-width: 190px;
  height: auto;
  display: block;
  margin: 0 auto; /* centraliza */
}

/* LGPD notice */
.lgpd-notice {
  padding: 12px 0 10px;
  color: #666;
  font-size: .82rem;
  display: flex; align-items: flex-start; gap: 8px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.lgpd-notice i { color: var(--yellow-dark); margin-top: 2px; flex-shrink: 0; }
.lgpd-notice strong { color: var(--dark); }

/* Progress steps */
.form-progress { padding: 16px 0; }
.progress-steps {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.progress-step {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 30px;
  font-size: .76rem; font-weight: 600;
  color: #888;
  background: rgba(0,0,0,.05);
  border: 1.5px solid rgba(0,0,0,.08);
  transition: all .2s ease;
}
.progress-step.active {
  background: var(--yellow); color: var(--dark);
  border-color: var(--yellow);
  box-shadow: 0 3px 12px rgba(245,197,24,.35);
}
.progress-step.done {
  background: #e6f4eb; color: #2d7a47;
  border-color: #b8dfc6;
}
.progress-step .step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.1); display: flex;
  align-items: center; justify-content: center; font-size: .68rem; flex-shrink: 0;
}
.progress-step.active .step-num { background: rgba(26,26,46,.2); }
.progress-step.done .step-num   { background: var(--success); color: #fff; }

/* ── Form container ──────────────────────────────────────── */
.form-container {
  max-width: 860px; margin: 0 auto; padding: 36px 20px 70px;
  width: 100%;
}

/* Welcome */
.form-welcome {
  text-align: center; margin-bottom: 32px;
}
.form-welcome h1 {
  font-size: 2rem; color: var(--dark); margin-bottom: 10px;
  font-weight: 800;
}
.form-welcome h1 span { color: var(--yellow-dark); }
.form-welcome p {
  font-size: .95rem; color: var(--text-muted);
  max-width: 560px; margin: 0 auto; line-height: 1.7;
}

/* ── Form section ────────────────────────────────────────── */
.form-section {
  background: #fff; border-radius: var(--radius); padding: 30px 32px;
  margin-bottom: 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06), 0 4px 20px rgba(0,0,0,.04);
  border-top: 3px solid var(--yellow);
  transition: box-shadow .2s ease;
}
.form-section:hover { box-shadow: 0 2px 12px rgba(0,0,0,.09), 0 6px 28px rgba(0,0,0,.06); }
.form-section-title {
  font-size: 1rem; font-weight: 700; color: var(--dark);
  margin-bottom: 24px; display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; border-bottom: 1.5px solid #f0f0f0;
}
.form-section-title i {
  width: 34px; height: 34px; background: #fffbeb;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--yellow-dark); font-size: .95rem; flex-shrink: 0;
  border: 1.5px solid #f5e88a;
}

/* ── Form row & group ────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-row.single { grid-template-columns: 1fr; }
.form-row.triple { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; }
.form-group label {
  font-size: .8rem; font-weight: 700; color: var(--gray-600);
  margin-bottom: 6px; letter-spacing: .3px; text-transform: uppercase;
}
.form-group label .req { color: var(--danger); margin-left: 2px; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #e8eaf0;
  border-radius: var(--radius-sm);
  font-size: .93rem; font-family: inherit; color: var(--text);
  background: #fcfcfe;
  transition: border-color .2s, box-shadow .2s, background .2s;
  width: 100%;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236c757d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #c8cadf; background: #fff; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245,197,24,.18);
  background: #fff;
}
.form-group input.autofilled {
  background: #fffef0; border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,197,24,.12);
}
.form-group input.field-error { border-color: var(--danger); background: #fff8f8; }
.field-hint { font-size: .74rem; color: var(--text-muted); margin-top: 4px; }
.field-status { font-size: .74rem; margin-top: 4px; display: flex; align-items: center; gap: 5px; min-height: 18px; }
.field-status.loading { color: var(--text-muted); }
.field-status.success { color: var(--success); font-weight: 600; }
.field-status.error   { color: var(--danger); }
.field-status.info    { color: #0d6efd; }

/* ── Company section ─────────────────────────────────────── */
.company-section {
  background: linear-gradient(135deg, #fffef5 0%, #fffbeb 100%);
  border-radius: var(--radius-sm);
  padding: 20px 22px; border: 2px solid rgba(245,197,24,.4);
  margin-top: 6px; margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(245,197,24,.1);
}
.company-section-title {
  font-size: .88rem; font-weight: 700; color: var(--dark);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.company-section-title i { color: var(--yellow-dark); font-size: 1rem; }

/* ── File upload ─────────────────────────────────────────── */
.file-dropzone {
  border: 2.5px dashed #c8cadf; border-radius: var(--radius);
  padding: 44px 20px; text-align: center; cursor: pointer;
  transition: all .2s ease; background: #fcfcfe;
}
.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--yellow); background: #fffbeb;
  box-shadow: 0 0 0 4px rgba(245,197,24,.12);
}
.file-dropzone .dz-icon    { font-size: 2.8rem; color: var(--yellow); margin-bottom: 12px; display: block; }
.file-dropzone .dz-title   { font-size: 1rem; color: var(--dark); font-weight: 700; margin-bottom: 5px; }
.file-dropzone .dz-subtitle{ font-size: .82rem; color: var(--text-muted); }
.file-preview-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.file-preview-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: var(--radius-sm);
  padding: 10px 14px; border: 1.5px solid var(--gray-200);
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.file-preview-item .fp-icon { color: var(--yellow-dark); font-size: 1.2rem; flex-shrink: 0; }
.file-preview-item .fp-name { flex: 1; font-size: .85rem; font-weight: 600; color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview-item .fp-size { font-size: .75rem; color: var(--text-muted); flex-shrink: 0; }
.file-preview-item .fp-remove { background: none; border: none; color: var(--gray-500); font-size: 1rem; cursor: pointer; flex-shrink: 0; padding: 4px 8px; border-radius: 6px; transition: all .15s; }
.file-preview-item .fp-remove:hover { color: var(--danger); background: #fff0f0; }

/* ── Submit ──────────────────────────────────────────────── */
.form-submit-section {
  text-align: center; margin-top: 10px;
  padding: 36px 24px 32px;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  border-top: 3px solid var(--yellow);
}
.form-submit-section p { font-size: .82rem; color: var(--text-muted); margin-top: 14px; }
.btn-submit {
  padding: 16px 52px; background: var(--yellow); color: var(--dark);
  border: none; border-radius: 50px;
  font-size: 1.05rem; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: all .2s ease;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(245,197,24,.35);
  letter-spacing: .3px;
}
.btn-submit:hover {
  background: var(--yellow-dark);
  box-shadow: 0 8px 28px rgba(245,197,24,.5);
  transform: translateY(-2px);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Alert ───────────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .9rem; display: flex; align-items: flex-start; gap: 10px; }
.alert-error   { background: #fff0f0; color: #721c24; border-left: 4px solid var(--danger); border: 1px solid #fcc; border-left: 4px solid var(--danger); }
.alert-success { background: #f0fff4; color: #155724; border: 1px solid #c3e6cb; border-left: 4px solid var(--success); }

/* ── Success page ────────────────────────────────────────── */
.success-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: #f5f5ee;
}
.success-card {
  background: #fff; border-radius: var(--radius-lg); padding: 56px 44px;
  max-width: 520px; width: 100%; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.success-icon {
  width: 84px; height: 84px;
  background: linear-gradient(135deg, #d4edda, #a8d5b5);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; font-size: 2.2rem; color: var(--success);
  box-shadow: 0 8px 24px rgba(40,167,69,.25);
}
.success-title { font-size: 1.8rem; color: var(--dark); margin-bottom: 14px; font-weight: 800; }
.success-text  { font-size: .95rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 28px; }

/* ── Footer ──────────────────────────────────────────────── */
.public-footer {
  text-align: center; padding: 28px 20px;
  color: #888; font-size: .8rem;
  background: #efefea; border-top: 1px solid #ddddd5;
  margin-top: auto;
}
.public-footer a { color: #b8960a; }
.public-footer strong { color: var(--dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .admin-content { padding: 20px 16px; }
  .navbar-toggle { display: flex; }

  /* No mobile, esconde o menu e o end dentro do navbar-menu */
  .navbar-menu {
    display: none;
    position: fixed; top: 64px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 12px 32px rgba(0,0,0,.4);
    z-index: 100;
    padding-bottom: 8px;
  }
  .navbar-menu.open { display: flex; }

  .navbar-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .navbar-nav .nav-item { border-bottom: 1px solid #f0f0f0; }
  .navbar-nav .nav-item a {
    padding: 14px 24px; font-size: .9rem; color: #495057;
    border-bottom: none;
  }
  .navbar-nav .nav-item a::after { display: none; }
  .navbar-nav .nav-item.active a {
    border-left: 4px solid var(--yellow);
    padding-left: 20px; background: #fffbee; color: var(--dark);
  }

  .navbar-end {
    flex-wrap: wrap; gap: 10px;
    padding: 14px 24px; margin-left: 0;
    border-left: none; border-top: 1px solid #f0f0f0;
  }

  /* Esconde end e brand fora do menu em mobile */
  .navbar-inner > .navbar-end { display: none; }
  .navbar-brand { border-right: none; padding-right: 0; }

  .navbar-user-name { display: block; }
}

@media (max-width: 680px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row.triple { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .client-header-info { flex-direction: column; align-items: flex-start; }
  .info-grid { grid-template-columns: 1fr; }
  .tabs-nav { gap: 2px; }
  .tab-btn { padding: 8px 12px; font-size: .8rem; }
  .success-card { padding: 36px 24px; }
  .form-section { padding: 20px 16px; }
  .form-container { padding: 24px 14px 60px; }
  .form-welcome h1 { font-size: 1.5rem; }
  .progress-step span:not(.step-num) { display: none; }
  .progress-step { padding: 6px 10px; min-width: 0; }
  .public-hero-inner { padding: 0 14px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-actions .btn { font-size: .75rem; padding: 6px 10px; }
  .custom-tag-row { flex-direction: column; align-items: flex-start; }
  .btn-submit { padding: 14px 32px; font-size: .95rem; }
}

/* ============================================================
   PLANOS & SERVIÇOS
   ============================================================ */

/* ── Section header row ─────────────────────────────────── */
.section-label-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.section-heading {
  font-size: 1.05rem; font-weight: 700; color: var(--dark);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.section-heading i { color: var(--yellow-dark); }

/* ── Plans admin grid ───────────────────────────────────── */
.plans-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-bottom: 8px;
}
.plan-admin-card {
  background: #fff; border-radius: var(--radius);
  border: 2px solid #e9ecef;
  padding: 24px; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); position: relative;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.plan-admin-card:hover { box-shadow: var(--shadow); }
.plan-admin-card.is-highlight {
  border-color: var(--yellow);
  box-shadow: 0 4px 20px rgba(245,197,24,.18);
}
.plan-popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--yellow); color: var(--dark); font-size: .72rem; font-weight: 700;
  padding: 3px 14px; border-radius: 20px; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.plan-admin-top { margin-bottom: 16px; }
.plan-admin-name {
  font-size: 1.15rem; font-weight: 700; color: var(--dark); margin: 0 0 6px;
}
.plan-admin-price {
  font-size: 1.6rem; font-weight: 800; color: var(--dark); line-height: 1.2; margin-bottom: 8px;
}
.plan-admin-price span, .price-consult { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.plan-admin-desc { font-size: .85rem; color: var(--text-muted); margin: 0; line-height: 1.5; }
.plan-features-list {
  list-style: none; padding: 0; margin: 0 0 20px; flex: 1;
}
.plan-features-list li {
  font-size: .85rem; color: #495057; padding: 5px 0;
  border-bottom: 1px solid #f5f5f5; display: flex; align-items: flex-start; gap: 8px;
}
.plan-features-list li:last-child { border-bottom: none; }
.plan-features-list li i { color: #28a745; font-size: .75rem; margin-top: 3px; flex-shrink: 0; }
.plan-admin-footer { margin-top: auto; }

/* ── Modal additions ────────────────────────────────────── */
.modal-lg { max-width: 560px; }
.modal-title {
  font-size: 1.1rem; font-weight: 700; color: var(--dark);
  margin: 0 0 20px; display: flex; align-items: center; gap: 8px;
}
.modal-title i { color: var(--yellow-dark); }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid #f0f0f0;
}
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; display: block; }
.form-check-label {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: .88rem; color: var(--dark);
}
.form-check-input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--yellow-dark); }

/* ── Plan alert banner (client detail) ──────────────────── */
.plan-alert-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff9e6; border: 1.5px solid var(--yellow);
  border-radius: var(--radius-sm); padding: 12px 18px;
  margin-bottom: 18px; font-size: .88rem; color: #856404;
}
.plan-alert-banner i { color: #e09000; font-size: 1rem; flex-shrink: 0; }
.plan-alert-banner span { flex: 1; }
.plan-alert-banner .btn-warning {
  background: var(--yellow); border-color: var(--yellow-dark); color: var(--dark);
}

/* ── Onboarding checklist ─────────────────────────────── */
.onboarding-card {
  background: #fff; border: 2px solid #e67e22; border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(230,126,34,.12);
}
.onboarding-card.onboarding-done { border-color: #27ae60; box-shadow: 0 3px 12px rgba(39,174,96,.12); }
.onboarding-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; flex-wrap:wrap; }
.onboarding-title  { font-size:.98rem; font-weight:700; color:var(--dark); display:flex; align-items:center; gap:8px; margin:0 0 3px; }
.onboarding-title i { color:#e67e22; }
.onboarding-done .onboarding-title i { color:#27ae60; }
.onboarding-sub    { font-size:.78rem; color:var(--text-muted); margin:0; }
.onboarding-progress-wrap { display:flex; align-items:center; gap:8px; min-width:140px; }
.onboarding-progress-bar  { flex:1; height:8px; background:#f0f0f0; border-radius:4px; overflow:hidden; }
.onboarding-progress-fill { height:100%; background:#e67e22; border-radius:4px; transition:width .4s; }
.onboarding-done .onboarding-progress-fill { background:#27ae60; }
.onboarding-pct { font-size:.78rem; font-weight:700; color:var(--text-muted); white-space:nowrap; }

.onboarding-steps { display:flex; flex-wrap:wrap; gap:8px; }
.onboarding-step  {
  display:inline-flex; align-items:center; gap:7px;
  padding:7px 13px; border-radius:8px; font-size:.82rem; font-weight:600;
  transition: transform .15s, box-shadow .15s;
}
.onboarding-step:hover { transform:translateY(-1px); box-shadow:0 3px 8px rgba(0,0,0,.1); }
.step-ok      { background:#d4edda; color:#155724; }
.step-pending { background:#fff3cd; color:#856404; border:1px solid #ffc107; }
.step-icon    { width:20px; height:20px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.72rem; flex-shrink:0; }
.step-ok .step-icon      { background:#27ae60; color:#fff; }
.step-pending .step-icon { background:#e67e22; color:#fff; }
.step-label   { white-space:nowrap; }
.step-arrow   { font-size:.68rem; opacity:.6; margin-left:2px; }
.onboarding-done-msg { margin-top:14px; font-size:.82rem; color:#27ae60; font-weight:500; }

/* ── Tab alert state ────────────────────────────────────── */
.tab-btn.tab-alert { color: #856404; }
.tab-badge-warn {
  background: #ffc107 !important; color: var(--dark) !important;
  font-size: .6rem; padding: 1px 5px;
}

/* ── Current plan display (client tab) ──────────────────── */
.current-plan-display {}
.current-plan-header {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 6px; flex-wrap: wrap;
}
.current-plan-name { font-size: 1.25rem; font-weight: 700; color: var(--dark); }
.current-plan-price {
  font-size: 1rem; font-weight: 600; color: var(--yellow-dark);
  background: #fffbee; padding: 2px 12px; border-radius: 20px;
  border: 1px solid rgba(245,197,24,.35);
}
.current-plan-desc { font-size: .88rem; color: var(--text-muted); margin: 0 0 12px; }
.plan-assigned-meta {
  font-size: .78rem; color: var(--text-muted); margin-top: 12px;
  display: flex; align-items: center; gap: 6px;
}
.no-plan-msg {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
  color: var(--text-muted);
}
.no-plan-msg i { font-size: 1.5rem; color: #ffc107; }
.no-plan-msg p { margin: 0; line-height: 1.5; }

/* ── Plan options grid (client tab) ─────────────────────── */
.plan-options-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.plan-option {
  border: 2px solid #e9ecef; border-radius: var(--radius-sm);
  padding: 18px 16px; text-align: center; position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column; gap: 6px;
}
.plan-option:hover { border-color: #adb5bd; }
.plan-option.is-popular { border-color: var(--yellow); }
.plan-option.is-selected {
  border-color: var(--yellow); background: #fffbee;
  box-shadow: 0 3px 14px rgba(245,197,24,.2);
}
.plan-option-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--yellow); color: var(--dark); font-size: .68rem; font-weight: 700;
  padding: 2px 12px; border-radius: 20px; white-space: nowrap;
}
.plan-option-name { font-size: 1rem; font-weight: 700; color: var(--dark); }
.plan-option-price { font-size: 1.3rem; font-weight: 800; color: var(--dark); line-height: 1.2; }
.plan-option-price small { font-size: .78rem; font-weight: 500; color: var(--text-muted); }
.plan-features-mini {
  list-style: none; padding: 0; margin: 6px 0; text-align: left;
}
.plan-features-mini li {
  font-size: .78rem; color: #6c757d; padding: 3px 0;
  border-bottom: 1px solid #f5f5f5;
}
.plan-features-mini li:last-child { border-bottom: none; }
.plan-option-current {
  margin-top: auto; color: #28a745; font-size: .82rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.plan-select-btn { margin-top: auto; width: 100%; justify-content: center; }

/* ── Assigned services list ─────────────────────────────── */
.add-service-row {
  display: flex; gap: 10px; align-items: center;
}
.add-service-row .form-control { flex: 1; }
.assigned-services-list {
  list-style: none; padding: 0; margin: 0;
}
.assigned-services-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #f0f0f0; gap: 12px;
}
.assigned-services-list li:last-child { border-bottom: none; }
.assigned-service-info { flex: 1; }
.assigned-service-info strong { display: block; font-size: .9rem; color: var(--dark); }
.assigned-service-info span { font-size: .8rem; }
.assigned-service-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.service-price {
  font-size: .85rem; font-weight: 600; color: var(--yellow-dark);
  background: #fffbee; padding: 2px 10px; border-radius: 12px;
  border: 1px solid rgba(245,197,24,.3);
}

/* ── Badge warning ──────────────────────────────────────── */
.badge-warning {
  background: #ffc107; color: #212529;
}

/* ── Plan badges (clients list) ─────────────────────────── */
.plan-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap;
}
.plan-badge i { font-size: .68rem; }

.plan-badge-basico {
  background: #e8f5e9; color: #2e7d32;
  border: 1px solid #a5d6a7;
}
.plan-badge-intermediario {
  background: #fff8e1; color: #e65100;
  border: 1px solid var(--yellow);
}
.plan-badge-avancado {
  background: #ede7f6; color: #4527a0;
  border: 1px solid #ce93d8;
}
.plan-badge-none {
  background: #f8f9fa; color: #adb5bd;
  border: 1px solid #dee2e6;
}

/* ── Responsive: plans ──────────────────────────────────── */
@media (max-width: 900px) {
  .plans-admin-grid { grid-template-columns: 1fr 1fr; }
  .plan-options-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .plans-admin-grid { grid-template-columns: 1fr; }
  .plan-options-grid { grid-template-columns: 1fr; }
  .add-service-row { flex-direction: column; }
  .add-service-row .form-control { width: 100%; }
}

/* ============================================================
   GERENCIADOR DE ARQUIVOS (File Manager)
   ============================================================ */

/* ── Toolbar ────────────────────────────────────────────── */
.fm-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #fff;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  margin-bottom: 10px; flex-wrap: wrap;
}
.fm-search-wrap {
  flex: 1; min-width: 200px; position: relative;
  display: flex; align-items: center;
}
.fm-search-icon {
  position: absolute; left: 12px; color: var(--gray-500); font-size: .85rem; pointer-events: none;
}
.fm-search-input {
  width: 100%; padding: 8px 36px 8px 34px;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: .88rem; font-family: inherit; color: var(--text);
  background: var(--gray-50); transition: border-color var(--transition);
  outline: none;
}
.fm-search-input:focus { border-color: var(--yellow); background: #fff; }
.fm-search-clear {
  position: absolute; right: 8px; background: none; border: none;
  color: var(--gray-500); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: .78rem; transition: color var(--transition);
}
.fm-search-clear:hover { color: var(--danger); }
.fm-toolbar-btns { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Upload progress ────────────────────────────────────── */
.fm-upload-progress {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: #fffbeb;
  border: 1px solid #ffe58f; border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.fm-upload-progress .progress-bar-wrap { flex: 1; }
.fm-upload-status { font-size: .8rem; color: var(--gray-700); white-space: nowrap; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.fm-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  padding: 8px 14px; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  margin-bottom: 8px; font-size: .84rem;
}
.fm-bc-item { display: flex; align-items: center; gap: 5px; color: var(--gray-600); padding: 2px 4px; }
.fm-bc-item i { font-size: .75rem; }
.fm-bc-active { color: var(--dark); font-weight: 600; }
.fm-bc-link {
  color: var(--info); cursor: pointer; border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}
.fm-bc-link:hover { background: rgba(13,110,253,.08); color: var(--info); }
.fm-bc-sep { color: var(--gray-400); font-size: .7rem; display: flex; align-items: center; }

/* ── Área de conteúdo ───────────────────────────────────── */
.fm-content {
  background: #fff; border: 1.5px dashed transparent;
  border-radius: var(--radius); min-height: 180px;
  transition: border-color .2s, background .2s;
}
.fm-content.fm-dragover {
  border-color: var(--yellow); background: #fffbeb;
  box-shadow: 0 0 0 4px rgba(245,197,24,.12);
}

/* ── Lista de itens ─────────────────────────────────────── */
.fm-list { display: flex; flex-direction: column; }

.fm-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.fm-row:last-child { border-bottom: none; }
.fm-row:hover { background: var(--gray-50); }

.fm-row-folder { cursor: pointer; }
.fm-row-folder:hover .fm-folder-icon i { color: var(--yellow-dark); }

/* ── Ícones ─────────────────────────────────────────────── */
.fm-row-icon {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0; background: var(--gray-100);
  color: var(--gray-600); transition: color var(--transition);
}
.fm-folder-icon { background: #fff4cc; color: var(--yellow-dark); }
.fm-row-folder:hover .fm-folder-icon { background: #ffe99a; }

/* ── Info do item ───────────────────────────────────────── */
.fm-row-info { flex: 1; min-width: 0; }
.fm-row-name {
  display: block; font-size: .88rem; font-weight: 600;
  color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-row-meta { font-size: .76rem; color: var(--text-muted); margin-top: 1px; display: block; }

/* ── Ações do item ──────────────────────────────────────── */
.fm-row-actions {
  display: flex; gap: 5px; flex-shrink: 0; opacity: 0;
  transition: opacity var(--transition);
}
.fm-row:hover .fm-row-actions { opacity: 1; }

/* ── Tag de caminho (modo pesquisa) ─────────────────────── */
.fm-path-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .72rem; font-weight: 500; color: var(--gray-600);
  background: var(--gray-100); border-radius: 4px;
  padding: 1px 6px; margin-left: 6px; vertical-align: middle;
}
.fm-path-tag i { font-size: .65rem; }

/* ── Estado vazio ───────────────────────────────────────── */
.fm-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px; text-align: center; color: var(--gray-500);
}
.fm-empty i { font-size: 2.4rem; margin-bottom: 12px; color: var(--gray-400); }
.fm-empty p { font-size: .9rem; line-height: 1.6; max-width: 320px; }
.fm-empty strong { color: var(--dark); }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .fm-toolbar { gap: 8px; }
  .fm-toolbar-btns .btn span { display: none; }
  .fm-row-actions { opacity: 1; }
  .fm-row { padding: 10px 12px; gap: 10px; }
}
