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

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --accent-color: #2563eb;
  --secondary-color: #64748b;
  --secondary-hover: #475569;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --page-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --background-color: #f1f5f9;
  --card-background: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --input-background: #f8fafc;
  --input-focus-background: #ffffff;
  --table-header-bg: #f8fafc;
  --row-hover-bg: #f8fafc;
  --detail-bg: #f8fafc;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --badge-pending-bg: #fef3c7;
  --badge-pending-text: #92400e;
  --badge-completed-bg: #d1fae5;
  --badge-completed-text: #065f46;
  --badge-cancelled-bg: #fee2e2;
  --badge-cancelled-text: #991b1b;
  --badge-low-bg: #e0f2fe;
  --badge-low-text: #0369a1;
  --badge-medium-bg: #fef3c7;
  --badge-medium-text: #92400e;
  --badge-high-bg: #fed7aa;
  --badge-high-text: #c2410c;
  --badge-urgent-bg: #fecaca;
  --badge-urgent-text: #991b1b;
  --badge-sector-bg: #e2e8f0;
  --badge-sector-text: #334155;
  --icon-total-bg: #dbeafe;
  --icon-total-color: #2563eb;
  --icon-pending-bg: #fef3c7;
  --icon-pending-color: #f59e0b;
  --icon-completed-bg: #d1fae5;
  --icon-completed-color: #10b981;
  --icon-cancelled-bg: #fee2e2;
  --icon-cancelled-color: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Modo escuro*/
[data-theme="dark"] {
  --primary-color: #5865f2;
  --primary-dark: #4752c4;
  --accent-color: #7983f5;
  --secondary-color: #4e5058;
  --secondary-hover: #6d6f78;
  --success-color: #23a55a;
  --danger-color: #ed4245;
  --warning-color: #f0b232;
  --page-gradient: linear-gradient(135deg, #5865f2 0%, #404eed 100%);
  --background-color: #2b2d31;
  --card-background: #313338;
  --text-primary: #dbdee1;
  --text-secondary: #949ba4;
  --border-color: #3f4147;
  --input-background: #383a40;
  --input-focus-background: #35373c;
  --table-header-bg: #292b30;
  --row-hover-bg: #35373c;
  --detail-bg: #383a40;
  --error-bg: rgba(237, 66, 69, 0.15);
  --error-text: #f5a9a9;
  --success-bg: rgba(87, 242, 135, 0.12);
  --success-text: #7ee2a8;
  --badge-pending-bg: rgba(240, 178, 50, 0.15);
  --badge-pending-text: #f0b232;
  --badge-completed-bg: rgba(74, 222, 128, 0.15);
  --badge-completed-text: #4ade80;
  --badge-cancelled-bg: rgba(237, 66, 69, 0.15);
  --badge-cancelled-text: #ed4245;
  --badge-low-bg: rgba(121, 131, 245, 0.15);
  --badge-low-text: #7983f5;
  --badge-medium-bg: rgba(240, 178, 50, 0.15);
  --badge-medium-text: #f0b232;
  --badge-high-bg: rgba(240, 151, 67, 0.18);
  --badge-high-text: #f09743;
  --badge-urgent-bg: rgba(237, 66, 69, 0.18);
  --badge-urgent-text: #ed4245;
  --badge-sector-bg: rgba(255, 255, 255, 0.08);
  --badge-sector-text: #b5bac1;
  --icon-total-bg: rgba(88, 101, 242, 0.18);
  --icon-total-color: #7983f5;
  --icon-pending-bg: rgba(240, 178, 50, 0.18);
  --icon-pending-color: #f0b232;
  --icon-completed-bg: rgba(74, 222, 128, 0.18);
  --icon-completed-color: #4ade80;
  --icon-cancelled-bg: rgba(237, 66, 69, 0.18);
  --icon-cancelled-color: #ed4245;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--page-gradient);
  min-height: 100vh;
  color: var(--text-primary);
}

/* Alternancia de tema — discreta */
.theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1100;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: 1;
}

/* Cadastro: dropdown de multiplos setores (visual de select comum) */
.multiselect {
  position: relative;
}

.multiselect-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--input-background);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
}

