* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f5f6f8;
  color: #1f2937;
}

header {
  min-height: 62px;
  background: #111827;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

header a,
header .link-button {
  color: white;
}

main {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 18px;
}

.narrow {
  max-width: 650px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(420px, 100%);
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0,0,0,.08);
}

.login-card h1 {
  margin-bottom: 0;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

button,
.button {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 600;
}

.login-card button {
  width: 100%;
  margin-top: 22px;
}

.primary {
  background: #2563eb;
  color: white;
}

.link-button {
  background: none;
  padding: 0;
}

.cards {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 3px 14px rgba(0,0,0,.06);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 750;
  margin-bottom: 12px;
}

.card-actions,
.top-actions,
.product-header,
.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.stats {
  color: #6b7280;
  margin-bottom: 14px;
}

.status {
  display: inline-block;
  margin: 8px 0;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 700;
}

.status-pending {
  background: #fff7ed;
}

.status-received {
  background: #ecfdf5;
}

.status-delivered {
  background: #eff6ff;
}

.muted {
  color: #6b7280;
}

.muted-light {
  color: #cbd5e1;
}

.small {
  font-size: .85rem;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  margin: 16px 0;
}

.error {
  background: #fee2e2;
  color: #991b1b;
}

.success {
  background: #dcfce7;
  color: #166534;
}

.table-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: #f9fafb;
}

.empty {
  background: white;
  padding: 30px;
  border-radius: 12px;
  color: #6b7280;
}

@media (max-width: 600px) {
  main {
    margin-top: 20px;
  }

  .card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .card-actions .button,
  .card-actions form,
  .card-actions button {
    width: 100%;
    text-align: center;
  }
}

.register-button {
  width: 100%;
  margin-top: 12px;
  background: white;
  border: 1px solid #d1d5db;
  color: #374151;
}

.register-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

input[type="number"],
input[type="date"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
}

.create-product-button {
  width: 100%;
  margin-top: 24px;
}

.message-preview {
  margin-top: 20px;
}

.message-preview pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  line-height: 1.55;
  background: #f9fafb;
  border-radius: 10px;
  padding: 16px;
}

/* ===== IDENTIDAD EL PARAÍSO FRIKI ===== */

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.login-brand-text h1 {
  margin: 0 0 8px 0;
}

.login-brand-text p {
  margin: 0;
}

.login-logo {
  width: 115px;
  height: 115px;
  object-fit: cover;
  border-radius: 18px;
  flex-shrink: 0;
  box-shadow: 0 7px 20px rgba(0,0,0,.20);
}

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

.header-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  margin-left: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
}

@media (max-width: 600px) {
  .login-logo {
    width: 90px;
    height: 90px;
  }

  .header-logo {
    width: 40px;
    height: 40px;
  }
}
