.smb-tools,
.smb-tools * {
  box-sizing: border-box;
}

.smb-tools {
  max-width: 1200px;
  margin: 2rem auto !important;
  padding: 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #dbe6f5;
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
}

.smb-tools::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -140px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.12) 0%, rgba(29, 78, 216, 0) 70%);
  pointer-events: none;
}

.smb-tools-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.smb-tools-header p {
  margin: 0.5rem 0 0;
  color: #475569;
}

.smb-tools .dashboard-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.smb-tools .dashboard-subtitle {
  margin: 0;
  color: #475569;
}

.smb-tools-header-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #334155;
  font-size: 1rem;
}

.smb-ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.smb-ui-icon-title {
  min-width: 2rem;
  height: 2rem;
}

.smb-tools-sections {
  position: relative;
  z-index: 1;
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.smb-tools-section {
  border: 1px solid #cbd5e1 !important;
  border-radius: 999px;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding: 0.4rem 0.72rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.smb-tools-section:hover {
  border-color: #0f172a !important;
  color: #0f172a !important;
}

.smb-tools-section.is-active {
  border-color: #0f172a !important;
  background: #0f172a !important;
  color: #ffffff !important;
}

.smb-tools-tabs {
  position: relative;
  z-index: 1;
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.8rem;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  background: #ffffff;
}

.smb-tools-tab {
  border: 1px solid #cbd5e1 !important;
  border-radius: 999px;
  background: #ffffff !important;
  color: #0f172a !important;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.smb-tools-tab[hidden] {
  display: none !important;
}

.smb-tools-tab:hover {
  border-color: #1d4ed8 !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px);
}

.smb-tools-tab .smb-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  margin-right: 0.35rem;
}

.smb-tools-tab.is-active {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

.smb-tools-panels {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
}

.smb-tool-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 1.15rem;
  display: none;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.smb-tool-card.is-active {
  display: block;
}

.smb-tool-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
}

.smb-tool-section-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.55rem;
  margin-bottom: 0.55rem;
}

.smb-tool-card p {
  margin: 0.5rem 0 1rem;
  color: #334155;
}

.smb-tool-card label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.6rem 0 0.35rem;
  color: #334155;
}

.smb-tool-card textarea,
.smb-tool-card input,
.smb-tool-card select {
  width: 100%;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.7rem 0.8rem;
  color: #0f172a;
  font: inherit;
  min-width: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.smb-tool-card textarea:focus,
.smb-tool-card input:focus,
.smb-tool-card select:focus {
  outline: 0;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.smb-tool-card textarea {
  resize: vertical;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.smb-tool-card input[readonly],
.smb-tool-card textarea[readonly] {
  background: #f8fafc;
}

.smb-tool-card input:disabled,
.smb-tool-card textarea:disabled,
.smb-tool-card select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: #f1f5f9;
}

.smb-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.smb-two-col > div {
  min-width: 0;
}

.smb-quick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.smb-quick-row button {
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  background: #0f172a !important;
  color: #ffffff !important;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.smb-three-col {
  grid-template-columns: minmax(80px, 120px) minmax(100px, 130px) minmax(120px, 160px) auto;
}

.smb-advanced-block {
  margin-top: 0.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #f8fbff;
}

.smb-advanced-block summary {
  cursor: pointer;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 0.86rem;
}

.smb-advanced-block[open] summary {
  margin-bottom: 0.45rem;
}

.smb-mini-list {
  margin-top: 0.55rem;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.65rem;
}

.smb-mini-list-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.smb-mini-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
}

.smb-table-wrap {
  margin-top: 0.85rem;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #fff;
  overflow-x: auto;
}

.smb-table-wrap table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.smb-table-wrap th,
.smb-table-wrap td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.55rem 0.6rem;
  text-align: left;
  color: #0f172a;
  font-size: 0.88rem;
  vertical-align: top;
}

.smb-table-wrap th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.smb-table-wrap tr:last-child td {
  border-bottom: 0;
}

.smb-checklist {
  margin-top: 0.85rem;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem;
}

.smb-checklist ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.smb-checklist li {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  color: #0f172a;
  font-size: 0.9rem;
}

.smb-checklist .smb-check-pass {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.smb-checklist .smb-check-warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.smb-checklist .smb-check-fail {
  border-color: #fecaca;
  background: #fef2f2;
}

.smb-format-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
}

.smb-linkedin-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.smb-linkedin-toolbar-placeholder {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.smb-emoji-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
}

.smb-emoji-btn {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px;
  min-width: 34px;
  height: 32px;
  padding: 0 0.35rem;
  background: #fff !important;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
}

.smb-emoji-btn:hover {
  border-color: #1d4ed8 !important;
}

