:root {
  --ks-primary: #136f63;
  --ks-primary-dark: #0f574f;
  --ks-primary-soft: #e8f5f2;
  --ks-accent: #e8a317;
  --ks-accent-soft: #fff6df;
  --ks-navy: #111c2e;
  --ks-sidebar: #101c2c;
  --ks-sidebar-muted: #93a4bb;
  --ks-canvas: #f4f7f9;
  --ks-surface: #ffffff;
  --ks-border: #dfe7ec;
  --ks-text: #172334;
  --ks-muted: #687789;
  --ks-danger: #d94b4b;
  --ks-shadow: 0 10px 30px rgba(30, 48, 66, 0.08);
  --ks-radius: 14px;
}

html { font-size: 15px; min-height: 100%; }
body.kurtuba-app {
  min-height: 100%;
  margin: 0;
  background: var(--ks-canvas);
  color: var(--ks-text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ks-primary); }
a:hover { color: var(--ks-primary-dark); }

/* Topbar */
.app-topbar {
  height: 72px;
  border-bottom: 1px solid var(--ks-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  overflow: visible;
}
.app-topbar .layout-width, .app-topbar .navbar-header { overflow: visible; }
.app-topbar .navbar-header { padding: 0 24px; }
.topbar-context { line-height: 1.15; }
.topbar-context strong { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ks-navy); }
.topbar-eyebrow, .page-kicker, .modal-kicker {
  display: block;
  color: var(--ks-muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.app-icon-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--ks-border);
  border-radius: 11px;
  background: var(--ks-surface);
  color: #425268;
  font-size: 1.25rem;
  transition: .18s ease;
}
.app-icon-button:hover { border-color: #b9c8d2; background: #f7fafb; color: var(--ks-primary); transform: translateY(-1px); }
.credit-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 6px;
  border: 1px solid #bfe0da;
  border-radius: 12px;
  background: var(--ks-primary-soft);
  color: var(--ks-primary-dark);
}
.credit-pill small { color: #52716c; font-size: .66rem; font-weight: 600; line-height: 1; }
.credit-pill strong { font-size: .91rem; line-height: 1.2; }
.credit-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--ks-primary); color: #fff; font-size: 1rem; }
.marketing-module-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid #edd28e;
  border-radius: 11px;
  background: var(--ks-accent-soft);
  color: #7b5709;
  font-weight: 700;
  white-space: nowrap;
}
.marketing-module-button:hover, .marketing-module-button.active { background: var(--ks-accent); border-color: var(--ks-accent); color: #fff; }
.marketing-module-button i { font-size: 1.1rem; }
.user-menu-button { display: flex; align-items: center; gap: 9px; padding: 3px 5px; border: 0; color: var(--ks-text); }
.user-menu-button:hover, .user-menu-button:focus { background: transparent; color: var(--ks-text); }
.user-menu-button strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.user-menu-button small { color: var(--ks-muted); font-size: .7rem; }
.user-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--ks-navy); color: #fff; font-weight: 800; }
.modern-dropdown { min-width: 220px; padding: 8px; border: 1px solid var(--ks-border); border-radius: 13px; box-shadow: var(--ks-shadow); }
.topbar-user-dropdown { position: relative !important; }
.topbar-user-dropdown .modern-dropdown { position: absolute !important; top: calc(100% + 10px) !important; right: 0 !important; left: auto !important; z-index: 1200; display: none; margin: 0; transform: none !important; }
.topbar-user-dropdown.open .modern-dropdown { display: block; }
.modern-dropdown .dropdown-header { display: flex; flex-direction: column; padding: 10px 12px 12px; }
.modern-dropdown .dropdown-header span { color: var(--ks-muted); font-size: .75rem; }
.modern-dropdown .dropdown-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; }
.modern-dropdown .dropdown-item i { font-size: 1.05rem; }

