/* Carnivor Pet Food — estilos del portal */
/* Tipografías alojadas en el propio servidor (licencia OFL) */
@font-face { font-family: 'Fredoka One'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/fredoka-one-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/nunito-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2'); }
:root {
  --ink: #0A0A0A; --orange: #F5A623; --amber: #E8891A; --amber-ink: #8F5300;
  --cream: #FFF7EA; --sand: #F6E9D2; --line: #EADBC0; --muted: #5C5445;
  --green: #1F6B43; --blue: #1D4F91; --red: #A32B1F;
  --display: 'Fredoka One', 'Fredoka', 'Trebuchet MS', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: var(--cream); line-height: 1.5; }
h1, h2, h3, h4, .disp { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .2px; line-height: 1.15; }
h1 { font-size: 40px; } h2 { font-size: 26px; } h3 { font-size: 22px; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 26px; }
.row-flex { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent; font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; }
.btn-p { background: var(--orange); color: var(--ink); }
.btn-p:hover { background: #FFB93F; }
.btn-d { background: var(--ink); color: #fff; }
.btn-d:hover { background: #2a2a2a; }
.btn-o { background: transparent; border-color: currentColor; color: inherit; }
.btn-o:hover { background: rgba(245, 166, 35, .16); }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: #fbe9e6; }
.btn-s { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--amber-ink); font-weight: 800; text-decoration: underline; min-height: 32px; }
.inline-form { display: inline; margin: 0; }

/* tarjetas y chips */
.card { background: #fff; border: 1.5px solid var(--line); border-radius: 22px; padding: 22px; }
.card-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--sand); color: var(--muted); white-space: nowrap; }
.s-prog { background: #FFE9C2; color: #7A4700; }
.s-prep { background: #E7ECF7; color: #1D4F91; }
.s-road { background: #D8E8FA; color: #123F78; }
.s-done { background: #DCF1E4; color: #1F6B43; }
.s-canc { background: #EEE8DC; color: #6b6355; text-decoration: line-through; }
.t-vacuna { background: #DCF1E4; color: #1F6B43; }
.t-consulta { background: #D8E8FA; color: #123F78; }
.t-despar { background: #FFE9C2; color: #7A4700; }
.t-examen { background: #EBDDF7; color: #5A2A86; }
.t-otro { background: var(--sand); color: var(--muted); }
.chip-paid { background: #DCF1E4; color: #1F6B43; }
.chip-unpaid { background: #FBE3DF; color: #8C241A; }

.av { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 26px; flex: none; }
.av0 { background: var(--orange); color: var(--ink); }
.av1 { background: #FFD58A; color: var(--ink); }
.av2 { background: var(--ink); color: var(--orange); }
.av-lg { width: 88px; height: 88px; font-size: 42px; }
.av-sm { width: 40px; height: 40px; font-size: 20px; }

/* formularios */
.fl { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 13.5px; color: #3d372c; }
.in { min-height: 46px; padding: 0 14px; border-radius: 14px; border: 1.5px solid #D9C7A5; background: #fff; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); width: 100%; }
select.in { padding-right: 8px; }
textarea.in { padding: 12px 14px; min-height: 84px; resize: vertical; }
input[type=file].in { padding: 10px 12px; }
.hint { font-weight: 600; font-size: 12.5px; color: var(--muted); }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span2 { grid-column: span 2; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 14.5px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--amber); flex: none; }
.radios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.radio { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid #D9C7A5; border-radius: 14px; background: #fff; font-weight: 800; cursor: pointer; }
.radio input { position: absolute; opacity: 0; }
.radio:has(input:checked) { border-color: var(--ink); background: #FFF0D2; box-shadow: 0 0 0 2px var(--orange); }
.radio:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; }
.radio span { font-weight: 600; font-size: 12.5px; color: var(--muted); }

.alert { padding: 14px 18px; border-radius: 16px; font-weight: 700; border: 1.5px solid; }
.alert-ok { background: #E6F5EC; border-color: #A8D8BB; color: #14502F; }
.alert-err { background: #FCEBE8; border-color: #EFB4AB; color: #7E1F15; }
.alert ul { margin: 0; padding-left: 20px; }

/* landing */
.l-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 48px; background: var(--ink); color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-txt b { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--orange); }
.brand-txt i { font-style: normal; font-size: 11px; letter-spacing: 3px; font-weight: 800; color: #fff; }
.l-nav { display: flex; gap: 26px; font-weight: 700; font-size: 15px; }
.l-nav a { text-decoration: none; color: #e9e2d3; }
.l-nav a:hover { color: var(--orange); }
.hero { background: var(--ink); color: #fff; padding: 56px 48px 88px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.hero h1 { font-size: 64px; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--orange); }
.book { background: var(--cream); color: var(--ink); border-radius: 28px; padding: 24px; transform: rotate(2deg); box-shadow: 0 24px 60px rgba(245, 166, 35, .28); border: 3px solid var(--orange); }
.sec { padding: 72px 48px; }
.sec-dark { background: var(--ink); color: #fff; }
.sec-sand { background: var(--sand); }
.kicker { font-weight: 800; font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--amber-ink); }
.sec-dark .kicker, .hero .kicker { color: var(--orange); }
.price { font-family: var(--display); font-size: 34px; }
.sec h2.big { font-size: 44px; }
.l-foot { background: var(--ink); color: #e9e2d3; padding: 32px 48px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.l-foot a { color: var(--orange); font-weight: 800; }

/* auth */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-l { background: var(--ink); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-l h1 { font-size: 52px; line-height: 1.05; }
.auth-r { padding: 40px 56px; display: flex; align-items: center; justify-content: center; }
.auth-box { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 18px; }

/* portal */
.portal { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: var(--ink); color: #fff; padding: 24px 18px; display: flex; flex-direction: column; gap: 26px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.nv { display: block; text-align: left; text-decoration: none; background: transparent; border: 0; color: #e9e2d3; font-weight: 800; font-size: 15.5px; padding: 12px 16px; border-radius: 14px; min-height: 44px; }
.nv:hover { background: #1c1c1c; }
.nv-on { background: var(--orange); color: var(--ink); }
.nv-on:hover { background: var(--orange); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: #cfc7b6; word-break: break-word; }
.side-foot b { color: #fff; }
.main { flex: 1; min-width: 0; padding: 36px 40px 64px; display: flex; flex-direction: column; gap: 26px; max-width: 1180px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; font-size: 16px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; text-decoration: none; border: 1.5px solid #D9C7A5; background: #fff; border-radius: 999px; padding: 0 18px; min-height: 40px; font-weight: 800; font-size: 14px; color: #3d372c; }
.pill:hover { border-color: var(--amber); }
.pill-on { background: var(--ink); border-color: var(--ink); color: var(--orange); }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dog-card { display: flex; flex-direction: column; gap: 14px; }
.add-card { border: 2px dashed var(--amber); background: transparent; border-radius: 22px; min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--amber-ink); font-weight: 800; font-size: 16px; text-decoration: none; }
.add-card:hover { background: rgba(245, 166, 35, .12); }
.tl { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; padding: 18px 0; border-top: 1.5px dashed var(--line); }
.tl:first-child { border-top: 0; }
.file { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: var(--cream); border: 1.5px solid var(--line); font-weight: 700; font-size: 13px; color: #3d372c; text-decoration: none; }
.file:hover { border-color: var(--amber); }
.files { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { padding: 20px 0; color: var(--muted); }
details.more { display: inline-block; position: relative; }
details.more summary { list-style: none; cursor: pointer; }
details.more summary::-webkit-details-marker { display: none; }
details.more .menu { position: absolute; right: 0; top: 40px; z-index: 5; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 190px; box-shadow: 0 12px 30px rgba(0, 0, 0, .12); }

/* calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.cal-c { min-height: 60px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; font-weight: 800; font-size: 14px; color: var(--ink); text-decoration: none; }
a.cal-c:hover { border-color: var(--amber); background: #FFF6E3; }
.cal-off { background: #F5EFE3; color: #9b917f; border-color: transparent; }
.cal-blank { border: 0; background: transparent; }
.cal-today { border-color: var(--ink); }
.cal-has { background: #FFE9C2; border-color: var(--orange); }
.cal-dot { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: #7A4700; }
.cal-dot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }

/* admin */
.adm { background: #F4F1EA; min-height: 100vh; }
.adm-h { background: var(--ink); color: #fff; padding: 14px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adm-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-nav a { text-decoration: none; padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #e9e2d3; }
.adm-nav a:hover { background: #1c1c1c; }
.adm-nav a.on { background: var(--orange); color: var(--ink); }
.adm-b { padding: 32px 40px 64px; display: flex; flex-direction: column; gap: 24px; max-width: 1400px; margin: 0 auto; }
.stat { background: #fff; border-radius: 20px; padding: 20px; border: 1.5px solid #E2DCCB; display: flex; flex-direction: column; gap: 4px; }
.stat span { font-weight: 800; color: var(--muted); }
.stat b { font-family: var(--display); font-weight: 400; font-size: 40px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; padding: 12px 16px; border-bottom: 1.5px solid #E2DCCB; white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1.5px solid #EFE9DA; vertical-align: top; font-weight: 600; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .name { font-weight: 800; }
.tbl .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.tbl-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.searchbar { display: flex; gap: 10px; flex-wrap: nowrap; align-items: center; }
.searchbar .in { max-width: 340px; }

/* error */
.err-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--ink); color: #fff; }
.err-box { max-width: 520px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.err-box .code { font-family: var(--display); font-size: 96px; color: var(--orange); line-height: 1; }

.prose { max-width: 760px; display: flex; flex-direction: column; gap: 14px; line-height: 1.65; }
.prose h2 { margin-top: 12px; }

@media (max-width: 900px) {
  h1 { font-size: 32px; }
  .l-head { padding: 14px 20px; }
  .l-nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 36px 20px 56px; gap: 32px; }
  .hero h1 { font-size: 42px; }
  .sec { padding: 48px 20px; }
  .sec h2.big { font-size: 34px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-l { padding: 28px 20px; }
  .auth-l h1 { font-size: 34px; }
  .auth-r { padding: 28px 20px 48px; }
  .portal { flex-direction: column; }
  .side { width: auto; padding: 14px 16px; gap: 10px; }
  .side-nav { flex-direction: row; overflow-x: auto; }
  .nv { white-space: nowrap; }
  .side-foot { display: none; }
  .main { padding: 24px 16px 56px; }
  .formgrid { grid-template-columns: 1fr; }
  .span2 { grid-column: span 1; }
  .radios { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 1fr; gap: 8px; }
  .adm-h { padding: 14px 16px; }
  .searchbar { flex-wrap: wrap; }
  .adm-b { padding: 24px 16px 56px; }
  .l-foot { padding: 28px 20px; }
}
