/* Sicartaz - Sistema de Licenciamento - v2.0 */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark: #1f2937;
  --gray: #6b7280;
  --light: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--dark);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--light);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 0.25rem;
}

/* Login Page */
.login-container {
  max-width: 400px;
  width: 100%;
}

.logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.logo p {
  color: var(--white);
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--light);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
button,
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  width: 100%;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-warning:hover {
  background: #d97706;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th {
  background: var(--light);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--light);
}

tr:hover {
  background: #f9fafb;
}

/* Machine List */
.machine-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.machine-item {
  background: var(--light);
  padding: 1rem;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.machine-item:hover {
  background: #e5e7eb;
  transform: translateX(4px);
}

.machine-info {
  flex: 1;
}

.machine-name {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.machine-details {
  font-size: 0.85rem;
  color: var(--gray);
}

.machine-actions {
  display: flex;
  gap: 0.5rem;
}

/* Header */
.header {
  background: var(--white);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 1.75rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logout-btn {
  padding: 0.5rem 1rem;
  background: var(--danger);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.logout-btn:hover {
  background: #dc2626;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

/* Loading */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--gray);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .stats {
    grid-template-columns: 1fr;
  }
  
  .machine-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .machine-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* Estilos para o modal de recuperação de senha */
#closeForgotModal:hover {
  background: #f3f4f6 !important;
  color: #1f2937 !important;
}#cancelForgot:hover {
  background: #e5e7eb !important;
}#submitForgot:hover {
  background: #4f46e5 !important;
}