:root {
  --primary: #0c8688;
  --primary-dark: #087072;
  --white: #fff;
  --black: #000;
  --text: #2d3748;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-primary: 0 2px 12px rgba(12, 134, 136, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f5f7fa;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Container principal */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  margin-top: 10%;
}

.card h2 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Formulários */
.form-group {
  margin-bottom: 1.5rem;
}

form label {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.95rem;
}

.form-input,
select {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  background: #f9fdfd;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.form-input:focus,
select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(12, 134, 136, 0.2);
}

/* Botões */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.9rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  gap: 0.5rem;
  margin-top: 2%;
}

.button:hover {
  background: var(--primary-dark);
}

.button.secondary {
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--border);
}

/* Alertas */
.alert {
  background: rgba(12, 134, 136, 0.1);
  color: var(--primary-dark);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  text-align: center;
  border-left: 4px solid var(--primary);
}

.alert-success {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
  border-left-color: #27ae60;
}

.alert-error {
  background: rgba(235, 87, 87, 0.1);
  color: #eb5757;
  border-left-color: #eb5757;
}

/* Tabelas */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th, .table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: #f6fefe;
  color: var(--primary);
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: none;
}

/* Botões pequenos */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  margin-right: 0.25rem;
  background: var(--primary);
  color: var(--white);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-sm:hover {
  background: var(--primary-dark);
}

.btn-sm.btn-danger {
  background: #e74c3c;
}

.btn-sm.btn-danger:hover {
  background: #c0392b;
}

/* Dashboard */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.dashboard-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.dashboard-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.dashboard-card .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.dashboard-card .description {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Login page */
.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f5f7fa;
}

.login-container {
  max-width: 400px;
  margin: auto;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo img {
  height: 60px;
  margin-bottom: 1rem;
}

.login-logo h1 {
  color: var(--primary);
  font-size: 1.5rem;
}

/* Responsivo */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .table th, .table td {
    padding: 0.7rem;
    font-size: 0.9rem;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 1.2rem;
    box-shadow: none;
    border: 1px solid var(--border);
  }
}

/* ========== HEADER MOBILE FIRST ========== */
.cliente-header {
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 0;
    border-bottom: 1px solid #e6f2f2;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
    z-index: 1001;
}

.logo img {
    height: 36px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo span {
    color: #0c8688;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
}

/* Menu Mobile */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: #0c8688;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger:before,
.hamburger:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #0c8688;
    transition: all 0.3s ease;
}

.hamburger:before {
    top: -6px;
}

.hamburger:after {
    top: 6px;
}

.menu-toggle.open .hamburger {
    background: transparent;
}

.menu-toggle.open .hamburger:before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.open .hamburger:after {
    top: 0;
    transform: rotate(-45deg);
}

/* Navigation */
.nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.nav.active {
    max-height: 100vh;
    padding-bottom: 20px;
}

.nav-list {
    list-style: none;
    padding: 0 15px;
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    text-decoration: none;
    color: #3d3d3d;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 5px 0;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-link:hover {
    background: #f0f8f8;
    color: #0c8688;
    transform: translateX(3px);
}

.nav-link.active {
    background: #0c8688;
    color: white;
}

/* Espaço para o header fixo */
main.container {
    margin-top: 80px;
}

/* ========== DESKTOP STYLES ========== */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .nav {
        position: static;
        max-height: none;
        background: transparent;
        box-shadow: none;
    }
    
    .nav-list {
        display: flex;
        gap: 8px;
        padding: 0;
    }
    
    .nav-link {
        padding: 10px 16px;
        margin: 0;
    }
    
    .nav-link:hover {
        transform: translateY(-2px);
    }
    
    main.container {
        margin-top: 30px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo span {
        font-size: 1.2rem;
    }
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav.active .nav-list li {
    animation: fadeIn 0.3s ease forwards;
}

.nav.active .nav-list li:nth-child(1) { animation-delay: 0.1s; }
.nav.active .nav-list li:nth-child(2) { animation-delay: 0.2s; }
.nav.active .nav-list li:nth-child(3) { animation-delay: 0.3s; }
.nav.active .nav-list li:nth-child(4) { animation-delay: 0.4s; }
.nav.active .nav-list li:nth-child(5) { animation-delay: 0.5s; }


/* ========== AGENDAMENTOS RESPONSIVO ========== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  min-width: 600px; /* Largura mínima para desktop */
}

.table th, .table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: #f6fefe;
  color: var(--primary);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.table tr:last-child td {
  border-bottom: none;
}

/* Estilos para mobile */
@media (max-width: 768px) {
  .table-responsive {
    border: 1px solid var(--border);
    box-shadow: none;
  }
  
  .table th, .table td {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  .btn-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    display: inline-block;
    width: 100%;
    text-align: center;
  }
}

/* Versão em cards para mobile */
.agendamentos-mobile {
  display: none;
}

@media (max-width: 768px) {
  .table-responsive {
    display: none;
  }
  
  .agendamentos-mobile {
    display: block;
  }
  
  .agendamento-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
  }
  
  .agendamento-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
  }
  
  .agendamento-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }
  
  .agendamento-status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
  }
  
  .status-pendente {
    background: #fff3cd;
    color: #856404;
  }
  
  .status-confirmado {
    background: #d4edda;
    color: #155724;
  }
  
  .status-cancelado {
    background: #f8d7da;
    color: #721c24;
  }
  
  .agendamento-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
  }
  
  .agendamento-actions a {
    flex: 1;
    min-width: 100px;
    text-align: center;
  }
}

