/* ═══════════════════════════════════════════
   ADMINISTRASI UJIAN v2.0 — STYLE.CSS
   Update UI/UX - Menggunakan shared theme
   ═══════════════════════════════════════════ */

/* Import shared theme variables sudah dilakukan via HTML */

/* Override untuk custom styling jika needed */
:root {
  /* Custom spacing untuk aplikasi ini */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
}

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

body {
  font-family: var(--font-ui);
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  background: var(--color-bg-app);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   HEADER - SHARED THEME STYLE
   ═══════════════════════════════════════════ */
.app-header {
  height: 52px;
  background: var(--color-bg-app-header);
  border-bottom: 1px solid var(--color-border-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: var(--color-text-app-header);
}

.app-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-title-text {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin: 0;
  color: var(--color-text-app-header);
}

.app-subtitle {
  font-size: var(--font-size-xs);
  margin: 0;
  color: rgba(255,255,255,0.8);
}

/* Status Pill */
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  padding: 4px 10px;
  background: rgba(255,255,255,.12);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.2);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 2s infinite;
}

.status-pill.has-data .status-dot {
  background: var(--color-btn-success);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-text {
  color: rgba(255,255,255,.9);
  font-size: var(--font-size-xs);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Selector */
.theme-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-label {
  font-size: var(--font-size-md);
  cursor: pointer;
}

.theme-select {
  padding: 4px 8px;
  font-size: var(--font-size-xs);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  color: var(--color-text-app-header);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ═══════════════════════════════════════════
   BUTTONS - SHARED THEME
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all .15s ease;
  white-space: nowrap;
  text-decoration: none;
  justify-content: center;
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Icon only mode */
.btn-icon {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
}

.btn-icon span {
  display: none;
}

.btn-primary {
  background: var(--color-btn-primary);
  color: var(--color-btn-primary-txt);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-btn-primary-hv);
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--color-btn-secondary-hv);
}

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

.btn-success:hover:not(:disabled) {
  background: var(--color-btn-success-hv);
}

.btn-dashboard {
  background: var(--color-btn-neutral);
  color: var(--color-btn-neutral-txt);
  border: 1px solid var(--color-border-panel);
}

.btn-dashboard:hover {
  background: var(--color-btn-neutral-hv);
}

.btn-sm {
  padding: 5px 10px;
  font-size: var(--font-size-xs);
}

/* ═══════════════════════════════════════════
   STEPPER NAVIGATOR - SHARED THEME
   ═══════════════════════════════════════════ */
.stepper-nav {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--color-bg-panel);
  border-bottom: 2px solid var(--color-border-panel);
  padding: 12px 16px;
  flex-shrink: 0;
  margin-bottom: 0;
  overflow-x: auto;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--color-border-panel);
  min-width: 12px;
  max-width: 32px;
  transition: background 0.3s ease;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  border: none;
  background: none;
}

.step-item:hover {
  background: var(--color-bg-hover);
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-border-panel);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  border: 2px solid var(--color-border-panel);
}

.step-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}

.step-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.step-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* State: aktif (oranye) */
.step-item.active .step-circle {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-accent) 40%, transparent);
}

.step-item.active .step-label,
.step-item.active .step-title {
  color: var(--color-accent);
}

/* State: selesai (hijau) */
.step-item.done .step-circle {
  background: var(--color-btn-success);
  border-color: var(--color-btn-success);
  color: white;
}

.step-item.done .step-label,
.step-item.done .step-title {
  color: var(--color-btn-success);
}

.step-item.done + .step-connector {
  background: var(--color-btn-success);
}

/* Responsive stepper */
@media (max-width: 1024px) {
  .stepper-nav {
    padding: 8px 10px;
    gap: 0;
  }
  .step-info {
    display: none;
  }
  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .step-connector {
    min-width: 8px;
  }
}

/* ═══════════════════════════════════════════
   STEP GUIDE BANNER - SHARED THEME
   ═══════════════════════════════════════════ */
.step-guide-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
}

