/* Mobile HUPE GLPI Monitor - Estilo Moderno Mobile First */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #131b2e;
  --bg-card: rgba(23, 32, 54, 0.85);
  --bg-card-hover: rgba(30, 42, 70, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 195, 255, 0.4);
  
  --primary: #0084ff;
  --primary-glow: rgba(0, 132, 255, 0.35);
  --primary-gradient: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
  
  --accent: #00d2d3;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #a855f7;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(12px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 132, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 210, 211, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-info h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
}

.brand-info span {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--warning);
}

.status-dot.active {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2s infinite;
}

.status-dot.error {
  background-color: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.status-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Container Principal */
.app-container {
  flex: 1;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 90px; /* Espaço para o bottom nav */
}

/* Abas */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cartões */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, transform 0.2s;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Status Banner */
.status-banner {
  background: linear-gradient(135deg, rgba(0, 132, 255, 0.12), rgba(0, 210, 211, 0.08));
  border: 1px solid rgba(0, 195, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.banner-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.banner-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  outline: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}

/* Grid de Estatísticas Rápidas */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Lista de Chamados */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.ticket-item:active {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ticket-id {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.ticket-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ticket-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.ticket-tech {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #cbd5e1;
}

/* Status Badges Específicos */
.status-new { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.status-assign { background: rgba(245, 158, 11, 0.25); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }
.status-plan { background: rgba(249, 115, 22, 0.25); color: #fed7aa; border: 1px solid rgba(249, 115, 22, 0.4); }
.status-waiting { background: rgba(168, 85, 247, 0.25); color: #e9d5ff; border: 1px solid rgba(168, 85, 247, 0.4); }
.status-solved { background: rgba(16, 185, 129, 0.25); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.4); }
.status-closed { background: rgba(107, 114, 128, 0.25); color: #d1d5db; border: 1px solid rgba(107, 114, 128, 0.4); }

/* Lista de Logs de Alerta */
.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.log-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.log-type {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.log-time {
  font-size: 10px;
  color: var(--text-dim);
}

.log-title {
  color: #fff;
  font-weight: 600;
}

.log-desc {
  color: var(--text-muted);
  font-size: 11px;
}

/* Formulários & Configurações */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-label {
  font-size: 13px;
  color: var(--text-main);
}

.toggle-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Switch iOS Style */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Grade de Botões de Teste */
.test-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.empty-text {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 4px;
}

.empty-subtext {
  font-size: 12px;
  color: var(--text-dim);
}

/* Bottom Navigation Bar (Estilo App Mobile Nativo) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  max-width: 600px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  flex: 1;
}

.nav-icon {
  font-size: 20px;
  transition: transform 0.2s;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

/* Alerta flutuante de permissão */
.permission-alert {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.permission-alert p {
  font-size: 12px;
  color: #fde68a;
  line-height: 1.3;
}

/* Quick Actions Bar */
.quick-actions-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.badge-filter {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 195, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(0, 195, 255, 0.3);
}

.ticket-item.highlight-update {
  animation: card-pulse 1.8s ease-out;
  border-color: var(--accent);
}

@keyframes card-pulse {
  0% { transform: scale(0.98); box-shadow: 0 0 16px rgba(0, 210, 211, 0.6); }
  50% { transform: scale(1.02); box-shadow: 0 0 24px rgba(0, 210, 211, 0.4); }
  100% { transform: scale(1); box-shadow: var(--shadow-card); }
}

.ticket-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ticket-btn-action {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ticket-btn-action:active {
  background: var(--primary-gradient);
  color: #fff;
}

