/* AZM Mock Control Center - Unified Styles */

:root {
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --bg: #f8fafc;
  --panel: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --success: #4ade80;
  --warning: #f59e0b;
  --radius: 12px;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-ui);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

/* Header / Navigation */
.main-header,
.header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.header-logo,
.page-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.header p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.back-link,
.back-button {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover,
.back-button:hover {
  color: var(--accent);
}

.guide-container,
.panel,
.main-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.panel-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-control,
.form-input {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-control:focus,
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.step {
  margin-bottom: 2rem;
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  position: relative;
}

.step::before {
  content: attr(data-step);
  position: absolute;
  left: -12px;
  top: 0;
  background: var(--accent);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
}

.step h3 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.step p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.code-block {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  border: 1px solid #334155;
}

.file-structure {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.file-structure .folder {
  color: var(--accent);
  font-weight: bold;
}

.file-structure .file {
  color: var(--success);
}

.file-structure .comment {
  color: var(--text-muted);
  font-style: italic;
}

.warning {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--warning);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.warning .icon {
  color: var(--warning);
  margin-right: 0.5rem;
}

.success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--success);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.success .icon {
  color: var(--success);
  margin-right: 0.5rem;
}

.tab-container,
.tabs-container {
  margin: 1rem 0;
}

.tabs {
  display: flex;
  background: #f8fafc;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  flex-wrap: wrap;
}

.tab,
.tab-btn {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: all 0.2s;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.tab:last-child,
.tab-btn:last-child {
  border-right: none;
}

.tab.active,
.tab-btn.active {
  background: var(--panel);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.tab-content {
  display: none;
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  padding: 0;
  background: var(--panel);
}

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

/* Buttons */
.btn,
.btn-primary,
.btn-secondary,
button {
  padding: 0.625rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  font-size: 0.95rem;
}

.btn-primary,
button.primary,
button[type="button"].btn-primary {
  background: var(--accent);
  color: white;
  border: none;
}

.btn-primary:hover,
button.primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  /* background: var(--bg); */
  opacity: .8 !important;
}

/* Utility */
.hidden {
  display: none !important;
}

.log-container {
  background: #1e293b;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius);
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-entry {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #334155;
}

.log-success {
  color: #4ade80;
}

.log-error {
  color: #f87171;
}

.log-info {
  color: #60a5fa;
}

.log-warning {
  color: #fbbf24;
}

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

th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-muted);
}

tr:hover {
  background: #f9fafc;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .main-header,
  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .guide-container,
  .panel,
  .main-panel {
    padding: 1rem;
  }

  .step {
    padding-left: 1rem;
  }

  .tabs {
    flex-direction: column;
  }

  .tab,
  .tab-btn {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .tab.active,
  .tab-btn.active {
    border-right: none;
  }

  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.5rem;
  }
}
.code-block {
  background: #2d3748;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 8px;
  margin: 15px 0;
  overflow-x: auto;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  border: 1px solid #4a5568;
}

.file-structure {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin: 15px 0;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9rem;
}

.file-structure .folder {
  color: #667eea;
  font-weight: bold;
}

.file-structure .file {
  color: #28a745;
}

.file-structure .comment {
  color: #6c757d;
  font-style: italic;
}

.warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  border-left: 4px solid #f39c12;
}

.warning .icon {
  color: #f39c12;
  margin-right: 10px;
}

.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  border-left: 4px solid #28a745;
}

.success .icon {
  color: #28a745;
  margin-right: 10px;
}

.tab-container {
  margin: 20px 0;
}

.tabs {
  display: flex;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  border: 1px solid #dee2e6;
  border-bottom: none;
}

.tab {
  padding: 12px 20px;
  cursor: pointer;
  border-right: 1px solid #dee2e6;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  color: #666;
}

.tab:last-child {
  border-right: none;
}

.tab.active {
  background: white;
  color: #667eea;
  font-weight: bold;
}

.tab-content {
  display: none;
  border: 1px solid #dee2e6;
  border-radius: 0 0 8px 8px;
  padding: 0;
}

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

.checklist {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin: 15px 0;
}

.checklist h4 {
  margin-bottom: 15px;
  color: #333;
}

.checklist-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.checklist-item:hover {
  background: #e9ecef;
}

.checklist-item input[type="checkbox"] {
  margin-right: 10px;
  transform: scale(1.2);
}

.quick-reference {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.quick-reference h4 {
  color: #1976d2;
  margin-bottom: 15px;
}

.quick-reference ul {
  list-style: none;
  padding: 0;
}

.quick-reference li {
  padding: 5px 0;
  border-bottom: 1px solid #e3f2fd;
}

.quick-reference li:last-child {
  border-bottom: none;
}

.quick-reference code {
  background: rgba(25, 118, 210, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  color: #1976d2;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .guide-container {
    padding: 20px;
  }

  .step {
    padding-left: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .tabs {
    flex-direction: column;
  }

  .tab {
    border-right: none;
    border-bottom: 1px solid #dee2e6;
  }
}

/* Small helpers used by JS-driven pages */
.hidden {
  display: none !important;
}
.back-button {
  display: inline-block;
}
.main-panel {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  margin-bottom: 8px;
  color: #666;
  font-weight: 600;
}
.form-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.btn {
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-primary {
  background: #667eea;
  color: white;
  border: none;
}
.users-list {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  padding: 8px;
  border-radius: 6px;
}
