/*
 * KomputerHub V2 Experience Layer
 * 2026-08-14
 * Safe enhancement layer: UI/UX only. Business logic remains in existing PHP.
 */
:root {
  --khv2-red:#dc2626;
  --khv2-red-dark:#b91c1c;
  --khv2-red-soft:#fff1f2;
  --khv2-orange:#f97316;
  --khv2-ink:#0f172a;
  --khv2-text:#334155;
  --khv2-muted:#64748b;
  --khv2-subtle:#94a3b8;
  --khv2-bg:#f6f8fb;
  --khv2-card:#ffffff;
  --khv2-line:#e2e8f0;
  --khv2-line-soft:#eef2f7;
  --khv2-success:#059669;
  --khv2-warning:#d97706;
  --khv2-danger:#dc2626;
  --khv2-info:#2563eb;
  --khv2-radius:16px;
  --khv2-radius-sm:11px;
  --khv2-shadow:0 8px 28px rgba(15,23,42,.055);
  --khv2-shadow-hover:0 16px 38px rgba(15,23,42,.09);
  --khv2-focus:0 0 0 4px rgba(220,38,38,.12);
}

html { background:var(--khv2-bg); }
body.kh-v2-enhanced {
  background:
    radial-gradient(circle at 100% 0, rgba(220,38,38,.035), transparent 34rem),
    var(--khv2-bg) !important;
  color:var(--khv2-ink);
  overflow-x:hidden;
}
body.kh-v2-enhanced * { box-sizing:border-box; }
body.kh-v2-enhanced :focus-visible { outline:3px solid rgba(220,38,38,.18); outline-offset:2px; }
body.kh-v2-enhanced img { max-width:100%; }

/* Main shell */
body.kh-v2-enhanced .kh-main {
  min-width:0;
  min-height:100vh;
  background:transparent !important;
}
body.kh-v2-enhanced .kh-page-header {
  min-height:72px;
  border-bottom:1px solid rgba(226,232,240,.95) !important;
  background:rgba(255,255,255,.94) !important;
  box-shadow:0 1px 0 rgba(15,23,42,.025) !important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
body.kh-v2-enhanced .kh-page-header h1,
body.kh-v2-enhanced .kh-page-header h2 {
  color:var(--khv2-ink);
  letter-spacing:-.025em;
}
body.kh-v2-enhanced .kh-page-header p { color:var(--khv2-muted); }
body.kh-v2-enhanced main[id="khMain"] > :not(header):not(script):not(style) {
  max-width:1680px;
}

/* Give legacy sections a cleaner common visual language without requiring markup rewrites. */
body.kh-v2-enhanced:not(.kh-v2-protected-report) section[class*="bg-white"][class*="rounded"],
body.kh-v2-enhanced:not(.kh-v2-protected-report) div[class*="bg-white"][class*="rounded"][class*="shadow"] {
  border-color:var(--khv2-line) !important;
  box-shadow:var(--khv2-shadow) !important;
}
body.kh-v2-enhanced:not(.kh-v2-protected-report) .glass {
  background:rgba(255,255,255,.93) !important;
  border-color:var(--khv2-line) !important;
  backdrop-filter:blur(18px);
}

/* V2 primitives */
.kh-v2-panel {
  border:1px solid var(--khv2-line);
  border-radius:var(--khv2-radius);
  background:var(--khv2-card);
  box-shadow:var(--khv2-shadow);
  overflow:hidden;
}
.kh-v2-panel-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:1rem;
  padding:1rem 1.15rem; border-bottom:1px solid var(--khv2-line-soft);
  background:linear-gradient(180deg,#fff 0%,#fcfdff 100%);
}
.kh-v2-eyebrow { font-size:.68rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; color:var(--khv2-red); }
.kh-v2-title { margin:.2rem 0 0; font-size:clamp(1.45rem,2vw,1.95rem); line-height:1.15; font-weight:900; color:var(--khv2-ink); letter-spacing:-.025em; }
.kh-v2-subtitle { margin:.32rem 0 0; color:var(--khv2-muted); font-size:.86rem; line-height:1.55; }
.kh-v2-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; }
.kh-v2-spacer { flex:1 1 auto; }

