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

/**
 * Brand Colors - Manual de Marca
 * 
 * All color values were extracted from ManualMarca.pdf using automated extraction tools.
 * Colors have been applied consistently across all components.
 * 
 * Primary Colors:
 * - Primary Color (#005A7F - Dark Teal/Blue): Used for primary buttons, links, active states, focus indicators
 * - Primary Hover (#004A6B): Darker shade for hover states
 * - Accent Color (#FFCC00 - Yellow/Gold): Used for accent elements and highlights
 * - Black (#000000): Primary text color
 * 
 * Notes:
 * - Focus states and shadows have been updated to use the new primary color
 */
:root {
  /* Brand colors from ManualMarca.pdf */
  --primary-color: #005a7f; /* Dark Teal/Blue - Primary buttons, links, active states, focus indicators */
  --primary-hover: #004a6b; /* Darker shade for hover states */
  --accent-color: #ffcc00; /* Yellow/Gold - Accent elements, highlights */
  --success-color: #10b981;
  --error-color: #ef4444;
  --text-primary: #000000; /* Black - Primary text color */
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --transition: all 0.2s ease-in-out;
}

/**
 * Typography:
 * - Font Family: Red Hat Display
 * - Weights: 400 (Regular), 500 (Medium), 600 (Semi-bold), 700 (Bold)
 * - Imported from Google Fonts
 * - Applied globally via body element
 * 
 * Background Gradient:
 * The application background uses a gradient based on the primary color:
 * - Start: #005a7f (primary color)
 * - End: #003d5a (darker variant)
 */
body {
  font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #005a7f 0%, #003d5a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 1200px;
  padding: 40px;
  animation: fadeIn 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

header {
  text-align: center;
  margin-bottom: 32px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  text-align: left;
}

.app-header > div:first-child {
  flex: 1;
  text-align: left;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0;
  letter-spacing: -0.5px;
  line-height: 1;
}

.habitus-icon {
  position: relative;
}

.habitus-icon:hover {
  opacity: 0.9;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.user-form {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.required-asterisk {
  color: var(--error-color);
  font-weight: 600;
}

.field-help {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  padding: 0;
  margin: 0;
  font-weight: normal;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 90, 127, 0.1);
}

.form-group input::placeholder {
  color: var(--text-secondary);
}

.char-count {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: right;
}

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.message {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin: 0;
  font-size: 0.95rem;
  display: none;
  animation: slideInFromRight 0.3s ease-out;
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  min-width: 300px;
  z-index: 3000;
  box-shadow: var(--shadow-lg);
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.message-text {
  flex: 1;
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.message.show {
  display: flex;
}

.message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.message-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: var(--transition);
  flex-shrink: 0;
}

.message-close:hover {
  opacity: 1;
}

.user-profile {
  margin-top: 32px;
}

.user-profile h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.profile-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.profile-field {
  margin-bottom: 20px;
}

.profile-field:last-child {
  margin-bottom: 0;
}

.profile-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.profile-picture-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-md);
}

.profile-picture-initials {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 2rem;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-md);
}

.auth-form-container {
  width: 100%;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-form-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 0;
  transition: var(--transition);
}

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

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

.auth-form {
  margin-bottom: 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 16px;
}

.profile-picture-preview {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.preview-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.remove-image-btn {
  padding: 6px 16px;
  background: var(--error-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.remove-image-btn:hover {
  background: #dc2626;
}

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

.file-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-input-hidden {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-input-button {
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.file-input-button:hover:not(:disabled) {
  background: var(--primary-hover);
}

.file-input-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.file-input-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-input-hidden:focus + .file-input-button {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.welcome-message {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

main {
  position: relative;
  min-height: 100%;
}

.tabs-container {
  width: 100%;
}

.tabs-header {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1rem;
}

.tab-button {
  padding: 12px 24px;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tab-button:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

.tab-button {
  position: relative;
}

.tab-badge {
  position: absolute;
  top: -6px;
  right: 4px;
  background-color: var(--error-color);
  color: white;
  border-radius: 10px;
  min-width: 16px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0 6px;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  box-sizing: border-box;
}

.tab-badge-green {
  background-color: #d1fae5;
  color: #065f46;
}

.tabs-content {
  width: 100%;
}

.trackings-view,
.reminders-view {
  width: 100%;
  margin-bottom: 40px;
}

.fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #00c8ff;
  color: white;
  border: 2px solid transparent;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
}

.fab:hover {
  background: #00b0e6;
  transform: scale(1.1);
  box-shadow: 0 12px 20px -5px rgba(0, 200, 255, 0.4);
}

.fab:active {
  transform: scale(1.05);
}

@media (max-width: 640px) {
  .fab {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
}

.fab.notifications-button {
  background: var(--primary-color);
}

.fab.notifications-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 12px 20px -5px rgba(0, 90, 127, 0.4);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .container {
    padding: 24px;
  }

  header h1 {
    font-size: 2rem;
  }

  .message {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    min-width: auto;
  }
}