.step-guide-banner.step-guide-final {
  background: color-mix(in srgb, var(--color-btn-success) 8%, transparent);
  border-left-color: var(--color-btn-success);
}

.step-guide-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-guide-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.step-guide-text strong {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  display: block;
}

.step-guide-text span {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.step-guide-banner.step-guide-final .step-guide-text strong {
  color: var(--color-btn-success);
}

/* Responsive banner */
@media (max-width: 768px) {
  .step-guide-banner {
    padding: 10px 12px;
    gap: 10px;
  }
  
  .step-guide-icon {
    font-size: 20px;
  }
  
  .step-guide-text strong,
  .step-guide-text span {
    font-size: var(--font-size-xs);
  }
}

/* ═══════════════════════════════════════════
   TAB NAVIGATION - SHARED THEME
   ═══════════════════════════════════════════ */
#tab-navigation {
  display: flex;
  border-bottom: 1px solid var(--color-border-panel);
  background: var(--color-bg-panel);
  padding: 0 20px;
}

.tab-btn {
  flex: 1;
  max-width: 200px;
  padding: 12px 16px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn:hover { 
  color: var(--color-text-primary); 
  background: var(--color-bg-hover);
}

.tab-btn.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  font-weight: 600;
  background: var(--color-accent-light);
}

.tab-icon { font-size: 16px; }
.tab-label { font-size: var(--font-size-sm); }

/* ═══════════════════════════════════════════
   SPLIT LAYOUT KARTU PESERTA - SHARED THEME
   ═══════════════════════════════════════════ */
.split-layout {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.panel-input {
  flex: none;
  background: var(--color-bg-panel);
  border-right: none;
  border-bottom: 1px solid var(--color-border-panel);
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: 45vh;
  overflow-y: auto;
}

/* Tablet landscape & Desktop (≥769px) - Split layout */
@media (min-width: 769px) {
  .split-layout {
    flex-direction: row;
  }

  .panel-input {
    flex: 0 0 320px;
    border-right: 1px solid var(--color-border-panel);
    border-bottom: none;
    height: 100%;
    max-height: none;
    overflow-y: auto;
  }
}

@media (min-width: 1024px) {
  .panel-input {
    flex: 0 0 360px;
  }
}

@media (min-width: 1280px) {
  .panel-input {
    flex: 0 0 400px;
  }
}

.panel-header {
  background: var(--color-bg-panel);
  border-bottom: 1px solid var(--color-border-panel);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.panel-header h3 {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text-primary);
}

.panel-actions {
  display: flex;
  gap: 6px;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* ═══════════════════════════════════════════
   FORM ELEMENTS - SHARED THEME
   ═══════════════════════════════════════════ */
.form-group {
  margin-bottom: 14px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 7px 10px;
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  color: var(--color-text-primary);
  background: var(--color-bg-panel);
  transition: border-color .15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.form-control {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-family: var(--font-ui);
}

.form-control:disabled {
  background: var(--color-bg-hover);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}

/* ═══════════════════════════════════════════
   FORM SECTION - VISUAL GROUPING
   ═══════════════════════════════════════════ */
.form-section {
  margin-bottom: 16px;
  border: 1px solid var(--color-border-panel);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.section-header {
  background: var(--color-bg-section);
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-panel);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header:hover {
  background: var(--color-bg-hover);
}

.section-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.section-body {
  padding: 12px;
}

.section-body .form-group:last-child {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════
   PREVIEW PANEL - SHARED THEME
   ═══════════════════════════════════════════ */
.panel-preview {
  flex: 1;
  min-width: 0;
  background: var(--color-bg-preview);
  overflow: auto;
  padding: 20px;
}

/* ═══════════════════════════════════════════
   EMPTY PREVIEW STATE - SHARED THEME
   ═══════════════════════════════════════════ */
.empty-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--color-text-muted);
}

.empty-preview-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-preview-title {
  font-size: var(--font-size-md);
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text-secondary);
}

.empty-preview-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: 280px;
}

/* ═══════════════════════════════════════════
   PREVIEW EMPTY STATE WITH ROADMAP
   ═══════════════════════════════════════════ */
.preview-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
}

