/* ==========================================================================
   KANGEN KISEKI — MINIMALIST LIQUID GLASS OMNICHANNEL ERP (erp.css v4.0)
   Aesthetic:
     - Apple visionOS / iOS Liquid Glass (Translucent Frosted Glass + Specular Rims)
     - Ultra-Clean Minimalist Spatial Layout & Pill Controls
   Brand Palette (GEMINI.md Locked):
     - Studio Daylight / Editorial Canvas: Alabaster Ivory (#FBF9F5) & Pure White (#FFFFFF)
     - Primary Brand Accent: Royal Amethyst Purple (#10061E / #1B0C31)
     - Metallic Accent: 24K Imperial Gold (#D4AF37 / #C59B27)
   Typography Triad:
     - Display: 'Cormorant Garamond', Georgia, serif
     - UI/Body: 'Plus Jakarta Sans', -apple-system, sans-serif
     - Technical/IDs: 'JetBrains Mono', monospace
   ========================================================================== */

:root {
  --amethyst-950: #10061E;
  --amethyst-900: #1B0C31;
  --amethyst-800: #2B144D;
  --amethyst-700: #4C1D95;
  --amethyst-600: #6D28D9;
  --amethyst-100: rgba(109, 40, 217, 0.08);
  --gold-500: #D4AF37;
  --gold-600: #C59B27;
  --gold-300: #F5D77F;
  --gold-100: rgba(212, 175, 55, 0.12);
  --ivory-50: #FBF9F5;
  --ivory-100: #F4EFE6;
  --ivory-200: rgba(20, 10, 36, 0.08);
  --white: #FFFFFF;
  --ink-900: #10061E;
  --ink-700: #3B314B;
  --ink-500: #6E647F;
  --ink-400: #968CA6;
  --emerald-600: #059669;
  --emerald-100: rgba(16, 185, 129, 0.12);
  --amber-600: #D97706;
  --amber-100: rgba(245, 158, 11, 0.13);
  --rose-600: #E11D48;
  --rose-100: rgba(225, 29, 72, 0.10);
  --blue-600: #2563EB;
  --blue-100: rgba(37, 99, 235, 0.10);

  /* Liquid Glass Surface Tokens */
  --glass-bg: rgba(255, 255, 255, 0.64);
  --glass-bg-elevated: rgba(255, 255, 255, 0.78);
  --glass-bg-subtle: rgba(255, 255, 255, 0.46);
  --glass-border: rgba(255, 255, 255, 0.88);
  --glass-border-subtle: rgba(16, 6, 30, 0.06);
  --glass-blur: blur(28px) saturate(190%);
  --glass-shadow:
    0 14px 40px -8px rgba(16, 6, 30, 0.05),
    0 2px 10px rgba(16, 6, 30, 0.025),
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  --glass-shadow-hover:
    0 20px 48px -10px rgba(16, 6, 30, 0.085),
    0 4px 14px rgba(212, 175, 55, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    inset 0 0 0 1px rgba(212, 175, 55, 0.28);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --radius-pill: 999px;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--ivory-50);
  background-image:
    radial-gradient(circle at 12% 14%, rgba(109, 40, 217, 0.07) 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(212, 175, 55, 0.11) 0%, transparent 38%),
    radial-gradient(circle at 52% 85%, rgba(27, 12, 49, 0.05) 0%, transparent 48%),
    linear-gradient(180deg, #FFFFFF 0%, #FBF9F5 52%, #F5F1E9 100%);
  background-attachment: fixed;
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Custom Minimalist Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(16, 6, 30, 0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 6, 30, 0.24);
}

/* ==========================================================================
   APP SHELL LAYOUT (Floating Liquid Glass Dock + Workspace)
   ========================================================================== */
.erp-shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
  gap: 0;
}

/* FLOATING LIQUID GLASS SIDEBAR */
.erp-sidebar {
  margin: 16px 0 16px 16px;
  height: calc(100vh - 32px);
  position: sticky;
  top: 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.78) 0%, rgba(251, 249, 245, 0.60) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--ink-900);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--glass-border-subtle);
  text-decoration: none;
  color: inherit;
}

.sidebar-brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  box-shadow: 0 4px 14px rgba(16, 6, 30, 0.10);
  flex-shrink: 0;
}

.sidebar-brand__title {
  font-family: var(--font-display);
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--amethyst-950);
  display: block;
  line-height: 1.1;
}

.sidebar-brand__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.9px;
  color: var(--ink-500);
  display: block;
  margin-top: 3px;
}

.sidebar-section-label {
  padding: 18px 20px 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--ink-400);
  font-weight: 600;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.sidebar-nav__btn-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav__icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.78;
}

.sidebar-nav__btn:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--amethyst-950);
  transform: translateX(2px);
}