/* Buttons: normalize geometry while preserving existing semantic colors. */
body.kh-v2-enhanced button,
body.kh-v2-enhanced a.kh-v2-button,
body.kh-v2-enhanced a[class*="px-"][class*="py-"][class*="rounded"] {
  -webkit-tap-highlight-color:transparent;
}
body.kh-v2-enhanced:not(.kh-v2-protected-report) button:not(.kh-sidebar-toggle):not([class*="rounded-full"]),
body.kh-v2-enhanced:not(.kh-v2-protected-report) a.kh-v2-button {
  min-height:40px;
  border-radius:11px !important;
  font-weight:800;
  transition:transform .14s ease, box-shadow .14s ease, filter .14s ease, background-color .14s ease, border-color .14s ease;
}
body.kh-v2-enhanced:not(.kh-v2-protected-report) button:not(:disabled):hover,
body.kh-v2-enhanced:not(.kh-v2-protected-report) a.kh-v2-button:hover { transform:translateY(-1px); }
body.kh-v2-enhanced button:disabled { opacity:.55; cursor:not-allowed; transform:none !important; }
.kh-v2-button {
  display:inline-flex; align-items:center; justify-content:center; gap:.45rem;
  padding:.62rem .88rem; border:1px solid transparent; text-decoration:none; line-height:1;
}
.kh-v2-button-primary { background:var(--khv2-red); color:#fff; }
.kh-v2-button-primary:hover { background:var(--khv2-red-dark); box-shadow:0 8px 20px rgba(220,38,38,.18); }
.kh-v2-button-secondary { background:#fff; color:var(--khv2-text); border-color:#cbd5e1; }
.kh-v2-button-secondary:hover { background:#f8fafc; border-color:#94a3b8; }
.kh-v2-button-danger { background:#b91c1c; color:#fff; }
.kh-v2-icon-button {
  width:40px; height:40px; min-width:40px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--khv2-line); border-radius:11px; background:#fff; color:#475569;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

/* Forms */
body.kh-v2-enhanced:not(.kh-v2-protected-report) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.kh-v2-enhanced:not(.kh-v2-protected-report) select,
body.kh-v2-enhanced:not(.kh-v2-protected-report) textarea {
  border-color:#cbd5e1 !important;
  border-radius:11px !important;
  background:#fff;
  color:var(--khv2-ink);
  box-shadow:0 1px 2px rgba(15,23,42,.025);
  transition:border-color .15s ease, box-shadow .15s ease;
}
body.kh-v2-enhanced:not(.kh-v2-protected-report) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.kh-v2-enhanced:not(.kh-v2-protected-report) select { min-height:43px; }
body.kh-v2-enhanced:not(.kh-v2-protected-report) input:focus,
body.kh-v2-enhanced:not(.kh-v2-protected-report) select:focus,
body.kh-v2-enhanced:not(.kh-v2-protected-report) textarea:focus {
  outline:none !important; border-color:#ef4444 !important; box-shadow:var(--khv2-focus) !important;
}
body.kh-v2-enhanced:not(.kh-v2-protected-report) label { color:#334155; font-weight:800; }

/* Tables */
.kh-v2-table-wrap {
  width:100%; max-width:100%; overflow:auto; border:1px solid var(--khv2-line);
  border-radius:14px; background:#fff; scrollbar-width:thin; scrollbar-color:#cbd5e1 transparent;
}
.kh-v2-table-wrap > table { margin:0 !important; }
body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table {
  width:100%; border-collapse:separate !important; border-spacing:0 !important; background:#fff;
}
body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table thead th {
  position:relative; padding:.72rem .85rem !important; background:#f8fafc !important;
  color:#64748b !important; border-bottom:1px solid var(--khv2-line) !important;
  font-size:.65rem !important; font-weight:900 !important; letter-spacing:.065em; text-transform:uppercase;
  line-height:1.35; white-space:nowrap; vertical-align:middle;
}
body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table tbody td {
  padding:.76rem .85rem !important; border-bottom:1px solid var(--khv2-line-soft) !important;
  color:#334155; font-size:.8rem; line-height:1.45; vertical-align:middle;
}
body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table tbody tr { transition:background-color .12s ease; }
body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table tbody tr:hover { background:#fffafa !important; }
body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table tbody tr:last-child td { border-bottom-color:transparent !important; }
body.kh-v2-enhanced table .kh-v2-nowrap { white-space:nowrap; }
body.kh-v2-enhanced table .kh-v2-money { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }

/* Auto status tokens */
.kh-v2-status {
  display:inline-flex !important; align-items:center; gap:.35rem; width:max-content;
  max-width:100%; padding:.34rem .55rem !important; border:1px solid transparent;
  border-radius:999px !important; font-size:.67rem !important; line-height:1.05; font-weight:900 !important;
}
.kh-v2-status::before { content:""; width:6px; height:6px; border-radius:999px; background:currentColor; flex:0 0 auto; }
.kh-v2-status-success { color:#047857 !important; background:#ecfdf5 !important; border-color:#a7f3d0 !important; }
.kh-v2-status-warning { color:#b45309 !important; background:#fffbeb !important; border-color:#fde68a !important; }
.kh-v2-status-danger { color:#b91c1c !important; background:#fef2f2 !important; border-color:#fecaca !important; }
.kh-v2-status-info { color:#1d4ed8 !important; background:#eff6ff !important; border-color:#bfdbfe !important; }
.kh-v2-status-neutral { color:#475569 !important; background:#f8fafc !important; border-color:#e2e8f0 !important; }
.kh-v2-serial { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace; font-weight:800; letter-spacing:.015em; white-space:nowrap; }

/* Live Notification Dock */
.kh-v2-notification-dock { position:relative; z-index:75; flex:0 0 auto; }
.kh-v2-bell {
  position:relative; width:42px; height:42px; border:1px solid var(--khv2-line) !important;
  border-radius:12px !important; background:#fff !important; color:#475569 !important;
  box-shadow:0 2px 8px rgba(15,23,42,.04); display:inline-flex; align-items:center; justify-content:center;
}
.kh-v2-bell:hover { color:var(--khv2-red) !important; border-color:#fecaca !important; background:#fffafa !important; }
.kh-v2-bell-count {
  position:absolute; top:-5px; right:-5px; display:none; align-items:center; justify-content:center;
  min-width:20px; height:20px; padding:0 5px; border:2px solid #fff; border-radius:999px;
  background:var(--khv2-red); color:#fff; font-size:.62rem; font-weight:900; line-height:1;
}
.kh-v2-bell-count.is-visible { display:flex; }
.kh-v2-notification-popover {
  position:absolute; top:calc(100% + .65rem); right:0; width:min(390px,calc(100vw - 2rem));
  border:1px solid var(--khv2-line); border-radius:16px; background:#fff; box-shadow:0 24px 70px rgba(15,23,42,.18);
  overflow:hidden; transform-origin:top right;
}
.kh-v2-notification-popover[hidden] { display:none !important; }
.kh-v2-popover-head { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.9rem 1rem; border-bottom:1px solid var(--khv2-line-soft); }
.kh-v2-popover-head strong { font-size:.9rem; color:var(--khv2-ink); }
.kh-v2-popover-tools { display:flex; align-items:center; gap:.35rem; }
.kh-v2-sound-toggle { width:34px; height:34px; min-height:34px !important; border-radius:10px !important; border:1px solid var(--khv2-line) !important; background:#fff !important; color:#64748b !important; }
.kh-v2-sound-toggle.is-on { color:var(--khv2-red) !important; background:#fff1f2 !important; border-color:#fecdd3 !important; }
.kh-v2-notification-list { max-height:min(470px,65vh); overflow:auto; }
.kh-v2-notification-item { display:grid; grid-template-columns:36px minmax(0,1fr); gap:.7rem; padding:.82rem 1rem; border-bottom:1px solid #f1f5f9; text-decoration:none; color:inherit; }
.kh-v2-notification-item:hover { background:#fffafa; }
.kh-v2-notification-item.is-unread { background:#fff7f7; }
.kh-v2-notification-icon { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:#f8fafc; color:#64748b; }
.kh-v2-notification-icon.payment { background:#ecfdf5; color:#047857; }
.kh-v2-notification-icon.registration { background:#eff6ff; color:#1d4ed8; }
.kh-v2-notification-icon.booking { background:#fff7ed; color:#c2410c; }
.kh-v2-notification-copy { min-width:0; }
.kh-v2-notification-title { font-size:.79rem; font-weight:900; color:#1e293b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kh-v2-notification-message { margin-top:.16rem; font-size:.72rem; line-height:1.4; color:#64748b; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.kh-v2-notification-time { margin-top:.26rem; font-size:.64rem; color:#94a3b8; font-weight:700; }
.kh-v2-notification-empty { padding:2rem 1rem; text-align:center; color:#94a3b8; font-size:.78rem; }
.kh-v2-popover-foot { display:flex; justify-content:space-between; gap:.5rem; padding:.72rem .85rem; border-top:1px solid var(--khv2-line-soft); background:#fcfdff; }
.kh-v2-popover-foot a,.kh-v2-popover-foot button { min-height:34px !important; padding:.45rem .65rem; border-radius:9px !important; font-size:.7rem; font-weight:900; }

/* Toasts */
.kh-v2-toast-host { position:fixed; top:1rem; right:1rem; z-index:9999; width:min(380px,calc(100vw - 2rem)); display:grid; gap:.65rem; pointer-events:none; }
.kh-v2-toast {
  display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:.7rem; align-items:start;
  padding:.82rem .9rem; border:1px solid var(--khv2-line); border-radius:14px; background:#fff;
  box-shadow:0 18px 55px rgba(15,23,42,.16); pointer-events:auto; animation:khV2ToastIn .18s ease-out;
}
.kh-v2-toast-icon { width:38px; height:38px; display:flex; align-items:center; justify-content:center; border-radius:11px; background:#f8fafc; color:#64748b; }
.kh-v2-toast.is-payment .kh-v2-toast-icon { background:#ecfdf5; color:#047857; }
.kh-v2-toast.is-registration .kh-v2-toast-icon { background:#eff6ff; color:#1d4ed8; }
.kh-v2-toast.is-booking .kh-v2-toast-icon { background:#fff7ed; color:#c2410c; }
.kh-v2-toast-copy strong { display:block; color:#0f172a; font-size:.8rem; line-height:1.35; }
.kh-v2-toast-copy span { display:block; margin-top:.18rem; color:#64748b; font-size:.72rem; line-height:1.45; }
.kh-v2-toast-close { width:30px; height:30px; min-height:30px !important; border:0 !important; background:transparent !important; color:#94a3b8 !important; border-radius:8px !important; }
@keyframes khV2ToastIn { from{opacity:0; transform:translateY(-8px) scale(.98)} to{opacity:1; transform:none} }

/* Skeleton / feedback */
.kh-v2-skeleton { position:relative; overflow:hidden; background:#eef2f7; border-radius:9px; min-height:14px; }
.kh-v2-skeleton::after { content:""; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent); animation:khV2Shimmer 1.25s infinite; }
@keyframes khV2Shimmer { 100%{ transform:translateX(100%); } }
.kh-v2-processing { pointer-events:none !important; opacity:.72; }
.kh-v2-processing .kh-v2-button-text::after { content:"…"; }

/* Mobile data cards generated by kh-v2.js. Excludes protected report/SOF page. */
@media (max-width: 700px) {
  body.kh-v2-enhanced .kh-page-header { min-height:64px; padding-top:.8rem !important; padding-bottom:.8rem !important; }
  body.kh-v2-enhanced .kh-page-header > * { min-width:0; }
  .kh-v2-toast-host { top:.75rem; right:.75rem; width:calc(100vw - 1.5rem); }
  .kh-v2-notification-popover { position:fixed; top:68px; left:.75rem; right:.75rem; width:auto; max-height:calc(100vh - 84px); }
  .kh-v2-notification-list { max-height:calc(100vh - 190px); }

  body.kh-v2-enhanced:not(.kh-v2-protected-report) .kh-v2-mobile-cards.kh-v2-table-wrap { border:0; border-radius:0; background:transparent; overflow:visible; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table.kh-v2-mobile-cards-table { display:block; background:transparent; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table thead { display:none; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody { display:grid; gap:.75rem; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody tr {
    display:block; border:1px solid var(--khv2-line); border-radius:14px; background:#fff; box-shadow:0 4px 16px rgba(15,23,42,.04); overflow:hidden;
  }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td {
    display:grid; grid-template-columns:minmax(105px,38%) minmax(0,1fr); gap:.7rem; align-items:start;
    width:100% !important; max-width:none !important; padding:.62rem .8rem !important; border-bottom:1px solid #f1f5f9 !important; text-align:left !important; white-space:normal !important;
  }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td:last-child { border-bottom:0 !important; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td::before {
    content:attr(data-kh-label); color:#94a3b8; font-size:.62rem; font-weight:900; letter-spacing:.06em; text-transform:uppercase; padding-top:.1rem;
  }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td[data-kh-label="Action"],
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td[data-kh-label="Actions"] { grid-template-columns:1fr; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td[data-kh-label="Action"]::before,
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td[data-kh-label="Actions"]::before { display:none; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td[colspan] { display:block; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td[colspan]::before { display:none; }

  body.kh-v2-enhanced:not(.kh-v2-protected-report) button,
  body.kh-v2-enhanced:not(.kh-v2-protected-report) .kh-v2-button { min-height:42px; }
}

@media (max-width: 420px) {
  body.kh-v2-enhanced .kh-page-header { padding-left:4rem !important; }
  .kh-v2-notification-dock { margin-left:auto; }
  body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-mobile-cards-table tbody td { grid-template-columns:1fr; gap:.2rem; }
}

@media print {
  .kh-v2-notification-dock,.kh-v2-toast-host,.kh-v2-no-print { display:none !important; }
  body.kh-v2-enhanced { background:#fff !important; }
}

/* Critical protected page: only shell/sidebar/header receives V2 polish. Internal report/SOF/Costing remains untouched. */
body.kh-v2-protected-report .kh-v2-notification-dock { display:block; }
body.kh-v2-protected-report table,
body.kh-v2-protected-report input,
body.kh-v2-protected-report select,
body.kh-v2-protected-report textarea,
body.kh-v2-protected-report button:not(.kh-v2-bell):not(.kh-v2-sound-toggle) { /* intentionally no V2 overrides */ }

/* Final V2 fit-to-screen safeguards */
body.kh-v2-enhanced .kh-page-header > * { min-width:0; }
body.kh-v2-enhanced .kh-page-header form { min-width:0; }
body.kh-v2-enhanced .overflow-x-auto,
body.kh-v2-enhanced .overflow-auto { max-width:100%; }
body.kh-v2-enhanced:not(.kh-v2-protected-report) .kh-main section,
body.kh-v2-enhanced:not(.kh-v2-protected-report) .kh-main article,
body.kh-v2-enhanced:not(.kh-v2-protected-report) .kh-main div { min-width:0; }
body.kh-v2-enhanced:not(.kh-v2-protected-report) .kh-main p,
body.kh-v2-enhanced:not(.kh-v2-protected-report) .kh-main td { overflow-wrap:anywhere; }
body.kh-v2-enhanced .kh-v2-serial,
body.kh-v2-enhanced [data-kh-label*="Serial"] { overflow-wrap:normal; }

.kh-v2-breadcrumb { display:flex; align-items:center; gap:.4rem; margin-bottom:.2rem; color:#94a3b8; font-size:.65rem; font-weight:800; }
.kh-v2-breadcrumb i { font-size:.55rem; }

@media (max-width:700px) {
  body.kh-v2-enhanced:not(.kh-v2-protected-report) .kh-v2-mobile-cards { overflow:visible !important; max-height:none !important; }
  body.kh-v2-enhanced .kh-page-header .kh-v2-button,
  body.kh-v2-enhanced .kh-page-header a[class*="px-"][class*="py-"] { max-width:100%; }
}

body.kh-v2-protected-report { overflow-x:auto; }

/* Compact table actions + copyable identifiers */
body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table td button,
body.kh-v2-enhanced:not(.kh-v2-protected-report) table.kh-v2-table td a[class*="rounded"] {
  min-height:34px !important;
  padding-top:.45rem !important;
  padding-bottom:.45rem !important;
  font-size:.72rem !important;
}
.kh-v2-copy-field { display:inline-flex; align-items:center; gap:.4rem; max-width:100%; }
.kh-v2-copy-value { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace; font-weight:800; }
.kh-v2-copy-btn { width:28px; height:28px; min-width:28px !important; min-height:28px !important; padding:0 !important; border:1px solid #e2e8f0 !important; border-radius:8px !important; background:#fff !important; color:#94a3b8 !important; }
.kh-v2-copy-btn:hover { color:#dc2626 !important; border-color:#fecaca !important; background:#fff7f7 !important; }
.kh-v2-truncate { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; max-width:34rem; }
[data-kh-live-updated="1"] { animation:khV2LivePulse .7s ease; }
@keyframes khV2LivePulse { 0%{opacity:.45;transform:translateY(2px)} 45%{color:#dc2626} 100%{opacity:1;transform:none} }

/* =========================================================
   KomputerHub V2 Admin Simplification Pass — 2026-08-14
   Source/UI only. No database schema dependency added.
========================================================= */
.kh-workspace{width:100%;max-width:1680px;margin:0 auto;}
.kh-admin-dashboard-header{min-height:76px!important;}
.kh-admin-header-actions{min-width:0;}
.kh-v2-date-chip{height:40px;display:inline-flex;align-items:center;gap:.45rem;padding:0 .75rem;border:1px solid var(--khv2-line);border-radius:11px;background:#fff;color:#475569;font-size:.73rem;font-weight:850;white-space:nowrap;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.kh-v2-date-chip i{color:#94a3b8}.kh-v2-date-dot{color:#cbd5e1}
.kh-v2-profile-chip{height:42px;display:inline-flex;align-items:center;gap:.55rem;padding:.2rem .55rem .2rem .25rem;border:1px solid var(--khv2-line);border-radius:12px;background:#fff;text-decoration:none;color:#334155;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.kh-v2-profile-chip:hover{border-color:#fecaca;background:#fffafa}.kh-v2-profile-chip img{width:34px;height:34px;border-radius:9px;object-fit:cover}.kh-v2-profile-chip strong,.kh-v2-profile-chip small{display:block;line-height:1.05}.kh-v2-profile-chip strong{font-size:.74rem;max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kh-v2-profile-chip small{margin-top:.18rem;font-size:.55rem;color:#94a3b8;font-weight:900;letter-spacing:.08em}
.kh-v2-attention-strip{display:flex;align-items:center;gap:1rem;padding:1rem 1.1rem;border:1px solid #fecaca;border-radius:16px;background:linear-gradient(110deg,#fff 0%,#fff7f7 100%);box-shadow:var(--khv2-shadow)}
.kh-v2-attention-icon{width:44px;height:44px;flex:0 0 auto;border-radius:12px;display:flex;align-items:center;justify-content:center;background:#dc2626;color:#fff;box-shadow:0 8px 18px rgba(220,38,38,.16)}
.kh-v2-metric-card{display:flex;align-items:flex-start;justify-content:space-between;gap:.85rem;padding:1.05rem;border:1px solid var(--khv2-line);border-radius:15px;background:#fff;text-decoration:none;box-shadow:var(--khv2-shadow);transition:.15s ease}
.kh-v2-metric-card:hover{transform:translateY(-2px);box-shadow:var(--khv2-shadow-hover);border-color:#fecaca}.kh-v2-metric-card p{font-size:.63rem;font-weight:900;letter-spacing:.08em;color:#64748b}.kh-v2-metric-card h3{margin-top:.28rem;font-size:1.55rem;line-height:1.08;font-weight:900;color:#0f172a}.kh-v2-metric-card small{display:block;margin-top:.35rem;font-size:.68rem;line-height:1.35;color:#94a3b8;font-weight:650}.kh-v2-metric-card>span{width:40px;height:40px;border-radius:11px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.kh-v2-metric-card>span.success{background:#ecfdf5;color:#059669}.kh-v2-metric-card>span.warning{background:#fff7ed;color:#d97706}.kh-v2-metric-card>span.danger{background:#fff1f2;color:#dc2626}.kh-v2-metric-card>span.info{background:#eff6ff;color:#2563eb}
.kh-v2-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.kh-v2-quick-grid>a{display:flex;align-items:center;gap:.8rem;padding:.85rem;border:1px solid var(--khv2-line);border-radius:13px;background:#fff;text-decoration:none;color:#334155;transition:.14s ease}.kh-v2-quick-grid>a:hover{border-color:#fecaca;background:#fffafa;transform:translateY(-1px)}.kh-v2-quick-grid>a>i{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#f8fafc;color:#dc2626;flex:0 0 auto}.kh-v2-quick-grid strong,.kh-v2-quick-grid small{display:block}.kh-v2-quick-grid strong{font-size:.78rem;color:#0f172a}.kh-v2-quick-grid small{margin-top:.12rem;font-size:.66rem;color:#94a3b8}
.kh-v2-tabs{display:flex;gap:.35rem;overflow-x:auto;scrollbar-width:none}.kh-v2-tabs::-webkit-scrollbar{display:none}.kh-v2-tab{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap;padding:.55rem .72rem;border:1px solid transparent;border-radius:10px;text-decoration:none;color:#64748b;font-size:.72rem;font-weight:900}.kh-v2-tab:hover{background:#f8fafc;color:#334155}.kh-v2-tab.is-active{background:#fff1f2;border-color:#fecaca;color:#b91c1c}.kh-v2-tab span{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 .35rem;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:.62rem}.kh-v2-tab.is-active span{background:#dc2626;color:#fff}
.kh-v2-search-inline{height:40px;min-width:min(310px,70vw);display:flex;align-items:center;gap:.5rem;padding:0 .7rem;border:1px solid #cbd5e1;border-radius:11px;background:#fff}.kh-v2-search-inline i{color:#94a3b8}.kh-v2-search-inline input{border:0!important;box-shadow:none!important;outline:0!important;padding:0!important;min-height:0!important;width:100%;font-size:.78rem;background:transparent!important}
.kh-v2-section-label{display:flex;align-items:center;gap:.45rem;font-size:.68rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#64748b}
.kh-v2-review-row{display:flex;align-items:center;gap:.9rem;padding:.9rem;border:1px solid var(--khv2-line);border-radius:14px;background:#fff}.kh-v2-review-row:hover{border-color:#fecaca;background:#fffdfd}.kh-v2-review-row-icon{width:42px;height:42px;flex:0 0 auto;border-radius:11px;display:flex;align-items:center;justify-content:center}.kh-v2-review-row-icon.payment{background:#ecfdf5;color:#059669}.kh-v2-review-row-icon.booking{background:#fff7ed;color:#d97706}.kh-v2-registration-card{display:flex;align-items:center;gap:.75rem;padding:.85rem;border:1px solid var(--khv2-line);border-radius:13px;background:#fff;text-decoration:none;color:#334155}.kh-v2-registration-card:hover{border-color:#bfdbfe;background:#f8fbff}
.kh-v2-review-card{padding:1rem;border:1px solid var(--khv2-line);border-radius:14px;background:#fff;box-shadow:0 3px 14px rgba(15,23,42,.035)}
.kh-v2-tool-card{display:flex;flex-direction:column;min-height:245px;padding:1rem;border:1px solid var(--khv2-line);border-radius:14px;background:#fff}.kh-v2-tool-card h3{margin-top:.8rem;font-size:.9rem;font-weight:900;color:#0f172a}.kh-v2-tool-card p{margin:.3rem 0 1rem;font-size:.75rem;line-height:1.55;color:#64748b}.kh-v2-tool-icon{width:40px;height:40px;border-radius:11px;display:flex;align-items:center;justify-content:center}.kh-v2-tool-icon.info{background:#eff6ff;color:#2563eb}.kh-v2-tool-icon.danger{background:#fff1f2;color:#dc2626}.kh-v2-tool-icon.success{background:#ecfdf5;color:#059669}

/* Cleaner admin notification feed */
.kh-v2-manage-bar{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;border-top:1px solid var(--khv2-line-soft)}.kh-v2-manage-actions{display:none;align-items:center;gap:.5rem}.is-managing .kh-v2-manage-actions{display:flex}.kh-admin-noti-row{display:grid;grid-template-columns:0 minmax(0,1fr);align-items:stretch;background:#fff;transition:.14s ease}.kh-admin-noti-row.is-unread{background:#fffafa}.kh-admin-noti-row:hover{background:#fff7f7}.kh-admin-noti-select{width:0;overflow:hidden;display:flex;align-items:center;justify-content:center;transition:.14s ease}.is-managing .kh-admin-noti-row{grid-template-columns:44px minmax(0,1fr)}.is-managing .kh-admin-noti-select{width:44px}.kh-admin-noti-select input{width:17px;height:17px;accent-color:#dc2626}.kh-admin-noti-link{display:flex;align-items:flex-start;gap:.8rem;padding:.9rem 1rem;text-decoration:none;color:inherit;min-width:0}.kh-admin-noti-icon{width:40px;height:40px;flex:0 0 auto;border-radius:11px;display:flex;align-items:center;justify-content:center;background:#f8fafc;color:#64748b}.kh-admin-noti-icon.payment{background:#ecfdf5;color:#059669}.kh-admin-noti-icon.booking{background:#fff7ed;color:#d97706}.kh-admin-noti-icon.registration{background:#eff6ff;color:#2563eb}.kh-admin-noti-icon.warning{background:#fff1f2;color:#dc2626}

/* Global admin search / command palette */
.kh-v2-notification-dock{display:flex;align-items:center;gap:.45rem}.kh-v2-search-trigger{width:42px;height:42px;min-width:42px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--khv2-line)!important;border-radius:12px!important;background:#fff!important;color:#475569!important;box-shadow:0 2px 8px rgba(15,23,42,.04)}.kh-v2-search-trigger:hover{color:#dc2626!important;border-color:#fecaca!important;background:#fffafa!important}
.kh-v2-search-overlay{position:fixed;inset:0;z-index:9998;display:flex;align-items:flex-start;justify-content:center;padding:9vh 1rem 1rem;background:rgba(15,23,42,.42);backdrop-filter:blur(5px)}.kh-v2-search-overlay[hidden]{display:none!important}.kh-v2-search-dialog{width:min(680px,100%);overflow:hidden;border:1px solid rgba(255,255,255,.8);border-radius:18px;background:#fff;box-shadow:0 35px 100px rgba(15,23,42,.28)}.kh-v2-search-box{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:.65rem;padding:.85rem 1rem;border-bottom:1px solid var(--khv2-line)}.kh-v2-search-box>i{color:#94a3b8}.kh-v2-search-box input{min-height:44px!important;border:0!important;box-shadow:none!important;outline:0!important;padding:0!important;font-size:.95rem!important}.kh-v2-search-box kbd{padding:.25rem .4rem;border:1px solid #e2e8f0;border-radius:7px;background:#f8fafc;color:#94a3b8;font-size:.62rem;font-weight:900}.kh-v2-search-results{max-height:min(62vh,520px);overflow:auto;padding:.45rem}.kh-v2-search-result{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:.7rem;align-items:center;padding:.7rem;border-radius:12px;text-decoration:none;color:inherit}.kh-v2-search-result:hover{background:#fff7f7}.kh-v2-search-result-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#f8fafc;color:#dc2626}.kh-v2-search-result strong{display:block;font-size:.78rem;color:#0f172a}.kh-v2-search-result small{display:block;margin-top:.16rem;font-size:.68rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kh-v2-search-result em{font-style:normal;font-size:.6rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8}.kh-v2-search-empty{padding:2.5rem 1rem;text-align:center;color:#94a3b8;font-size:.78rem}

/* Table action cleanup: style only, existing href/forms/actions stay untouched. */
td.kh-v2-actions>a,td.kh-v2-actions>button,td.kh-v2-actions>form{display:inline-flex!important;margin:.15rem!important;vertical-align:middle}td.kh-v2-actions>form>button{min-height:34px!important;padding:.45rem .65rem!important;border-radius:9px!important;font-size:.7rem!important}

@media(max-width:900px){.kh-v2-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kh-v2-attention-strip{align-items:flex-start;flex-wrap:wrap}.kh-v2-attention-strip>.kh-v2-button{margin-left:56px}.kh-v2-review-row{align-items:flex-start;flex-wrap:wrap}.kh-v2-review-row>div.text-right{width:100%;display:flex;align-items:center;justify-content:space-between;padding-left:56px}}
@media(max-width:640px){.kh-admin-dashboard-header{padding-top:.7rem!important;padding-bottom:.7rem!important}.kh-admin-header-actions{width:100%;justify-content:flex-start}.kh-v2-date-chip{display:none}.kh-v2-header-asms span{display:none}.kh-v2-profile-chip{margin-left:auto}.kh-v2-quick-grid{grid-template-columns:1fr}.kh-v2-attention-strip>.kh-v2-button{width:100%;margin-left:0}.kh-v2-review-row>div.text-right{padding-left:0}.kh-v2-search-inline{min-width:0;width:100%}.kh-v2-manage-bar{align-items:stretch;flex-direction:column}.kh-v2-manage-actions{flex-wrap:wrap}.kh-v2-manage-actions .kh-v2-button{flex:1}.kh-admin-noti-link{padding:.8rem}.kh-v2-search-overlay{padding-top:4.5rem}}

/* =========================
   KomputerHub V2 Operations Simplification Pass
   ========================= */
body.kh-page-admininventory-php,
body.kh-page-adminsalesproduct-php,
body.kh-page-adminbooking-php,
body.kh-page-adminclients-php,
body.kh-page-admincollection-php,
body.kh-page-adminmanualsales-php,
body.kh-page-adminserialtrace-php { background:#f7f8fb; }
body.kh-v2-enhanced .kh-page-header { box-shadow:none !important; }
body.kh-page-admininventory-php .admin-card,
body.kh-page-adminsalesproduct-php .kh-surface,
body.kh-page-adminbooking-php .kh-card,
body.kh-page-adminbooking-php .bg-white { box-shadow:0 5px 18px rgba(15,23,42,.035); }
body.kh-v2-enhanced:not(.kh-v2-protected-report) td.kh-v2-actions { min-width:112px; }
body.kh-v2-enhanced:not(.kh-v2-protected-report) td.kh-v2-actions a,
body.kh-v2-enhanced:not(.kh-v2-protected-report) td.kh-v2-actions button { min-height:34px !important; padding:.45rem .65rem !important; border-radius:9px !important; font-size:.7rem !important; font-weight:900 !important; box-shadow:none !important; }
.kh-operation-collapsible { display:none; }
.kh-operation-collapsible.kh-operation-open { display:block; }
.kh-operation-filter .kh-operation-advanced { display:none !important; }
.kh-operation-filter.kh-operation-show-advanced .kh-operation-advanced { display:flex !important; }
.kh-operation-filter.kh-operation-show-advanced .kh-operation-advanced.blockish { display:block !important; }
.kh-operation-filter-toggle { min-height:42px; padding:.6rem .85rem; border:1px solid #e2e8f0; border-radius:11px; background:#fff; color:#475569; font-size:.72rem; font-weight:900; }
.kh-operation-filter-toggle:hover { border-color:#fecaca; color:#dc2626; background:#fffafa; }
@media(max-width:700px){
  body.kh-v2-enhanced:not(.kh-v2-protected-report) td.kh-v2-actions { min-width:0; }
  .kh-operation-filter .kh-operation-advanced { display:none !important; }
}
