﻿:root {
  color-scheme: light;
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-soft: #eef5ff;
  --text: #0f1d35;
  --muted: #75839a;
  --line: #dfe7f2;
  --blue: #0f74f2;
  --blue-dark: #075dca;
  --navy: #12213a;
  --danger: #9b2d2d;
  --shadow: 0 18px 45px rgba(28, 62, 114, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 5%, rgba(15, 116, 242, 0.12), transparent 30%),
    radial-gradient(circle at 90% 15%, rgba(143, 197, 255, 0.18), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.auth-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 28px;
}

.login-card {
  margin: 0 auto;
  max-width: 420px;
  width: 100%;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, #2388ff, #075dca);
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
}

.login-logo {
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: block;
  height: 96px;
  margin: 0 auto 28px;
  object-fit: contain;
  width: 96px;
}

.login-card h1 {
  font-size: 34px;
  line-height: 1.08;
  margin: 0;
  text-align: center;
}

.login-card h1 strong { color: var(--blue); }
.login-card p { color: var(--muted); margin: 18px 0 28px; text-align: center; }

.login-form { display: grid; gap: 16px; }

.input-icon,
.login-form label {
  position: relative;
}

.input-icon input {
  padding-left: 50px;
}

.input-icon::before {
  color: #7e8ca3;
  content: "?";
  font-size: 22px;
  left: 17px;
  line-height: 1;
  position: absolute;
  top: 43px;
}

.input-icon.lock::before {
  content: "?";
  font-size: 20px;
}

.login-options {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 2px 0 4px;
}

.login-options a,
.signup-line a {
  color: var(--blue);
  font-weight: 800;
}

.remember {
  align-items: center;
  color: var(--blue);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
}

.remember input {
  accent-color: var(--blue);
  height: 20px;
  min-height: 20px;
  width: 20px;
}

.divider {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto 1fr;
  margin: 26px 0;
}

.divider::before,
.divider::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.google-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 14px;
  justify-content: center;
  min-height: 56px;
  width: 100%;
}

.google-button span {
  color: #4285f4;
  font-size: 22px;
  font-weight: 900;
}

.signup-line {
  margin-top: 28px !important;
}

.signup-card .login-logo {
  height: 82px;
  margin-bottom: 22px;
  width: 82px;
}

.alert {
  background: #fff1f1;
  border: 1px solid #f1c6c6;
  border-radius: 8px;
  color: var(--danger) !important;
  padding: 10px 12px;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: var(--navy);
  display: inline-flex;
  font-size: 17px;
  font-weight: 900;
  gap: 10px;
}

.brand-mark {
  border-radius: 9px;
  height: 32px;
  width: 32px;
}

.topbar nav {
  align-items: center;
  display: flex;
  gap: 8px;
}

.topbar nav a, .topbar nav button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 8px 10px;
}

.topbar nav a:hover, .topbar nav button:hover { background: var(--surface-soft); color: var(--text); }

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.dashboard-head, .admin-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 12px 0 20px;
}

.dashboard-head h1, .admin-head h1 {
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 6px;
}

.dashboard-head p, .admin-head span { color: var(--muted); margin: 0; }

.eyebrow {
  color: var(--blue) !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 6px !important;
  text-transform: uppercase;
}

.circle-button {
  align-items: center;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: #fff;
  display: inline-flex;
  font-size: 30px;
  font-weight: 500;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.search-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto;
  margin-bottom: 22px;
}

