* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f6fa;
  color: #222;
}
a { text-decoration: none; color: inherit; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3b072, #d7e79e);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 12px 35px rgba(0,0,0,.12);
}
.login-card h1 {
  margin-top: 0;
  margin-bottom: 8px;
}
.sub {
  color: #666;
  margin-bottom: 20px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #444;
}
.field input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
}
.primary, .logout-btn {
  background: #ef7f3b;
  border: 0;
  color: #fff;
  padding: 11px 16px;
  border-radius: 8px;
  cursor: pointer;
}
.alert {
  background: #ffe5e5;
  color: #b30000;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 240px;
  background: #111827;
  color: #fff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 28px;
}
.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #d8d8d8;
}
.menu a.active, .menu a:hover {
  background: #1f2937;
  color: #fff;
}
.logout-btn {
  margin-top: auto;
}
.content {
  flex: 1;
  padding: 32px;
}
.card, .card-link {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 20px;
  margin-top: 20px;
}
.card-link h3 {
  margin-top: 0;
}
.reference-card img,
.preview-image {
  max-width: 180px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.image-preview {
  width: 180px;
  min-height: 80px;
  overflow: hidden;
}
.reference-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reference-card {
  border: 1px solid #e5e5e5;
  padding: 16px;
  border-radius: 6px;
  background: #fff;
}

.reference-grid {
  display: grid;
  grid-template-columns: 200px 1fr 1.2fr 120px 80px;
  gap: 14px;
  align-items: start;
}

.field-group {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}

.field-group label {
  font-weight: 600;
  margin-bottom: 4px;
}

.field-group input {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.image-preview {
  width: 180px;
  height: 80px;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  overflow: hidden;
}

.preview-image {
  max-width: 170px;
  max-height: 70px;
  object-fit: contain;
}

.btn-delete {
  margin-top: 22px;
}

/* Toolbar */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.page-header-left h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.page-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.toolbar,
.form-footer,
.page-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  appearance: none;
  border: 0;
  outline: none;
  cursor: pointer;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 18px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #f97316;
  color: #fff;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.22);
}

.btn-primary:hover {
  background: #ea580c;
}

.btn-secondary {
  background: #111827;
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.btn-secondary:hover {
  background: #0b1220;
}

.btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* Alerts */
.alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0 18px;
  font-size: 14px;
  font-weight: 500;
}

.alert-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Inputs */
.form-control,
.field-group input[type="text"],
.field-group input[type="number"] {
  width: 100%;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.field-group input[type="text"]:focus,
.field-group input[type="number"]:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.15);
}

/* Cards */
.reference-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.reference-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.reference-grid {
  display: grid;
  grid-template-columns: 220px 1fr 1.2fr 120px 90px;
  gap: 14px;
  align-items: start;
}

.field-group label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.image-preview {
  width: 170px;
  height: 72px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 10px;
}

.preview-image {
  max-width: 150px;
  max-height: 56px;
  object-fit: contain;
}

/* Empty state */
.empty-box {
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  background: #fff;
  color: #6b7280;
}

/* Mobile */
@media (max-width: 1200px) {
  .reference-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field-slot,
  .field-actions {
    max-width: 180px;
  }
}

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

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

  .image-preview {
    width: 100%;
    max-width: 220px;
  }

  .btn {
    width: 100%;
  }

  .toolbar,
  .form-footer,
  .page-header-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
}

.file-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-input {
  display: none;
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.btn-upload {
  background: #f97316;
  color: #fff;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.18);
}

.btn-upload:hover {
  background: #ea580c;
  transform: translateY(-1px);
}

.file-name {
  font-size: 13px;
  color: #6b7280;
}

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

.page-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.content-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  max-width: 980px;
  max-width: 1200px;
}

.insurance-form {
  width: 100%;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1 1 calc(50% - 8px);
  min-width: 280px;
  display: flex;
  flex-direction: column;
}

.form-group.full {
  flex: 1 1 100%;
}

.form-group label {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #344054;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: #101828;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #ee8b4a;
  box-shadow: 0 0 0 4px rgba(238, 139, 74, 0.12);
}

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

.form-actions {
  margin-top: 8px;
}

.form-actions .btn,
.btn.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: #ee8b4a;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.form-actions .btn:hover,
.btn.btn-primary:hover {
  opacity: 0.92;
}

