/* ISHRAE Support Admin — shared design system. Flat, premium, Stripe/Linear-style. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d7dbe0; border-radius: 20px; border: 2px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: #bcc2ca; }

body.ishtk-body {
  background: #FFFFFF;
  color: #1a1a1a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

@keyframes ishtk-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ishtk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}

/* ---------- Shell layout: sidebar + content ---------- */
.ishtk-shell {
  display: flex;
  min-height: 100vh;
}

.ishtk-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #035aad;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.ishtk-sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 24px 22px 20px;
}

.ishtk-brand-logo-box {
  background: #ffffff;
  border-radius: 9px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.ishtk-brand-logo-box img {
  height: 24px;
  width: auto;
  display: block;
}

.ishtk-brand-sub {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.2;
}

.ishtk-sidebar-nav {
  padding: 4px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ishtk-nav-section-label {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.28);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 18px 10px 8px;
}

.ishtk-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: 13.6px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  position: relative;
}

.ishtk-nav-item svg { flex-shrink: 0; opacity: 0.75; transition: opacity 0.15s ease; }

.ishtk-nav-item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
}

.ishtk-nav-item:active { transform: scale(0.98); }

.ishtk-nav-item.ishtk-nav-active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 600;
}

.ishtk-nav-item.ishtk-nav-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #ffffff;
}

.ishtk-nav-item.ishtk-nav-active svg { opacity: 1; }

.ishtk-nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.ishtk-nav-badge.ishtk-nav-badge-muted {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
}

.ishtk-sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 18px;
}

.ishtk-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ishtk-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.ishtk-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.ishtk-signout {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.12s ease;
}

.ishtk-signout:hover { color: #ff7a6e; }

.ishtk-content {
  flex: 1;
  min-width: 0;
  padding: 34px 42px 60px;
  max-width: 1320px;
  animation: ishtk-fade-in 0.35s ease;
}

.ishtk-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.ishtk-page-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 5px;
}

.ishtk-page-sub {
  color: #6b7280;
  font-size: 13.8px;
  margin: 0;
}

/* ---------- Stat tiles ---------- */
.ishtk-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}