.sidebar-nav__btn.is-active {
  background: linear-gradient(135deg, rgba(16, 6, 30, 0.92) 0%, rgba(43, 20, 77, 0.88) 100%);
  border-color: rgba(212, 175, 55, 0.45);
  color: var(--white);
  box-shadow:
    0 8px 20px -4px rgba(16, 6, 30, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sidebar-nav__btn.is-active .sidebar-nav__icon {
  color: var(--gold-300);
  opacity: 1;
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(16, 6, 30, 0.06);
  color: var(--ink-700);
}

.sidebar-nav__btn.is-active .nav-badge {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.nav-badge--gold {
  background: rgba(212, 175, 55, 0.22);
  color: var(--amethyst-950);
}

.sidebar-nav__btn.is-active .nav-badge--gold {
  background: var(--gold-500);
  color: var(--amethyst-950);
}

.nav-badge--alert {
  background: rgba(225, 29, 72, 0.14);
  color: var(--rose-600);
}

.sidebar-footer {
  padding: 14px 16px;
  margin: 10px 12px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sidebar-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-700);
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
  flex-shrink: 0;
}

.status-dot--amber {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.65);
}

.sidebar-website-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 6, 30, 0.10);
  background: rgba(255, 255, 255, 0.75);
  color: var(--amethyst-950);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar-website-link:hover {
  background: var(--amethyst-950);
  color: var(--gold-300);
  border-color: var(--gold-500);
}

/* ==========================================================================
   MAIN WORKSPACE & FLOATING LIQUID GLASS TOPBAR
   ========================================================================== */
.erp-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
}

.erp-topbar {
  margin: 16px 24px 0 20px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: var(--glass-bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 16px;
  z-index: 20;
}

.topbar-left {
  display: flex;
  flex-direction: column;
}

.topbar-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--ink-500);
  font-weight: 600;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: var(--amethyst-950);
  margin: 1px 0 0;
  line-height: 1.15;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* LIQUID GLASS PILL BUTTONS */
.btn-erp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(16, 6, 30, 0.08);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink-900);
  box-shadow: 0 2px 8px rgba(16, 6, 30, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-erp:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(212, 175, 55, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 6, 30, 0.06);
}

.btn-erp--primary {
  background: linear-gradient(135deg, rgba(16, 6, 30, 0.92) 0%, rgba(43, 20, 77, 0.90) 100%);
  color: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.42);
  box-shadow: 0 6px 18px rgba(16, 6, 30, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-erp--primary:hover {
  background: linear-gradient(135deg, #1B0C31 0%, #371A63 100%);
  color: var(--gold-300);
  border-color: var(--gold-500);
  box-shadow: 0 10px 24px rgba(16, 6, 30, 0.22);
}

.btn-erp--gold {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.92) 0%, rgba(197, 155, 39, 0.92) 100%);
  color: var(--amethyst-950);
  border: 1px solid rgba(255, 255, 255, 0.65);
  font-weight: 700;
}

.btn-erp--gold:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn-erp--sm {
  padding: 5px 11px;
  font-size: 11px;
}

.bot-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.10);
  backdrop-filter: blur(12px);
  color: #065F46;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bot-toggle-pill.is-paused {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #92400E;
}

/* ==========================================================================
   VIEW PANELS & LIQUID GLASS KPI CARDS
   ========================================================================== */
.erp-content {
  padding: 20px 24px 48px 20px;
  flex: 1;
}

.erp-view {
  display: none;
}

.erp-view.is-active {
  display: block;
  animation: liquidFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes liquidFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}

.kpi-card--purple {
  background: linear-gradient(145deg, rgba(16, 6, 30, 0.88) 0%, rgba(43, 20, 77, 0.82) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.38);
  box-shadow:
    0 16px 40px -8px rgba(16, 6, 30, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.22);
}

.kpi-card__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink-500);
  font-weight: 600;
}

.kpi-card--purple .kpi-card__label {
  color: var(--gold-300);
}

.kpi-card__value {
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 700;
  color: var(--amethyst-950);
  margin: 10px 0 4px;
  letter-spacing: -0.5px;
}

.kpi-card--purple .kpi-card__value {
  color: var(--white);
}

.kpi-card__sub {
  font-size: 11.5px;
  color: var(--ink-500);
}

.kpi-card--purple .kpi-card__sub {
  color: rgba(255, 255, 255, 0.72);
}

/* ==========================================================================
   LIQUID GLASS CARDS, MINIMALIST TABLES & SOFT CAPSULE BADGES
   ========================================================================== */
.erp-grid-2 {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}

.erp-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.erp-card__header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--glass-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.42);
}

.erp-card__title {
  font-family: var(--font-display);
  font-size: 19.5px;
  font-weight: 700;
  color: var(--amethyst-950);
  margin: 0;
}

.erp-card__sub {
  font-size: 11.5px;
  color: var(--ink-500);
  margin: 2px 0 0;
}

