/* Disciplina — protótipo estático (mock). Replica o tema do app mobile:
   azul claro (#0288D1), Material Design, fundo claro. */
:root {
  --primary: #0288d1;
  --primary-light: #4fc3f7;
  --primary-dark: #026aa1;
  --bg: #f3f5fb;
  --surface: #ffffff;
  --border: #e2e6f0;
  --text: #1a2333;
  --text-dim: #64708a;
  --text-body: #3a4258;
  --danger: #dc2626;
  --warn-bg: #ffedcf;
  --warn-fg: #8a5a12;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(13, 27, 76, 0.10);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 20% -5%, #e7eefc, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #e9f6fe, transparent 55%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 56px;
}

/* Barra superior de navegação do protótipo (fora do "celular") */
.proto-bar {
  width: 100%; max-width: 900px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
}
.proto-bar a.back {
  text-decoration: none; color: var(--primary);
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(13,27,76,0.05);
}
.proto-bar .crumb { color: var(--text-dim); font-size: 14px; }
.proto-bar .crumb b { color: var(--text); }

/* Moldura de celular */
.phone {
  width: 390px; max-width: 100%;
  background: #0b1020;
  border-radius: 46px;
  padding: 10px;
  box-shadow: var(--shadow), 0 2px 0 #1b2440 inset;
}
.phone-screen {
  position: relative;
  background: var(--bg);
  border-radius: 38px;
  overflow: hidden;
  height: 780px;
  display: flex;
  flex-direction: column;
}
.statusbar {
  height: 30px; flex: 0 0 auto;
  background: var(--primary);
  color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.statusbar .icons { letter-spacing: 2px; }

/* AppBar */
.appbar {
  flex: 0 0 auto;
  background: var(--primary);
  color: #fff;
  height: 56px;
  display: flex; align-items: center;
  padding: 0 8px;
  box-shadow: 0 2px 6px rgba(2, 136, 209, 0.28);
  position: relative;
  z-index: 2;
}
.appbar .icon-btn { color: #fff; }
.appbar .title {
  font-size: 18px; font-weight: 700; letter-spacing: 0.2px;
  flex: 1; text-align: center;
}
.appbar .title.left { text-align: left; padding-left: 8px; }
.appbar .actions { display: flex; }

/* Área de conteúdo rolável */
.screen {
  flex: 1 1 auto;
  overflow-y: auto;
  position: relative;
}
.screen-pad { padding: 16px; }

/* Ícone-botão genérico */
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: var(--primary); cursor: pointer;
  border: none; background: transparent;
  font-size: 22px; line-height: 1;
}
.icon-btn:hover { background: rgba(2,136,209,0.08); }
.appbar .icon-btn:hover { background: rgba(255,255,255,0.15); }

/* Material icons via texto/emoji simples */
.mi { font-family: var(--font); font-style: normal; }

/* List tile */
.tile {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 12px;
  border-radius: 14px;
  text-decoration: none; color: inherit;
}
.tile:hover { background: rgba(2,136,209,0.05); }
.tile .leading { flex: 0 0 auto; color: var(--primary); }
.tile .body { flex: 1 1 auto; min-width: 0; }
.tile .t {
  font-size: 15.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile .s { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.tile .trailing { flex: 0 0 auto; color: var(--text-dim); }
.tile .trailing.right-cat {
  color: var(--text-dim); font-size: 12.5px; text-align: right;
}
.tile-divider { height: 1px; background: var(--border); margin: 2px 12px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 15px 24px; font-size: 15px; font-weight: 600;
  font-family: var(--font); cursor: pointer; text-decoration: none;
  width: 100%;
  box-shadow: 0 4px 14px rgba(2,136,209,0.28);
}
.btn:hover { background: var(--primary-dark); }
.btn.block { width: 100%; }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.6px solid var(--primary);
  box-shadow: none;
}
.btn-outline:hover { background: rgba(2,136,209,0.06); }
.btn-text {
  background: none; color: var(--primary); box-shadow: none;
  width: auto; padding: 10px 12px; font-weight: 600;
}
.btn-text:hover { background: rgba(2,136,209,0.06); }
.btn-text.danger { color: var(--danger); }

/* FAB */
.fab {
  position: absolute; right: 18px; bottom: 18px;
  width: 56px; height: 56px; border-radius: 18px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 26px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(2,136,209,0.4);
  z-index: 3;
}
.fab:hover { background: var(--primary-dark); }
.fab.center { left: 50%; right: auto; transform: translateX(-50%); }
.fab.small { width: 46px; height: 46px; border-radius: 15px; font-size: 22px; }
.fab.secondary { right: 18px; left: auto; transform: none; }

/* Campos de texto (outlined) */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12.5px; color: var(--text-dim);
  margin-bottom: 6px; font-weight: 600;
}
.input {
  width: 100%; font-family: var(--font); font-size: 15px;
  color: var(--text); background: var(--surface);
  border: 1.4px solid var(--border); border-radius: 14px;
  padding: 14px 16px;
}
.input::placeholder { color: #9aa6bd; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(2,136,209,0.14); }
textarea.input { resize: none; min-height: 96px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: #eef1fa;
  color: var(--primary); font-weight: 600; font-size: 13px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  user-select: none;
}
.chip.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip.plain { background: #eef1fa; color: var(--text-dim); font-weight: 500; }
.chip .x { margin-left: 6px; opacity: .7; }

/* Cards / seções */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
}
.section-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 20px 0 10px; }
.hint { font-size: 12.5px; color: var(--text-dim); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Banner offline */
.banner {
  background: var(--warn-bg); color: var(--warn-fg);
  font-size: 13px; text-align: center; padding: 10px 12px;
}

/* Segmented button */
.segmented {
  display: flex; border: 1.4px solid var(--primary); border-radius: 12px;
  overflow: hidden; margin-top: 6px;
}
.segmented .seg {
  flex: 1; text-align: center; padding: 11px 8px; font-size: 13.5px;
  font-weight: 600; color: var(--primary); cursor: pointer; background: #fff;
}
.segmented .seg.active { background: var(--primary); color: #fff; }

/* Switch (toggle) */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.switch {
  width: 46px; height: 28px; border-radius: 999px; background: #cbd5e1;
  position: relative; flex: 0 0 auto; cursor: pointer;
}
.switch .knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch.on { background: var(--primary-light); }
.switch.on .knob { left: 21px; background: var(--primary); }

/* Stepper */
.stepper { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0; }
.stepper .val { font-size: 18px; font-weight: 700; min-width: 24px; text-align: center; }
.stepper .icon-btn { border: 1px solid var(--border); }

/* Popup de opções (menu) */
.menu {
  position: absolute; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
  min-width: 170px; z-index: 5;
}
.menu a {
  display: block; padding: 12px 16px; font-size: 14px; color: var(--text);
  text-decoration: none;
}
.menu a:hover { background: rgba(2,136,209,0.06); }
.menu a.danger { color: var(--danger); }

/* Overlay + diálogo (modal) */
.overlay {
  position: absolute; inset: 0; background: rgba(13,27,76,0.35);
  display: none; align-items: center; justify-content: center; padding: 24px;
  z-index: 10;
}
.overlay.open { display: flex; }
.dialog {
  background: #fff; border-radius: 20px; width: 100%; max-width: 320px;
  padding: 22px; box-shadow: var(--shadow);
}
.dialog h3 { margin: 0 0 10px; font-size: 18px; color: var(--primary); }
.dialog p { margin: 0 0 16px; font-size: 14px; color: var(--text-body); line-height: 1.5; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Reader (leitor de livro) */
.reader {
  padding: 22px 18px; font-size: 17px; line-height: 1.7; color: var(--text-body);
  white-space: pre-wrap;
}
.reader-fab-col { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; }
.reader-fab-col .fab { position: static; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; }

/* Logo login */
.brand { text-align: center; margin: 30px 0 26px; }
.brand h1 { margin: 0; font-size: 30px; font-weight: 800; color: var(--primary); letter-spacing: -.02em; }
.center-col { display: flex; flex-direction: column; justify-content: center; min-height: 100%; padding: 24px; }
.row-center { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 14px; color: var(--text-dim); }

/* Índice */
.index-wrap { width: 100%; max-width: 1040px; }
.index-head { text-align: center; margin-bottom: 8px; }
.index-head .tag { display:inline-block; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#fff; background:var(--primary); padding:6px 14px; border-radius:999px; }
.index-head h1 { font-size: 34px; margin: 16px 0 6px; letter-spacing: -.02em; }
.index-head p { color: var(--text-dim); margin: 0 auto; max-width: 560px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 32px; }
.screen-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: inherit; overflow: hidden; transition: transform .12s, box-shadow .12s;
  box-shadow: 0 2px 10px rgba(13,27,76,0.04);
}
.screen-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.screen-card .thumb { height: 120px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: grid; place-items: center; color: #fff; font-size: 40px; }
.screen-card .meta { padding: 14px 16px; }
.screen-card .meta .n { font-size: 15px; font-weight: 700; }
.screen-card .meta .d { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.mock-note { text-align:center; color: var(--text-dim); font-size: 13px; margin-top: 40px; }