.multiselect-toggle:focus,
.multiselect.open .multiselect-toggle {
  outline: none;
  border-color: var(--primary-color);
  background: var(--input-focus-background);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.multiselect-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiselect-label.placeholder {
  color: var(--text-secondary);
}

.multiselect-arrow {
  font-size: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.multiselect.open .multiselect-arrow {
  transform: rotate(180deg);
}

.multiselect-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card-background);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  z-index: 50;
}

.multiselect.open .multiselect-menu {
  display: block;
}

.multiselect-option {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.multiselect-option:hover {
  background: var(--row-hover-bg);
}

.multiselect-option.selected {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-color);
  font-weight: 600;
}

/* Tela de contas: badge de papel e larguras da tabela */
.role-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--badge-sector-bg);
  color: var(--badge-sector-text);
}

.role-badge.admin {
  background: var(--badge-pending-bg);
  color: var(--badge-pending-text);
}

.users-table th:nth-child(1) { width: 5%; }  /* ID */
.users-table th:nth-child(2) { width: 16%; } /* Nome */
.users-table th:nth-child(3) { width: 20%; } /* Email */
.users-table th:nth-child(4) { width: 20%; } /* Setores */
.users-table th:nth-child(5) { width: 8%; }  /* Papel */
.users-table th:nth-child(6) { width: 5%; }  /* CIs */
.users-table th:nth-child(7) { width: 12%; } /* Criada em */
.users-table th:nth-child(8) { width: 14%; } /* Acoes */

/* Anexos: selecao no formulario e exibicao nos detalhes */
.file-list {
  margin-top: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-background);
  color: var(--text-primary);
  font-size: 12px;
}

.file-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-name span {
  color: var(--text-secondary);
}

.file-remove {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--danger-color);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.file-remove:hover {
  background: var(--badge-cancelled-bg);
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.attachment-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 220px;
}

.attachment-item img {
  max-height: 160px;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: block;
  object-fit: cover;
}

.attachment-doc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-background);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  word-break: break-all;
}

.attachment-doc:hover {
  border-color: var(--primary-color);
}

.attachment-name,
.attachment-loading {
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
}

/* CIs cujo autor/resolvedor foi apagado */
.deleted-user {
  color: var(--text-secondary);
  font-style: italic;
}

/* Previsao de conclusao atrasada */
.overdue {
  color: var(--danger-color);
  font-weight: 600;
}

.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Notificacoes: sino no cabecalho e toast de nova CI */
.notifications-wrap {
  position: relative;
}

.notifications-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 24px);
  max-height: 420px;
  overflow-y: auto;
  background: var(--card-background);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 1300;
  padding: 6px;
}

.notifications-panel.open {
  display: block;
}

.notifications-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 10px 6px;
}

.notification-item {
  position: relative;
  padding: 10px 34px 10px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.notification-dismiss {
  position: absolute;
  top: 7px;
  right: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.notification-dismiss:hover {
  color: var(--danger-color);
  background: var(--badge-cancelled-bg);
}

.notification-item:hover {
  background: var(--row-hover-bg);
}

.notification-item.unseen {
  background: rgba(37, 99, 235, 0.12);
}

.notification-item.unseen:hover {
  background: rgba(37, 99, 235, 0.18);
}

.notification-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  word-break: break-word;
}

.notification-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-secondary);
}

.notifications-empty {
  padding: 18px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.notification-btn {
  position: relative;
  padding: 4px 6px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.notification-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger-color);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--card-background);
  color: var(--text-primary);
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  cursor: pointer;
  animation: toast-in 0.25s ease;
}

@keyframes toast-in {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.header-theme-toggle {
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.header-theme-toggle:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  background: var(--card-background);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
}

.logo-container {
  text-align: center;
  margin-bottom: 30px;
}

.logo-container img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}

.logo-container h1 {
  color: var(--accent-color);
  font-size: 28px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: var(--input-background);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--input-focus-background);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

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

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

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

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

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

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

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

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