.preview-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.preview-empty-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.preview-empty-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.preview-empty-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 500px;
}

.preview-empty-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border-panel);
  border-radius: var(--radius-sm);
  text-align: left;
}

.preview-empty-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.preview-empty-step span {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* Responsive empty state */
@media (max-width: 768px) {
  .preview-empty-state {
    padding: 16px;
  }
  
  .preview-empty-icon {
    font-size: 40px;
  }
  
  .preview-empty-title {
    font-size: var(--font-size-md);
  }
  
  .preview-empty-steps {
    max-width: 100%;
  }
  
  .preview-empty-step {
    padding: 8px 10px;
    gap: 10px;
  }
  
  .preview-empty-step-num {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 11px;
  }
  
  .preview-empty-step span {
    font-size: var(--font-size-xs);
  }
}

/* ═══════════════════════════════════════════
   TAB TOOLBAR & BREADCRUMB - SHARED THEME
   ═══════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  padding: 8px 16px;
  background: var(--color-bg-section);
  border-bottom: 1px solid var(--color-border-panel);
}

.breadcrumb-item {
  color: var(--color-text-secondary);
}

.breadcrumb-current {
  color: var(--color-accent);
  font-weight: 500;
}

.breadcrumb-sep {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

/* Responsive breadcrumb */
@media (max-width: 768px) {
  .breadcrumb {
    padding: 6px 12px;
    font-size: var(--font-size-xs);
    gap: 6px;
  }
}

/* ═══════════════════════════════════════════
   BACK LINK
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   FORM CONTAINER
   ═══════════════════════════════════════════ */
.form-container {
  padding: 16px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.form-container h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.form-container hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* Info Block */
.info-block {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
}

.info-label {
  font-weight: 500;
  color: var(--ink);
}

.info-value {
  color: var(--text);
}

/* ═══════════════════════════════════════════
   SESI LIST
   ═══════════════════════════════════════════ */
.sesi-list-container {
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
}

.sesi-group {
  margin-bottom: 12px;
}

.sesi-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  background: #f0f4ff;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 6px;
  border-left: 3px solid var(--ink);
}

.sesi-item {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all .15s;
  font-size: 11px;
  line-height: 1.4;
}

.sesi-item:hover {
  background: #f0f4ff;
  border-color: var(--ink);
}

.sesi-item.selected {
  background: #e8eef6;
  border-color: var(--ink);
  border-left: 3px solid var(--ink);
  font-weight: 500;
}

.empty-state {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ═══════════════════════════════════════════
   PREVIEW MODE
   ═══════════════════════════════════════════ */
.preview-mode {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.preview-fullscreen {
  flex: 1;
  overflow: auto;
  background: var(--preview);
  padding: 20px;
}

/* ═══════════════════════════════════════════
   CUSTOM MODAL DIALOG - SHARED THEME
   ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--color-bg-panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--color-shadow-panel);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(-20px);
  transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border-panel);
  background: var(--color-bg-section);
}

.modal-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.modal-body {
  padding: 20px 24px;
}

.modal-message {
  margin-bottom: 16px;
}

.modal-message p {
  margin: 0 0 8px 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-md);
  line-height: 1.5;
}

.modal-message strong {
  color: var(--color-accent);
  font-weight: 600;
}

.modal-warning {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.modal-warning p {
  margin: 0;
  color: var(--color-warning-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.modal-warning strong {
  color: var(--color-warning-text);
  font-weight: 600;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--color-border-panel);
  background: var(--color-bg-section);
}

.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════
   LOADING & ERROR STATES
   ═══════════════════════════════════════════ */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.error-icon {
  font-size: 32px;
  color: var(--danger);
}

.error-message {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
  max-width: 400px;
}

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

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

/* ═══════════════════════════════════════════
   MAIN CONTENT & MODULE PANELS
   ═══════════════════════════════════════════ */
#app-content {
  height: calc(100vh - 104px); /* 52px header + 52px stepper nav */
  overflow: hidden;
}

.module-panel {
  display: none;
  height: 100%;
}

.module-panel.active {
  display: block;
}

/* Legacy tab-content support (for backward compatibility) */
.tab-content {
  display: none;
  height: 100%;
}

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

/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════ */

/* Tab buttons responsive untuk mobile */
@media (max-width: 768px) {
  .header-compact {
    padding: 8px 12px;
  }

  .header-left {
    gap: 10px;
  }

  .app-title {
    font-size: 14px;
  }

  .tab-btn {
    padding: 10px 12px;
  }

  .tab-label {
    display: none;
  }

  .tab-icon {
    font-size: 18px;
  }
}

/* ═══════════════════════════════════════════
   HEADER RESPONSIVE
   ═══════════════════════════════════════════ */

/* Tablet (≤768px) */
@media (max-width: 768px) {
  .app-header {
    padding: 0 16px;
    height: 52px;
  }

  .app-title {
    gap: 12px;
  }

  .app-name {
    font-size: 16px;
  }

  .app-subtitle {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .theme-selector-wrapper {
    gap: 4px;
  }

  .theme-label {
    font-size: 12px;
  }

  .theme-select {
    font-size: 11px;
    padding: 3px 6px;
  }

  .btn-dashboard {
    padding: 6px 10px;
    font-size: 12px;
  }

  .action-buttons {
    gap: 4px;
  }

  #btn-import-xlsx,
  #btn-open,
  #btn-save {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Mobile besar (≤480px) */
@media (max-width: 480px) {
  .app-header {
    padding: 0 12px;
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .app-title {
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .app-name {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-subtitle {
    display: none;
  }

  .status-pill {
    padding: 3px 8px;
    font-size: 10px;
    flex-shrink: 0;
  }

  .status-dot {
    width: 5px;
    height: 5px;
  }

  .header-actions {
    gap: 6px;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  /* Theme selector - compact */
  .theme-selector-wrapper {
    order: 1;
  }

  .theme-label {
    font-size: 14px;
  }

  .theme-select {
    font-size: 10px;
    padding: 2px 4px;
    max-width: 100px;
  }

  /* Dashboard button - icon only */
  .btn-dashboard {
    order: 2;
    padding: 6px;
    min-width: 36px;
    font-size: 0;
  }

  .btn-dashboard span {
    display: none;
  }

  /* Action buttons - full width row */
  .action-buttons {
    order: 3;
    width: 100%;
    display: flex;
    gap: 4px;
  }

  #btn-import-xlsx,
  #btn-open,
  #btn-save {
    flex: 1;
    padding: 6px 4px;
    font-size: 0;
    min-width: 0;
  }

  #btn-import-xlsx span,
  #btn-open span,
  #btn-save span {
    display: none;
  }
}

/* Mobile kecil (≤375px) */
@media (max-width: 375px) {
  .app-header {
    padding: 0 8px;
    gap: 6px;
  }

  .app-title {
    gap: 6px;
  }

  .app-name {
    font-size: 13px;
  }

  .status-pill {
    padding: 2px 6px;
    font-size: 9px;
  }

  .status-dot {
    width: 4px;
    height: 4px;
  }

  .theme-select {
    font-size: 9px;
    padding: 2px 3px;
    max-width: 80px;
  }

  .btn-dashboard {
    padding: 5px;
    min-width: 32px;
    font-size: 0;
  }

  #btn-import-xlsx,
  #btn-open,
  #btn-save {
    padding: 5px 3px;
    font-size: 0;
  }
}

/* Template Generator Container */
.template-generator-container {
    width: 100%;
    height: calc(100vh - 120px); /* Adjust for header and tabs */
    position: relative;
}

.template-generator-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Tab active state untuk template generator */
.tab-btn[data-tab="template-generator"].active {
    background: var(--primary-color);
    color: white;
}

.tab-btn[data-tab="template-generator"]:hover {
    background: var(--primary-hover);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .template-generator-container {
        height: calc(100vh - 140px);
    }
}
