/* --- DESIGN SYSTEM --- */
:root {
  --font-family: 'Outfit', sans-serif;
  
  /* Cores Modernas */
  --bg-app: #0d0e12;
  --bg-card: rgba(22, 24, 33, 0.7);
  --bg-sidebar: rgba(15, 17, 24, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --primary: #6c5ce7;
  --primary-hover: #5b4bc4;
  --primary-glow: rgba(108, 92, 231, 0.35);
  
  --text-main: #f1f2f6;
  --text-muted: #a4b0be;
  
  --color-green: #2ed573;
  --color-red: #ff4757;
  --color-orange: #ffa502;
  --color-yellow: #eccc68;
  --color-purple: #9b59b6;
  --color-blue: #1e90ff;
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- ELEMENTOS GERAIS --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* Efeito Glassmorphism */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* --- TELA DE LOGIN --- */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.1) 0%, rgba(0,0,0,0) 90%), var(--bg-app);
}

.login-box {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
  text-align: center;
}

.login-header .brand-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 15px;
  filter: drop-shadow(0 0 15px var(--primary-glow));
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: -0.5px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.login-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px;
  border-radius: var(--radius-md);
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

.login-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-family: var(--font-family);
}

.login-tab.active {
  background: var(--primary);
  color: var(--text-main);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Formulários */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.input-icon-wrapper input {
  padding-left: 45px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(255, 255, 255, 0.08);
}

/* Botões */
.btn-primary {
  background: var(--primary);
  color: var(--text-main);
  border: none;
  padding: 12px 24px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-block {
  width: 100%;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  font-family: var(--font-family);
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-success {
  background: var(--color-green);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.btn-success:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(46, 213, 115, 0.3);
}

.btn-danger {
  background: var(--color-red);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.btn-danger:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.error-message {
  background: rgba(255, 71, 87, 0.15);
  color: var(--color-red);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 71, 87, 0.3);
  text-align: center;
}

/* --- APENAS ICONES E AUXILIARES --- */
.icon-left { margin-right: 8px; }
.icon-right { margin-left: 8px; }

/* --- GRID DE LAYOUT DO APP --- */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  border-radius: 0;
  border-left: none;
  border-top: none;
  border-bottom: none;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 30px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

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

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

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 15px 0 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  background: var(--primary-glow);
  color: var(--primary);
  border-left: 3px solid var(--primary);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-icon-small {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-icon-small:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Abas de Projeto na Sidebar */
.project-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 250px;
  overflow-y: auto;
}

.project-tab-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-align: left;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.9rem;
  transition: var(--transition);
}

.project-tab-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.project-tab-btn.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-weight: 600;
  border-left: 2px solid var(--primary);
}

.project-count-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.project-tab-btn.active .project-count-badge {
  background: var(--primary);
  color: white;
}

.btn-logout {
  width: 100%;
  padding: 10px;
  background: rgba(255, 71, 87, 0.08);
  border: 1px solid rgba(255, 71, 87, 0.2);
  color: var(--color-red);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

/* --- CONTEÚDO PRINCIPAL --- */
.main-content {
  padding: 30px;
  overflow-y: auto;
  max-height: 100vh;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin-bottom: 30px;
}

.main-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

/* Cards do Dashboard */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
}

.bg-blue { background: rgba(30, 144, 255, 0.15); color: var(--color-blue); }
.bg-yellow { background: rgba(236, 204, 104, 0.15); color: var(--color-yellow); }
.bg-orange { background: rgba(255, 165, 2, 0.15); color: var(--color-orange); }
.bg-purple { background: rgba(155, 89, 182, 0.15); color: var(--color-purple); }
.bg-green { background: rgba(46, 213, 115, 0.15); color: var(--color-green); }

.border-all { border-bottom: 3px solid var(--color-blue); }
.border-pending { border-bottom: 3px solid var(--color-yellow); }
.border-budget { border-bottom: 3px solid var(--color-orange); }
.border-progress { border-bottom: 3px solid var(--color-purple); }
.border-done { border-bottom: 3px solid var(--color-green); }

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

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Seção de Tickets */
.tickets-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.section-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.filter-controls {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.btn-filter {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-family);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-filter:hover, .btn-filter.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-filter.active {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
}

/* Grid de Solicitações */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.ticket-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.ticket-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 25px rgba(0,0,0,0.5);
}

.ticket-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ticket-card-project {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ticket-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 4px;
}

.ticket-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.ticket-card-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-priority {
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}
.badge-priority.Baixa { background: rgba(46, 213, 115, 0.1); color: var(--color-green); }
.badge-priority.Média { background: rgba(236, 204, 104, 0.1); color: var(--color-yellow); }
.badge-priority.Alta { background: rgba(255, 71, 87, 0.1); color: var(--color-red); }

.badge-status {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
}
.badge-status.Pendente { background: rgba(236, 204, 104, 0.15); color: var(--color-yellow); }
.badge-status.Em-Análise { background: rgba(255, 165, 2, 0.15); color: var(--color-orange); }
.badge-status.Em-Andamento { background: rgba(155, 89, 182, 0.15); color: var(--color-purple); }
.badge-status.Concluído { background: rgba(46, 213, 115, 0.15); color: var(--color-green); }

/* Indicador se tem orçamento */
.badge-budget-alert {
  background: var(--color-orange);
  color: #000;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- MODAIS --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 20px;
}

.modal-box {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-lg {
  max-width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: rgba(22, 24, 33, 0.95);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.modal-header h3 {
  font-weight: 600;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Upload zone */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-md);
  padding: 25px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.05);
}

.upload-dropzone i {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.upload-dropzone p {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-dropzone span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.selected-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.file-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.file-preview-item button {
  background: transparent;
  border: none;
  color: var(--color-red);
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Detalhes do Chamado */
.ticket-header-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badge-project {
  background: var(--primary-glow);
  color: var(--primary);
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
}

.ticket-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}

.ticket-description-content p {
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  white-space: pre-line;
  margin-top: 8px;
}

.ticket-attachments-section {
  margin-top: 25px;
}

.ticket-attachments-section h4, .ticket-description-content h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.attachment-media-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 1;
  background: black;
  position: relative;
  cursor: pointer;
}

.attachment-media-wrapper img, .attachment-media-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.8rem;
  background: rgba(0,0,0,0.6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Orçamentos */
.budget-section {
  margin-top: 25px;
  padding: 20px;
  border-left: 4px solid var(--color-orange);
}

.budget-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.budget-icon {
  font-size: 2.2rem;
  color: var(--color-orange);
}

.budget-info h5 {
  font-size: 0.95rem;
  font-weight: 600;
}

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

.budget-info h3 {
  font-size: 1.8rem;
  color: var(--color-orange);
  font-weight: 700;
  margin-top: 4px;
}

.budget-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.budget-status-message {
  margin-top: 12px;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

/* Painel de Controles Admin */
.admin-controls {
  margin-top: 30px;
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.admin-controls h4 {
  font-size: 0.95rem;
  margin-bottom: 15px;
  color: var(--primary);
  font-weight: 600;
}

.admin-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.input-inline-btn {
  display: flex;
  gap: 8px;
}

.input-inline-btn input {
  flex-grow: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Project Tab Wrapper Styles */
.project-tab-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-md);
  transition: var(--transition);
  width: 100%;
}
.project-tab-wrapper.active {
  background: rgba(255, 255, 255, 0.06);
  border-left: 2px solid var(--primary);
}
.project-tab-wrapper .project-tab-btn {
  flex-grow: 1;
  border-left: none !important;
  background: transparent !important;
}
.btn-delete-project-small {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  font-size: 0.85rem;
  transition: var(--transition);
}
.btn-delete-project-small:hover {
  color: var(--color-red);
}

/* Overlay de fundo para o Sidebar Mobile */
.sidebar-overlay-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 90;
  transition: var(--transition);
}

.mobile-header {
  display: none;
}

.sidebar-mobile-header {
  display: none;
}

/* --- RESPONSIVIDADE (MOBILE E TABLET) --- */
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
    padding-top: 65px; /* Altura do header mobile */
  }

  /* Header Mobile */
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 65px;
    padding: 0 20px;
    z-index: 80;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    background: rgba(15, 17, 24, 0.9);
    backdrop-filter: blur(15px);
  }

  .btn-hamburger {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
  }

  .mobile-user {
    cursor: pointer;
  }
  
  .mobile-user .user-avatar {
    width: 35px;
    height: 35px;
    font-size: 0.95rem;
  }

  /* Sidebar Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 290px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    padding: 20px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
  }

  .sidebar-mobile-header span {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
  }

  .btn-close-sidebar {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
  }

  .sidebar-brand {
    display: none;
  }

  .user-profile {
    margin-bottom: 20px;
  }

  /* Restaurar lista vertical de projetos na barra lateral */
  .project-tabs {
    display: flex;
    flex-direction: column;
    overflow-x: visible;
    max-height: 300px;
    overflow-y: auto;
    padding-bottom: 0;
    gap: 4px;
  }

  .project-tab-wrapper {
    width: 100%;
    background: transparent;
    border: none;
  }

  .project-tab-wrapper.active {
    background: rgba(255, 255, 255, 0.06);
    border-left: 2px solid var(--primary);
  }

  .project-tab-wrapper .project-tab-btn {
    padding: 8px 12px;
  }

  .main-content {
    padding: 15px;
  }

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

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .main-header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 15px;
  }

  .main-header h2 {
    font-size: 1.2rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .section-header h3 {
    font-size: 1rem;
  }

  /* Modal adaptável para celular */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
  }

  .modal-body {
    padding: 15px;
  }
}

/* Auth Toggle Links */
.auth-toggle-link {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-toggle-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}
.auth-toggle-link a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

