/* HRAI Dashboard - Modal & Tabs */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.visible { display: flex; }

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

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 1000px;
  height: 700px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  animation: slideUp 0.25s ease;
}

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

.modal-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.machine-id-header {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.5rem;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  background: var(--bg);
  border-radius: 4px;
}
.machine-id-header:hover {
  color: var(--accent);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* Кнопки-иконки в обзоре: только иконка, цветная подсветка */
.modal-actions-icons .btn-icon-action {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.modal-actions-icons .btn-icon-action:hover { opacity: 0.9; transform: scale(1.05); }
.modal-actions-icons .btn-refresh { background: #238636; color: #fff; }
.modal-actions-icons .btn-reboot { background: #1f6feb; color: #fff; }
.modal-actions-icons .btn-shutdown { background: #da3633; color: #fff; }
.modal-actions-icons .btn-wol { background: #6e7681; color: #fff; }
.modal-actions-icons .btn-elevate { background: #d29922; color: #000; }
.modal-actions-icons .btn-delete { background: #da3633; color: #fff; }

/* Modal Body - Sidebar Layout */
.modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Vertical Tabs Sidebar */
.tabs {
  display: flex;
  flex-direction: column;
  width: 160px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.tab {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  text-align: left;
}
.tab:hover {
  color: var(--text);
  background: var(--bg-tab);
}
.tab.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--bg-tab);
}

/* Tab Content Area */
.tab-panels {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.tab-content.active { display: block; }
