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

/* Balão do CKEditor (link, etc.) acima dos modais Bootstrap */
.ck.ck-balloon-panel { z-index: 100000 !important; }

:root {
  --brand:        #0d406f;
  --brand-dark:   #0a3358;
  --brand-light:  #e8f0f8;
  --sidebar-w:    220px;
  --border:       #e2e8f0;
  --body-bg:      #f4f6f9;
  --card-bg:      #ffffff;
  --text:         #2d3748;
  --muted:        #718096;
  --danger:       #e53e3e;
}

* { box-sizing: border-box; }

body {
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--body-bg);
  margin: 0;
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-sticky {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 16px;
}

.sidebar .logo-area {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

/* Nav links */
.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 400;
  border-radius: 7px;
  margin: 1px 8px;
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.sidebar .nav-link svg {
  flex-shrink: 0;
  transition: color .15s;
}

.sidebar .nav-link:hover {
  color: var(--brand);
  background: var(--brand-light);
}

.sidebar .nav-link.active {
  color: var(--brand);
  background: var(--brand-light);
  font-weight: 500;
  border-left-color: var(--brand);
}

.sidebar .nav-link.logout {
  color: var(--muted);
  margin-top: auto;
}

.sidebar .nav-link.logout:hover {
  color: var(--danger);
  background: #fff5f5;
}

.sidebar-heading {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  padding: 16px 24px 4px;
}

.nav-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

/* ── MAIN CONTENT ── */
main[role="main"] {
  flex: 1;
  min-width: 0;
  padding: 28px 36px;
  min-height: 100vh;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 20px;
  font-size: 13px;
}

.breadcrumb-item a {
  color: var(--brand);
  text-decoration: none;
}

.breadcrumb-item.active { color: var(--muted); }

.breadcrumb-item p { float: left; }

.breadcrumb-item .fa-plus {
  background: var(--brand);
  color: white;
  border-radius: 10px;
  padding: 3px 5px;
  margin: 2px;
  position: absolute;
  right: 62px;
}

/* ── HEADINGS ── */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 500;
}

h1 { font-size: 22px; }
h5 { font-size: 15px; margin-bottom: 10px; }

/* ── METRIC CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 20px 16px;
  text-align: center;
}

.stat-card .stat-value {
  display: block;
  font-size: 30px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1.1;
}

.stat-card .stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── TABLE WRAPPER ── */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

/* DataTables */
.dataTables_wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 16px 12px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--border) !important;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
}

.dataTables_wrapper .dataTables_length select {
  color: var(--text) !important;
}

a.paginate_button.current {
  background: var(--brand) !important;
  color: white !important;
  border: none !important;
  border-radius: 5px !important;
}

a.paginate_button:hover {
  background: var(--brand-light) !important;
  color: var(--brand) !important;
  border: none !important;
  border-radius: 5px !important;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
  white-space: nowrap;
}

table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}

table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover td { background: var(--brand-light); }

/* ── FORMS ── */
label {
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 5px;
  display: block;
}

.form-group { margin-bottom: 16px; }
.mb-3 { margin-bottom: 16px; }

.form-control {
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13.5px;
  padding: 8px 12px;
  height: auto;
  color: var(--text);
  width: 100%;
  font-family: 'Rubik', sans-serif;
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13,64,111,.12);
  outline: none;
}

select.form-control { height: 38px; }

textarea, textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* ── BUTTONS ── */
.btn {
  font-family: 'Rubik', sans-serif;
  font-weight: 500;
  border-radius: 7px;
  font-size: 13.5px;
  cursor: pointer;
  border: none;
  padding: 9px 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
  text-decoration: none;
}

.btn-success,
button.btn-success {
  background: var(--brand) !important;
  color: #fff !important;
  border-color: var(--brand) !important;
}

.btn-success:hover,
button.btn-success:hover {
  background: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
}

.btn-success:focus,
button.btn-success:focus {
  box-shadow: 0 0 0 3px rgba(13,64,111,.25) !important;
}

