/* ===== Variables McDonald's ===== */
:root {
  --mcdo-red: #DA291C;
  --mcdo-yellow: #FFC72C;
  --mcdo-dark: #27251F;
  --mcdo-gold: #FFBC0D;
  --primary: #DA291C;
  --primary-dark: #b71c1c;
  --secondary: #FFC72C;
  --accent: #FFBC0D;
  --success: #27ae60;
  --danger: #DA291C;
  --dark: #27251F;
  --gray-900: #1a1a1a;
  --gray-800: #2d2d2d;
  --gray-700: #4a4a4a;
  --gray-600: #6b6b6b;
  --gray-500: #9a9a9a;
  --gray-400: #c4c4c4;
  --gray-300: #e0e0e0;
  --gray-200: #f0f0f0;
  --gray-100: #f8f8f8;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  color: var(--gray-800);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hidden {
  display: none !important;
}

/* ===== Header ===== */
.header {
  text-align: center;
  padding: 40px 20px;
}

.header-compact {
  padding: 20px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.logo-mcdo {
  height: 50px;
  width: auto;
}

.logo h1 {
  font-size: 1.8rem;
  color: var(--dark);
  font-weight: 700;
}

.tagline {
  color: var(--gray-600);
  margin-top: 8px;
  font-size: 1.1rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--mcdo-red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--mcdo-yellow);
  color: var(--dark);
}

.btn-secondary:hover {
  background: var(--mcdo-gold);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--mcdo-red);
  color: var(--mcdo-red);
}

.btn-outline:hover {
  background: var(--mcdo-red);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: #b71c1c;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  transition: transform 0.2s;
}

.btn-icon:hover {
  transform: scale(1.2);
}

.btn-icon-danger:hover {
  color: var(--danger);
}

/* ===== Cards ===== */
.intro-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 30px;
  border-top: 4px solid var(--mcdo-yellow);
}

.intro-card h2 {
  color: var(--dark);
  margin-bottom: 12px;
}

.intro-card p {
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Access Section ===== */
.access-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.access-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--mcdo-red);
}

.access-card.manager {
  border-top-color: var(--mcdo-yellow);
}

.access-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.access-card h3 {
  color: var(--dark);
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.access-card p {
  color: var(--gray-600);
  margin-bottom: 20px;
}

.access-card .btn {
  width: 100%;
  margin-bottom: 10px;
}

.code-form {
  display: flex;
  gap: 10px;
}

.code-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  text-transform: uppercase;
  transition: border-color 0.2s;
}

.code-form input:focus {
  outline: none;
  border-color: var(--mcdo-yellow);
}

.hint {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-top: 12px;
}

/* ===== Features ===== */
.features {
  margin-top: 40px;
}

.features h2 {
  text-align: center;
  color: var(--dark);
  margin-bottom: 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--mcdo-yellow);
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.feature h4 {
  color: var(--dark);
  margin-bottom: 8px;
}

.feature p {
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* ===== Vote Page ===== */
.vote-page {
  background: linear-gradient(180deg, var(--mcdo-red) 0%, var(--dark) 100%);
  min-height: 100vh;
}

.vote-page .header {
  padding: 20px;
}

.vote-page .logo h1 {
  color: var(--white);
}

.vote-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.vote-section,
.details-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.site-name {
  background: var(--mcdo-yellow);
  color: var(--dark);
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 20px;
}

.vote-section h2,
.details-section h2 {
  color: var(--dark);
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.vote-subtitle {
  color: var(--gray-500);
  margin-bottom: 30px;
}

/* ===== Mood Selector ===== */
.mood-selector {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mood-btn {
  background: var(--gray-100);
  border: 3px solid transparent;
  border-radius: var(--radius);
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
}

.mood-btn:hover {
  transform: scale(1.1);
  background: var(--gray-200);
}

.mood-btn.selected {
  border-color: var(--mcdo-yellow);
  background: var(--mcdo-yellow);
  transform: scale(1.15);
}

.mood-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.mood-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 600;
}

/* ===== Details Form ===== */
.details-form {
  text-align: left;
  margin-bottom: 24px;
}

.details-form .form-group {
  margin-bottom: 20px;
}

.details-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--dark);
  font-weight: 600;
}

.details-form input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.details-form input:focus {
  outline: none;
  border-color: var(--mcdo-yellow);
}

.form-hint {
  color: var(--gray-500);
  font-size: 0.8rem;
  margin-top: 4px;
}

.details-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ===== Phrases ===== */
.phrases-container {
  margin-top: 12px;
}

.phrase-category {
  margin-bottom: 16px;
}

.phrase-category-label {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 8px;
  font-weight: 500;
}

