:root {
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-light: #dcfce7;
  --primary-subtle: #f0fdf4;
  --primary-dark: #14532d;
  
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --secondary-card: #1e293b;
  
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-white: #ffffff;
  
  --border-color: #e2e8f0;
  --border-radius-sm: 8px;
  --border-radius: 14px;
  --border-radius-lg: 20px;
  
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --danger-text: #991b1b;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --warning-text: #92400e;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --info-text: #1e40af;
  
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   AUTH LAYOUT
   ========================================= */
.auth-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 80% 20%, #166534 0%, #0f172a 60%, #020617 100%);
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 50%;
  filter: blur(80px);
  top: 10%;
  left: 15%;
}

.auth-card {
  position: relative;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  width: 100%;
  max-width: 440px;
  border-radius: var(--border-radius-lg);
  padding: 42px 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  max-height: 80px;
  max-width: 190px;
  object-fit: contain;
  border-radius: 10px;
  margin: 0 auto 16px auto;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.auth-header h1 {
  font-size: 1.65rem;
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* =========================================
   FORMS & INPUTS
   ========================================= */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
  letter-spacing: 0.2px;
}

.form-control {
  width: 100%;
  padding: 11px 15px;
  font-size: 0.925rem;
  font-family: inherit;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: #fff;
  transition: all 0.2s ease-in-out;
  outline: none;
  color: var(--text-main);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
  background-color: #fff;
}

textarea.form-control {
  resize: vertical;
  min-height: 85px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 0.925rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.25;
}

.btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.btn-action {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
  font-weight: 600;
}

/* =========================================
   ALERTS
   ========================================= */
.alert {
  padding: 14px 18px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 22px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.alert-danger {
  background-color: var(--danger-light);
  color: var(--danger-text);
  border: 1px solid #fca5a5;
}

.alert-success {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #86efac;
}

/* =========================================
   APP SHELL / LAYOUT
   ========================================= */
.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--bg-sidebar);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
  height: 40px;
  max-width: 65px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
}

.sidebar-brand-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}

.sidebar-nav {
  padding: 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-link:hover svg {
  transform: scale(1.1);
}

.nav-link.active {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.sidebar-footer {
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

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

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.btn-logout {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  text-decoration: none;
}

.btn-logout:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* =========================================
   MAIN WRAPPER & TOPBAR
   ========================================= */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  background: #ffffff;
  min-height: 70px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.4px;
}

.content-container {
  padding: 30px;
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* =========================================
   STATS CARDS (GRADIENTES & ELEVAÇÃO)
   ========================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px 22px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
}

.stat-card:nth-child(1)::before { background: var(--primary); }
.stat-card:nth-child(2)::before { background: var(--info); }
.stat-card:nth-child(3)::before { background: var(--danger); }
.stat-card:nth-child(4)::before { background: var(--warning); }

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.stat-info h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.stat-info .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.green { background: #dcfce7; color: #15803d; }
.stat-icon.blue { background: #dbeafe; color: #1d4ed8; }
.stat-icon.yellow { background: #fef3c7; color: #b45309; }
.stat-icon.red { background: #fee2e2; color: #b91c1c; }

/* =========================================
   CARDS & TABLES
   ========================================= */
.card {
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 28px;
}

.card-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fafafa;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.data-table th {
  background-color: #f8fafc;
  padding: 14px 20px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: #1e293b;
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.badge-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Overlay Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 90;
}

/* =========================================
   RESPONSIVIDADE (MOBILE & TABLETS)
   ========================================= */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  }

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

  .sidebar.open + .sidebar-overlay {
    display: block;
  }

  .content-container {
    padding: 18px 14px;
  }

  .topbar {
    padding: 12px 18px;
  }
}

/* =========================================
   BUSCA COM LUPA & INPUTS COM ÍCONES
   ========================================= */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-icon-wrapper .form-control.with-icon {
  padding-left: 42px;
}

.input-icon-wrapper:focus-within .input-icon {
  color: var(--primary);
}

/* Barra de Busca Global na Topbar */
.topbar-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 480px;
  min-width: 240px;
}

.topbar-search-form {
  position: relative;
  width: 100%;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon-box {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.search-icon-box:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.topbar-search-input {
  width: 100%;
  height: 42px;
  padding: 10px 68px 10px 42px;
  font-size: 0.885rem;
  font-family: inherit;
  border-radius: 24px;
  border: 1.5px solid var(--border-color);
  background-color: #f8fafc;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease-in-out;
}

.topbar-search-input:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.topbar-search-form:focus-within .search-icon-box {
  color: var(--primary);
  transform: scale(1.08);
}

.search-kbd {
  position: absolute;
  right: 14px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.search-clear-btn {
  position: absolute;
  right: 36px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.search-clear-btn:hover {
  color: #ef4444;
}

.search-spinner {
  position: absolute;
  right: 38px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(22, 163, 74, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Dropdown de Resultados da Busca Instantânea */
.search-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: dropdownFadeIn 0.15s ease-out;
}

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

.search-dropdown-header {
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
  gap: 12px;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
  background-color: #f0fdf4;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.search-item-thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.search-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-item-highlight {
  background-color: #fef08a;
  color: #854d0e;
  border-radius: 2px;
  padding: 0 2px;
}

.search-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.search-item-sku {
  font-family: monospace;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #334155;
}

.search-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.search-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.search-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.search-badge.in_stock {
  background-color: #dcfce7;
  color: #166534;
}

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

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

.search-empty-state {
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.88rem;
}

.search-empty-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.search-dropdown-footer {
  padding: 11px 16px;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.search-view-all {
  font-size: 0.835rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}

.search-view-all:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-location-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.btn-menu-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .topbar-left {
    justify-content: space-between;
  }
  .topbar-search-wrapper {
    max-width: 100%;
    margin: 0;
  }
  .topbar-right {
    justify-content: flex-end;
  }
}

/* =========================================
   UI/UX SENIOR - SEÇÕES DE NAVEGAÇÃO & CARDS
   ========================================= */
.nav-section-title {
  font-size: 0.64rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  padding: 14px 14px 4px 14px;
  user-select: none;
}

.stat-icon.purple {
  background-color: #f3e8ff;
  color: #7e22ce;
}

/* Perfis de Usuário (Role Badges) */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-admin {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.badge-manager {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-operator {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* Status Pills (Ativo / Inativo com Ponto Luminoso) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-active {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-active .status-dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.status-inactive .status-dot {
  background: #94a3b8;
}

/* Avatar de Usuário */
.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Botões de Ação Especiais */
.btn-pwd {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-pwd:hover {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.btn-deactivate {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  cursor: pointer;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-deactivate:hover {
  background: #fee2e2;
  color: #991b1b;
}

.btn-activate {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-activate:hover {
  background: #dcfce7;
  color: #166534;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

/* =========================================
   MODAL MODERNO (FROSTED GLASS EFFECT)
   ========================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 460px;
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid var(--border-color);
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--danger);
  background: #fee2e2;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}