.ishtk-stat-tile {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 22px 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.ishtk-stat-tile::after {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  background: #9ca3af;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.ishtk-stat-tile-blue::after { background: #0277bd; }
.ishtk-stat-tile-red::after { background: #c0392b; }
.ishtk-stat-tile-green::after { background: #7ba82e; }

.ishtk-stat-tile:hover {
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
  transform: translateY(-2px);
  border-color: #dfe2e6;
}

.ishtk-stat-tile:hover::after { opacity: 1; }

.ishtk-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.18s ease;
}

.ishtk-stat-tile:hover .ishtk-stat-icon { transform: scale(1.06); }

.ishtk-stat-icon-blue { background: #e6f4fb; color: #0277bd; }
.ishtk-stat-icon-red { background: #fde8e8; color: #c0392b; }
.ishtk-stat-icon-green { background: #eef7df; color: #7ba82e; }
.ishtk-stat-icon-gray { background: #f0f1f3; color: #6b7280; }

.ishtk-stat-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.ishtk-stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ---------- Cards ---------- */
.ishtk-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  background: #fff;
}

.ishtk-card-pad { padding: 26px; }

/* ---------- Filters / toolbar ---------- */
.ishtk-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: center;
}

.ishtk-select, .ishtk-input {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13.3px;
  font-weight: 500;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  font-family: inherit;
}

.ishtk-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

.ishtk-select:hover, .ishtk-input:hover { border-color: #d5d9df; }

.ishtk-select:focus, .ishtk-input:focus {
  outline: none;
  border-color: #0277bd;
  box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.12);
}

.ishtk-search-wrap {
  position: relative;
  min-width: 240px;
}

.ishtk-search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.ishtk-search-wrap input {
  width: 100%;
  padding-left: 34px;
}

/* ---------- Table ---------- */
.ishtk-table-wrap {
  overflow-x: auto;
}

table.ishtk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.6px;
}

table.ishtk-table thead th {
  background: #fafbfc;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 18px;
  text-align: left;
  font-weight: 700;
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

table.ishtk-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid #f0f1f3;
  vertical-align: middle;
}

table.ishtk-table tbody tr:last-child td { border-bottom: none; }

table.ishtk-table tbody tr {
  transition: background 0.12s ease;
}

table.ishtk-table tbody tr:hover { background: #fbfdff; }

table.ishtk-table tbody tr.ishtk-row-priority {
  background: #fffbf0;
}

table.ishtk-table tbody tr.ishtk-row-priority:hover {
  background: #fff8e6;
}

.ishtk-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ishtk-row-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11.5px;
  flex-shrink: 0;
}

a.ishtk-ticket-link {
  color: #0277bd;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.12s ease;
}

a.ishtk-ticket-link:hover { color: #01659e; text-decoration: underline; }

.ishtk-cell-sub {
  color: #9ca3af;
  font-size: 12px;
}

/* ---------- Skeleton loading ---------- */
.ishtk-skeleton {
  height: 13px;
  border-radius: 4px;
  background: #eef0f2;
  animation: ishtk-pulse 1.3s ease-in-out infinite;
}

/* ---------- Badges ---------- */
.ishtk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.8px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  text-transform: capitalize;
  white-space: nowrap;
}

.ishtk-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ishtk-badge-open { background: #e6f4fb; color: #0277bd; }
.ishtk-badge-open::before { background: #0277bd; }
.ishtk-badge-in_progress { background: #e6f4fb; color: #0277bd; }
.ishtk-badge-in_progress::before { background: #0277bd; }
.ishtk-badge-resolved { background: #eef7df; color: #5a7a1e; }
.ishtk-badge-resolved::before { background: #7ba82e; }
.ishtk-badge-closed { background: #eef7df; color: #5a7a1e; }
.ishtk-badge-closed::before { background: #7ba82e; }
.ishtk-badge-reopened { background: #fde8e8; color: #c0392b; }
.ishtk-badge-reopened::before { background: #c0392b; }

.ishtk-priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
}

.ishtk-priority-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ishtk-priority-high { color: #c0392b; }
.ishtk-priority-high::before { background: #c0392b; }
.ishtk-priority-medium { color: #a56a00; }
.ishtk-priority-medium::before { background: #d9a441; }
.ishtk-priority-low { color: #6b7280; }
.ishtk-priority-low::before { background: #9ca3af; }

/* ---------- Buttons ---------- */
.ishtk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.7px;
  padding: 9px 17px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.06s ease, box-shadow 0.14s ease;
  text-decoration: none;
  font-family: inherit;
}

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

.ishtk-btn-primary { background: #0277bd; color: #fff; box-shadow: 0 1px 2px rgba(2, 119, 189, 0.25); }
.ishtk-btn-primary:hover { background: #01659e; color: #fff; box-shadow: 0 4px 12px rgba(2, 119, 189, 0.3); }
.ishtk-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.ishtk-btn-outline { background: #fff; border-color: #e5e7eb; color: #1a1a1a; }
.ishtk-btn-outline:hover { border-color: #0277bd; color: #0277bd; }

.ishtk-btn-ghost { background: transparent; color: #6b7280; }
.ishtk-btn-ghost:hover { background: #f9fafb; color: #1a1a1a; }

/* ---------- Forms ---------- */
.ishtk-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}

.ishtk-field { margin-bottom: 18px; }

.ishtk-form-control {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
  color: #1a1a1a;
  width: 100%;
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  font-family: inherit;
}

.ishtk-form-control:hover { border-color: #d5d9df; }

.ishtk-form-control:focus {
  outline: none;
  border-color: #0277bd;
  box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.12);
}

.ishtk-hint {
  font-size: 12.3px;
  color: #9ca3af;
  margin-top: 6px;
}

.ishtk-alert {
  border-radius: 8px;
  font-size: 13.6px;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.ishtk-alert-success { background: #f3f9e9; color: #4a6b1a; border-color: #dcedc0; }
.ishtk-alert-danger { background: #fdf1f1; color: #a5302a; border-color: #f6d4d3; }

/* ---------- Empty / loading states ---------- */
.ishtk-empty, .ishtk-loading {
  padding: 64px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 13.6px;
}

.ishtk-empty svg { margin-bottom: 10px; opacity: 0.5; }

/* ---------- Toasts ---------- */
.ishtk-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.ishtk-toast {
  background: #14171e;
  color: #fff;
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 13.3px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-left: 3px solid #0277bd;
}

.ishtk-toast svg { flex-shrink: 0; }

.ishtk-toast-show { opacity: 1; transform: translateY(0); }

.ishtk-toast-success { border-left-color: #7ba82e; }
.ishtk-toast-error { border-left-color: #c0392b; }

@media (max-width: 900px) {
  .ishtk-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .ishtk-sidebar { display: none; }
  .ishtk-content { padding: 20px; }
}
