/* ==========================================================================
   GraveCare Chile - Hoja de Estilos Principal
   Dominio: gravecare.cl
   ========================================================================== */

:root {
  --primary-color: #1a3636;
  --primary-hover: #122525;
  --secondary-color: #40534c;
  --accent-gold: #c19a5b;
  --accent-gold-hover: #a88448;
  --bg-light: #f7f9f8;
  --surface-color: #ffffff;
  --text-main: #222222;
  --text-muted: #666666;
  --border-color: #dcdfdc;
  --danger-color: #c53030;
  --success-color: #276749;
  --info-color: #2b6cb0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Barra de Navegación */
.navbar {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--primary-color);
}

.nav-brand .logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-brand .logo-badge {
  font-size: 0.75rem;
  background-color: var(--accent-gold);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent-gold);
}

/* Contenedor Principal */
.main-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.content-wrapper {
  width: 100%;
  max-width: 520px;
}

/* Tarjeta / Card de Formulario */
.auth-card {
  background-color: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Formularios */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.35rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(193, 154, 91, 0.2);
}

.input-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.input-error {
  font-size: 0.8rem;
  color: var(--danger-color);
  margin-top: 0.3rem;
  display: none;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-decoration: none;
  font-family: inherit;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #fff;
}

.btn-gold:hover {
  background-color: var(--accent-gold-hover);
}

.btn-outline {
  background-color: transparent;
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Alertas y Mensajes */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: none;
}

.alert-danger {
  background-color: #fff5f5;
  color: var(--danger-color);
  border: 1px solid #feb2b2;
}

.alert-success {
  background-color: #f0fff4;
  color: var(--success-color);
  border: 1px solid #9ae6b4;
}

.alert-info {
  background-color: #ebf8ff;
  color: var(--info-color);
  border: 1px solid #bee3f8;
}

/* Links secundarios */
.auth-footer-links {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-footer-links a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer-links a:hover {
  text-decoration: underline;
}

/* Dashboard & Perfil */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.profile-field {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

.profile-field:last-child {
  border-bottom: none;
}

.profile-field .field-name {
  font-weight: 600;
  color: var(--text-muted);
}

.profile-field .field-value {
  font-weight: 500;
  color: var(--primary-color);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.activa {
  background-color: #c6f6d5;
  color: #22543d;
}

.status-badge.pendiente {
  background-color: #feebc8;
  color: #744210;
}

.status-badge.inactiva {
  background-color: #fed7d7;
  color: #742a2a;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: #e2e8f0;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  margin-top: auto;
}

.footer a {
  color: var(--accent-gold);
  text-decoration: none;
}
