:root {
  --bg: #f7f9fc;
  --white: #ffffff;
  --blue: #0078d4;
  --blue-dark: #005a9e;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e1e5ea;
  --pos: #1fa34a;
  --neg: #d93025;
  --neu: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f5f7fb 0%, #ffffff 40%);
}

.app {
  min-height: 100vh;
}

.ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ribbon-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-title {
  font-weight: 600;
  font-size: 18px;
}

.ribbon-tabs {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.tab {
  padding: 4px 8px;
  border-radius: 4px;
  background: #eef3fb;
}

.ribbon-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  background: #eef3fb;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.link {
  color: var(--blue);
  text-decoration: none;
  font-size: 12px;
}

.btn-light {
  background: #eef3fb;
  color: var(--blue-dark);
  border: 1px solid #d7e3f6;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.body {
  display: grid;
  grid-template-columns: 220px 1fr 180px;
  gap: 16px;
  padding: 16px;
}

.sidebar,
.margin {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  height: fit-content;
}

.sidebar-title,
.margin-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 8px;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  font-size: 12px;
  color: var(--muted);
}

.sidebar-list li {
  padding: 4px 0;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.panel-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.results th,
.results td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  text-transform: capitalize;
  display: inline-block;
}

.badge-positivo {
  background: rgba(31, 163, 74, 0.15);
  color: var(--pos);
}

.badge-neutral {
  background: rgba(107, 114, 128, 0.15);
  color: var(--neu);
}

.badge-negativo {
  background: rgba(217, 48, 37, 0.15);
  color: var(--neg);
}

.tag {
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.tag-pos {
  background: rgba(31, 163, 74, 0.12);
  color: var(--pos);
}

.tag-neu {
  background: rgba(107, 114, 128, 0.12);
  color: var(--neu);
}

.tag-neg {
  background: rgba(217, 48, 37, 0.12);
  color: var(--neg);
}

.alert {
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.alert-error {
  background: rgba(217, 48, 37, 0.12);
  color: var(--neg);
}

.alert-success {
  background: rgba(31, 163, 74, 0.12);
  color: var(--pos);
}

input[type="text"],
input[type="password"],
input[type="file"] {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #f0f4ff, #ffffff);
}

.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 10px;
  width: 320px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.login-title {
  font-size: 18px;
  font-weight: 600;
}

.login-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .body {
    grid-template-columns: 1fr;
  }
  .sidebar,
  .margin {
    order: 2;
  }
}