button:not(.btn):not(.accordion-button):not(.next):not(.prev):not(.save):not(.faq-toggle):not(.btn-icon):not(.btn-close):not(.btn-add-faq):not([data-bs-dismiss]) {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

/* nav/slide buttons */
.next, .prev, .save {
  width: auto;
  min-width: 110px;
}

/* ── DIVIDER ── */
.small-line {
  height: 2px;
  width: 30px;
  background: var(--brand);
  display: block;
  float: none;
  margin: 0 0 14px;
}

/* ── MESSAGES (complaint thread) ── */
.msg-holder {
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px 0;
}

.msg-single {
  background: #f7f8fa;
  border: 1px solid var(--border);
  padding: 9px 14px 6px;
  border-radius: 8px;
  font-size: 13px;
}

.msg-single p { margin: 2px 0; }

.sentmsg {
  background: var(--brand-light) !important;
  border-color: #b8d0e8 !important;
}

/* ── ACCORDION (FAQ admin) ── */
.accordion-item.ui-sortable-handle {
  background: #fafafa;
  padding: 4px 14px 10px;
  margin: 4px 0;
  cursor: grab;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.accordion-button {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  width: auto;
  text-align: left;
  border: none;
}

.accordion-button:focus { box-shadow: none; }

/* ── MISC ── */
.delete { color: var(--brand); cursor: pointer; }
.delete:hover { color: var(--danger); }

.fa-plus {
  background: var(--brand);
  color: white;
  border-radius: 10px;
  padding: 3px 5px;
  margin: 2px;
}

/* ── LOGIN PAGE ── */
body.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--body-bg);
  padding: 20px;
}

.form-signin {
  max-width: 380px;
  width: 100%;
  padding: 40px;
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.form-signin img { margin-bottom: 20px; display: block; }

.form-signin h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.form-signin .login-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.form-signin .form-floating { margin-bottom: 12px; }
.form-floating > label { font-size: 13px; color: var(--muted); }

/* ── DROPZONE ── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: #fafbfc;
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.dropzone:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

.dz-message { margin: 0; }

/* ── TOOLTIP images ── */
.tooltip-inner img { width: 100%; }

/* ── FORM SECTOR (formulario editor) ── */
.formSectorRow { margin-bottom: 5px; }
.formSector {
  min-height: 50px;
  border-radius: 6px;
  border: 1px dashed #a3a3a3;
}
.addElement {
  position: absolute;
  left: 50%;
  top: 50%;
  background: #e6e6e6;
  padding: 7px 11px;
  border-radius: 18px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  border: 1px solid #e9e9e9;
}

/* ── SLIDES (first install) ── */
.slide { display: none; }
.active-slide { display: block; }

/* ── CKEditor ── */
.ck.ck-editor__main { min-height: 150px; }
.ck.ck-editor__main>.ck-editor__editable { min-height: 150px; }

/* Tone down toolbar — less visual noise */
.ck.ck-toolbar { background: #f8f9fa !important; border-color: #dee2e6 !important; padding: 2px 4px !important; }
.ck.ck-toolbar .ck-toolbar__separator { background: #dee2e6 !important; }
.ck.ck-button { border: none !important; background: transparent !important; color: #6c757d !important; border-radius: 4px !important; padding: 4px 6px !important; min-width: unset !important; }
.ck.ck-button:hover:not(.ck-disabled) { background: #e9ecef !important; color: #343a40 !important; box-shadow: none !important; }
.ck.ck-button.ck-on { background: #e2e8f0 !important; color: #1a56db !important; box-shadow: none !important; }
.ck.ck-button.ck-on:hover { background: #d1dae8 !important; }
.ck.ck-editor__editable { border-color: #dee2e6 !important; box-shadow: none !important; }
.ck.ck-editor__editable:focus { border-color: #86b7fe !important; box-shadow: 0 0 0 0.2rem rgba(13,110,253,.15) !important; }

/* ── COPIED badge ── */
.copied { display: none; color: var(--brand); font-size: 12px; margin-left: 8px; }
