/* === Variáveis Globais === */
:root {
  --primary: #0D9488;
  --primary-dark: #0F766E;
  --primary-light: #67E8D7;
  --bg: #F8FAF9;
  --surface: #FFFFFF;
  --text: #1F2937;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* === Auth Page === */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  background: linear-gradient(135deg, #F0FDF4 0%, #F8FAF9 50%, #E0F2FE 100%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
}

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

.auth-header .logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.auth-header .logo h1 {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-header .logo p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg);
  padding: 0.25rem;
  border-radius: var(--radius);
}

.tab-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.btn-primary {
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

.btn-primary.btn-full {
  width: 100%;
}

.btn-secondary {
  padding: 0.75rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-logout {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--danger);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-logout:hover {
  background: var(--danger-light);
}

/* Auth Messages */
.message {
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  text-align: center;
}

.message.success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #BBF7D0;
}

.message.error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #FCA5A5;
}

.auth-link {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 1rem;
}

.auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

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

/* === Main Dashboard === */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header-left h1 {
  color: var(--primary);
  font-size: 1.25rem;
}

.header-left .subtitle {
  color: var(--text-light);
  font-size: 0.9rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  color: white;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-info span:first-child {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-info span:last-child {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  color: white;
}

.stat-icon.restaurant {
  background: #DB2777;
}

.stat-icon.produtos {
  background: #0D9488;
}

.stat-icon.pedidos {
  background: #6366F1;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-info span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Dashboard Actions */
.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.action-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.action-card h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.action-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Section Card */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.section-card h2 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Orders List */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.order-info strong {
  font-size: 0.95rem;
}

.order-info p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.order-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.item-tag {
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  font-size: 0.8rem;
}

.status {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status.pendente {
  background: var(--warning-light);
  color: var(--warning);
}

.status.processando {
  background: var(--warning-light);
  color: var(--warning);
}

.status.confirmado {
  background: var(--success-light);
  color: var(--success);
}

.status.cancelado {
  background: var(--danger-light);
  color: var(--danger);
}

.empty {
  text-align: center;
  color: var(--text-light);
  padding: 2rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

footer p {
  margin: 0;
}

/* === Responsivo === */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-actions {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .auth-page {
    padding: 1rem;
  }

  .order-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