.btn-small {
  padding: 5px 10px;
  font-size: 12px;
  width: auto;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.error-message {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid var(--danger-color);
}

.success-message {
  background: var(--success-bg);
  color: var(--success-text);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid var(--success-color);
}

.dashboard {
  min-height: 100vh;
  background: var(--background-color);
}

.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 20px 40px;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.header-logo h1 {
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Somente spans diretos (nome do usuario / badge admin): sem o ">" esta
   regra atingia tambem os textos do painel de notificacoes, que fica dentro
   do header — deixando-os brancos no modo claro */
.header-user > span {
  color: white;
  font-weight: 500;
}

.btn-logout {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.3);
}

.main-content {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-background);
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.stat-icon.total {
  background: var(--icon-total-bg);
  color: var(--icon-total-color);
}

.stat-icon.pending {
  background: var(--icon-pending-bg);
  color: var(--icon-pending-color);
}

.stat-icon.completed {
  background: var(--icon-completed-bg);
  color: var(--icon-completed-color);
}

.stat-icon.cancelled {
  background: var(--icon-cancelled-bg);
  color: var(--icon-cancelled-color);
}

.stat-info h3 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-info p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 5px;
}

.card {
  background: var(--card-background);
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.card-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.filters {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters input,
.filters select {
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--input-background);
  color: var(--text-primary);
}

/* Barra de pesquisa ocupa todo o espaco restante da linha de filtros */
.filters input {
  flex: 1;
  min-width: 260px;
}

.filters input:focus,
.filters select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.os-table {
  width: 100%;
  border-collapse: collapse;
  /* Layout fixo: as larguras das colunas nao variam com o conteudo,
     mantendo o mesmo espacamento com ou sem filtro/scope selecionado. */
  table-layout: fixed;
}

.os-table th:nth-child(1) { width: 5%; }  /* ID */
.os-table th:nth-child(2) { width: 26%; } /* Titulo */
.os-table th:nth-child(3) { width: 8%; }  /* Setor */
.os-table th:nth-child(4) { width: 13%; } /* Solicitante */
.os-table th:nth-child(5) { width: 7%; }  /* Prioridade */
.os-table th:nth-child(6) { width: 10%; } /* Previsao */
.os-table th:nth-child(7) { width: 7%; }  /* Status */
.os-table th:nth-child(8) { width: 24%; } /* Acoes */

.os-table th,
.os-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.os-table th {
  background: var(--table-header-bg);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.os-table td {
  font-size: 14px;
}

.os-table tr:hover {
  background: var(--row-hover-bg);
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge.pending {
  background: var(--badge-pending-bg);
  color: var(--badge-pending-text);
}

.status-badge.completed {
  background: var(--badge-completed-bg);
  color: var(--badge-completed-text);
}

.status-badge.cancelled {
  background: var(--badge-cancelled-bg);
  color: var(--badge-cancelled-text);
}

.priority-badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-badge.low {
  background: var(--badge-low-bg);
  color: var(--badge-low-text);
}

.priority-badge.medium {
  background: var(--badge-medium-bg);
  color: var(--badge-medium-text);
}

.priority-badge.high {
  background: var(--badge-high-bg);
  color: var(--badge-high-text);
}

.priority-badge.urgent {
  background: var(--badge-urgent-bg);
  color: var(--badge-urgent-text);
}

.sector-badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--badge-sector-bg);
  color: var(--badge-sector-text);
}

.scope-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.scope-buttons .btn {
  width: auto;
  padding: 8px 16px;
}

.scope-buttons .btn.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-background);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
  font-size: 22px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

.os-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.os-detail-item {
  padding: 15px;
  background: var(--detail-bg);
  border-radius: 10px;
}

.os-detail-item label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 600;
}

.os-detail-item span {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.os-description {
  grid-column: span 2;
  padding: 15px;
  background: var(--detail-bg);
  border-radius: 10px;
}

.os-description label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 600;
}

.os-description p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

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

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 14px;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .os-table {
    display: block;
    overflow-x: auto;
    min-width: 800px;
  }

  .card-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .os-details {
    grid-template-columns: 1fr;
  }

  .os-description {
    grid-column: span 1;
  }

  .modal-content {
    margin: 20px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 25px;
  }

  .logo-container h1 {
    font-size: 24px;
  }

  .header {
    padding: 15px 20px;
  }

  .header-logo h1 {
    font-size: 20px;
  }

  .header-logo img {
    height: 40px;
  }
}
