:root {
  --bg:#f3eee5;
  --paper:#fbf8f2;
  --ink:#29241e;
  --muted:#80776c;
  --line:#dfd6c9;
  --brown:#5b4938;
}

* { box-sizing:border-box; }

html,body {
  margin:0;
  min-height:100%;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--ink);
  background:var(--bg);
}

button,input { font:inherit; }
button { cursor:pointer; }
[hidden] { display:none!important; }

.intro {
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  background:var(--bg);
  overflow:hidden;
  transition:opacity .25s ease;
}

.intro img {
  width:min(58vw,270px);
  height:auto;
  animation:logo-entrance 1.35s cubic-bezier(.2,.7,.2,1) forwards;
}

.intro.finished {
  opacity:0;
  pointer-events:none;
}

@keyframes logo-entrance {
  0% { transform:translateX(-110vw) scale(.65);opacity:0; }
  36% { transform:translateX(0) scale(1);opacity:1; }
  65% { transform:translateX(0) scale(1);opacity:1; }
  100% { transform:translateX(0) scale(7);opacity:0; }
}

.login-page {
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:24px 16px;
  animation:appear .45s ease both;
}

@keyframes appear {
  from { opacity:0;transform:translateY(12px); }
  to { opacity:1;transform:none; }
}

.login-card {
  width:min(100%,440px);
  padding:34px clamp(22px,6vw,44px) 27px;
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--paper);
  box-shadow:0 20px 70px #35281912;
  text-align:center;
}

.login-logo {
  display:block;
  width:118px;
  max-width:40%;
  height:auto;
  margin:0 auto 18px;
}

.eyebrow {
  color:var(--brown);
  font-size:10px;
  font-weight:800;
  letter-spacing:.25em;
}

.login-card h1 {
  font-size:clamp(26px,6vw,33px);
  letter-spacing:-.045em;
  margin:12px 0 7px;
}

.subtitle {
  font-size:14px;
  color:var(--muted);
  margin:0 0 30px;
}

form { text-align:left; }

label {
  display:block;
  font-size:12px;
  font-weight:800;
  margin:17px 0 8px;
}

input {
  width:100%;
  height:52px;
  padding:0 15px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fffdf9;
  color:var(--ink);
  outline:none;
  font-size:16px;
}

input:focus {
  border-color:var(--brown);
  box-shadow:0 0 0 3px #5b493819;
}

.password-field { position:relative; }
.password-field input { padding-right:54px; }

.password-field button {
  position:absolute;
  top:5px;
  right:6px;
  width:42px;
  height:42px;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:22px;
}

.enter {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  width:100%;
  height:54px;
  margin-top:25px;
  border:0;
  border-radius:11px;
  background:var(--ink);
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.17em;
}

.enter span { font-size:20px;font-weight:400; }
.enter:disabled { opacity:.65;cursor:wait; }

.error {
  color:#a52e2e;
  font-size:13px;
  line-height:1.4;
}

.signature {
  margin-top:29px;
  padding-top:21px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
  font-style:italic;
}

.dashboard {
  display:flex;
  flex-direction:column;
  min-height:100dvh;
}

.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:17px clamp(18px,4vw,56px);
  border-bottom:1px solid var(--line);
  background:#f8f4ed;
}

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

.brand img {
  width:48px;
  height:48px;
  object-fit:contain;
}

.brand strong {
  display:block;
  font-size:12px;
  letter-spacing:.14em;
}

.brand small {
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
}

.logout,.back {
  padding:12px 16px;
  border:1px solid var(--line);
  border-radius:10px;
  background:transparent;
  color:var(--ink);
  font-size:12px;
  font-weight:700;
}

.content {
  width:min(1180px,100%);
  flex:1;
  margin:0 auto;
  padding:clamp(25px,5vw,62px) clamp(16px,4vw,35px);
}

.content h1 {
  font-size:clamp(28px,5vw,48px);
  letter-spacing:-.055em;
  margin:12px 0;
}

.description {
  margin:0 0 33px;
  color:var(--muted);
  font-size:15px;
}

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

.tile {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-height:190px;
  padding:24px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--paper);
  color:var(--ink);
  text-align:left;
  transition:transform .18s,border-color .18s,box-shadow .18s;
}