.phrase-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phrase-chip {
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.phrase-chip:hover {
  border-color: var(--mcdo-yellow);
  background: var(--gray-200);
}

.phrase-chip.selected {
  background: var(--mcdo-yellow);
  border-color: var(--mcdo-yellow);
  color: var(--dark);
}

/* ===== Confirmation ===== */
.confirm-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.confirm-animation {
  margin-bottom: 20px;
}

.confirm-mood {
  font-size: 5rem;
  display: inline-block;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.confirm-title {
  color: var(--success);
  margin-bottom: 12px;
}

.confirm-message {
  color: var(--gray-700);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.citation-card {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--mcdo-yellow);
  text-align: left;
}

.citation-card blockquote {
  font-style: italic;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.citation-card cite {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* ===== Error & Already Voted ===== */
.error-section,
.already-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.error-icon,
.already-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
}

.error-section h2 {
  color: var(--danger);
}

.already-section h2 {
  color: var(--success);
}

/* ===== Dashboard Layout ===== */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--dark);
  color: var(--white);
  padding: 24px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.sidebar-header .logo-mcdo {
  height: 40px;
}

.sidebar-header h2 {
  font-size: 1.1rem;
  color: var(--mcdo-yellow);
}

.sidebar-nav {
  margin-bottom: 32px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--gray-400);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  margin-bottom: 4px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.nav-link.active {
  background: var(--mcdo-red);
  color: var(--white);
}

.nav-icon {
  font-size: 1.2rem;
}

.sidebar-sites h3,
.sidebar-period h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.site-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 0.9rem;
}

.site-select option {
  background: var(--dark);
}

.sidebar-period {
  margin-top: 24px;
}

.period-buttons {
  display: flex;
  gap: 8px;
}

.period-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: var(--gray-400);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.period-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.period-btn.active {
  background: var(--mcdo-yellow);
  color: var(--dark);
}

/* ===== Dashboard Main ===== */
.dashboard-main,
.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-header h1 {
  color: var(--dark);
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* ===== KPI Cards ===== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--mcdo-yellow);
}

.kpi-icon {
  font-size: 2.5rem;
}

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
}

.kpi-label {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.alert-card.alert-active {
  background: #fff5f5;
  border-left-color: var(--danger);
}

.alert-card.alert-active .kpi-value {
  color: var(--danger);
}

/* ===== Weather Display ===== */
.weather-row {
  margin-bottom: 24px;
}

.weather-card {
  background: linear-gradient(135deg, var(--mcdo-red) 0%, var(--dark) 100%);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--white);
  text-align: center;
}

.weather-card h3 {
  margin-bottom: 20px;
  font-size: 1rem;
  opacity: 0.9;
}

.weather-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.weather-display .weather-icon {
  font-size: 5rem;
}

.weather-label {
  font-size: 2rem;
  font-weight: 700;
}

.weather-description {
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Votes List ===== */
.votes-row {
  margin-bottom: 24px;
}

.votes-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.votes-card h3 {
  color: var(--dark);
  margin-bottom: 16px;
}

.recent-votes-list {
  max-height: 400px;
  overflow-y: auto;
}

.vote-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--gray-200);
}

.vote-item:last-child {
  border-bottom: none;
}

.vote-mood {
  font-size: 1.5rem;
}

.vote-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vote-pseudo {
  font-weight: 600;
  color: var(--dark);
}

.vote-phrase {
  color: var(--gray-600);
  font-style: italic;
  font-size: 0.9rem;
}

.vote-anon {
  color: var(--gray-500);
  font-size: 0.85rem;
}

.vote-meta {
  color: var(--gray-500);
  font-size: 0.8rem;
}

.no-votes {
  color: var(--gray-500);
  text-align: center;
  padding: 20px;
}

/* ===== No Data ===== */
.no-data-message {
  text-align: center;
  padding: 60px 20px;
}

.no-data-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
}

.no-data-message h2 {
  color: var(--dark);
  margin-bottom: 12px;
}

.no-data-message p {
  color: var(--gray-600);
  margin-bottom: 24px;
}

/* ===== Admin Page ===== */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: var(--mcdo-yellow);
}

.tab-btn.active {
  background: var(--mcdo-yellow);
  border-color: var(--mcdo-yellow);
  color: var(--dark);
}

.admin-section {
  margin-bottom: 32px;
}

.admin-section h2 {
  color: var(--dark);
  margin-bottom: 16px;
}

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.create-form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 200px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-700);
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--mcdo-yellow);
}

/* ===== Sites Grid ===== */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.site-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--mcdo-yellow);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.site-header h3 {
  color: var(--dark);
}

.site-code {
  background: var(--gray-100);
  color: var(--mcdo-red);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
}

.site-code.clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.site-code.clickable:hover {
  background: var(--mcdo-yellow);
  color: var(--dark);
}

.site-info {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.site-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.no-sites {
  text-align: center;
  padding: 40px;
  color: var(--gray-500);
}

.no-sites-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

/* ===== Phrases Admin ===== */
.phrases-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phrase-group h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.phrase-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phrase-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
}

.phrase-item.disabled {
  opacity: 0.5;
}

.phrase-text {
  flex: 1;
}

.phrase-actions {
  display: flex;
  gap: 8px;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
}

.modal-danger {
  border-top: 4px solid var(--danger);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
}

.modal-content h2 {
  color: var(--dark);
  margin-bottom: 20px;
}

.qr-container {
  margin-bottom: 16px;
}

.qr-container img {
  max-width: 250px;
  border-radius: var(--radius-sm);
}

.qr-url {
  color: var(--gray-500);
  font-size: 0.875rem;
  word-break: break-all;
  margin-bottom: 8px;
}

.qr-code-text {
  color: var(--gray-700);
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.vote-page .footer {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .dashboard-main,
  .admin-main {
    margin-left: 0;
  }

  .create-form {
    flex-direction: column;
  }

  .mood-selector {
    gap: 8px;
  }

  .mood-btn {
    min-width: 60px;
    padding: 12px 8px;
  }

  .mood-icon {
    font-size: 2rem;
  }

  .access-section {
    grid-template-columns: 1fr;
  }

  .code-form {
    flex-direction: column;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    min-width: 140px;
  }

  .details-actions {
    flex-direction: column;
  }

  .header-actions {
    flex-direction: column;
    width: 100%;
  }

  .header-actions .btn {
    width: 100%;
  }
}