.erp-card__body {
  padding: 18px 22px;
}

.erp-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.erp-table th {
  text-align: left;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--ink-500);
  background: rgba(255, 255, 255, 0.38);
  border-bottom: 1px solid var(--glass-border-subtle);
  font-weight: 600;
}

.erp-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(16, 6, 30, 0.045);
  vertical-align: middle;
}

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

.erp-table tr:hover td {
  background: rgba(255, 255, 255, 0.55);
}

/* TRANSLUCENT CAPSULE BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.badge--website { background: var(--amethyst-100); color: var(--amethyst-700); border-color: rgba(109, 40, 217, 0.15); }
.badge--messenger { background: var(--blue-100); color: var(--blue-600); border-color: rgba(37, 99, 235, 0.15); }
.badge--email { background: var(--gold-100); color: #7C5800; border-color: rgba(212, 175, 55, 0.3); }
.badge--success { background: var(--emerald-100); color: var(--emerald-600); border-color: rgba(16, 185, 129, 0.2); }
.badge--warning { background: var(--amber-100); color: var(--amber-600); border-color: rgba(245, 158, 11, 0.22); }
.badge--danger { background: var(--rose-100); color: var(--rose-600); border-color: rgba(225, 29, 72, 0.2); }

/* ==========================================================================
   LIQUID GLASS KANBAN PIPELINE BOARD
   ========================================================================== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(235px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.kanban-col {
  background: var(--glass-bg-subtle);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 460px;
  box-shadow: var(--glass-shadow);
}

.kanban-col__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

.kanban-col__title {
  font-weight: 700;
  font-size: 11.5px;
  color: var(--amethyst-950);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.kanban-card {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 13px;
  box-shadow: 0 4px 16px rgba(16, 6, 30, 0.04);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kanban-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 10px 24px rgba(16, 6, 30, 0.08);
}

.kanban-card__name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--amethyst-950);
  margin-bottom: 4px;
}

.kanban-card__meta {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-bottom: 8px;
}

.kanban-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(16, 6, 30, 0.05);
}

/* ==========================================================================
   3-PANE LIQUID GLASS FACEBOOK MESSENGER CONCIERGE HUB
   ========================================================================== */
.messenger-layout {
  display: grid;
  grid-template-columns: 310px 1fr 300px;
  height: calc(100vh - 140px);
  min-height: 580px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.msg-threads {
  border-right: 1px solid var(--glass-border-subtle);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.35);
}

.msg-threads__header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--glass-border-subtle);
  background: rgba(255, 255, 255, 0.45);
}

.msg-threads__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.msg-thread-item {
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  transition: all 0.18s ease;
}

.msg-thread-item:hover {
  background: rgba(255, 255, 255, 0.65);
}

.msg-thread-item.is-active {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 6px 18px rgba(16, 6, 30, 0.05);
}

.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amethyst-900), var(--amethyst-700));
  color: var(--gold-300);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.55);
}

.msg-chat {
  display: flex;
  flex-direction: column;
  background: rgba(251, 249, 245, 0.35);
  min-width: 0;
}

.msg-chat__header {
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid var(--glass-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.msg-chat__stream {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: 76%;
}

.chat-bubble-row--customer {
  align-self: flex-start;
}

.chat-bubble-row--page {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.55;
  backdrop-filter: blur(16px);
}

.chat-bubble-row--customer .chat-bubble {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-900);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(16, 6, 30, 0.04);
  border-bottom-left-radius: 5px;
}

.chat-bubble-row--page .chat-bubble {
  background: linear-gradient(135deg, rgba(16, 6, 30, 0.92) 0%, rgba(43, 20, 77, 0.90) 100%);
  color: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.42);
  box-shadow: 0 6px 20px rgba(16, 6, 30, 0.14);
  border-bottom-right-radius: 5px;
}

.chat-bubble__meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-400);
  margin-top: 4px;
}

