/* ===========================================
   FONTES & ROOT
=========================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
  --bg: #e9f2fb;
  --panel: #ffffff;
  --primary: #1e3a8a;
  --accent: #2563eb;
  --muted: #6b7280;
  --tag-default: #3b82f6;
  --shadow: 0 6px 18px rgba(16,24,40,0.06);
}

* {
  box-sizing: border-box;
  font-family: Inter, system-ui, Arial, sans-serif;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #f5f9ff);
  color: #0f172a;
}

/* ===========================================
   LAYOUT PRINCIPAL
=========================================== */
.app {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, var(--primary), #18306a);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar .brand {
  font-size: 20px;
  font-weight: 700;
}

.sidebar nav button {
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.92);
}

.sidebar nav button.active {
  background: rgba(255,255,255,0.06);
}

/* MAIN */
.main {
  flex: 1;
  padding: 20px;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.main-header h1 {
  margin: 0;
  color: var(--primary);
}

/* TABS */
.tab { display: none; }
.tab.active { display: block; }

/* ===========================================
   CONTROLES / FORMULÁRIOS
=========================================== */
.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.search {
  flex: 2;
  min-width: 260px;
  display: flex;
  gap: 8px;
}

.search input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
}

.select,
input[type=text],
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #e6f0ff;
  border-radius: 10px;
}

.btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(30,58,138,0.08);
}

.btn.small {
  padding: 6px 10px;
  font-size: 13px;
}

/* ===========================================
   PAINÉIS E CARDS
=========================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.card-title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

/* ===========================================
   TAGS
=========================================== */
.tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--tag-default);
  margin-right: 6px;
  margin-bottom: 6px;
}

/* ===========================================
   MODAL PADRÃO (editar / prévia)
=========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal {
  background: white;
  width: 500px;
  max-width: 95%;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

/* ===========================================
   MONTAR LAUDO – SEÇÃO PERSONALIZADA
=========================================== */
.laudo-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  margin-top: 20px;
}

.laudo-box {
  background: var(--panel);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.lista-frases {
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px;
  height: 420px;
  overflow-y: auto;
}

/* item da frase */
.frase-item {
  background: var(--panel);
  border-left: 4px solid var(--accent);
  padding: 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.frase-buttons {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.laudo-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}