.search-row input {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.filter-icon { color: var(--blue); font-size: 24px; font-weight: 900; transform: rotate(90deg); }

.notes-list {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.note-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  grid-template-columns: 58px 1fr auto;
  padding: 16px;
}

.note-icon {
  align-items: center;
  background: #e7f1ff;
  border-radius: 8px;
  color: var(--blue);
  display: flex;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.note-card strong { display: block; margin-bottom: 4px; }
.note-card p { color: var(--text); margin: 0 0 4px; }
.note-card small { color: var(--blue); font-weight: 800; }
.note-card > span { color: var(--muted); font-size: 28px; }

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  padding: 22px;
}

.panel-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel h1, .panel h2 { margin: 0 0 18px; }
.panel-title h2 { margin: 0; }

.grid-form {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form.calm label {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

label { display: grid; gap: 6px; }
label span { color: var(--muted); font-size: 13px; font-weight: 800; }

input, select, textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.grid-form.calm input, .grid-form.calm select, .grid-form.calm textarea {
  border: 0;
  min-height: 28px;
  padding: 0;
}

textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }

.button, .link-button {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
}

.button { border: 1px solid var(--line); background: #fff; color: var(--blue); }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.full { width: 100%; }
.link-button { background: transparent; border: 0; color: var(--blue); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 760px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
small { color: var(--muted); }
.empty, .empty-state { color: var(--muted); text-align: center; }
.empty-state { background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 28px; }

.metrics {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.metrics div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.metrics strong { display: block; font-size: 30px; }
.metrics span { color: var(--muted); font-weight: 800; }

.split {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.error { border-color: #e6b9b9; color: var(--danger); }

@media (max-width: 780px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 10px; padding: 14px 18px; }
  .topbar nav { flex-wrap: wrap; }
  .shell { padding: 18px; }
  .dashboard-head, .admin-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .grid-form, .split, .metrics { grid-template-columns: 1fr; }
  .note-card { grid-template-columns: 52px 1fr auto; }
  .login-card h1, .dashboard-head h1, .admin-head h1 { font-size: 30px; }
}



/* Mobile app home */
.app-page:has(.mobile-home),
.app-page:has(.mobile-page) {
  background: linear-gradient(155deg, #f7fbff 0%, #eef6ff 46%, #ffffff 100%);
}

.mobile-home,
.mobile-page {
  margin: 0 auto;
  max-width: 480px;
  min-height: 100vh;
  padding: 22px 18px 110px;
}

.mobile-home .dashboard-head,
.mobile-page .dashboard-head {
  align-items: flex-start;
  display: block;
  margin: 34px 0 22px;
}

.mobile-home .dashboard-head h1,
.mobile-page .dashboard-head h1 {
  color: var(--navy);
  font-size: 32px;
  margin: 0 0 6px;
}

.mobile-home .dashboard-head p,
.mobile-page .dashboard-head p {
  color: var(--muted);
  font-size: 17px;
}

.home-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.icon-link,
.filter-button,
.circle-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.icon-link svg,
.filter-button svg,
.circle-button svg,
.note-icon svg,
.bottom-nav svg,
.card-arrow svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.icon-link {
  color: #24547e;
  height: 44px;
  width: 44px;
}

.icon-link svg {
  height: 30px;
  width: 30px;
}

.circle-button {
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(15, 116, 242, 0.3);
  color: #fff;
  height: 48px;
  width: 48px;
}

.circle-button svg {
  height: 28px;
  width: 28px;
}

.mobile-home .search-row {
  grid-template-columns: 1fr 48px;
  margin-bottom: 26px;
}

.search-box {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: 24px 1fr;
  min-height: 62px;
  padding: 0 18px;
}

.search-box svg {
  color: #71839d;
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.2;
  width: 24px;
}

.search-box input {
  background: transparent;
  border: 0;
  color: var(--muted);
  min-height: 40px;
  padding: 0;
}

.filter-button {
  color: var(--blue);
  height: 62px;
  width: 48px;
}

.filter-button svg {
  height: 28px;
  width: 28px;
}

.mobile-home .notes-list {
  gap: 16px;
}

.mobile-home .note-card {
  border-radius: 12px;
  grid-template-columns: 58px 1fr 24px;
  min-height: 116px;
  padding: 18px 16px;
}

.note-icon svg {
  height: 30px;
  width: 30px;
}

.card-arrow {
  align-items: center;
  color: #50617a;
  display: flex;
}

.card-arrow svg {
  height: 24px;
  width: 24px;
}

.mobile-home .note-card p span,
.mobile-home .note-card small span {
  color: #97a5b8;
  padding: 0 6px;
}

.new-note-panel {
  margin-top: 28px;
}

.bottom-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  bottom: 0;
  box-shadow: 0 -12px 35px rgba(38, 73, 120, 0.08);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  left: 50%;
  max-width: 480px;
  min-height: 82px;
  position: fixed;
  transform: translateX(-50%);
  width: 100%;
  z-index: 20;
}

.bottom-nav a {
  align-items: center;
  color: #76849a;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 4px;
  justify-items: center;
}

.bottom-nav a.active {
  color: var(--blue);
}

.bottom-nav svg {
  height: 28px;
  width: 28px;
}

.profile-head {
  display: grid;
  justify-items: center;
  padding: 34px 0 22px;
  text-align: center;
}

.avatar {
  align-items: center;
  background: var(--blue);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 34px;
  font-weight: 900;
  height: 82px;
  justify-content: center;
  margin-bottom: 14px;
  width: 82px;
}

.profile-head h1 { margin: 0 0 6px; }
.profile-head p { color: var(--muted); margin: 0; }
.profile-list { display: grid; gap: 10px; }
.profile-list a,
.profile-list button {
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: block;
  font-weight: 800;
  min-height: 46px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

@media (min-width: 781px) {
  .app-page:has(.mobile-home) .shell,
  .app-page:has(.mobile-page) .shell {
    padding-top: 0;
  }
}

/* Profile image upload */
.profile-page .profile-head {
  padding-top: 26px;
}

.avatar-img {
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: var(--shadow);
  display: block;
  height: 112px;
  margin-bottom: 14px;
  object-fit: cover;
  width: 112px;
}

.profile-page .avatar {
  border: 4px solid #fff;
  box-shadow: var(--shadow);
  height: 112px;
  width: 112px;
}

.upload-panel h2 {
  margin-bottom: 14px;
}

.upload-form {
  display: grid;
  gap: 14px;
}

.file-picker {
  align-items: center;
  background: #f7fbff;
  border: 1px dashed #b8c9de;
  border-radius: 10px;
  color: var(--blue);
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 84px;
  padding: 16px;
  text-align: center;
}

.file-picker span {
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
}

.file-picker input {
  background: transparent;
  border: 0;
  color: var(--muted);
  min-height: auto;
  padding: 0;
}

.app-page {
  min-height: 100vh;
}

.mobile-home,
.mobile-page {
  width: 100%;
}

@media (max-width: 520px) {
  .shell {
    padding-left: 0;
    padding-right: 0;
  }

  .mobile-home,
  .mobile-page {
    max-width: none;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Visual refresh: mobile app typography, colors and comfortable fields */
:root {
  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface-soft: #edf4fb;
  --text: #142033;
  --muted: #6d7b8f;
  --line: #dce6f0;
  --blue: #1268e5;
  --blue-dark: #0b4fb3;
  --navy: #142033;
  --mint: #dff5ec;
  --mint-text: #1f6f52;
  --amber: #f2c46d;
  --shadow: 0 14px 34px rgba(28, 55, 92, 0.10);
  --soft-shadow: 0 8px 22px rgba(28, 55, 92, 0.08);
}

body {
  background: linear-gradient(155deg, #f9fcff 0%, #eef6ff 48%, #fbfdff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  letter-spacing: 0;
}

.login-card h1,
.mobile-home .dashboard-head h1,
.mobile-page .dashboard-head h1,
.profile-head h1,
.panel h1,
.panel h2 {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
}

.login-card p,
.mobile-home .dashboard-head p,
.mobile-page .dashboard-head p,
.profile-head p,
.note-card p,
.bible-version-card p {
  color: var(--muted);
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 12px;
  font-size: 16px;
  min-height: 52px;
  padding: 14px 16px;
}

textarea {
  line-height: 1.45;
  min-height: 112px;
  padding-top: 14px;
}

label span {
  color: #718094;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 2px;
}

.grid-form.calm label {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  gap: 8px;
  padding: 14px 16px;
}

.grid-form.calm input,
.grid-form.calm select,
.grid-form.calm textarea {
  background: transparent;
  border: 0;
  min-height: 34px;
  padding: 4px 0 0;
}

.grid-form.calm textarea {
  min-height: 92px;
}

.panel,
.note-card,
.login-card,
.bible-reader-card,
.bible-version-card {
  border-radius: 16px;
}

.panel {
  border-color: rgba(216, 226, 238, 0.9);
  box-shadow: var(--soft-shadow);
  padding: 20px;
}

.button,
.link-button,
.google-button {
  border-radius: 14px;
  min-height: 52px;
}

.button.primary {
  background: linear-gradient(135deg, #1473f3, #0c5fcf);
  border: 0;
  box-shadow: 0 12px 24px rgba(18, 104, 229, 0.22);
}

.auth-shell {
  padding: 24px;
}

.login-card {
  background: transparent;
}

.input-icon input {
  padding-left: 52px;
}

.input-icon::before,
.input-icon.lock::before {
  content: "";
  border: 2px solid #8a98aa;
  border-radius: 4px;
  height: 16px;
  left: 18px;
  top: 44px;
  width: 20px;
}

.input-icon.lock::before {
  border-radius: 5px;
  height: 18px;
  width: 16px;
}

.mobile-home,
.mobile-page {
  max-width: 460px;
  padding-top: 20px;
}

.mobile-home .dashboard-head {
  margin-top: 30px;
}

.mobile-home .dashboard-head h1 {
  font-size: 34px;
  line-height: 1.05;
}

.search-box {
  border-radius: 18px;
  min-height: 60px;
}

.mobile-home .note-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(218, 228, 240, 0.95);
  box-shadow: var(--soft-shadow);
  min-height: 112px;
  padding: 17px 15px;
}

.note-card strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.note-card p {
  font-size: 14px;
  line-height: 1.35;
}

.note-card small {
  color: var(--blue);
  font-size: 13px;
  line-height: 1.35;
}

.note-icon {
  background: #e7f1ff;
  border-radius: 14px;
}

.bottom-nav {
  min-height: 78px;
}

.bottom-nav a {
  font-size: 12px;
}

/* Bible library */
.bible-page .dashboard-head {
  margin-top: 18px;
}

.bible-title h1 {
  font-size: 34px;
}

.bible-reader-card {
  background: linear-gradient(150deg, #ffffff 0%, #f3f8ff 62%, #f7fff9 100%);
  border: 1px solid rgba(214, 226, 239, 0.95);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  padding: 18px;
}

.reader-search {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: 24px 1fr;
  min-height: 58px;
  padding: 0 14px;
}

.reader-search svg {
  color: #77869a;
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  width: 22px;
}

.reader-search input {
  background: transparent;
  border: 0;
  min-height: 40px;
  padding: 0;
}

.version-strip {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.version-strip button {
  background: #eef5ff;
  border: 1px solid #d6e5f7;
  border-radius: 999px;
  color: #526176;
  font-size: 12px;
  font-weight: 900;
  min-height: 34px;
  padding: 0 13px;
  white-space: nowrap;
}

.version-strip button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.scripture-preview {
  background: #fff;
  border: 1px solid rgba(221, 230, 240, 0.9);
  border-radius: 14px;
  padding: 16px;
}

.scripture-preview span {
  color: var(--mint-text);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.scripture-preview h2 {
  font-size: 19px;
  line-height: 1.2;
  margin: 0 0 8px;
}

.scripture-preview p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.bible-library .panel-title {
  align-items: center;
  gap: 10px;
}

.version-list {
  display: grid;
  gap: 12px;
}

.bible-version-card {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 15px;
}

.bible-version-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.bible-version-card span {
  color: #738197;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.bible-version-card p {
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.bible-version-card em {
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  justify-self: start;
  padding: 7px 10px;
}

.bible-version-card em.ready {
  background: var(--mint);
  color: var(--mint-text);
}

.bible-version-card em.license {
  background: #fff4d8;
  color: #876018;
}

@media (max-width: 520px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .panel {
    padding: 18px;
  }
}

/* Login screen cleanup */
.auth-page {
  background: linear-gradient(155deg, #f8fbff 0%, #eef6ff 52%, #ffffff 100%);
}

.auth-shell {
  align-items: center;
  min-height: 100svh;
  padding: 28px 22px;
}

.login-card {
  max-width: 390px;
  padding-bottom: 10px;
}

.login-logo {
  border-radius: 24px;
  height: 92px;
  margin-bottom: 26px;
  width: 92px;
}

.login-card h1 {
  font-size: 35px;
  letter-spacing: 0;
  line-height: 1.05;
}

.login-card p {
  font-size: 16px;
  line-height: 1.45;
  margin: 18px 0 30px;
}

.clean-login-form {
  gap: 17px;
}

.clean-login-form .app-field {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe5f0;
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(30, 57, 94, 0.06);
  display: grid;
  grid-template-columns: 26px 1fr;
  min-height: 58px;
  padding: 0 16px;
  position: relative;
}

.clean-login-form .app-field.with-action {
  grid-template-columns: 26px 1fr 28px;
}

.clean-login-form .field-icon,
.clean-login-form .field-action {
  align-items: center;
  color: #7c8a9f;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.clean-login-form svg {
  fill: none;
  height: 23px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 23px;
}

.clean-login-form input[type="email"],
.clean-login-form input[type="password"] {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--text);
  font-size: 16px;
  min-height: 56px;
  padding: 0 10px;
}

.clean-login-form input::placeholder {
  color: #8c99aa;
}

.input-icon::before,
.input-icon.lock::before {
  display: none !important;
}

.login-options {
  margin: 0 0 2px;
}

.remember {
  color: var(--blue);
  font-size: 15px;
}

.remember input {
  border-radius: 5px;
  height: 20px;
  min-height: 20px;
  width: 20px;
}

.login-options a {
  font-size: 15px;
}

.login-card .button.primary {
  border-radius: 13px;
  font-size: 16px;
  min-height: 58px;
}

.signup-line {
  color: #7a8799 !important;
  font-size: 15px;
  margin: 30px 0 0 !important;
}

.signup-line a {
  color: var(--blue);
}

.signup-card .login-form label:not(.app-field) {
  gap: 8px;
}

.signup-card .login-form input {
  min-height: 56px;
  padding: 14px 16px;
}

@media (max-width: 390px) {
  .auth-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .login-card h1 {
    font-size: 32px;
  }
}

/* Hard override for any cached old login markup */
.auth-page .divider,
.auth-page .google-button {
  display: none !important;
}

.auth-page .input-icon,
.auth-page .input-icon.lock {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 13px !important;
  box-shadow: 0 8px 22px rgba(30, 57, 94, 0.06) !important;
  display: block !important;
  min-height: 58px !important;
  padding: 0 !important;
  position: relative !important;
}

.auth-page .input-icon > span,
.auth-page .input-icon.lock > span {
  display: none !important;
}

.auth-page .input-icon::before,
.auth-page .input-icon.lock::before {
  display: none !important;
  content: none !important;
}

.auth-page .input-icon input,
.auth-page .input-icon.lock input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 16px !important;
  min-height: 58px !important;
  padding: 0 16px !important;
}

.auth-page .input-icon input::placeholder,
.auth-page .input-icon.lock input::placeholder {
  color: #8c99aa !important;
}

/* Flow updates: clean home, dedicated new preaching screen, avatar plus */
.home-actions {
  justify-content: flex-end !important;
}

.home-actions > span {
  display: none;
}

.single-search {
  grid-template-columns: 1fr !important;
}

.filter-button,
.icon-link[href="/menu"] {
  display: none !important;
}

.new-note-panel {
  display: none !important;
}

.mobile-form-header {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px 1fr auto;
  margin: 4px 0 24px;
  min-height: 54px;
}

.mobile-form-header .icon-link {
  color: var(--blue);
  display: inline-flex !important;
  transform: rotate(180deg);
}

.mobile-form-header h1 {
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
  margin: 0;
  text-align: center;
}

.new-preaching-page .app-form {
  grid-template-columns: 1fr;
}

.new-preaching-page .app-form .wide,
.new-preaching-page .app-form .button {
  grid-column: 1;
}

.new-preaching-page .app-form label {
  min-height: 76px;
}

.new-preaching-page .app-form textarea {
  min-height: 118px;
}

.avatar-upload-form {
  margin: 0 0 14px;
}

.avatar-picker {
  cursor: pointer;
  display: inline-block;
  position: relative;
}

.avatar-picker input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.avatar-plus {
  align-items: center;
  background: var(--blue);
  border: 3px solid #fff;
  border-radius: 50%;
  bottom: 8px;
  box-shadow: 0 8px 18px rgba(18, 104, 229, 0.25);
  color: #fff;
  display: flex;
  font-size: 22px;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 2px;
  width: 34px;
}

.profile-head .avatar,
.profile-head .avatar-img {
  margin-bottom: 0;
}

.upload-panel {
  display: none !important;
}

/* Preaching detail */
.preaching-detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  padding: 20px;
}

.detail-icon {
  align-items: center;
  background: #e7f1ff;
  border-radius: 16px;
  color: var(--blue);
  display: flex;
  height: 62px;
  justify-content: center;
  margin-bottom: 16px;
  width: 62px;
}

.detail-icon svg,
.icon-library svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.detail-icon svg {
  height: 32px;
  width: 32px;
}

.preaching-detail-card h2 {
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.detail-ref {
  color: var(--blue);
  font-weight: 800;
  margin: 0 0 18px;
}

.preaching-detail-card dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.preaching-detail-card dl div {
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.preaching-detail-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}

.preaching-detail-card dd {
  color: var(--text);
  font-weight: 750;
  margin: 0;
}

.preaching-detail-card h3 {
  font-size: 15px;
  margin: 18px 0 8px;
}

.preaching-detail-card section p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.icon-library-panel {
  margin-top: 18px;
}

.icon-library {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.icon-library button {
  align-items: center;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #6f7d91;
  display: grid;
  font-weight: 850;
  gap: 6px;
  justify-items: center;
  min-height: 78px;
  padding: 10px 6px;
}

.icon-library button.active {
  background: #e7f1ff;
  border-color: #bed8ff;
  color: var(--blue);
}

.icon-library svg {
  height: 25px;
  width: 25px;
}

.icon-library span {
  color: inherit;
  font-size: 11px;
}

/* Editing, autosave, bible picker and nav avatar */
.mobile-form-header [data-save-status] {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.inline-fields {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
}

.inline-fields label {
  min-width: 0;
}

.bible-picker {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 1fr;
}

.bible-picker select {
  background: #f7fbff;
  min-height: 48px;
  padding: 10px 12px;
}

.note-shortcuts {
  display: flex;
  gap: 8px;
  margin-top: -6px;
}

.note-shortcuts button {
  background: #eef5ff;
  border: 1px solid #d6e5f7;
  border-radius: 999px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  min-height: 34px;
  padding: 0 12px;
}

.nav-avatar {
  border: 2px solid currentColor;
  border-radius: 50%;
  height: 28px;
  object-fit: cover;
  width: 28px;
}

.preaching-detail-page .app-form {
  grid-template-columns: 1fr;
}

.preaching-detail-page .app-form .wide,
.preaching-detail-page .app-form .button {
  grid-column: 1;
}

.icon-library button {
  cursor: pointer;
}

@media (max-width: 360px) {
  .bible-picker {
    grid-template-columns: 1fr;
  }
}

/* Inline Bible picker inside the field */
.bible-field {
  position: relative;
}

.bible-field .bible-picker[hidden] {
  display: none !important;
}

.bible-field .bible-picker {
  background: #ffffff;
  border: 1px solid #d8e4f0;
  border-radius: 14px;
  box-shadow: 0 16px 38px rgba(25, 52, 88, 0.16);
  display: grid;
  gap: 10px;
  left: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  position: absolute;
  right: 10px;
  top: calc(100% - 4px);
  z-index: 30;
}

.picker-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 2px 4px;
}

.picker-options {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.picker-options.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.picker-options button {
  background: #f3f8ff;
  border: 1px solid #dce8f5;
  border-radius: 10px;
  color: var(--text);
  font-weight: 800;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
}

.picker-options.compact button {
  text-align: center;
}

/* Ajustes finais: campos mobile, atalhos de anotacao e biblioteca de icones */
.app-form.grid-form.calm label {
  padding: 16px !important;
  gap: 8px;
}

.app-form.grid-form.calm input,
.app-form.grid-form.calm select,
.app-form.grid-form.calm textarea {
  min-height: 44px !important;
  padding: 8px 0 2px !important;
  line-height: 1.45;
}

.app-form.grid-form.calm textarea {
  min-height: 168px !important;
  padding-top: 10px !important;
}

.app-form .inline-fields label {
  padding: 14px !important;
}

.notes-field {
  gap: 12px !important;
}

.notes-label-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  width: 100%;
}

.notes-label-row > span:first-child {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
}

.notes-field .note-shortcuts {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin: 0;
}

.notes-field .note-shortcuts button {
  align-items: center;
  background: #eef5ff;
  border: 1px solid #d6e5f7;
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .notes-label-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .notes-field .note-shortcuts {
    justify-content: flex-start;
  }
}

/* Lixeira por usuario e acoes dos cards */
.note-card {
  overflow: hidden;
  padding: 0 !important;
  position: relative;
}

.note-card-main {
  align-items: center;
  color: inherit;
  display: grid;
  gap: 16px;
  grid-template-columns: 58px 1fr auto;
  min-height: 112px;
  padding: 17px 54px 17px 15px;
  text-decoration: none;
}

.note-card-main:hover,
.note-card-main:focus {
  text-decoration: none;
}

.card-action-form {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.card-action {
  align-items: center;
  background: #f7fbff;
  border: 1px solid #d7e5f7;
  border-radius: 999px;
  color: #50617a;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.card-action.danger {
  color: #d33b3b;
}

.card-action svg {
  height: 18px;
  width: 18px;
}

.trash-link svg {
  height: 22px;
  width: 22px;
}

.trash-card {
  opacity: 0.96;
}

.trash-card .note-icon {
  background: #f3f6fa;
  color: #6c7a8d;
}

.trash-page .empty-state {
  margin-top: 20px;
}

/* Correcoes mobile: padding dos campos e seletor biblico */
.app-form.grid-form.calm input,
.app-form.grid-form.calm select,
.app-form.grid-form.calm textarea {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.app-form.grid-form.calm textarea {
  padding: 12px !important;
}

.bible-field {
  overflow: visible !important;
  z-index: 5;
}

.bible-field .bible-picker {
  left: 12px !important;
  max-height: min(58vh, 430px) !important;
  overscroll-behavior: contain;
  right: 12px !important;
  top: calc(100% + 6px) !important;
  z-index: 80 !important;
}

.picker-options.book-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.picker-options button {
  cursor: pointer;
  line-height: 1.2;
  min-height: 42px;
  padding: 10px 12px;
}

@media (max-width: 420px) {
  .picker-options.book-grid {
    grid-template-columns: 1fr;
  }

  .bible-field .bible-picker {
    left: 8px !important;
    right: 8px !important;
  }
}

/* Lixeira somente no perfil e exclusao somente dentro da anotacao */
.profile-trash-button {
  align-items: center;
  color: #d33b3b !important;
  display: flex !important;
  gap: 10px;
}

.profile-trash-button svg {
  height: 20px;
  width: 20px;
}

.detail-delete-form {
  margin: 18px 0 96px;
}

.button.danger {
  align-items: center;
  background: #fff5f5;
  border: 1px solid #f1c5c5;
  color: #c92f2f;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.button.danger svg {
  height: 20px;
  width: 20px;
}

/* Campo bÃ­blico como seletor mobile, sem teclado */
.bible-field input[data-bible-target] {
  cursor: pointer;
  caret-color: transparent;
  user-select: none;
}

.picker-options.picker-list,
.picker-options.compact.picker-list {
  grid-template-columns: 1fr !important;
}

.picker-options.picker-list button {
  min-height: 46px;
  text-align: left !important;
  width: 100%;
}

/* CorreÃ§Ã£o do card apÃ³s remover exclusÃ£o da home */
.note-card-main {
  padding: 17px 15px !important;
}

.trash-card .note-card-main {
  padding-right: 58px !important;
}

.trash-detail-card {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.trash-detail-card .note-icon {
  height: 54px;
  width: 54px;
}

.trash-detail-card h2 {
  font-size: 20px;
  margin: 4px 0 0;
}

.trash-detail-card p {
  color: var(--muted);
  margin: 0;
}

.trash-note-body {
  background: #f7fbff;
  border: 1px solid #dce8f5;
  border-radius: 8px;
  color: var(--text);
  line-height: 1.5;
  margin-top: 6px;
  padding: 14px;
}

.detail-restore-form {
  margin: 18px 0 96px;
}

.detail-restore-form .button svg {
  height: 20px;
  width: 20px;
}

/* Home: botao + na mesma linha do nome */
.mobile-home .home-head-row {
  align-items: flex-start !important;
  display: flex !important;
  gap: 16px;
  justify-content: space-between;
  margin-top: 26px !important;
}

.mobile-home .home-head-row > div {
  min-width: 0;
}

.mobile-home .home-head-row .circle-button {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* Seletor biblico: voltar visivel */
.picker-title-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.picker-title-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.picker-title-row button {
  background: #eef5ff;
  border: 1px solid #d6e5f7;
  border-radius: 999px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  min-height: 30px;
  padding: 0 12px;
}

/* AÃ§Ãµes duplas no card da lixeira */
.card-action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.card-action-group .card-action-form {
  position: static;
}

.trash-card .note-card-main {
  padding-right: 58px !important;
}

/* CorreÃ§Ã£o visual final da home e cards */
.mobile-home .home-head-row.dashboard-head {
  align-items: center !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 60px !important;
  margin: 28px 0 22px !important;
  width: 100%;
}

.mobile-home .home-head-row h1 {
  margin-bottom: 6px !important;
}

.mobile-home .home-head-row .circle-button {
  align-self: start;
  justify-self: end;
  margin: 0 !important;
}

.mobile-home .note-card {
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.mobile-home .note-card-main {
  align-items: center !important;
  display: grid !important;
  gap: 14px !important;
  grid-template-columns: 74px minmax(0, 1fr) 24px !important;
  min-height: 118px !important;
  padding: 16px !important;
  width: 100%;
}

.mobile-home .note-card-main > div:nth-child(2) {
  min-width: 0;
}

.mobile-home .note-card strong,
.mobile-home .note-card p,
.mobile-home .note-card small {
  overflow-wrap: anywhere;
}

.mobile-home .note-card small {
  display: inline;
}

.mobile-home .card-arrow {
  justify-self: end;
}

.mobile-home .note-icon {
  height: 74px;
  width: 74px;
}

/* Seletor bÃ­blico centralizado */
.bible-field .bible-picker {
  background: #ffffff !important;
  border: 1px solid #d8e4f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 22px 60px rgba(14, 35, 66, 0.24) !important;
  display: grid !important;
  gap: 12px !important;
  left: 50% !important;
  max-height: min(74vh, 560px) !important;
  max-width: 520px !important;
  overflow: auto !important;
  padding: 14px !important;
  position: fixed !important;
  right: auto !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(calc(100vw - 32px), 520px) !important;
  z-index: 200 !important;
}

.bible-field .bible-picker[hidden] {
  display: none !important;
}

.picker-title-row {
  align-items: center !important;
  display: grid !important;
  gap: 10px !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  justify-content: stretch !important;
  position: sticky;
  top: -14px;
  background: #ffffff;
  padding: 2px 0 10px;
  z-index: 2;
}

.picker-title-row span {
  color: var(--navy) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-back-button,
.picker-title-row button {
  align-items: center !important;
  background: #eef5ff !important;
  border: 1px solid #d6e5f7 !important;
  border-radius: 999px !important;
  color: var(--blue) !important;
  display: inline-flex !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  height: 38px !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 !important;
  width: 38px !important;
}

.picker-options.book-grid,
.picker-options.picker-list {
  grid-template-columns: 1fr !important;
}

.picker-options button {
  min-height: 48px !important;
}

/* AnotaÃ§Ãµes sem rolagem interna: cresce com o conteÃºdo */
textarea[data-notes-area] {
  min-height: 220px !important;
  overflow: hidden !important;
  resize: none !important;
  scrollbar-width: none;
}

textarea[data-notes-area]::-webkit-scrollbar {
  display: none;
}

/* Seletor biblico em roleta de 5 linhas */
.bible-field .bible-picker {
  max-height: none !important;
  overflow: hidden !important;
  padding: 16px !important;
  width: min(calc(100vw - 34px), 430px) !important;
}

.bible-field .bible-picker .picker-title {
  color: var(--navy) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  padding: 0 4px 12px !important;
  text-align: center;
}

.picker-wheel {
  height: 260px;
  position: relative;
}

.picker-wheel::before {
  background: #eef5ff;
  border: 1px solid #d6e5f7;
  border-radius: 12px;
  content: "";
  height: 52px;
  left: 0;
  position: absolute;
  right: 0;
  top: 104px;
  z-index: 0;
}

.picker-wheel-back {
  align-items: center !important;
  background: var(--blue) !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  display: inline-flex !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  height: 38px !important;
  justify-content: center !important;
  left: 10px;
  padding: 0 !important;
  position: absolute;
  top: 111px;
  width: 38px !important;
  z-index: 3;
}

.picker-options.wheel-list {
  display: grid !important;
  gap: 0 !important;
  grid-template-columns: 1fr !important;
  height: 260px;
  overflow-y: auto;
  padding: 0 !important;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.picker-options.wheel-list::-webkit-scrollbar {
  display: none;
}

.picker-options.wheel-list button {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  display: flex;
  font-size: 16px !important;
  font-weight: 850 !important;
  height: 52px !important;
  justify-content: center;
  min-height: 52px !important;
  padding: 0 14px 0 58px !important;
  position: relative;
  scroll-snap-align: center;
  text-align: center !important;
  z-index: 1;
}

/* Seletor biblico mais aberto para leitura no celular */
.bible-field .bible-picker {
  max-width: 620px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  width: min(calc(100vw - 12px), 620px) !important;
}

.picker-wheel::before {
  left: 4px !important;
  right: 4px !important;
}

.picker-wheel-back {
  left: 14px !important;
}

.picker-options.wheel-list button {
  padding-left: 66px !important;
  padding-right: 18px !important;
}

@media (min-width: 720px) {
  .bible-field .bible-picker {
    max-width: 660px !important;
    width: min(92vw, 660px) !important;
  }
}

/* Compartilhamento da anotacao */
.detail-share-button {
  align-items: center;
  background: #19b864 !important;
  border: 0 !important;
  color: #ffffff !important;
  display: inline-flex;
  gap: 10px;
  justify-content: center;
  margin: 18px 0 0;
  min-height: 56px;
}

.detail-share-button svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.detail-share-button + .detail-delete-form {
  margin-top: 12px;
}

/* Logout no perfil */
.profile-logout-form {
  margin: 0;
}

.profile-logout-button {
  background: #fff5f5 !important;
  border: 1px solid #f2c8c8 !important;
  border-radius: 8px !important;
  color: #b42323 !important;
  cursor: pointer;
  font-weight: 900;
  justify-content: center !important;
  min-height: 52px;
  width: 100%;
}
