@import url('tokens.css');

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

html { scroll-behavior: smooth; }

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

/* ========== LAYOUT ========== */
.app-container {
  display: flex;
  min-height: 100vh;
}

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
}

/* ========== HEADER ========== */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--header-bg);
  color: var(--header-text);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 1000;
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  text-decoration: none;
}

.logo-img {
  display: block;
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

.logo-img--dark { display: none; }
[data-theme="dark"] .logo-img--light { display: none; }
[data-theme="dark"] .logo-img--dark { display: block; }

.logo h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--header-text);
  white-space: nowrap;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  line-height: 1.3;
}

/* Buscadores dentro de las páginas (tablas, listas) */
.search-container {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.search-container .search-box {
  width: 100%;
  padding: 8px 14px 8px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.search-container .search-box::placeholder {
  color: var(--text-muted);
}

.search-container .search-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-container .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--header-btn-bg);
  color: var(--header-text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all var(--transition);
}

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

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--header-text);
  white-space: nowrap;
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s;
}

.user-dropdown a:hover {
  background: var(--bg);
  color: var(--primary);
}

.user-dropdown a i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  background: var(--dark);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  overflow-y: auto;
  z-index: 999;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.38);
  padding: 16px 20px 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.72);
  transition: all var(--transition);
  border-left: 3px solid transparent;
  font-size: 14px;
  text-decoration: none;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-left-color: var(--primary);
}

.menu-item.active {
  background: color-mix(in srgb, var(--primary) 26%, transparent);
  color: #fff;
  font-weight: 600;
  border-left-color: var(--primary);
}

.menu-item.active .menu-icon {
  color: #fff;
}

.menu-item .menu-icon {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

/* ========== MOBILE MENU ========== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--header-text);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.sidebar-overlay {
  display: none;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px var(--accent-glow);
}

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

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  background: transparent;
}

.btn-icon:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-icon.small {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

/* ========== TABLES ========== */
.table-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.table-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

td {
  color: var(--text);
}

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

tbody tr {
  transition: background var(--transition);
}

tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}

tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

td .order-id {
  font-weight: 600;
  color: var(--primary);
}

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}

.status-completed, .status.success {
  background: var(--success-bg);
  color: var(--success);
}

.status-in-process, .status.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

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

.status-cancelled, .status.error {
  background: var(--error-bg);
  color: var(--error);
}

/* ========== FORMS ========== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
  background: var(--surface);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* ========== CARDS ========== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.card-trend.positive {
  background: var(--success-bg);
  color: var(--success);
}

.card-trend.negative {
  background: var(--error-bg);
  color: var(--error);
}

.card-trend.neutral {
  background: var(--bg);
  color: var(--text-muted);
}

/* Cards with top accent */
.card-accent {
  position: relative;
  overflow: hidden;
}

.card-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.stat-chart {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat-chart::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.stat-chart h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.chart-placeholder {
  height: 200px;
  background: var(--bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Chart bars */
.chart-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-grid {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 200px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--primary-dark), var(--primary));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-height: 16px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.chart-bar:hover {
  opacity: 0.85;
  transform: scaleY(1.03);
}

/* ========== STATUS BARS (dashboard) ========== */
.orders-status {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}

.status-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-color.pending { background: var(--info); }
.status-color.progress { background: var(--warning); }
.status-color.completed { background: var(--success); }

.status-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  min-width: 28px;
  text-align: right;
}

.status-bar {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.status-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--primary);
  transition: width 0.6s ease;
}

/* ========== MODAL / DIALOG ========== */
.modal, dialog {
  position: fixed;
  z-index: 1100;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
  border: none;
  padding: 20px;
}

.modal.open, dialog[open] {
  display: flex;
}

.modal-content, .dialog-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 0;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.25s ease;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.dialog-header h3 {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-dialog, .close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--transition);
}

.close-dialog:hover, .close:hover {
  color: #fff;
}

.dialog-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.section {
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}

.section h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== WORK ORDER FORM ========== */
.work-order-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.work-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.work-order-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.order-number {
  display: flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
}

.order-id {
  font-weight: 700;
}

.work-order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-section {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-light);
}

.form-section.full-width {
  grid-column: 1 / -1;
}

.form-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section h3::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

/* Inspection checkboxes */
.vehicle-inspection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inspection-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  font-size: 13px;
}

.inspection-item label:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.inspection-item input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  position: relative;
  transition: all var(--transition);
  flex-shrink: 0;
}

.inspection-item input[type="checkbox"]:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.inspection-item input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
}

/* Signature section */
.signature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
}

.signature-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.signature-area {
  width: 100%;
  height: 110px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: all var(--transition);
}

.signature-area:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.signature-placeholder {
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
}

.signature-label {
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  padding: 6px 16px;
  background: var(--bg);
  border-radius: var(--radius-full);
  font-size: 12px;
}

/* ========== NOTIFICATIONS ========== */
.notification {
  position: fixed;
  top: 80px;
  right: 24px;
  padding: 12px 20px;
  color: #fff;
  border-radius: var(--radius-md);
  z-index: 1200;
  animation: slideInRight 0.3s ease;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification.success { background: var(--success); }
.notification.error { background: var(--error); }

/* ========== PAGE HEADER ========== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.breadcrumb .divider {
  color: var(--border);
}

.breadcrumb .active {
  color: var(--text);
  font-weight: 500;
}

/* ========== HEADER ACTIONS (dentro de páginas) ========== */
.header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

.page-content {
  animation: fadeIn 0.3s ease;
}

.dashboard-card, .card, .stat-chart, .table-container, .work-order-container {
  animation: slideDown 0.4s ease;
}

.dashboard-card:nth-child(2) { animation-delay: 0.05s; }
.dashboard-card:nth-child(3) { animation-delay: 0.1s; }
.dashboard-card:nth-child(4) { animation-delay: 0.15s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  .work-order-grid {
    grid-template-columns: 1fr;
  }
  .vehicle-inspection {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

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

  .mobile-toggle {
    display: block;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .page-content {
    padding: 16px;
  }

  .user-name {
    display: none;
  }

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

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

  .signature-section {
    grid-template-columns: 1fr;
  }

  .work-order-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions .search-container {
    display: block;
    max-width: 100%;
  }

  .dialog-header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  dialog {
    padding: 12px;
  }
}

@media (max-width: 900px) {
  .logo h1 {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .top-header {
    padding: 0 12px;
    gap: 12px;
  }
  .header-right {
    gap: 8px;
  }
  .logo-img {
    height: 40px;
  }
  .logo h1 {
    display: none;
  }
}

@media print {
  .top-header, .sidebar, .mobile-toggle, .sidebar-overlay,
  .page-header, .header-actions, .btn, .content-header, .breadcrumb {
    display: none !important;
  }
  .main-wrapper { margin-left: 0; margin-top: 0; }
  .page-content { padding: 0; }
  .work-order-container, .table-container, .card, .stat-chart {
    box-shadow: none; border: 1px solid #000;
    break-inside: avoid;
  }
}

/* ========== CONFIRM DIALOG ========== */
.confirm-dialog {
  border: none;
  border-radius: var(--radius-xl);
  padding: 0;
  width: 300px;
  max-width: 90vw;
  margin: auto;
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  animation: fadeIn 0.2s ease;
}

.confirm-dialog::backdrop {
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
}

.confirm-dialog-content {
  padding: 32px 28px 24px;
  text-align: center;
}

.confirm-dialog-content h3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--text);
}

.confirm-dialog-content h3 i {
  margin: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--error-bg);
  color: var(--error);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-dialog-content p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-dialog-actions .btn {
  width: 100%;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
