/* ===== Variáveis de cor ===== */
:root {
  --primary: #2c3e50;
  --secondary: #3498db;
  --accent: #e74c3c;
  --light: #ecf0f1;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #17a2b8;
  --dark: #212529;
  --background: #f5f7fa;
}

/* ===== Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--background);
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

/* ===== Header ===== */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, #1a2530 100%);
  color: white;
  padding: 25px 0;
  text-align: center;
  margin-bottom: 30px;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  position: relative;
}

.header h2 { 
  margin: 0; 
  font-size: 28px;
}

.header a { 
  color: white; 
  font-weight: bold; 
  text-decoration: none; 
}

/* ===== Cards do dashboard ===== */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.card h3 { 
  margin: 0; 
  font-size: 18px; 
  color: var(--primary);
  margin-bottom: 10px;
}

.card .numero { 
  font-size: 32px; 
  font-weight: bold; 
  color: var(--secondary);
}

/* ===== Abas ===== */
.tabs {
  display: flex;
  margin-bottom: 20px;
  flex-wrap: wrap;
  background: white;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.tabs button {
  padding: 15px 25px;
  background-color: #f8f9fa;
  cursor: pointer;
  font-weight: 600;
  margin-right: 5px;
  border-radius: 5px 5px 0 0;
  transition: background-color 0.3s;
  border: none;
}

.tabs button:hover {
  background-color: #e9ecef;
}

.tabs button.active {
  background-color: white;
  color: var(--secondary);
  border-bottom: 3px solid var(--secondary);
}

.tab-content { 
  display: none; 
  padding: 25px;
  background: white;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.tab-content.active { 
  display: block; 
}

/* ===== Tabelas ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: var(--primary);
  color: white;
}

tr:hover {
  background-color: #f5f5f5;
}

/* ===== Botões ===== */
.btn {
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  margin: 5px;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary { background-color: var(--primary); }
.btn-secondary { background-color: var(--secondary); }
.btn-success { background-color: var(--success); }
.btn-warning { background-color: var(--warning); color: white; }
.btn-danger { background-color: var(--danger); }
.btn-info { background-color: var(--info); }

.btn-success:hover { background-color: #27ae60; }
.btn-warning:hover { background-color: #e67e22; }
.btn-danger:hover { background-color: #c0392b; }
.btn-info:hover { background-color: #148f9c; }

/* ===== Status badges ===== */
.status {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
}

.status.em-dia { background: #e8f5e9; color: #2e7d32; }
.status.vencendo { background: #fff8e1; color: #f57c00; }
.status.vencido { background: #ffebee; color: #c62828; }

/* ===== Formulários ===== */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--secondary);
  outline: none;
}

/* ===== Alertas ===== */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-weight: 500;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
}

/* ===== Responsividade ===== */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .card {
    padding: 16px;
    border-radius: 14px;
  }
  
  input, select, textarea {
    height: 48px;
    padding: 10px 12px;
    font-size: 16px;
    border-radius: 10px;
  }
  
  .btn {
    min-height: 48px;
    padding: 10px 16px;
    font-size: 16px;
    border-radius: 12px;
  }
  
  .header {
    padding: 12px;
  }
  
  .tabs {
    flex-direction: column;
  }
  
  .tabs button {
    margin-bottom: 5px;
    border-radius: 5px;
  }
  
  .dashboard {
    grid-template-columns: 1fr;
  }
}