.msg-chat__composer {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.65);
  border-top: 1px solid var(--glass-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.concierge-two-bubble-box {
  background: rgba(253, 248, 231, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 14px;
  padding: 11px 14px;
}

.msg-crm-pane {
  border-left: 1px solid var(--glass-border-subtle);
  background: rgba(255, 255, 255, 0.45);
  padding: 18px;
  overflow-y: auto;
}

/* ==========================================================================
   3-PANE LIQUID GLASS WEBMAIL CLIENT (Inbox, Sent, Reader, Composer)
   ========================================================================== */
.email-layout {
  display: grid;
  grid-template-columns: 230px 330px 1fr;
  height: calc(100vh - 140px);
  min-height: 580px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.email-folders {
  background: rgba(255, 255, 255, 0.35);
  border-right: 1px solid var(--glass-border-subtle);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.email-folder-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.email-folder-btn:hover {
  background: rgba(255, 255, 255, 0.65);
}

.email-folder-btn.is-active {
  background: linear-gradient(135deg, rgba(16, 6, 30, 0.90) 0%, rgba(43, 20, 77, 0.88) 100%);
  color: var(--gold-300);
  border-color: rgba(212, 175, 55, 0.4);
}

.email-list-pane {
  border-right: 1px solid var(--glass-border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.25);
}

.email-item {
  padding: 13px 16px;
  border-bottom: 1px solid var(--glass-border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}

.email-item:hover {
  background: rgba(255, 255, 255, 0.6);
}

.email-item.is-active {
  background: rgba(255, 255, 255, 0.88);
  border-left: 3px solid var(--gold-500);
}

.email-item.is-unread .email-item__subject {
  font-weight: 800;
  color: var(--amethyst-950);
}

.email-reader-pane {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.55);
}

/* ==========================================================================
   LIQUID GLASS MODALS & MINIMALIST FROSTED INPUTS
   ========================================================================== */
.erp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 6, 30, 0.28);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.erp-modal-backdrop.is-open {
  display: flex;
}

.erp-modal {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 32px 80px -12px rgba(16, 6, 30, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.98);
}

.erp-modal__header {
  background: rgba(255, 255, 255, 0.55);
  color: var(--amethyst-950);
  padding: 20px 26px;
  border-bottom: 1px solid var(--glass-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.erp-modal__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--amethyst-950);
}

.erp-modal__close {
  background: rgba(16, 6, 30, 0.05);
  border: 1px solid rgba(16, 6, 30, 0.08);
  color: var(--ink-700);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.erp-modal__close:hover {
  background: var(--amethyst-950);
  color: var(--white);
}

.erp-modal__body {
  padding: 24px 26px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.form-field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: 0.2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 14px;
  border: 1px solid rgba(16, 6, 30, 0.10);
  border-radius: 13px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 2px rgba(16, 6, 30, 0.02);
  transition: all 0.18s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(109, 40, 217, 0.45);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.08);
}

/* ==========================================================================
   MINIMALIST LIQUID GLASS LOGIN GATE (app.kangenkiseki.store)
   ========================================================================== */
.erp-login-overlay {
  position: fixed;
  inset: 0;
  background-color: #FBF9F5;
  background-image:
    radial-gradient(circle at 20% 22%, rgba(109, 40, 217, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 82% 20%, rgba(212, 175, 55, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 50% 80%, rgba(27, 12, 49, 0.08) 0%, transparent 50%),
    linear-gradient(160deg, #FFFFFF 0%, #FBF9F5 55%, #F3EDE2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.erp-login-overlay.is-authenticated {
  display: none !important;
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 32px 80px -12px rgba(16, 6, 30, 0.10),
    0 4px 20px rgba(212, 175, 55, 0.07),
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    inset 0 0 0 1px rgba(212, 175, 55, 0.16);
}

.login-card__header {
  background: rgba(255, 255, 255, 0.45);
  padding: 32px 32px 22px;
  text-align: center;
  border-bottom: 1px solid rgba(16, 6, 30, 0.06);
}

.login-card__logo {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(212, 175, 55, 0.7);
  box-shadow: 0 8px 24px rgba(16, 6, 30, 0.10);
  margin-bottom: 12px;
}

.login-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 600;
}

.login-card__title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  color: var(--amethyst-950);
  margin: 4px 0 3px;
}

.login-card__sub {
  font-size: 12px;
  color: var(--ink-500);
  margin: 0;
}

.login-card__body {
  padding: 26px 32px 30px;
  background: transparent;
}

.login-error-banner {
  display: none;
  background: rgba(225, 29, 72, 0.08);
  color: var(--rose-600);
  border: 1px solid rgba(225, 29, 72, 0.2);
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

.admin-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(212, 175, 55, 0.45);
  font-size: 12px;
  font-weight: 600;
  color: var(--amethyst-950);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.admin-profile-pill:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--gold-500);
}

/* LIQUID GLASS TOAST NOTIFICATION */
.erp-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(16, 6, 30, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--gold-300);
  border: 1px solid rgba(212, 175, 55, 0.45);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 16px 40px rgba(16, 6, 30, 0.22);
  font-weight: 600;
  font-size: 12.5px;
  z-index: 200;
  display: none;
}

.erp-toast.is-visible {
  display: block;
  animation: liquidFadeIn 0.2s ease;
}

@media (max-width: 1120px) {
  .erp-shell {
    grid-template-columns: 1fr;
  }
  .erp-sidebar {
    position: relative;
    height: auto;
    margin: 12px 16px 0;
    top: 0;
  }
  .erp-topbar {
    margin: 12px 16px 0;
  }
  .erp-content {
    padding: 16px;
  }
  .erp-grid-2,
  .messenger-layout,
  .email-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}