.tile:hover,.tile:focus-visible {
  transform:translateY(-3px);
  border-color:#aa9681;
  box-shadow:0 12px 30px #35281910;
}

.icon {
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  margin-bottom:auto;
  border-radius:13px;
  background:#eee5d8;
  color:var(--brown);
  font-size:27px;
}

.tile strong {
  margin-top:17px;
  font-size:20px;
  letter-spacing:-.04em;
}

.tile small {
  margin-top:7px;
  color:var(--muted);
  font-size:12px;
}

.arrow {
  position:absolute;
  top:24px;
  right:22px;
  color:#9b8b78;
  font-size:20px;
}

.area-card {
  margin-top:18px;
  padding:35px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--paper);
}

.area-card h2 {
  margin:13px 0;
  font-size:34px;
}

.area-card p { color:var(--muted); }

footer {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:20px clamp(18px,4vw,56px);
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
}

@media(max-width:700px) {
  .menu {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:11px;
  }

  .tile {
    min-height:165px;
    padding:17px;
  }

  .tile strong { font-size:17px; }
  .tile small { font-size:11px;line-height:1.35; }

  .arrow { top:16px;right:16px; }

  .icon {
    width:43px;
    height:43px;
    font-size:25px;
  }
}

@media(max-width:340px) {
  .menu { grid-template-columns:1fr; }
  .tile { min-height:125px; }
}

@media(max-height:520px) and (orientation:landscape) {
  .login-page { padding:12px; }
  .login-card { padding-top:17px;padding-bottom:14px; }
  .login-logo { width:65px;margin-bottom:7px; }
  .login-card h1 { font-size:23px;margin:5px 0; }
  .subtitle { margin-bottom:10px; }
  label { margin:9px 0 5px; }
  input { height:42px; }
  .password-field button { top:0; }
  .enter { height:44px;margin-top:14px; }
  .signature { margin-top:12px;padding-top:10px; }
  .menu { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .tile { min-height:135px; }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.01ms!important;
    transition-duration:.01ms!important;
  }
}


/* LIBORIUS_CATALOGO_V1 */

.catalog-intro,
.catalog-help {
  color:var(--muted);
  line-height:1.5;
}

.catalog-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:20px 0;
}

.action-button,
.secondary-button {
  border-radius:11px;
  padding:13px 17px;
  font-size:13px;
  font-weight:700;
}

.action-button {
  border:1px solid var(--ink);
  background:var(--ink);
  color:white;
}

.secondary-button {
  border:1px solid var(--line);
  background:#fffdf9;
  color:var(--ink);
}

button:disabled {
  opacity:.55;
  cursor:wait;
}

.product-list {
  display:grid;
  gap:12px;
  margin:18px 0;
}

.product-row {
  display:flex;
  align-items:center;
  gap:15px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fffdf9;
}

.product-thumb {
  width:72px;
  height:72px;
  object-fit:cover;
  border-radius:10px;
  background:var(--bg);
}

.product-info {
  display:grid;
  gap:6px;
  flex:1;
  min-width:0;
}

.product-info strong {
  overflow-wrap:anywhere;
}

.product-info small {
  color:var(--muted);
}

.status-on {
  color:#28754b;
  font-size:12px;
  font-weight:700;
}

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

.stock-alert,
.catalog-error {
  color:#ae3535!important;
}

#product-form {
  margin-top:25px;
  padding-top:20px;
  border-top:1px solid var(--line);
}

#product-form h3 {
  font-size:24px;
}

#product-form textarea {
  width:100%;
  padding:14px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fffdf9;
  color:var(--ink);
  font:inherit;
  font-size:16px;
  resize:vertical;
}

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

.publish-toggle {
  display:flex;
  align-items:center;
  gap:12px;
  padding:17px;
  margin-top:23px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#eee5d8;
  font-size:14px;
}

.publish-toggle input {
  width:22px;
  height:22px;
  flex:none;
}

#catalog-message {
  font-size:13px;
  font-weight:700;
}

@media(max-width:600px) {
  .area-card {
    padding:20px 15px;
  }

  .area-card h2 {
    font-size:28px;
  }

  .product-row {
    flex-wrap:wrap;
  }

  .product-info {
    flex-basis:calc(100% - 90px);
  }

  .product-row > button {
    margin-left:auto;
  }

  .form-grid {
    grid-template-columns:1fr;
  }
}