.alert.alert-danger {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

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

.table.table-insurance th,
.table.table-insurance td {
  padding: 14px 12px;
  border-bottom: 1px solid #eaecf0;
  text-align: left;
  vertical-align: top;
}

.table.table-insurance th {
  background: #f9fafb;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-group input,
.filter-group select {
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
}

.text-muted {
  color: #667085;
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.badge-created { background: #fff4e5; color: #b54708; }
.badge-assigned { background: #e0f2fe; color: #0369a1; }
.badge-progress { background: #ede9fe; color: #6d28d9; }
.badge-waiting { background: #fef3c7; color: #b45309; }
.badge-repair { background: #dcfce7; color: #15803d; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }

@media (max-width: 768px) {
  .content-card {
    padding: 18px;
  }

  .form-group {
    flex: 1 1 100%;
    min-width: 100%;
  }

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

/* ==== INSURANCE UI ==== */

.content-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  max-width: 900px;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
}

.form-group.full {
  flex: 100%;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.form-actions {
  margin-top: 10px;
}

.btn {
  background: #ee8b4a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
}


.match-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
}

.match-item input {
  margin-top: 4px;
}

.action-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-add-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.inline-add-wrap input,
.inline-add-wrap select {
  flex: 1;
}

.inline-add-btn {
  min-width: 90px;
  border: 1px solid #d0d5dd;
  background: #f9fafb;
  color: #344054;
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 600;
  cursor: pointer;
}

.inline-add-btn:hover {
  background: #f3f4f6;
}

.option-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border: 1px solid #eee;
  border-radius: 6px;
}

.delete-btn {
  background: #fee2e2;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
}

.option-manage-box {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.option-manage-box summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 600;
  color: #344054;
  list-style: none;
}

.option-manage-box summary::-webkit-details-marker {
  display: none;
}

.option-manage-box[open] summary {
  border-bottom: 1px solid #e5e7eb;
}

.option-manage-box .option-list {
  padding: 10px;
}

.action-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
}

.icon-edit:hover {
  background: #eff6ff;
}

.icon-delete:hover {
  background: #fef2f2;
}

.detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-item {
  flex: 1 1 calc(50% - 8px);
  min-width: 260px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
}

.detail-item.full {
  flex: 1 1 100%;
}

.detail-item strong {
  display: block;
  margin-bottom: 6px;
  color: #344054;
}

.detail-item p {
  margin: 0;
  color: #101828;
}

.status-box h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

@media print {
  .print-hide,
  .sidebar,
  .topbar,
  .btn,
  form {
    display: none !important;
  }

  body,
  .content,
  .content-card,
  .print-card {
    background: #fff !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .detail-item {
    break-inside: avoid;
  }
}


.pricing-box {
  margin-top: 8px;
}

.pricing-box .insurance-form .form-row {
  gap: 20px;
}

.pricing-box .insurance-form .form-group {
  flex: 1 1 calc(50% - 10px);
  min-width: 320px;
}

.pricing-box .table-wrap {
  margin-top: 24px;
  overflow-x: auto;
}

.pricing-box table.table {
  width: 100%;
  table-layout: auto;
}

.pricing-box table.table th,
.pricing-box table.table td {
  vertical-align: middle;
  white-space: normal;
}

.pricing-summary {
  margin-top: 20px;
  margin-left: auto;
  width: 100%;
  max-width: 360px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
}

.pricing-summary .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.pricing-summary .summary-row:last-child {
  border-bottom: none;
}

.pricing-summary .summary-row span {
  color: #475467;
  font-weight: 600;
}

.pricing-summary .summary-row strong {
  color: #101828;
  font-weight: 700;
}

.pricing-summary .summary-row.total {
  margin-top: 4px;
  padding-top: 14px;
}

.pricing-summary .summary-row.total span,
.pricing-summary .summary-row.total strong {
  font-size: 18px;
}

.status-box,
.pricing-box {
  width: 100%;
}

.edit-two-col {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.edit-left {
  flex: 0 0 44%;
  min-width: 360px;
}

.edit-right {
  flex: 0 0 56%;
  min-width: 420px;
}

.tab-header {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid #d0d5dd;
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn.active {
  color: #fff;
  border-color: transparent;
}

.tab-btn-orange.active {
  background: #f28c38;
}

.tab-btn-blue.active {
  background: #3b82f6;
}

.tab-btn-green.active {
  background: #22c55e;
}

.tab-panel {
  display: none;
}

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

.tab-card-placeholder {
  min-height: 300px;
  padding: 18px;
  border: 1px dashed #d0d5dd;
  border-radius: 12px;
  background: #fafafa;
}

.pricing-box {
  margin-top: 8px;
}

.pricing-box .insurance-form .form-row {
  gap: 20px;
}

.pricing-box .insurance-form .form-group {
  flex: 1 1 calc(50% - 10px);
  min-width: 280px;
}

.pricing-box .table-wrap {
  margin-top: 24px;
  overflow-x: auto;
}

.pricing-box table.table {
  width: 100%;
  table-layout: auto;
}

.pricing-box table.table th,
.pricing-box table.table td {
  vertical-align: middle;
  white-space: normal;
}

.pricing-summary {
  margin-top: 20px;
  margin-left: auto;
  width: 100%;
  max-width: 360px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
}

.pricing-summary .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.pricing-summary .summary-row:last-child {
  border-bottom: none;
}

.pricing-summary .summary-row span {
  color: #475467;
  font-weight: 600;
}

.pricing-summary .summary-row strong {
  color: #101828;
  font-weight: 700;
}

.pricing-summary .summary-row.total {
  margin-top: 4px;
  padding-top: 14px;
}

.pricing-summary .summary-row.total span,
.pricing-summary .summary-row.total strong {
  font-size: 18px;
}

@media (max-width: 1100px) {
  .edit-two-col {
    flex-direction: column;
  }

  .edit-left,
  .edit-right {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

.row-action-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table td input,
.table td select {
  width: 100%;
  min-width: 90px;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 13px;
  box-sizing: border-box;
}

.subtotal-row {
  background: #fff7ed;
}

.subtotal-row td {
  border-top: 2px solid #fdba74;
  border-bottom: 2px solid #fdba74;
}

.subtotal-row strong {
  color: #c2410c;
}

.icon-btn {
  min-width: 34px;
}

.pricing-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

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

.pricing-hidden {
  display: none !important;
}

.pricing-expanded {
  width: 100% !important;
  max-width: none !important;
}

.edit-two-col.pricing-wide .edit-left {
  flex: 0 0 30%;
}

.edit-two-col.pricing-wide .edit-right {
  flex: 0 0 70%;
}

.row-action-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table td input,
.table td select {
  width: 100%;
  min-width: 86px;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 13px;
  box-sizing: border-box;
}

.subtotal-row {
  background: #fff7ed;
}

.subtotal-row td {
  border-top: 2px solid #fdba74;
  border-bottom: 2px solid #fdba74;
}

.subtotal-row strong {
  color: #c2410c;
}

.subtotal-row td {
  background: #fff7ed;
  border-top: 2px solid #fdba74;
  border-bottom: 2px solid #fdba74;
}

.subtotal-row input[type="text"] {
  font-weight: 700;
  background: #fffaf5;
}

.subtotal-row .line-total {
  display: inline-block;
  font-size: 18px;
  font-weight: 800;
  color: #c2410c;
}

/* Sidebar toggle */
.sidebar-toggle-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.sidebar-toggle-btn {
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #101828;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1;
}

.sidebar-toggle-btn:hover {
  background: #f9fafb;
}

body.sidebar-collapsed .sidebar {
  width: 72px !important;
  min-width: 72px !important;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar .menu-text,
body.sidebar-collapsed .sidebar .nav-text,
body.sidebar-collapsed .sidebar .label,
body.sidebar-collapsed .sidebar .sidebar-title,
body.sidebar-collapsed .sidebar .brand,
body.sidebar-collapsed .sidebar .menu a,
body.sidebar-collapsed .sidebar .logout-btn {
  white-space: nowrap;
}

body.sidebar-collapsed .sidebar .brand {
  font-size: 0 !important;
}

body.sidebar-collapsed .sidebar .menu a,
body.sidebar-collapsed .sidebar .logout-btn {
  font-size: 0 !important;
}

body.sidebar-collapsed .sidebar a,
body.sidebar-collapsed .sidebar button {
  justify-content: center;
}

body.sidebar-collapsed .content {
  width: calc(100% - 72px) !important;
  max-width: calc(100% - 72px) !important;
}



body.sidebar-collapsed .app {
  grid-template-columns: 72px 1fr !important;
}

.customer-phone-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid #d0d5dd;
  background: #fff;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.icon-btn:hover {
  transform: translateY(-1px);
}

.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 24, 40, 0.12);
}

.icon-btn.phone {
  color: #1d4ed8;
}

.icon-btn.phone:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.icon-btn.whatsapp {
  color: #16a34a;
}

.icon-btn.whatsapp:hover {
  background: #ecfdf5;
  border-color: #86efac;
}

.icon-btn .icon-emoji {
  font-size: 18px;
  line-height: 1;
}

.icon-btn .icon-svg {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn .icon-svg svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: currentColor;
}

/* Tooltip */
.icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  background: #101828;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 7px 9px;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.icon-btn[data-tooltip]::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%) translateY(4px);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #101828 transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.icon-btn[data-tooltip]:hover::after,
.icon-btn[data-tooltip]:hover::before,
.icon-btn[data-tooltip]:focus-visible::after,
.icon-btn[data-tooltip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Mobile touch size */
@media (max-width: 768px) {
  .customer-phone-actions {
    gap: 12px;
    margin-top: 10px;
  }

  .icon-btn {
    width: 46px;
    height: 46px;
  }

  .icon-btn .icon-emoji {
    font-size: 20px;
  }

  .icon-btn .icon-svg,
  .icon-btn .icon-svg svg {
    width: 21px;
    height: 21px;
  }

  .icon-btn[data-tooltip]::after,
  .icon-btn[data-tooltip]::before {
    display: none;
  }
}

.contact-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.contact-action-row .icon-btn {
  width: 34px;
  height: 34px;
}

.icon-btn.icon-delete {
  color: #b42318;
}

.icon-btn.icon-delete:hover {
  background: #fef3f2;
  border-color: #fda29b;
}

.customer-phone-actions .icon-btn.whatsapp,
.contact-action-row .icon-btn.whatsapp {
  border-color: #b7e4c7;
  background: #f3fff7;
}

.customer-phone-actions .icon-btn.whatsapp:hover,
.contact-action-row .icon-btn.whatsapp:hover {
  background: #e9fbee;
  border-color: #86efac;
}

.customer-phone-actions .icon-btn.phone,
.contact-action-row .icon-btn.phone {
  border-color: #d0d5dd;
  background: #ffffff;
}

.customer-phone-actions .icon-btn.phone:hover,
.contact-action-row .icon-btn.phone:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
