/* Gestor de Eventos 4.0 - Estilos Principais */

/* Reset e configurações gerais */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Layout principal */
.main-content {
    flex: 1 0 auto;
    padding: 20px 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer {
    flex-shrink: 0;
}

/* Navbar customizações */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Topbar */
.topbar {
    min-height: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    text-decoration: none;
    color: #6c757d;
}

.breadcrumb-item a:hover {
    color: #495057;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
    width: 100%;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Botões */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
    color: #fff;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
    transform: translateY(-1px);
    color: #fff;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
    transform: translateY(-1px);
    color: #fff;
}

/* Formulários */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Tabelas */
.table {
    background-color: #fff;
    width: 100%;
    border-collapse: collapse;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* Badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Alertas */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    color: #055160;
}

/* Dashboard específico */
.dashboard-card {
    border-left: 4px solid #0d6efd;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #fff;
    border-radius: 6px;
    width: 100%;
}

.dashboard-card.success {
    border-left-color: #198754;
}

.dashboard-card.warning {
    border-left-color: #ffc107;
}

.dashboard-card.danger {
    border-left-color: #dc3545;
}

.dashboard-card .display-4 {
    font-weight: 700;
    color: #495057;
    font-size: 2.5rem;
    margin: 0;
}

/* Login page */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.login-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

/* QR Code */
.qr-code-container {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsividade */
@media (max-width: 767.98px) {
  /* Topbar: layout empilhado e centralizado */
  .topbar .row {
    flex-wrap: wrap !important;
  }

  .topbar .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px;
    text-align: center !important;
  }

  .topbar .col-md-6.text-end {
    text-align: center !important;
  }

  .topbar .col-md-6.text-end > .d-flex {
    justify-content: center !important;
    flex-wrap: wrap;
    gap: 10px;
  }

  .navbar-nav {
    text-align: center;
  }

  .dashboard-card .display-4 {
    font-size: 2rem;
  }

  .table-responsive {
    font-size: 0.875rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-content,
  .card,
  .dashboard-card {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .col-12{
    margin-top: 60px !important;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 10px 10px;
  }

  .card-body {
    padding: 1rem 0.5rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    width: 100%;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
  }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}
