/* ============================================================
   LAK Rincón Deli · Portal Corporativo
   Paleta de marca, fondo siempre claro.
   ============================================================ */

:root {
  --bg:           #faf6ef;
  --bg-card:      #ffffff;
  --bg-soft:      #f3ecdf;
  --border:       #e6dcc8;
  --border-dk:    #c9bb9c;
  --primary:      #8b2d3e;
  --primary-dk:   #6b2230;
  --primary-soft: #f3dde1;
  --secondary:    #c2882a;
  --secondary-soft: #f6ead3;
  --accent:       #5b7a4f;
  --accent-soft:  #e1ecdc;
  --text:         #2a221c;
  --text-2:       #5a4f44;
  --muted:        #908577;
  --danger:       #b03a3a;
  --danger-soft:  #f7d7d7;
  --shadow:       0 4px 16px rgba(42, 34, 28, .08);
  --shadow-lg:    0 20px 60px rgba(42, 34, 28, .15);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----------------------- LOGIN ----------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
}
.brand-name {
  font-size: 22px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: .5px;
}
.brand-tag {
  font-size: 13px;
  color: var(--text-2);
  font-style: italic;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.public-nav-links a {
  color: var(--text-2);
  transition: color .15s;
}
.public-nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-pill {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.login-hero {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background:
    radial-gradient(circle at center, rgba(0,0,0,.0) 0%, rgba(0,0,0,.35) 100%),
    linear-gradient(135deg, #3a2520 0%, #5a3530 50%, #3a2520 100%);
  overflow: hidden;
}

/* Placeholder decorativo del florero (se reemplaza por <img> real cuando llegue) */
.hero-placeholder {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 320px;
  opacity: .18;
  pointer-events: none;
}

.login-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}

.login-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  color: var(--primary);
  font-weight: 600;
  text-align: center;
  margin: 0 0 6px;
}
.login-subtitle {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2.5px;
  text-align: center;
  margin: 0 0 28px;
  text-transform: uppercase;
}

.field { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
}
.field-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.field-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  margin-top: 4px;
  font-family: inherit;
}
.btn-primary:hover { background: var(--primary-dk); }
.btn-primary:active { transform: scale(.98); }

.login-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  text-align: center;
}

.public-foot {
  padding: 14px 32px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ----------------------- DASHBOARD ----------------------- */
.dash-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-brand-mark {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
}
.dash-brand-text {
  display: flex; flex-direction: column;
}
.dash-brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.dash-brand-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dash-user {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
}
.dash-user-info { text-align: right; }
.dash-user-name { color: var(--text); font-weight: 500; }
.dash-user-rol { color: var(--muted); font-size: 11px; }

.dash-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 500;
  font-size: 13px;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--bg); border-color: var(--border-dk); }

.dash-welcome {
  padding: 32px 24px 16px;
}
.dash-welcome-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  color: var(--text);
  margin: 0 0 4px;
  font-weight: 500;
}
.dash-welcome-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 8px 24px 32px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .15s, box-shadow .2s;
  display: block;
}
.app-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.app-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  fill: none;
}
.app-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.app-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.dash-foot {
  margin-top: auto;
  padding: 14px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

@media (max-width: 600px) {
  .public-nav, .dash-header { padding: 14px 18px; }
  .public-nav-links { gap: 14px; }
  .login-card { padding: 32px 24px; }
  .apps-grid { padding: 8px 18px 24px; grid-template-columns: 1fr; }
}

/* === Acceso al Panel Admin (solo ADMIN/SOCIA) === */
.btn-admin {
  background: rgba(139, 45, 62, 0.08) !important;
  border-color: rgba(139, 45, 62, 0.2) !important;
  color: #8b2d3e !important;
  font-weight: 500;
}
.btn-admin:hover {
  background: rgba(139, 45, 62, 0.15) !important;
  border-color: rgba(139, 45, 62, 0.35) !important;
}

.admin-strip {
  margin: 8px 24px 24px;
  max-width: 1320px;
}
.admin-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: #fff;
  border: 1px dashed #e6dcc8;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: all .15s ease;
}
.admin-link:hover {
  border-color: #8b2d3e;
  background: #fffbf8;
}
.admin-icon {
  width: 40px;
  height: 40px;
  background: rgba(139, 45, 62, 0.08);
  color: #8b2d3e;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.admin-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.admin-sub {
  font-size: 12px;
  color: var(--muted);
}
.admin-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
  transition: transform .15s ease;
}
.admin-link:hover .admin-arrow {
  color: #8b2d3e;
  transform: translateX(3px);
}

@media (max-width: 600px) {
  .admin-strip { margin: 8px 18px 20px; }
}