.smb-inline-helpers {
  margin-top: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.smb-helper-text {
  font-size: 0.8rem;
  color: #64748b;
}

.smb-link-btn {
  border: 0;
  background: transparent !important;
  color: #1d4ed8 !important;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.smb-link-btn:hover {
  text-decoration: underline;
}

.smb-format-btn {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px;
  min-width: 36px;
  height: 32px;
  padding: 0 0.5rem;
  background: #fff !important;
  color: #0f172a !important;
  font-weight: 700;
  cursor: pointer;
}

.smb-format-btn[data-format="i"] {
  font-style: italic;
}

.smb-format-btn[data-format="u"] {
  text-decoration: underline;
}

.smb-format-btn:hover {
  border-color: #1d4ed8 !important;
  color: #1d4ed8 !important;
}

.smb-linkedin-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.smb-linkedin-panel-title {
  margin: 0 0 0.45rem;
  min-height: 1.35rem;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.2;
}

.smb-linkedin-editor,
.smb-linkedin-preview-wrap {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.smb-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.smb-linkedin-preview {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  min-height: 250px;
  overflow-y: auto;
}

.smb-platform-picker {
  margin: 0.2rem 0 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.smb-platform-btn {
  border: 1px solid #cbd5e1 !important;
  border-radius: 999px;
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 0.35rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.smb-platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: inherit;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
}

.smb-platform-btn.is-active {
  border-color: #1d4ed8 !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.smb-evolution-inline-controls {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(110px, 140px) minmax(110px, 140px) auto;
  gap: 0.55rem;
  align-items: end;
}

.smb-evolution-field {
  min-width: 0;
}

.smb-evolution-field label {
  margin: 0 0 0.28rem;
}

.smb-evolution-inline-actions {
  margin-top: 0;
  align-self: end;
}

.smb-evolution-inline-actions button {
  white-space: nowrap;
}

.smb-evolution-rows table td:last-child {
  width: 82px;
}

.smb-preview-header {
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 0.4rem;
}

.smb-preview-header span {
  color: #64748b;
}

.smb-linkedin-preview pre {
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #0f172a;
  line-height: 1.45;
}

.smb-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.45rem;
}

.smb-preview-actions .secondary {
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  background: #0f172a !important;
  color: #ffffff !important;
  cursor: pointer;
  font-weight: 600;
}

.smb-preview-actions .secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.smb-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.smb-tool-actions button {
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  background: #1d4ed8 !important;
  color: #ffffff !important;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.smb-tool-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.22);
}

.smb-tool-actions button.secondary {
  background: #0f172a !important;
  color: #ffffff !important;
}

.smb-tool-actions button.is-disabled,
.smb-tool-actions button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.smb-result {
  margin-top: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.smb-save-status {
  margin: 0.5rem 0 0;
  min-height: 1.1rem;
  color: #0f766e;
  font-size: 0.88rem;
}

.smb-save-status.is-error {
  color: #b91c1c;
}

.smb-login-notice {
  margin-bottom: 0.6rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.smb-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1d4ed8;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  background: #ffffff;
}

.smb-login-link:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.smb-is-locked {
  position: relative;
}

.smb-saved-posts {
  margin-top: 1rem;
}

.smb-saved-posts h4 {
  margin: 0 0 0.5rem;
  color: #0f172a;
  font-size: 0.95rem;
}

.smb-saved-posts-list {
  border: 1px solid #dbe6f5;
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem;
}

.smb-saved-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.smb-saved-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.smb-saved-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.smb-saved-meta {
  min-width: 0;
  flex: 1;
}

.smb-saved-text {
  color: #0f172a;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smb-saved-title {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smb-saved-date {
  color: #64748b;
}

.smb-saved-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.smb-saved-actions button {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 0.82rem;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}

.smb-saved-actions .smb-saved-delete {
  color: #b91c1c !important;
  border-color: #fecaca !important;
}

.smb-saved-posts-pagination {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.smb-page-btn {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 0.82rem;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}

.smb-page-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.smb-page-info {
  color: #64748b;
  font-size: 0.84rem;
}

.smb-content-calendar {
  margin-top: 1rem;
}

.smb-content-calendar h4 {
  margin: 0 0 0.5rem;
  color: #0f172a;
  font-size: 0.95rem;
}

.smb-calendar-inputs {
  display: grid;
  grid-template-columns: auto minmax(140px, 220px) auto minmax(120px, 180px);
  gap: 0.45rem 0.6rem;
  align-items: center;
}

.smb-calendar-inputs label {
  margin: 0;
}

.smb-calendar-list {
  margin-top: 0.5rem;
  border: 1px solid #dbe6f5;
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem;
}

.smb-engagement-evolution {
  margin-top: 1rem;
  border: 1px solid #dbe6f5;
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem;
}

.smb-engagement-evolution h4 {
  margin: 0 0 0.45rem;
  color: #0f172a;
  font-size: 0.95rem;
}

.smb-engagement-note {
  margin: 0 0 0.55rem;
  color: #475569;
  font-size: 0.88rem;
}

.smb-engagement-note code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  color: #0f172a;
}

#smb-evolution-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 960px) {
  .smb-linkedin-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .smb-tools-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .smb-tools-header-icons {
    display: none;
  }

  .smb-tools-sections {
    gap: 0.4rem;
  }

  .smb-tools-section {
    flex: 1 1 calc(50% - 0.4rem);
    text-align: center;
  }

  .smb-tools-tab {
    width: 100%;
    text-align: center;
  }

  .smb-calendar-inputs {
    grid-template-columns: 1fr;
  }

  .smb-two-col {
    grid-template-columns: 1fr;
  }

  .smb-platform-picker {
    gap: 0.35rem;
  }

  .smb-platform-btn {
    flex: 1 1 calc(50% - 0.35rem);
    justify-content: center;
  }

  .smb-quick-row {
    grid-template-columns: 1fr;
  }

  .smb-three-col {
    grid-template-columns: 1fr;
  }

  .smb-table-wrap table {
    min-width: 540px;
  }

  .smb-inline-helpers {
    align-items: flex-start;
    flex-direction: column;
  }

  .smb-linkedin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .smb-evolution-inline-controls {
    grid-template-columns: 1fr;
  }
}