/* Sidebar */
.app-menu { height: 100vh; overflow: hidden; background: var(--ks-sidebar) !important; border-right: 0; }
.modern-brand { height: 72px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-link { height: 100%; display: flex; align-items: center; gap: 11px; color: #fff; }
.brand-link:hover { color: #fff; }
.brand-logo { width: 38px; height: 38px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 1.06rem; letter-spacing: -.01em; }
.brand-copy small { margin-top: 4px; color: var(--ks-sidebar-muted); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-scroll { height: calc(100vh - 126px); overflow-y: auto; padding-bottom: 22px; scrollbar-width: thin; scrollbar-color: #344359 transparent; }
.sidebar-account-card { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; padding: 11px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.04); }
.sidebar-account-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: rgba(31, 169, 151, .16); color: #66d4c5; }
.sidebar-account-card div { min-width: 0; display: flex; flex-direction: column; }
.sidebar-account-card small { color: var(--ks-sidebar-muted); font-size: .65rem; }
.sidebar-account-card strong { overflow: hidden; color: #eef4fb; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-section-label { margin: 18px 10px 7px; color: #6f829a; font-size: .63rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.modern-sidebar-nav .nav-item { margin: 2px 0; }
.modern-sidebar-nav .nav-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b9c6d6 !important;
  font-size: .86rem;
  font-weight: 550;
  text-align: left;
  transition: .16s ease;
}
.modern-sidebar-nav .nav-link > i:first-child { width: 20px; color: #8395aa; font-size: 1.12rem; text-align: center; }
.modern-sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff !important; transform: translateX(2px); }
.modern-sidebar-nav .nav-link:hover > i:first-child { color: #fff; }
.modern-sidebar-nav .nav-link.active { background: var(--ks-primary) !important; color: #fff !important; box-shadow: 0 7px 18px rgba(8, 74, 65, .3); }
.modern-sidebar-nav .nav-link.active > i { color: #fff; }
.sidebar-submenu-toggle .submenu-arrow { margin-left: auto; transition: transform .2s ease; }
.sidebar-submenu-toggle[aria-expanded="true"] .submenu-arrow { transform: rotate(180deg); }
.modern-sidebar-nav .submenu { display: none; margin: 4px 0 7px 20px; padding: 3px 0 3px 13px; border-left: 1px solid rgba(255,255,255,.12); }
.modern-sidebar-nav .submenu.show { display: block; }
.modern-sidebar-nav .submenu .nav-link { min-height: 34px; padding: 6px 10px; font-size: .78rem; }
.modern-sidebar-nav .submenu .nav-link.active { background: rgba(31, 169, 151, .18) !important; color: #83e0d4 !important; box-shadow: none; }
.nav-badge { margin-left: auto; padding: 2px 6px; border-radius: 5px; background: rgba(232,163,23,.17); color: #f3c55f; font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.sidebar-footer { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-top: 1px solid rgba(255,255,255,.08); background: #0d1826; color: #61748d; font-size: .68rem; }
.sidebar-footer a { display: flex; align-items: center; gap: 7px; color: #aebdce; font-weight: 650; }
.sidebar-footer a:hover { color: #fff; }

/* Shell interactions are independent from the legacy theme script. */
.app-menu, #page-topbar, .main-content { transition: width .2s ease, left .2s ease, margin-left .2s ease, transform .2s ease; }
@media (min-width: 768px) {
  body.shell-sidebar-collapsed .app-menu { width: 78px !important; }
  body.shell-sidebar-collapsed #page-topbar { left: 78px !important; }
  body.shell-sidebar-collapsed .main-content { margin-left: 78px !important; }
  body.shell-sidebar-collapsed .modern-brand { padding: 0 14px; }
  body.shell-sidebar-collapsed .brand-link { justify-content: center; }
  body.shell-sidebar-collapsed .brand-copy,
  body.shell-sidebar-collapsed .sidebar-account-card div,
  body.shell-sidebar-collapsed .sidebar-section-label,
  body.shell-sidebar-collapsed .modern-sidebar-nav .nav-link > span,
  body.shell-sidebar-collapsed .modern-sidebar-nav .submenu,
  body.shell-sidebar-collapsed .modern-sidebar-nav .submenu-arrow,
  body.shell-sidebar-collapsed .sidebar-footer span { display: none !important; }
  body.shell-sidebar-collapsed .sidebar-account-card { justify-content: center; padding: 8px; }
  body.shell-sidebar-collapsed .modern-sidebar-nav .nav-link { justify-content: center; padding-right: 8px; padding-left: 8px; }
  body.shell-sidebar-collapsed .modern-sidebar-nav .nav-link > i:first-child { width: auto; margin: 0; font-size: 1.2rem; }
  body.shell-sidebar-collapsed .sidebar-footer { justify-content: center; padding: 0 10px; }
}

/* Page shell */
.main-content { min-height: 100vh; }
.page-content { min-height: calc(100vh - 58px); padding-top: 96px; padding-bottom: 32px; }
.modern-page-container { max-width: 1560px; padding-right: 28px; padding-left: 28px; }
.modern-page-header { min-height: 58px; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.modern-page-header h1 { margin: 3px 0 0; color: var(--ks-navy); font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 750; letter-spacing: -.035em; }
.page-back-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ks-border); border-radius: 10px; background: var(--ks-surface); color: var(--ks-text); }
.page-back-button:hover { background: var(--ks-primary-soft); border-color: #badbd5; color: var(--ks-primary); }
.modern-footer { position: static; height: auto; padding: 17px 28px; border-top: 1px solid var(--ks-border); background: var(--ks-surface); color: var(--ks-muted); font-size: .77rem; }
.modern-footer a { font-weight: 650; }

/* Reusable controls across legacy views */
.card { border: 1px solid var(--ks-border) !important; border-radius: var(--ks-radius); box-shadow: 0 4px 18px rgba(30,48,66,.05); }
.card-header { padding: 17px 20px; border-bottom: 1px solid var(--ks-border); background: transparent; }
.card-body { padding: 20px; }
.card-title { color: var(--ks-navy); font-weight: 700; letter-spacing: -.015em; }
.btn { border-radius: 9px; font-weight: 650; }
.btn-primary, .btn-success { background: var(--ks-primary); border-color: var(--ks-primary); color: #fff; }
.btn-primary:hover, .btn-success:hover { background: var(--ks-primary-dark); border-color: var(--ks-primary-dark); }
.btn-info { background: #2f7c92; border-color: #2f7c92; color: #fff; }
.btn-warning { background: var(--ks-accent); border-color: var(--ks-accent); color: #312100; }
.btn-danger { background: var(--ks-danger); border-color: var(--ks-danger); }
.btn-light { background: #f4f7f9; border-color: var(--ks-border); color: #425268; }
.btn-sm { min-height: 34px; }
.form-label { margin-bottom: 7px; color: #354357; font-size: .79rem; font-weight: 700; }
.form-control, .form-select, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
  min-height: 42px;
  border: 1px solid #ccd8df;
  border-radius: 9px;
  background-color: #fff;
  color: var(--ks-text);
  box-shadow: none;
}
.form-control:focus, .form-select:focus { border-color: var(--ks-primary); box-shadow: 0 0 0 3px rgba(19,111,99,.11); }
textarea.form-control { min-height: 110px; }
.input-group-text { border-color: #ccd8df; background: #f4f7f9; }
.table-responsive { border: 1px solid var(--ks-border); border-radius: 12px; }
.table { margin-bottom: 0; color: var(--ks-text); }
.table > :not(caption) > * > * { padding: 13px 14px; border-bottom-color: #e9eef2; vertical-align: middle; }
.table thead th { border-bottom-width: 1px; background: #f5f8fa; color: #526174; font-size: .71rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr { transition: background-color .15s ease; }
.table tbody tr:hover { background: #f8fbfb; }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_length label,
div.dt-container .dt-length {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.dataTables_wrapper .dataTables_filter input { min-height: 38px; border: 1px solid #ccd8df !important; border-radius: 8px !important; padding: 7px 10px !important; }
.dataTables_wrapper .dataTables_length select,
div.dt-container .dt-length select,
select.dt-input {
  width: auto !important;
  min-width: 72px !important;
  min-height: 38px;
  margin: 0 3px !important;
  padding: 7px 30px 7px 11px !important;
  border: 1px solid #ccd8df !important;
  border-radius: 8px !important;
  background-color: var(--ks-surface) !important;
  background-position: right 8px center !important;
  color: var(--ks-text) !important;
  line-height: 1.25;
}
.dataTables_wrapper .row:last-child { align-items: center; row-gap: 10px; margin-top: 12px; }
.dataTables_wrapper .dataTables_length { min-height: 40px; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { border-color: var(--ks-primary) !important; border-radius: 7px !important; background: var(--ks-primary) !important; color: #fff !important; }
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 24px 70px rgba(17,28,46,.2); }
.modal-header { padding: 19px 22px; border-bottom-color: var(--ks-border); }
.modal-footer { border-top-color: var(--ks-border); }
.alert { border: 0; border-radius: 11px; }
.badge { border-radius: 6px; font-weight: 700; }

/* Dashboard */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  border-radius: 18px;
  background: var(--ks-navy);
  color: #fff;
  box-shadow: var(--ks-shadow);
}
.dashboard-hero::after { content: ""; position: absolute; right: -45px; top: -80px; width: 230px; height: 230px; border: 44px solid rgba(93,219,201,.11); border-radius: 50%; }
.dashboard-hero-content { position: relative; z-index: 1; }
.dashboard-overline { display: block; margin-bottom: 9px; color: #71d5c8; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-hero h2 { margin: 0 0 8px; color: #fff; font-size: clamp(1.55rem, 3vw, 2.25rem); font-weight: 760; letter-spacing: -.04em; }
.dashboard-hero p { max-width: 650px; margin: 0; color: #afbece; font-size: .9rem; }
.dashboard-user-chip { position: relative; z-index: 1; min-width: 220px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.06); }
.dashboard-user-avatar { width: 45px; height: 45px; flex: 0 0 45px; display: grid; place-items: center; border-radius: 12px; background: #5fc9ba; color: #0d332f; font-size: 1.1rem; font-weight: 850; }
.dashboard-user-chip div { display: flex; flex-direction: column; }
.dashboard-user-chip strong { color: #fff; }
.dashboard-user-chip span { color: #9eb0c3; font-size: .72rem; }
.dashboard-section { margin-top: 25px; }
.dashboard-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.dashboard-section-heading h3 { margin: 0; color: var(--ks-navy); font-size: 1.1rem; font-weight: 750; letter-spacing: -.02em; }
.dashboard-section-heading p { margin: 3px 0 0; color: var(--ks-muted); font-size: .78rem; }
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.module-card { position: relative; min-height: 164px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--ks-border); border-radius: 14px; background: var(--ks-surface); color: var(--ks-text); box-shadow: 0 4px 16px rgba(30,48,66,.04); transition: .18s ease; }
.module-card:hover { color: var(--ks-text); border-color: #b6d5cf; box-shadow: var(--ks-shadow); transform: translateY(-3px); }
.module-card.featured { border-color: #ead49e; background: #fffbef; }
.module-card-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 11px; background: var(--ks-primary-soft); color: var(--ks-primary); font-size: 1.25rem; }
.module-card.featured .module-card-icon { background: #f9e8b9; color: #855e08; }
.module-card strong { margin-bottom: 6px; font-size: .94rem; }
.module-card p { margin: 0 25px 0 0; color: var(--ks-muted); font-size: .76rem; line-height: 1.45; }
.module-card-arrow { position: absolute; right: 17px; bottom: 16px; color: #94a4b5; font-size: 1.05rem; }
.module-label { position: absolute; right: 14px; top: 14px; padding: 3px 7px; border-radius: 5px; background: var(--ks-accent); color: #fff; font-size: .57rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.dashboard-lower-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 16px; }
.dashboard-panel { border: 1px solid var(--ks-border); border-radius: 14px; background: var(--ks-surface); box-shadow: 0 4px 16px rgba(30,48,66,.04); }
.dashboard-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px; border-bottom: 1px solid var(--ks-border); }
.dashboard-panel-header h3 { margin: 0; color: var(--ks-navy); font-size: .96rem; font-weight: 750; }
.dashboard-panel-header span { color: var(--ks-muted); font-size: .72rem; }
.announcement-list { max-height: 300px; overflow-y: auto; padding: 5px 19px; }
.announcement-row { display: grid; grid-template-columns: 35px 1fr; gap: 11px; padding: 14px 0; border-bottom: 1px solid #edf1f4; }
.announcement-row:last-child { border-bottom: 0; }
.announcement-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--ks-accent-soft); color: #936909; }
.announcement-row p { margin: 0 0 5px; line-height: 1.45; }
.announcement-row time { color: var(--ks-muted); font-size: .7rem; }
.account-summary { padding: 20px; }
.account-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf1f4; }
.account-summary-row:last-child { border-bottom: 0; }
.account-summary-row span { color: var(--ks-muted); font-size: .76rem; }
.account-summary-row strong { text-align: right; font-size: .8rem; }
.dashboard-empty { padding: 35px 15px; text-align: center; color: var(--ks-muted); }
.dashboard-empty i { display: block; margin-bottom: 8px; font-size: 1.7rem; }

/* Notifications */
.modern-modal { overflow: hidden; }
.notifications-container { max-height: 430px; overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: 9px 1fr; gap: 11px; padding: 16px 21px; border-bottom: 1px solid var(--ks-border); }
.notification-item:last-child { border-bottom: 0; }
.notification-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ks-accent); box-shadow: 0 0 0 4px var(--ks-accent-soft); }
.notification-item p { margin: 0 0 7px; color: var(--ks-text); line-height: 1.45; }
.notification-item time { display: flex; align-items: center; gap: 5px; color: var(--ks-muted); font-size: .7rem; }
.notification-empty { display: grid; place-items: center; gap: 8px; min-height: 180px; padding: 30px; color: var(--ks-muted); text-align: center; }
.notification-empty i { font-size: 2rem; }
.notification-empty p { margin: 0; }

/* Marketing automation workspace */
.module-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 22px 24px; border: 1px solid #ead49e; border-radius: 15px; background: #fffbef; }
.module-intro-copy { display: flex; align-items: center; gap: 15px; }
.module-intro-icon { width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; border-radius: 13px; background: var(--ks-accent); color: #fff; font-size: 1.45rem; }
.module-intro h2 { margin: 0 0 5px; color: var(--ks-navy); font-size: 1.15rem; font-weight: 750; }
.module-intro p { margin: 0; color: var(--ks-muted); font-size: .8rem; }
.module-chip { padding: 5px 9px; border-radius: 7px; background: #f6e6b9; color: #76520a; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.filter-panel { margin-bottom: 16px; padding: 20px; border: 1px solid var(--ks-border); border-radius: 14px; background: var(--ks-surface); box-shadow: 0 4px 16px rgba(30,48,66,.04); }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr 1.35fr auto; align-items: end; gap: 13px; }
.filter-action { min-height: 42px; padding-right: 21px; padding-left: 21px; white-space: nowrap; }
.results-panel { padding: 19px; border: 1px solid var(--ks-border); border-radius: 14px; background: var(--ks-surface); box-shadow: 0 4px 16px rgba(30,48,66,.04); }
.results-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.results-heading h3 { margin: 0; color: var(--ks-navy); font-size: .96rem; font-weight: 750; }
.results-count { color: var(--ks-muted); font-size: .72rem; }

/* Shopify orders */
.shopify-module-card { border-color: #b8dfbf; background: #f6fcf7; }
.shopify-module-card .module-card-icon { background: #dff4e3; color: #27813a; }
.shopify-module-card .module-label { background: #319745; }
.shopify-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 21px 23px; border: 1px solid #b8dfbf; border-radius: 15px; background: #f6fcf7; }
.shopify-summary-copy { display: flex; align-items: center; gap: 14px; }
.shopify-logo { width: 49px; height: 49px; flex: 0 0 49px; display: grid; place-items: center; border-radius: 13px; background: #319745; color: #fff; font-size: 1.45rem; }
.shopify-summary h2 { margin: 0 0 4px; color: var(--ks-navy); font-size: 1.14rem; font-weight: 750; }
.shopify-summary p { margin: 0; color: var(--ks-muted); font-size: .8rem; }
.shopify-connection { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--ks-border); border-radius: 10px; background: var(--ks-surface); }
.shopify-connection > span { width: 9px; height: 9px; border-radius: 50%; background: #d14c4c; box-shadow: 0 0 0 4px rgba(209,76,76,.12); }
.shopify-connection.connected > span { background: #35a653; box-shadow: 0 0 0 4px rgba(53,166,83,.12); }
.shopify-connection div { display: flex; flex-direction: column; }
.shopify-connection small { color: var(--ks-muted); font-size: .62rem; }
.shopify-connection strong { font-size: .75rem; }
.shopify-alert { display: flex; align-items: center; gap: 12px; padding: 15px 17px; }
.shopify-alert > i { font-size: 1.4rem; }
.shopify-alert div { display: flex; flex-direction: column; gap: 2px; }
.shopify-alert span { font-size: .78rem; }
.shopify-test-banner { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 13px 16px; border: 1px solid #e7c86f; border-radius: 11px; background: #fff8df; color: #765407; }
.shopify-test-banner > i { font-size: 1.35rem; }
.shopify-test-banner div { display: flex; flex-direction: column; gap: 2px; }
.shopify-test-banner strong { font-size: .79rem; }
.shopify-test-banner span { font-size: .72rem; }
.shopify-automation-banner { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 13px 16px; border: 1px solid var(--ks-border); border-radius: 11px; background: var(--ks-surface); }
.shopify-automation-banner > i { font-size: 1.35rem; }
.shopify-automation-banner > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.shopify-automation-banner strong { color: var(--ks-navy); font-size: .79rem; }
.shopify-automation-banner span { color: var(--ks-muted); font-size: .72rem; }
.shopify-automation-banner.ready { border-color: #abd9b5; background: #f3fbf5; }
.shopify-automation-banner.ready > i { color: #288441; }
.shopify-automation-banner.paused { border-color: #efc1c1; background: #fff7f7; }
.shopify-automation-banner.paused > i { color: #c13a3a; }
.shopify-automation-banner.waiting > i { color: #9b6e0b; }
.shopify-automation-banner form { margin: 0; }
.shopify-automation-actions { display: flex !important; flex: 0 0 auto !important; flex-direction: row !important; align-items: center; justify-content: flex-end; gap: .5rem !important; flex-wrap: wrap; }
.shopify-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.shopify-toolbar div { display: flex; align-items: baseline; gap: 6px; }
.shopify-toolbar strong { color: var(--ks-navy); font-size: 1.05rem; }
.shopify-toolbar span { color: var(--ks-muted); font-size: .76rem; }
.shopify-order-list { display: grid; gap: 13px; }
.shopify-order-card { overflow: hidden; border: 1px solid var(--ks-border); border-radius: 14px; background: var(--ks-surface); box-shadow: 0 4px 16px rgba(30,48,66,.04); }
.shopify-order-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 17px; border-bottom: 1px solid var(--ks-border); }
.shopify-order-card > header > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.shopify-order-number { color: var(--ks-navy); font-size: .96rem; }
.shopify-order-card time { color: var(--ks-muted); font-size: .71rem; }
.shopify-order-statuses { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.shopify-automation-stages { display: inline-flex; gap: 4px; margin-right: 4px; }
.shopify-automation-stages span { display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 6px; background: #edf1f4; color: #8a98a7; font-size: .58rem; font-weight: 700; }
.shopify-automation-stages span i { display: none; }
.shopify-automation-stages span.done { background: #e2f4e7; color: #26753a; }
.shopify-automation-stages span.done i { display: inline; }
.order-status { padding: 5px 8px; border-radius: 7px; font-size: .63rem; font-weight: 750; }
.order-status.financial { background: #e6f4ea; color: #257238; }
.order-status.fulfillment { background: #fff1cd; color: #805c08; }
.shopify-order-body { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(260px, 1.2fr) auto; align-items: center; gap: 20px; padding: 17px; }
.shopify-customer { display: flex; align-items: flex-start; gap: 11px; }
.shopify-customer-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 9px; background: var(--ks-primary-soft); color: var(--ks-primary); }
.shopify-customer > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.shopify-customer strong { color: var(--ks-navy); font-size: .83rem; }
.shopify-customer span { overflow: hidden; color: var(--ks-muted); font-size: .7rem; line-height: 1.35; text-overflow: ellipsis; }
.shopify-products { display: grid; gap: 6px; padding-left: 18px; border-left: 1px solid var(--ks-border); }
.shopify-product-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .74rem; }
.shopify-product-row strong { color: var(--ks-primary); }
.shopify-product-row small { color: var(--ks-muted); }
.shopify-total { min-width: 135px; display: flex; flex-direction: column; align-items: flex-end; }
.shopify-total small { color: var(--ks-muted); font-size: .65rem; }
.shopify-total strong { color: var(--ks-navy); font-size: .98rem; }
.shopify-ready-action { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-top: 11px; }
.shopify-ready-action form { margin: 0; }
.shopify-ready-action .btn { white-space: nowrap; }
.ready-sms-state { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 8px; font-size: .68rem; font-weight: 750; }
.ready-sms-state.sent { background: #e4f5e8; color: #24753a; }
.shopify-empty { display: grid; place-items: center; min-height: 330px; padding: 40px; border: 1px solid var(--ks-border); border-radius: 15px; background: var(--ks-surface); text-align: center; }
.shopify-empty > i { margin-bottom: 10px; color: #319745; font-size: 2.6rem; }
.shopify-empty h3 { margin: 0 0 6px; color: var(--ks-navy); font-size: 1.05rem; }
.shopify-empty p { margin: 0 0 18px; color: var(--ks-muted); font-size: .8rem; }

/* Authentication */
body.auth-modern { min-height: 100vh; margin: 0; background: #eef3f5; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .92fr) minmax(440px, 1.08fr); }
.auth-brand-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; background: var(--ks-navy); color: #fff; }
.auth-brand-panel::after { content: ""; position: absolute; right: -130px; bottom: -120px; width: 380px; height: 380px; border: 75px solid rgba(93,219,201,.1); border-radius: 50%; }
.auth-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.auth-brand:hover { color: #fff; }
.auth-brand img { width: 46px; height: 46px; object-fit: cover; border-radius: 12px; }
.auth-brand span { display: flex; flex-direction: column; line-height: 1.1; }
.auth-brand strong { font-size: 1.1rem; }
.auth-brand small { margin-top: 4px; color: #92a6ba; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; }
.auth-pitch { position: relative; z-index: 1; max-width: 520px; }
.auth-pitch span { color: #67d1c2; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.auth-pitch h1 { margin: 12px 0 14px; color: #fff; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.06; letter-spacing: -.055em; }
.auth-pitch p { color: #aebdcd; font-size: .96rem; line-height: 1.65; }
.auth-feature-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.auth-feature-list span { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; color: #d7e0e9; font-size: .72rem; font-weight: 600; letter-spacing: normal; text-transform: none; }
.auth-brand-footer { position: relative; z-index: 1; color: #72869c; font-size: .72rem; }
.auth-form-panel { display: grid; place-items: center; padding: 36px; background: #f8fafb; }
.auth-form-wrap { width: min(100%, 430px); }
.auth-form-heading { margin-bottom: 25px; }
.auth-form-heading span { color: var(--ks-primary); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.auth-form-heading h2 { margin: 8px 0 7px; color: var(--ks-navy); font-size: 1.75rem; font-weight: 760; letter-spacing: -.04em; }
.auth-form-heading p { margin: 0; color: var(--ks-muted); }
.auth-card { padding: 28px; border: 1px solid var(--ks-border); border-radius: 17px; background: #fff; box-shadow: var(--ks-shadow); }
.auth-submit { min-height: 46px; }
.auth-mobile-brand { display: none; }
.auth-centered { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: #f4f7f9; }
.auth-status-card { width: min(100%, 460px); padding: 34px; border: 1px solid var(--ks-border); border-radius: 18px; background: #fff; box-shadow: var(--ks-shadow); text-align: center; }
.auth-status-brand, .auth-status-card .auth-mobile-brand { align-items: center; justify-content: center; gap: 10px; margin-bottom: 26px; color: var(--ks-navy); }
.auth-status-brand { display: inline-flex; }
.auth-status-brand:hover { color: var(--ks-primary); }
.auth-status-brand img, .auth-status-card .auth-mobile-brand img { width: 42px; height: 42px; flex: 0 0 42px; object-fit: cover; border-radius: 10px; }
.auth-status-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 18px; background: var(--ks-primary-soft); color: var(--ks-primary); font-size: 2rem; }
.auth-status-card h1 { margin: 0 0 9px; color: var(--ks-navy); font-size: 1.65rem; font-weight: 760; letter-spacing: -.04em; }
.auth-status-card p { margin-bottom: 24px; color: var(--ks-muted); line-height: 1.6; }

/* Dark mode support */
[data-layout-mode="dark"] body.kurtuba-app { --ks-canvas: #101722; --ks-surface: #17212e; --ks-border: #2b3949; --ks-text: #e4ebf2; --ks-muted: #91a1b3; --ks-navy: #f2f6fa; background: var(--ks-canvas); }
[data-layout-mode="dark"] .app-topbar, [data-layout-mode="dark"] .modern-footer, [data-layout-mode="dark"] .card, [data-layout-mode="dark"] .dashboard-panel, [data-layout-mode="dark"] .module-card { background: var(--ks-surface); }
[data-layout-mode="dark"] .table thead th, [data-layout-mode="dark"] .table tbody tr:hover { background: #1d2937; }
[data-layout-mode="dark"] .form-control, [data-layout-mode="dark"] .form-select { border-color: var(--ks-border); background: #121b26; color: var(--ks-text); }
[data-layout-mode="dark"] .module-card.featured { background: #29271f; }
[data-layout-mode="dark"] .shopify-module-card, [data-layout-mode="dark"] .shopify-summary { border-color: #2e6540; background: #172b20; }
[data-layout-mode="dark"] .app-icon-button, [data-layout-mode="dark"] .modern-dropdown, [data-layout-mode="dark"] .filter-panel, [data-layout-mode="dark"] .results-panel { border-color: var(--ks-border); background: var(--ks-surface); color: var(--ks-text); }
[data-layout-mode="dark"] .credit-pill { border-color: #315e58; background: #173a36; }
[data-layout-mode="dark"] .credit-pill small { color: #8db7b1; }
[data-layout-mode="dark"] .module-intro { border-color: #5b4d2d; background: #29271f; }
[data-layout-mode="dark"] .dataTables_wrapper .dataTables_length select,
[data-layout-mode="dark"] div.dt-container .dt-length select,
[data-layout-mode="dark"] select.dt-input { border-color: var(--ks-border) !important; background-color: #121b26 !important; color: var(--ks-text) !important; }

@media (max-width: 1199.98px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .modern-page-container { padding-right: 18px; padding-left: 18px; }
  .dashboard-lower-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; color: var(--ks-navy); }
  .auth-mobile-brand img { width: 40px; height: 40px; object-fit: cover; border-radius: 10px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .shopify-order-body { grid-template-columns: 1fr 1fr; }
  .shopify-total { grid-column: 1 / -1; align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--ks-border); }
}
@media (max-width: 767.98px) {
  .app-topbar { height: 64px; }
  .app-topbar .navbar-header { padding: 0 12px; }
  .app-icon-button { width: 38px; height: 38px; }
  .credit-pill { min-height: 38px; padding: 4px 9px 4px 5px; }
  .credit-icon { width: 28px; height: 28px; }
  .marketing-module-button { min-height: 38px; padding: 0 10px; font-size: .75rem; }
  .page-content { padding-top: 82px; }
  .modern-page-header { margin-bottom: 15px; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; padding: 23px; }
  .dashboard-user-chip { min-width: 0; width: 100%; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 132px; }
  .modern-footer { padding: 15px 18px; }
  .table-responsive { border-radius: 10px; }
  .card-body { padding: 16px; }
  .auth-form-panel { padding: 25px 18px; }
  .auth-card { padding: 22px; }
  .module-intro { align-items: flex-start; padding: 18px; }
  .module-chip { display: none; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-action { width: 100%; }
  .shopify-summary, .shopify-order-card > header { align-items: flex-start; flex-direction: column; }
  .shopify-connection { width: 100%; }
  .shopify-order-body { grid-template-columns: 1fr; }
  .shopify-products { padding: 14px 0 0; border-top: 1px solid var(--ks-border); border-left: 0; }
  .shopify-total { grid-column: auto; }
  body.kurtuba-app .app-menu { margin-left: 0 !important; transform: translateX(-100%); }
  body.kurtuba-app.shell-menu-open .app-menu { transform: translateX(0); }
  body.kurtuba-app .vertical-overlay { display: block; visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility .2s ease; }
  body.kurtuba-app.shell-menu-open .vertical-overlay { visibility: visible; opacity: 1; }
}
@media (max-width: 430px) {
  .marketing-module-button { width: 38px; padding: 0; justify-content: center; }
  .marketing-module-button span { display: none !important; }
  .topbar-user-dropdown { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.password-leading-icon {
    pointer-events: none;
    z-index: 2;
}

.password-toggle {
    z-index: 3;
}

#password-input {
    position: relative;
    z-index: 1;
}
