/* ===========================================
   CARDPIO WEB DESIGN SYSTEM  Clone
   Based on portal.sandbox.cardapioweb.com
   =========================================== */

/*  CSS Custom Properties  */
:root {
  /*  Primary Palette (Cardpio Web)  */
  --cw-primary: #A543FA;
  --cw-primary-light: #B96BFB;
  --cw-primary-dark: #8B2DE0;
  --cw-primary-bg: #F3EAFF;

  /*  Purple / Accent (Boto SALVAR, Toggle ativo, Tabs)  */
  --cw-purple: #A543FA;
  --cw-purple-hover: #8B2DE0;
  --cw-purple-light: #EDE9FE;
  --cw-purple-lighter: #F5F3FF;

  /*  Neutral Palette  */
  --cw-bg: #F1F5F9;
  --wt-gray: #f5f5f5;
  --cw-surface: #FFFFFF;
  --cw-border: #E2E8F0;
  --cw-border-light: #F0F0F0;
  --cw-border-input: rgba(0, 0, 0, 0.23);
  --cw-border-input-hover: rgba(0, 0, 0, 0.87);

  /*  Text Colors  */
  --cw-text-primary: #334155;
  --cw-text-secondary: #64748B;
  --cw-text-muted: #94A3B8;
  --cw-text-placeholder: #CBD5E1;
  --cw-text-label: rgba(0, 0, 0, 0.6);

  /*  Sidebar  */
  --cw-sidebar-bg: #FFFFFF;
  --cw-sidebar-width: 240px;
  --cw-sidebar-item-hover: #F8FAFC;
  --cw-sidebar-active-color: #A543FA;

  /*  Status Colors  */
  --cw-success: #2E7D32;
  --cw-success-light: #4CAF50;
  --cw-success-bg: #E8F5E9;
  --cw-success-border: #4CAF50;
  --cw-warning: #ED6C02;
  --cw-warning-bg: #FFF3E0;
  --cw-warning-border: #FF9800;
  --cw-danger: #D32F2F;
  --cw-danger-bg: #FFEBEE;
  --cw-danger-border: #EF5350;
  --cw-info: #0288D1;
  --cw-info-bg: #E1F5FE;

  /*  Table  */
  --cw-table-header-bg: #F3EAFF;
  --cw-table-header-text: #64748B;
  --cw-table-row-hover: #F8FAFC;
  --cw-table-border: #F1F5F9;

  /*  Shadows  */
  --cw-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --cw-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --cw-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --cw-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --cw-shadow-modal: 0 11px 15px -7px rgba(0,0,0,0.2), 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12);

  /*  Border Radius  */
  --cw-radius-sm: 4px;
  --cw-radius-md: 8px;
  --cw-radius-lg: 12px;
  --cw-radius-xl: 16px;
  --cw-radius-pill: 50px;

  /*  Typography  */
  --cw-font-family: 'Mulish', 'Roboto', 'Helvetica Neue', sans-serif;
  --cw-font-size-xs: 11px;
  --cw-font-size-sm: 13px;
  --cw-font-size-base: 14px;
  --cw-font-size-md: 15px;
  --cw-font-size-lg: 18px;
  --cw-font-size-xl: 2.4rem;
  --cw-font-size-2xl: 28px;

  /*  Spacing  */
  --cw-spacing-xs: 4px;
  --cw-spacing-sm: 8px;
  --cw-spacing-md: 16px;
  --cw-spacing-lg: 24px;
  --cw-spacing-xl: 32px;
  --cw-spacing-2xl: 48px;

  /*  Transitions  */
  --cw-transition: 0.2s ease;
  --cw-transition-slow: 0.3s ease;
}

/*  Reset & Base  */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--cw-font-family);
  font-size: var(--cw-font-size-base);
  color: var(--cw-text-primary);
  background: var(--cw-bg);
  line-height: 1.5;
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

/*  App Layout  */
.cw-app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/*  Sidebar  */
.cw-sidebar {
  width: var(--cw-sidebar-width);
  min-width: var(--cw-sidebar-width);
  background: var(--cw-sidebar-bg);
  border-right: 1px solid var(--cw-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: width 0.25s ease, min-width 0.25s ease, border-color 0.25s ease;
}

/* Sidebar collapsed state */
.cw-app.sidebar-collapsed .cw-sidebar {
  width: 0;
  min-width: 0;
  border-right-color: transparent;
}

/* Sidebar toggle button */
.sidebar-toggle {
  position: fixed;
  left: calc(var(--cw-sidebar-width) - 12px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 300;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #D1D5DB;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: left 0.25s ease, box-shadow 0.15s;
}
.sidebar-toggle:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  border-color: #9CA3AF;
}
.sidebar-toggle .material-icons-outlined {
  font-size: 14px;
  color: #6B7280;
  pointer-events: none;
}
.cw-app.sidebar-collapsed .sidebar-toggle {
  left: 4px;
}

.cw-sidebar-logo {
  padding: 20px 20px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cw-logo-svg {
  width: 150px;
  height: 36px;
}

.cw-logo-badge {
  background: linear-gradient(135deg, var(--cw-primary), #B96BFB);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--cw-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar Store Info */
.cw-sidebar-store {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  margin: 0 12px;
  border-radius: var(--cw-radius-md);
}

.cw-store-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cw-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cw-primary);
  font-size: 18px;
  flex-shrink: 0;
}

.cw-store-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cw-store-name {
  font-size: var(--cw-font-size-sm);
  font-weight: 600;
  color: var(--cw-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-store-location {
  font-size: var(--cw-font-size-xs);
  color: var(--cw-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Status */
.cw-sidebar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 12px 12px;
  padding: 8px 16px;
  background: var(--cw-primary);
  color: white;
  border-radius: var(--cw-radius-md);
  font-size: var(--cw-font-size-sm);
  font-weight: 500;
}

/* Sidebar Navigation */
.cw-sidebar-nav {
  flex: 1;
  padding: 8px 0;
}

.cw-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--cw-text-secondary);
  font-size: var(--cw-font-size-base);
  font-weight: 500;
  transition: all var(--cw-transition);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.cw-nav-item:hover {
  background: var(--cw-sidebar-item-hover);
  color: var(--cw-text-primary);
}

.cw-nav-item.active,
.cw-nav-item.active:hover {
  color: #2196F3 !important;
  border-left-color: #2196F3 !important;
  font-weight: 700 !important;
  background: none !important;
}

.cw-nav-item .material-icons-outlined {
  font-size: 22px;
  width: 24px;
  text-align: center;
  -webkit-text-stroke: 0.4px currentColor;
}

/* Sidebar Footer */
.cw-sidebar-footer {
  border-top: 1px solid var(--cw-border);
  padding: 8px 0 12px;
}

.cw-nav-help {
  color: var(--cw-primary) !important;
}

/*  Main Content  */
.cw-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

/* Header */
.cw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--cw-bg);
  min-height: 60px;
  flex-shrink: 0;
}

.cw-page-title {
  font-size: var(--cw-font-size-xl);
  font-weight: 500;
  color: var(--cw-text-primary);
}

.cw-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cw-header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cw-text-secondary);
  transition: all var(--cw-transition);
}

.cw-header-btn:hover {
  background: var(--cw-sidebar-item-hover);
  color: var(--cw-text-primary);
  box-shadow: var(--cw-shadow-sm);
}

/* Content Area */
.cw-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px 32px;
}

/*  CARD COMPONENT  */
.cw-card {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-lg);
  box-shadow: var(--cw-shadow-card);
  border: 1px solid var(--cw-border-light);
  overflow: hidden;
}

.cw-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--cw-border-light);
}

.cw-card-title {
  font-size: var(--cw-font-size-md);
  font-weight: 600;
  color: var(--cw-text-primary);
}

.cw-card-body {
  padding: 24px;
}

/*  TABLE COMPONENT (Cardpio Web Style)  */
.cw-table-wrapper {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-lg);
  box-shadow: var(--cw-shadow-card);
  border: 1px solid var(--cw-border-light);
  overflow: hidden;
}

.cw-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 12px;
}

.cw-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  padding: 8px 14px;
  min-width: 280px;
  transition: border-color var(--cw-transition);
}

.cw-search-box:focus-within {
  border-color: var(--cw-primary);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.cw-search-box .material-icons-outlined {
  color: var(--cw-text-placeholder);
  font-size: 20px;
}

.cw-search-box input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: var(--cw-font-size-sm);
  color: var(--cw-text-primary);
  width: 100%;
  background: transparent;
}

.cw-search-box input::placeholder {
  color: var(--cw-text-placeholder);
}

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

.cw-table thead th {
  background: var(--cw-table-header-bg);
  padding: 12px 16px;
  text-align: left;
  font-size: var(--cw-font-size-sm);
  font-weight: 600;
  color: var(--cw-table-header-text);
  white-space: nowrap;
  border-bottom: 1px solid var(--cw-border-light);
}

.cw-table tbody td {
  padding: 14px 16px;
  font-size: var(--cw-font-size-sm);
  color: var(--cw-text-primary);
  border-bottom: 1px solid var(--cw-table-border);
  vertical-align: middle;
}

.cw-table tbody tr:hover {
  background: var(--cw-table-row-hover);
}

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

.cw-table-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 20px;
  gap: 16px;
  border-top: 1px solid var(--cw-border-light);
  font-size: var(--cw-font-size-sm);
  color: var(--cw-text-muted);
}

/*  BUTTON COMPONENTS  */
.cw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--cw-radius-md);
  font-family: inherit;
  font-size: var(--cw-font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--cw-transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

.cw-btn .material-icons-outlined {
  font-size: 18px;
}

/* Primary Button (Novo cupom style) */
.cw-btn-outline {
  background: var(--cw-surface);
  color: var(--cw-text-primary);
  border: 1px solid var(--cw-border);
}

.cw-btn-outline:hover {
  background: var(--cw-sidebar-item-hover);
  box-shadow: var(--cw-shadow-sm);
}

/* Primary Filled (Laranja) */
.cw-btn-primary {
  background: var(--cw-primary);
  color: white;
  border-color: var(--cw-primary);
}

.cw-btn-primary:hover {
  background: var(--cw-primary-dark);
  box-shadow: var(--cw-shadow-md);
  transform: translateY(-1px);
}

/* SALVAR Button (Purple  Cardpio Web modal) */
.cw-btn-save {
  background: var(--cw-purple);
  color: white;
  border-color: var(--cw-purple);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 10px 24px;
  border-radius: var(--cw-radius-sm);
}

.cw-btn-save:hover {
  background: var(--cw-purple-hover);
  box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2), 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12);
}

/* CANCELAR Button (Cardpio Web modal) */
.cw-btn-cancel {
  background: transparent;
  color: var(--cw-text-primary);
  border: 1px solid var(--cw-border);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 10px 24px;
  border-radius: var(--cw-radius-sm);
}

.cw-btn-cancel:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Success Button */
.cw-btn-success {
  background: var(--cw-success);
  color: white;
  border-color: var(--cw-success);
}

.cw-btn-success:hover {
  background: #1B5E20;
  box-shadow: var(--cw-shadow-md);
}

/* Danger Button */
.cw-btn-danger {
  background: var(--cw-danger);
  color: white;
  border-color: var(--cw-danger);
}

.cw-btn-danger:hover {
  background: #C62828;
}

/* Ghost Button */
.cw-btn-ghost {
  background: transparent;
  color: var(--cw-text-secondary);
  border: 1px solid var(--cw-border);
}

.cw-btn-ghost:hover {
  background: var(--cw-sidebar-item-hover);
}

/* Filter Button */
.cw-btn-filter {
  background: var(--cw-surface);
  color: var(--cw-text-secondary);
  border: 1px solid var(--cw-border);
  padding: 8px 16px;
}

.cw-btn-filter:hover {
  background: var(--cw-sidebar-item-hover);
}

/* Small Button */
.cw-btn-sm {
  padding: 5px 12px;
  font-size: var(--cw-font-size-xs);
}

/*  BADGE/TAG COMPONENT  */
.cw-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: var(--cw-radius-pill);
  font-size: var(--cw-font-size-xs);
  font-weight: 600;
  white-space: nowrap;
}

.cw-badge-success {
  background: var(--cw-success-bg);
  color: var(--cw-success);
  border: 1px solid var(--cw-success);
}

.cw-badge-warning {
  background: var(--cw-warning-bg);
  color: var(--cw-warning);
  border: 1px solid var(--cw-warning);
}

.cw-badge-danger {
  background: var(--cw-danger-bg);
  color: var(--cw-danger);
  border: 1px solid var(--cw-danger);
}

.cw-badge-info {
  background: var(--cw-info-bg);
  color: var(--cw-info);
  border: 1px solid var(--cw-info);
}

.cw-badge-purple {
  background: var(--cw-purple-light);
  color: var(--cw-purple);
  border: 1px solid var(--cw-purple);
}

.cw-badge-neutral {
  background: #F5F5F5;
  color: var(--cw-text-muted);
  border: 1px solid var(--cw-border);
}

/* 
   FORM COMPONENTS  MUI Outlined Style (Cardpio Web)
    */

.cw-form-group {
  margin-bottom: 20px;
}

/*  Simple label (above input)  */
.cw-label {
  display: block;
  font-size: var(--cw-font-size-sm);
  font-weight: 600;
  color: var(--cw-text-primary);
  margin-bottom: 6px;
}

.cw-label-optional {
  font-weight: 400;
  color: var(--cw-text-muted);
  font-size: var(--cw-font-size-xs);
}

/*  MUI Outlined Input (floating label)  */
.cw-outlined {
  position: relative;
  width: 100%;
}

.cw-outlined input,
.cw-outlined textarea,
.cw-outlined select {
  width: 100%;
  padding: 16.5px 14px;
  border: 1px solid var(--cw-border-input);
  border-radius: var(--cw-radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--cw-text-primary);
  background: transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.cw-outlined input:hover,
.cw-outlined textarea:hover,
.cw-outlined select:hover {
  border-color: var(--cw-border-input-hover);
}

.cw-outlined input:focus,
.cw-outlined textarea:focus,
.cw-outlined select:focus {
  border-color: var(--cw-purple);
  border-width: 2px;
  padding: 15.5px 13px;
  box-shadow: none;
}

.cw-outlined label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--cw-text-label);
  pointer-events: none;
  transition: all 0.2s ease;
  background: var(--cw-surface);
  padding: 0;
}

.cw-outlined textarea ~ label {
  top: 18px;
  transform: none;
}

.cw-outlined input:focus ~ label,
.cw-outlined input:not(:placeholder-shown) ~ label,
.cw-outlined textarea:focus ~ label,
.cw-outlined textarea:not(:placeholder-shown) ~ label,
.cw-outlined select:focus ~ label,
.cw-outlined select:not([value=""]) ~ label,
.cw-outlined .cw-outlined-label-float {
  top: 0;
  transform: translateY(-50%);
  font-size: 12px;
  padding: 0 5px;
  color: var(--cw-text-label);
}

.cw-outlined input:focus ~ label,
.cw-outlined textarea:focus ~ label,
.cw-outlined select:focus ~ label {
  color: var(--cw-purple);
}

.cw-outlined .cw-input-hint {
  font-size: 12px;
  color: var(--cw-text-muted);
  margin: 4px 14px 0;
  line-height: 1.4;
}

.cw-outlined .cw-input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cw-text-muted);
  font-size: 20px;
  pointer-events: none;
}

/* Prefix (R$) inside input */
.cw-outlined .cw-input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cw-text-muted);
  font-size: 16px;
  pointer-events: none;
}

.cw-outlined .has-prefix {
  padding-left: 40px;
}

.cw-outlined .has-prefix:focus {
  padding-left: 39px;
}

/*  Regular Simple Input (non-MUI)  */
.cw-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  font-family: inherit;
  font-size: var(--cw-font-size-base);
  color: var(--cw-text-primary);
  background: var(--cw-surface);
  transition: border-color var(--cw-transition), box-shadow var(--cw-transition);
}

.cw-input:focus {
  outline: none;
  border-color: var(--cw-purple);
  box-shadow: 0 0 0 1px var(--cw-purple);
}

.cw-input::placeholder {
  color: var(--cw-text-placeholder);
}

.cw-input-hint {
  font-size: var(--cw-font-size-xs);
  color: var(--cw-text-muted);
  margin-top: 4px;
}

/*  Select  */
.cw-select {
  width: 100%;
  padding: 16.5px 14px;
  border: 1px solid var(--cw-border-input);
  border-radius: var(--cw-radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--cw-text-primary);
  background: var(--cw-surface);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23757575' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
  cursor: pointer;
  transition: border-color var(--cw-transition), box-shadow var(--cw-transition);
}

.cw-select:focus {
  outline: none;
  border-color: var(--cw-purple);
  border-width: 2px;
  padding: 15.5px 13px;
  padding-right: 35px;
}

/*  Textarea  */
.cw-textarea {
  width: 100%;
  padding: 16.5px 14px;
  border: 1px solid var(--cw-border-input);
  border-radius: var(--cw-radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--cw-text-primary);
  background: var(--cw-surface);
  resize: vertical;
  min-height: 100px;
  transition: border-color var(--cw-transition);
}

.cw-textarea:focus {
  outline: none;
  border-color: var(--cw-purple);
  border-width: 2px;
  padding: 15.5px 13px;
}

/*  Segmented Tabs (Desconto em R$ / % / Entrega grtis)  */
.cw-segmented {
  display: flex;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.cw-segmented-btn {
  flex: 1;
  padding: 12px 16px;
  font-family: inherit;
  font-size: var(--cw-font-size-base);
  font-weight: 600;
  color: var(--cw-text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--cw-transition);
  text-align: center;
  position: relative;
}

.cw-segmented-btn:not(:last-child) {
  border-right: 1px solid var(--cw-border);
}

.cw-segmented-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.cw-segmented-btn.active {
  color: var(--cw-text-primary);
  border-bottom-color: var(--cw-text-primary);
  font-weight: 600;
}

/*  Toggle Switch — see unified .cw-toggle definition in Prototypes section (line ~6947)  */

/*  Checkbox (MUI style)  */
.cw-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--cw-font-size-base);
  color: var(--cw-text-primary);
}

.cw-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid var(--cw-text-muted);
  border-radius: 2px;
  appearance: none;
  cursor: pointer;
  transition: all var(--cw-transition);
  position: relative;
  flex-shrink: 0;
}

.cw-checkbox input[type="checkbox"]:hover {
  border-color: var(--cw-purple);
}

.cw-checkbox input[type="checkbox"]:checked {
  background: var(--cw-purple);
  border-color: var(--cw-purple);
}

.cw-checkbox input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  color: white;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
}

/*  Pill Toggle (R$ / % switch)  */
.cw-pill-toggle {
  display: inline-flex;
  background: var(--cw-border-light);
  border-radius: var(--cw-radius-pill);
  padding: 3px;
  gap: 2px;
}

.cw-pill-toggle-btn {
  padding: 6px 16px;
  border-radius: var(--cw-radius-pill);
  font-size: var(--cw-font-size-sm);
  font-weight: 600;
  background: transparent;
  color: var(--cw-text-muted);
  transition: all var(--cw-transition);
}

.cw-pill-toggle-btn.active {
  background: var(--cw-surface);
  color: var(--cw-text-primary);
  box-shadow: var(--cw-shadow-sm);
}

/*  Section Divider (Limitaes do cupom)  */
.cw-form-section {
  font-size: var(--cw-font-size-md);
  font-weight: 600;
  color: var(--cw-text-primary);
  padding: 16px 0 8px;
  margin-top: 8px;
  border-top: 1px solid var(--cw-border-light);
}

/*  MODAL  */
.cw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: cw-fadeIn 0.2s ease;
}

.cw-modal {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-sm);
  box-shadow: var(--cw-shadow-modal);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: cw-slideUp 0.3s ease;
}

.cw-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
}

.cw-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--cw-text-primary);
}

.cw-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cw-text-muted);
  transition: all var(--cw-transition);
}

.cw-modal-close:hover {
  background: var(--cw-sidebar-item-hover);
  color: var(--cw-text-primary);
}

.cw-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.cw-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--cw-border-light);
}

/*  ACTION ICON BUTTONS (table row actions)  */
.cw-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cw-text-muted);
  transition: all var(--cw-transition);
}

.cw-action-btn:hover {
  background: var(--cw-sidebar-item-hover);
  color: var(--cw-text-primary);
}

.cw-action-btn .material-icons-outlined {
  font-size: 20px;
}

/*  CHECKBOX IN TABLE (Ativo column)  */
.cw-table-check {
  width: 20px;
  height: 20px;
  border-radius: var(--cw-radius-sm);
  background: var(--cw-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

/*  PAGINATION  */
.cw-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cw-pagination-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cw-text-muted);
  transition: all var(--cw-transition);
  font-size: 12px;
}

.cw-pagination-btn:hover {
  background: var(--cw-sidebar-item-hover);
  color: var(--cw-text-primary);
}

/*  ANIMATIONS  */
@keyframes cw-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cw-slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cw-scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/*  PROTOTYPES PAGE  App Store Style  */
.prototypes-hero {
  text-align: left;
  padding: 40px 0 32px;
}

.prototypes-hero h2 {
  font-size: var(--cw-font-size-2xl);
  font-weight: 600;
  color: var(--cw-text-primary);
  margin-bottom: 8px;
}

.prototypes-hero p {
  font-size: var(--cw-font-size-md);
  color: var(--cw-text-secondary);
  max-width: 600px;
}

.prototypes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 0 0 40px;
}

.prototype-card {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-xl);
  border: 1px solid var(--cw-border-light);
  overflow: hidden;
  transition: all var(--cw-transition-slow);
  cursor: pointer;
  position: relative;
  animation: cw-scaleIn 0.4s ease backwards;
}

.prototype-card:nth-child(1) { animation-delay: 0.05s; }
.prototype-card:nth-child(2) { animation-delay: 0.1s; }
.prototype-card:nth-child(3) { animation-delay: 0.15s; }
.prototype-card:nth-child(4) { animation-delay: 0.2s; }

.prototype-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cw-shadow-lg);
  border-color: transparent;
}

.prototype-card-banner {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.prototype-card-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, white, transparent);
}

.prototype-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--cw-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  box-shadow: var(--cw-shadow-md);
  position: relative;
  z-index: 1;
}

.prototype-card-body {
  padding: 16px 20px 20px;
}

.prototype-card-name {
  font-size: var(--cw-font-size-md);
  font-weight: 600;
  color: var(--cw-text-primary);
  margin-bottom: 4px;
}

.prototype-card-desc {
  font-size: var(--cw-font-size-sm);
  color: var(--cw-text-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
  min-height: 36px;
}

.prototype-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prototype-card-status {
  font-size: var(--cw-font-size-xs);
  font-weight: 600;
}

.prototype-card-btn {
  padding: 6px 16px;
  border-radius: var(--cw-radius-pill);
  font-size: var(--cw-font-size-xs);
  font-weight: 600;
  background: var(--cw-primary-bg);
  color: var(--cw-primary);
  border: none;
  cursor: pointer;
  transition: all var(--cw-transition);
}

.prototype-card-btn:hover {
  background: var(--cw-primary);
  color: white;
}

.prototype-card-btn.disabled {
  background: #F5F5F5;
  color: var(--cw-text-muted);
  cursor: not-allowed;
}

/*  DESIGN SYSTEM PAGE  */
.ds-section {
  margin-bottom: 40px;
}

.ds-section-title {
  font-size: var(--cw-font-size-lg);
  font-weight: 600;
  color: var(--cw-text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cw-primary);
  display: inline-block;
}

.ds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.ds-color-card {
  border-radius: var(--cw-radius-md);
  overflow: hidden;
  border: 1px solid var(--cw-border-light);
  box-shadow: var(--cw-shadow-sm);
}

.ds-color-swatch {
  height: 72px;
  display: flex;
  align-items: flex-end;
  padding: 8px 12px;
}

.ds-color-label {
  padding: 10px 12px;
  background: var(--cw-surface);
}

.ds-color-name {
  font-size: var(--cw-font-size-sm);
  font-weight: 600;
  color: var(--cw-text-primary);
}

.ds-color-value {
  font-size: var(--cw-font-size-xs);
  color: var(--cw-text-muted);
  font-family: 'Courier New', monospace;
}

.ds-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ds-typography-item {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: var(--cw-surface);
  border-radius: var(--cw-radius-md);
  border: 1px solid var(--cw-border-light);
}

.ds-typography-sample {
  margin-bottom: 4px;
}

.ds-typography-meta {
  font-size: var(--cw-font-size-xs);
  color: var(--cw-text-muted);
  font-family: 'Courier New', monospace;
}

.ds-component-preview {
  padding: 24px;
  background: var(--cw-surface);
  border-radius: var(--cw-radius-md);
  border: 1px solid var(--cw-border-light);
}

.ds-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ds-spacer {
  height: 16px;
}

/*  UTILITY CLASSES  */
.text-muted { color: var(--cw-text-muted); }
.text-primary { color: var(--cw-primary); }
.text-success { color: var(--cw-success); }
.text-danger { color: var(--cw-danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 600; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* 
   CHECKLISTS MODULE
    */

/*  Nav Section  */
.cw-nav-divider {
  height: 1px;
  background: var(--cw-border-light);
  margin: 8px 20px;
}

.cw-nav-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--cw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 20px 8px;
}

/*  Stats Row  */
.ck-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ck-stat-card {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--cw-shadow-card);
  border: 1px solid var(--cw-border-light);
  transition: all var(--cw-transition);
}

.ck-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cw-shadow-md);
}

.ck-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--cw-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.ck-stat-content {
  display: flex;
  flex-direction: column;
}

.ck-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--cw-text-primary);
  line-height: 1.2;
}

.ck-stat-label {
  font-size: 13px;
  color: var(--cw-text-muted);
}

/*  Actions Row  */
.ck-actions-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

/*  Dashboard Grid  */
.ck-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/*  Avatar  */
.ck-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.ck-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/*  Collaborator Row  */
.ck-collab-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cw-border-light);
}

.ck-collab-row:last-child { border-bottom: none; }

.ck-collab-rank {
  font-size: 14px;
  font-weight: 600;
  color: var(--cw-text-muted);
  min-width: 28px;
}

.ck-collab-info {
  flex: 1;
  min-width: 0;
}

.ck-collab-name {
  font-weight: 600;
  font-size: 14px;
}

.ck-collab-role {
  font-size: 12px;
  color: var(--cw-text-muted);
}

.ck-collab-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.ck-score-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--cw-primary);
}

.ck-score-label {
  font-size: 12px;
  color: var(--cw-text-muted);
}

/*  Category Icon  */
.ck-category-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--cw-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ck-category-icon .material-icons-outlined { font-size: 20px; }

/*  Progress Mini  */
.ck-progress-mini {
  width: 80px;
  height: 6px;
  background: var(--cw-border-light);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}


.ck-progress-bar {
  height: 100%;
  background: var(--cw-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/*  Template Builder Items  */
.ck-item-builder {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-md);
  background: var(--cw-table-row-hover);
  animation: cw-scaleIn 0.2s ease;
}

.ck-item-drag { cursor: grab; color: var(--cw-text-placeholder); padding-top: 8px; }
.ck-item-fields { flex: 1; }
.ck-empty-items { text-align: center; padding: 40px; }

/*  Template Show Items  */
.ck-show-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--cw-border-light);
}
.ck-show-item:last-child { border-bottom: none; }
.ck-show-item-num { width: 28px; height: 28px; border-radius: 50%; background: var(--cw-primary-bg); color: var(--cw-primary); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.ck-show-item-icon { color: var(--cw-text-muted); }
.ck-show-item-content { flex: 1; }
.ck-show-item-name { font-weight: 500; }
.ck-show-item-desc { font-size: 12px; color: var(--cw-text-muted); margin-top: 2px; }

/*  Template Header  */
.ck-template-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.ck-template-icon { width: 56px; height: 56px; border-radius: var(--cw-radius-lg); display: flex; align-items: center; justify-content: center; }
.ck-template-icon .material-icons-outlined { font-size: 28px; }

/*  Meta Row  */
.ck-meta-row { display: flex; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.ck-meta-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--cw-text-secondary); background: var(--cw-surface); padding: 8px 14px; border-radius: var(--cw-radius-md); border: 1px solid var(--cw-border-light); }
.ck-meta-item .material-icons-outlined { font-size: 18px; color: var(--cw-primary); }

/*  Filter Row  */
.ck-filter-row { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

/*  Execution Interface  */
.ck-exec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ck-exec-timer { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 600; color: var(--cw-primary); background: var(--cw-primary-bg); padding: 10px 20px; border-radius: var(--cw-radius-md); }
.ck-exec-timer .material-icons-outlined { font-size: 24px; }
.ck-exec-progress { height: 8px; background: var(--cw-border-light); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.ck-exec-progress-bar { height: 100%; background: var(--cw-primary); border-radius: 4px; transition: width 0.5s ease; }
.ck-exec-items { display: flex; flex-direction: column; gap: 12px; }

.ck-exec-item { display: flex; gap: 16px; padding: 20px; background: var(--cw-surface); border-radius: var(--cw-radius-lg); border: 1px solid var(--cw-border-light); box-shadow: var(--cw-shadow-sm); transition: all var(--cw-transition); }
.ck-exec-item:hover { box-shadow: var(--cw-shadow-md); }
.ck-exec-item.completed { background: var(--cw-table-row-hover); border-color: var(--cw-success-border); }
.ck-exec-item.completed.feito-item { border-left: 3px solid var(--cw-success); }
.ck-exec-item.completed.nao-feito-item { border-left: 3px solid var(--cw-danger); background: #FFF8F8; }

.ck-exec-item-number { width: 32px; height: 32px; border-radius: 50%; background: var(--cw-primary-bg); color: var(--cw-primary); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.ck-exec-item.completed .ck-exec-item-number { background: var(--cw-success-bg); color: var(--cw-success); }
.ck-exec-item.completed.nao-feito-item .ck-exec-item-number { background: var(--cw-danger-bg); color: var(--cw-danger); }
.ck-exec-item-content { flex: 1; }
.ck-exec-item-header { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.ck-exec-item-name { font-size: 15px; }

/*  Score/Podium  */
.ck-score-bar { width: 120px; height: 8px; background: var(--cw-border-light); border-radius: 4px; overflow: hidden; }
.ck-score-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.ck-podium { display: flex; justify-content: center; align-items: flex-end; gap: 24px; margin-bottom: 32px; padding: 20px 0; }
.ck-podium-item { text-align: center; background: var(--cw-surface); border-radius: var(--cw-radius-lg); padding: 24px 20px; box-shadow: var(--cw-shadow-card); border: 1px solid var(--cw-border-light); min-width: 140px; transition: all var(--cw-transition); }
.ck-podium-first { transform: scale(1.1); border-color: var(--cw-primary); box-shadow: 0 4px 20px rgba(165, 67, 250, 0.15); }
.ck-podium-avatar { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; font-weight: 600; margin: 0 auto 10px; }
.ck-podium-name { font-weight: 600; margin-bottom: 4px; }
.ck-podium-score { font-size: 24px; font-weight: 600; color: var(--cw-primary); }
.ck-podium-rank { font-size: 28px; margin-top: 4px; }

/* 
   COLLAPSIBLE NAV GROUP (Sidebar Submenu)
    */
.cw-nav-divider { height: 1px; background: var(--cw-border-light); margin: 8px 16px; }

.cw-nav-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 20px; background: none; border: none; color: var(--cw-text-secondary); font-family: inherit; font-size: var(--cw-font-size-base); font-weight: 600; cursor: pointer; transition: all var(--cw-transition); border-left: 3px solid transparent; }
.cw-nav-group-toggle:hover { background: var(--cw-sidebar-item-hover); color: var(--cw-text-primary); }
.cw-nav-group.open .cw-nav-group-toggle,
.cw-nav-group.open .cw-nav-group-toggle:hover { color: #2196F3 !important; border-left-color: #2196F3 !important; font-weight: 700 !important; background: none !important; }

.cw-nav-group-left { display: flex; align-items: center; gap: 12px; }
.cw-nav-group-left .material-icons-outlined { font-size: 22px; width: 24px; text-align: center; -webkit-text-stroke: 0.4px currentColor; }
.cw-nav-chevron {
  font-size: 13px !important;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.2s ease;
  flex-shrink: 0;
  opacity: 0.65;
}
.cw-nav-group-toggle:hover .cw-nav-chevron { background: rgba(0,0,0,0.1); opacity: 1; }
.cw-nav-group.open .cw-nav-chevron { transform: rotate(180deg); opacity: 1; }

.cw-nav-group-items { max-height: 0; overflow: hidden; transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1); background: var(--cw-sidebar-item-hover); }
.cw-nav-group.open .cw-nav-group-items { max-height: 600px; }

.cw-nav-sub-item { display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 36px; color: var(--cw-text-muted); font-size: var(--cw-font-size-sm); font-weight: 500; transition: all var(--cw-transition); border-left: 3px solid transparent; cursor: pointer; }
.cw-nav-sub-item .material-icons-outlined { font-size: 18px; width: 20px; text-align: center; -webkit-text-stroke: 0.4px currentColor; }
.cw-nav-sub-item:hover { color: var(--cw-text-primary); background: rgba(165, 67, 250, 0.04); }
.cw-nav-sub-item.active,
.cw-nav-sub-item.active:hover { color: #2196F3 !important; border-left-color: #2196F3 !important; font-weight: 700 !important; background: none !important; }

.cw-nav-sub-group { display: block; }
.cw-nav-sub-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 16px 8px 36px; background: none; border: none; color: var(--cw-text-muted); font-family: inherit; font-size: var(--cw-font-size-sm); font-weight: 500; cursor: pointer; transition: all var(--cw-transition); border-left: 3px solid transparent; box-sizing: border-box; }
.cw-nav-sub-group-toggle:hover { color: var(--cw-text-primary); background: rgba(165, 67, 250, 0.04); }
.cw-nav-sub-group.open .cw-nav-sub-group-toggle { color: var(--cw-text-primary); }
.cw-nav-sub-group-left { display: flex; align-items: center; gap: 10px; }
.cw-nav-sub-group-left .material-icons-outlined { font-size: 18px; width: 20px; text-align: center; }
.cw-nav-sub-chevron { font-size: 13px !important; transition: transform 0.25s ease; opacity: 0.6; }
.cw-nav-sub-group.open .cw-nav-sub-chevron { transform: rotate(180deg); opacity: 1; }
.cw-nav-sub-group-items { display: none; }
.cw-nav-sub-group.open .cw-nav-sub-group-items { display: block; }
.cw-nav-sub-sub-item { display: flex; align-items: center; gap: 10px; padding: 7px 20px 7px 56px; color: var(--cw-text-muted); font-size: 12px; font-weight: 500; transition: all var(--cw-transition); border-left: 3px solid transparent; cursor: pointer; text-decoration: none; box-sizing: border-box; width: 100%; }
.cw-nav-sub-sub-item .material-icons-outlined { font-size: 15px; width: 16px; text-align: center; flex-shrink: 0; }
.cw-nav-sub-sub-item:hover { color: var(--cw-text-primary); background: rgba(165, 67, 250, 0.04); }
.cw-nav-sub-sub-item.active,
.cw-nav-sub-sub-item.active:hover { color: #2196F3 !important; border-left-color: #2196F3 !important; font-weight: 700 !important; background: none !important; }

/* 
   SIDEBAR DRAWER (Template Creation)
    */
.ck-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 900; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.ck-drawer-overlay.open { opacity: 1; pointer-events: all; }
.ck-drawer { position: fixed; top: 0; right: 0; width: 580px; max-width: 92vw; height: 100vh; background: var(--cw-surface); box-shadow: -8px 0 32px rgba(0,0,0,0.15); z-index: 950; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; }
.ck-drawer.open { transform: translateX(0); }
.ck-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--cw-border-light); flex-shrink: 0; }
.ck-drawer-header h3 { font-size: 18px; font-weight: 600; color: var(--cw-text-primary); display: flex; align-items: center; gap: 10px; }
.ck-drawer-header h3 .material-icons-outlined { color: var(--cw-primary); }
.ck-drawer-close { width: 36px; height: 36px; border-radius: 50%; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--cw-text-muted); cursor: pointer; transition: all var(--cw-transition); border: none; }
.ck-drawer-close:hover { background: var(--cw-sidebar-item-hover); color: var(--cw-text-primary); }
.ck-drawer > form { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.ck-drawer-body { flex: 1; overflow-y: auto; padding: 24px; }
.ck-drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--cw-border-light); flex-shrink: 0; }

/* Scheduling section */
.ck-schedule-section { border-top: 1px solid var(--cw-border-light); padding-top: 16px; margin-top: 8px; }
.ck-section-title { font-weight: 600; font-size: 15px; color: var(--cw-text-primary); display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.ck-section-title .material-icons-outlined { font-size: 18px; color: var(--cw-primary); }
.ck-days-grid { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ck-day-chip { display: flex; align-items: center; justify-content: center; width: 42px; height: 36px; border-radius: var(--cw-radius-md); border: 1px solid var(--cw-border); font-size: 12px; font-weight: 600; color: var(--cw-text-muted); cursor: pointer; transition: all 0.2s; user-select: none; }
.ck-day-chip:hover { border-color: var(--cw-primary); color: var(--cw-primary); }
.ck-day-chip.active { background: var(--cw-primary); color: white; border-color: var(--cw-primary); }
.ck-day-chip input { display: none; }
.ck-contact-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 32px; }
.ck-contact-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--cw-radius-pill); font-size: 12px; font-weight: 500; animation: cw-scaleIn 0.2s ease; }
.ck-contact-tag.whatsapp { background: #E8F5E9; color: #2E7D32; border: 1px solid #66BB6A; }
.ck-contact-tag.email { background: #E3F2FD; color: #1565C0; border: 1px solid #42A5F5; }
.ck-contact-tag button { background: none; border: none; cursor: pointer; color: inherit; font-size: 14px; padding: 0; line-height: 1; opacity: 0.6; }
.ck-contact-tag button:hover { opacity: 1; }
.ck-contact-add-row { display: flex; gap: 8px; align-items: center; }
.ck-contact-add-row input { flex: 1; padding: 8px 12px; border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md); font-family: inherit; font-size: 13px; }
.ck-contact-add-row input:focus { outline: none; border-color: var(--cw-primary); }
.ck-contact-add-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--cw-primary); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ck-contact-add-btn .material-icons-outlined { font-size: 18px; }

/* 
   LOADING BUTTON STATE (Anti Double-Click)
    */
.cw-btn-loading { pointer-events: none; opacity: 0.7; position: relative; }
.cw-btn-loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: cw-spin 0.6s linear infinite; right: 12px; top: 50%; margin-top: -8px; }
.cw-btn-outline.cw-btn-loading::after, .cw-btn-cancel.cw-btn-loading::after { border-color: rgba(0,0,0,0.1); border-top-color: var(--cw-primary); }
@keyframes cw-spin { to { transform: rotate(360deg); } }

/* 
   FEITO / NO FEITO BUTTONS
    */
.ck-action-buttons { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: flex-start; }
.ck-btn-feito { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: var(--cw-radius-md); font-family: inherit; font-size: var(--cw-font-size-sm); font-weight: 600; cursor: pointer; border: 2px solid var(--cw-success); background: var(--cw-success-bg); color: var(--cw-success); transition: all 0.25s ease; }
.ck-btn-feito:hover { background: var(--cw-success); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(46,125,50,0.3); }
.ck-btn-feito .material-icons-outlined { font-size: 18px; }
.ck-btn-nao-feito { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: var(--cw-radius-md); font-family: inherit; font-size: var(--cw-font-size-sm); font-weight: 600; cursor: pointer; border: 2px solid var(--cw-danger); background: var(--cw-danger-bg); color: var(--cw-danger); transition: all 0.25s ease; }
.ck-btn-nao-feito:hover { background: var(--cw-danger); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(211,47,47,0.3); }
.ck-btn-nao-feito .material-icons-outlined { font-size: 18px; }

/* Observation field for NO FEITO */
.ck-obs-field { display: none; margin-top: 10px; animation: cw-slideDown 0.3s ease; width: 100%; }
.ck-obs-field.show { display: block; }
.ck-obs-field textarea { width: 100%; padding: 10px 14px; border: 2px solid var(--cw-danger); border-radius: var(--cw-radius-md); font-family: inherit; font-size: var(--cw-font-size-sm); color: var(--cw-text-primary); background: var(--cw-danger-bg); resize: vertical; min-height: 60px; outline: none; }
.ck-obs-field textarea:focus { box-shadow: 0 0 0 3px rgba(211,47,47,0.1); }
.ck-obs-field .ck-obs-submit { margin-top: 8px; display: flex; justify-content: flex-end; }
@keyframes cw-slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/*  Completed Item Status Display  */
.ck-status-feito { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: var(--cw-radius-pill); font-size: 12px; font-weight: 600; background: var(--cw-success-bg); color: var(--cw-success); border: 1px solid var(--cw-success); animation: cw-pulseSuccess 0.5s ease; }
.ck-status-nao-feito { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: var(--cw-radius-pill); font-size: 12px; font-weight: 600; background: var(--cw-danger-bg); color: var(--cw-danger); border: 1px solid var(--cw-danger); }
.ck-obs-display { margin-top: 6px; padding: 8px 12px; background: var(--cw-danger-bg); border-left: 3px solid var(--cw-danger); border-radius: 0 var(--cw-radius-sm) var(--cw-radius-sm) 0; font-size: 12px; color: var(--cw-text-secondary); }
.ck-obs-display strong { color: var(--cw-danger); }
@keyframes cw-pulseSuccess { 0% { transform: scale(0.9); opacity: 0; } 50% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }

/* 
   FINISH MODAL & SECTION
    */
.ck-finish-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 1000; animation: cw-fadeIn 0.2s ease; }
.ck-finish-modal-backdrop.open { display: flex; }
.ck-finish-modal { background: var(--cw-surface); border-radius: var(--cw-radius-lg); box-shadow: var(--cw-shadow-modal); width: 90%; max-width: 520px; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; animation: cw-scaleIn 0.3s ease; }
.ck-finish-modal-header { padding: 24px 24px 16px; display: flex; align-items: center; gap: 14px; }
.ck-finish-modal-header .ck-finish-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ck-finish-icon.complete { background: var(--cw-success-bg); color: var(--cw-success); }
.ck-finish-icon.incomplete { background: var(--cw-warning-bg); color: var(--cw-warning); }
.ck-finish-modal-header h3 { font-size: 18px; font-weight: 600; }
.ck-finish-modal-header p { font-size: 13px; color: var(--cw-text-muted); margin-top: 2px; }
.ck-finish-modal-body { padding: 0 24px 20px; overflow-y: auto; flex: 1; }
.ck-missing-list { background: var(--cw-warning-bg); border: 1px solid var(--cw-warning-border); border-radius: var(--cw-radius-md); padding: 12px 16px; margin-bottom: 16px; }
.ck-missing-list h4 { font-size: 13px; font-weight: 600; color: var(--cw-warning); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ck-missing-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; color: var(--cw-text-secondary); }
.ck-missing-item .material-icons-outlined { font-size: 16px; color: var(--cw-warning); }
.ck-finish-notes { margin-top: 12px; }
.ck-finish-notes label { display: block; font-size: 13px; font-weight: 600; color: var(--cw-text-primary); margin-bottom: 6px; }
.ck-finish-notes textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md); font-family: inherit; font-size: var(--cw-font-size-sm); color: var(--cw-text-primary); resize: vertical; min-height: 80px; outline: none; }
.ck-finish-notes textarea:focus { border-color: var(--cw-primary); box-shadow: 0 0 0 2px rgba(165,67,250,0.1); }
.ck-finish-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--cw-border-light); }

.ck-finish-section { text-align: center; margin-top: 32px; padding: 24px; background: var(--cw-surface); border-radius: var(--cw-radius-lg); border: 2px dashed var(--cw-border); transition: all 0.3s ease; }
.ck-finish-section:hover { border-color: var(--cw-primary); box-shadow: var(--cw-shadow-md); }
.ck-finish-btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 48px; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border: none; border-radius: var(--cw-radius-md); cursor: pointer; transition: all 0.3s ease; }
.ck-finish-btn.complete { background: var(--cw-success); color: white; }
.ck-finish-btn.complete:hover { background: #1B5E20; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(46,125,50,0.35); }
.ck-finish-btn.incomplete { background: var(--cw-warning); color: white; }
.ck-finish-btn.incomplete:hover { background: #E65100; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(237,108,2,0.35); }
.ck-finish-btn .material-icons-outlined { font-size: 22px; }
.ck-finish-hint { font-size: 13px; color: var(--cw-text-muted); margin-top: 10px; }
.ck-finish-stats { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.ck-finish-stat { text-align: center; }
.ck-finish-stat-value { font-size: 24px; font-weight: 700; }
.ck-finish-stat-value.success { color: var(--cw-success); }
.ck-finish-stat-value.danger { color: var(--cw-danger); }
.ck-finish-stat-value.neutral { color: var(--cw-text-muted); }
.ck-finish-stat-label { font-size: 11px; color: var(--cw-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* 
   MOBILE-FIRST EXECUTION INTERFACE
    */
.ck-mobile-header { margin-bottom: 20px; }
.ck-mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--cw-primary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.ck-mobile-template { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ck-mobile-template-icon { width: 48px; height: 48px; border-radius: var(--cw-radius-lg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ck-mobile-template-icon .material-icons-outlined { font-size: 26px; }
.ck-mobile-template-info { flex: 1; min-width: 0; }
.ck-mobile-template-info h1 { font-size: 18px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-mobile-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--cw-text-muted); flex-wrap: wrap; }

/* Share Link */
.ck-share-bar { margin-top: 14px; padding: 10px 14px; background: var(--cw-primary-bg); border-radius: var(--cw-radius-md); border: 1px dashed var(--cw-primary); }
.ck-share-link-box { display: flex; align-items: center; gap: 8px; }
.ck-share-input { flex: 1; border: none; background: transparent; font-family: monospace; font-size: 11px; color: var(--cw-text-secondary); outline: none; min-width: 0; }
.ck-share-copy-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--cw-primary); color: white; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; flex-shrink: 0; transition: all 0.2s; }
.ck-share-copy-btn:hover { transform: scale(1.1); }
.ck-share-copy-btn .material-icons-outlined { font-size: 16px; }
.ck-share-hint { display: block; font-size: 11px; color: var(--cw-primary); margin-top: 6px; }

/* Progress */
.ck-mobile-progress { margin-bottom: 20px; }
.ck-mobile-progress-bar { height: 10px; background: var(--cw-border-light); border-radius: 5px; overflow: hidden; }
.ck-mobile-progress-fill { height: 100%; background: linear-gradient(90deg, var(--cw-primary), #B96BFB); border-radius: 5px; transition: width 0.5s ease; }
.ck-mobile-progress-text { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--cw-text-muted); }
.ck-mobile-progress-pct { font-weight: 700; color: var(--cw-primary); }

/* Items */
.ck-mobile-items { display: flex; flex-direction: column; gap: 12px; }
.ck-mobile-item { padding: 16px; background: var(--cw-surface); border-radius: var(--cw-radius-lg); border: 1px solid var(--cw-border-light); box-shadow: var(--cw-shadow-sm); transition: all 0.3s; }
.ck-mobile-item:hover { box-shadow: var(--cw-shadow-md); }
.ck-mobile-item.completed.feito-item { border-left: 4px solid var(--cw-success); background: #F8FFF8; }
.ck-mobile-item.completed.nao-feito-item { border-left: 4px solid var(--cw-danger); background: #FFF8F8; }

.ck-mobile-item-top { display: flex; align-items: center; gap: 12px; }
.ck-mobile-item-num { width: 30px; height: 30px; border-radius: 50%; background: var(--cw-primary-bg); color: var(--cw-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.ck-mobile-item.completed.feito-item .ck-mobile-item-num { background: var(--cw-success-bg); color: var(--cw-success); }
.ck-mobile-item.completed.nao-feito-item .ck-mobile-item-num { background: var(--cw-danger-bg); color: var(--cw-danger); }
.ck-mobile-item-info { flex: 1; min-width: 0; }
.ck-mobile-item-name { font-weight: 600; font-size: 14px; display: block; }
.ck-mobile-item-req { font-size: 10px; color: var(--cw-danger); font-weight: 500; text-transform: uppercase; }
.ck-mobile-item-desc { font-size: 12px; color: var(--cw-text-muted); margin: 6px 0 0 42px; line-height: 1.4; }
.ck-mobile-check-icon { font-size: 24px !important; flex-shrink: 0; }
.ck-mobile-check-icon.feito { color: var(--cw-success); }
.ck-mobile-check-icon.naofeito { color: var(--cw-danger); }

/* Action buttons */
.ck-mobile-action-row { display: flex; gap: 8px; margin-top: 12px; padding-left: 42px; }
.ck-mobile-btn-feito { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; padding: 12px 16px; border-radius: var(--cw-radius-md); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; border: 2px solid var(--cw-success); background: var(--cw-success-bg); color: var(--cw-success); transition: all 0.25s; min-height: 48px; position: relative; }
.ck-mobile-btn-feito:hover, .ck-mobile-btn-feito:active { background: var(--cw-success); color: white; }
.ck-mobile-btn-feito .material-icons-outlined { font-size: 20px; }
.ck-mobile-btn-naofeito { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; padding: 12px 16px; border-radius: var(--cw-radius-md); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; border: 2px solid var(--cw-danger); background: var(--cw-danger-bg); color: var(--cw-danger); transition: all 0.25s; min-height: 48px; }
.ck-mobile-btn-naofeito:hover, .ck-mobile-btn-naofeito:active { background: var(--cw-danger); color: white; }
.ck-mobile-btn-naofeito .material-icons-outlined { font-size: 20px; }

/* Input forms */
.ck-mobile-input-form { margin-top: 12px; padding-left: 42px; }
.ck-mobile-input-row { display: flex; gap: 8px; align-items: center; }
.ck-mobile-input { flex: 1; padding: 12px 14px; border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md); font-family: inherit; font-size: 15px; min-height: 48px; }
.ck-mobile-input:focus { outline: none; border-color: var(--cw-primary); box-shadow: 0 0 0 2px rgba(165,67,250,0.1); }
.ck-mobile-send-btn { width: 48px; height: 48px; border-radius: var(--cw-radius-md); background: var(--cw-primary); color: white; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; flex-shrink: 0; position: relative; }
.ck-mobile-send-btn .material-icons-outlined { font-size: 22px; }
.ck-inline-form { display: contents; }

/* Photo upload */
.ck-hidden-file { display: none; }
.ck-mobile-photo-section { margin-top: 12px; padding-left: 42px; }
.ck-mobile-photo-upload { border: 2px dashed var(--cw-primary); border-radius: var(--cw-radius-lg); padding: 24px; text-align: center; cursor: pointer; transition: all 0.3s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ck-mobile-photo-upload:hover, .ck-mobile-photo-upload:active { background: var(--cw-primary-bg); border-color: var(--cw-primary-dark); }
.ck-mobile-photo-label { font-weight: 600; font-size: 14px; color: var(--cw-primary); }
.ck-mobile-photo-hint { font-size: 11px; color: var(--cw-warning); background: var(--cw-warning-bg); padding: 3px 10px; border-radius: var(--cw-radius-pill); }
.ck-mobile-photo-done { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cw-success); padding: 8px 12px; background: var(--cw-success-bg); border-radius: var(--cw-radius-md); }

/* AI Analysis */
.ck-ai-analysis { animation: cw-slideDown 0.3s ease; }
.ck-ai-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 600; font-size: 14px; color: var(--cw-primary); }
.ck-ai-header .material-icons-outlined { font-size: 20px; }
.ck-ai-badge { background: linear-gradient(135deg, #667eea, #764ba2); color: white; font-size: 10px; padding: 2px 8px; border-radius: var(--cw-radius-pill); font-weight: 600; letter-spacing: 0.5px; }
.ck-ai-preview img { max-height: 200px; object-fit: cover; }
.ck-ai-loading { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--cw-primary-bg); border-radius: var(--cw-radius-md); font-size: 14px; color: var(--cw-primary); }
.ck-ai-spinner { width: 20px; height: 20px; border: 2px solid rgba(165,67,250,0.2); border-top-color: var(--cw-primary); border-radius: 50%; animation: cw-spin 0.6s linear infinite; }
.ck-ai-score { padding: 14px; border-radius: var(--cw-radius-md); background: white; margin-bottom: 12px; }
.ck-ai-score-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ck-ai-score-label { font-weight: 700; font-size: 15px; }
.ck-ai-score-value { font-weight: 600; font-size: 13px; }
.ck-ai-details { font-size: 13px; color: var(--cw-text-secondary); line-height: 1.5; margin-bottom: 10px; }
.ck-ai-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-ai-tag { background: var(--cw-primary-bg); color: var(--cw-primary); font-size: 11px; padding: 3px 10px; border-radius: var(--cw-radius-pill); font-weight: 500; }
.ck-ai-actions { margin-top: 12px; }

/* Completed display */
.ck-mobile-completed { margin-top: 10px; padding-left: 42px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ck-mobile-timestamp { font-size: 11px; color: var(--cw-text-muted); display: flex; align-items: center; gap: 4px; }

/* Finish section */
.ck-mobile-finish { text-align: center; margin-top: 28px; padding: 24px 16px; background: var(--cw-surface); border-radius: var(--cw-radius-lg); border: 2px dashed var(--cw-border); }

/*  Responsive  */
@media (max-width: 768px) {
  .cw-sidebar { display: none; }
  .cw-header { padding: 12px 16px; }
  .cw-content { padding: 0 16px 24px; }
  .cw-page-title { font-size: 1.4rem; }
  .ck-mobile-template { gap: 10px; }
  .ck-mobile-template-info h1 { font-size: 16px; }
  .ck-exec-timer { font-size: 18px; padding: 8px 12px; }
  .ck-mobile-action-row { padding-left: 0; }
  .ck-mobile-input-form { padding-left: 0; }
  .ck-mobile-photo-section { padding-left: 0; }
  .ck-mobile-completed { padding-left: 0; }
  .ck-mobile-item { padding: 14px; }
  .ck-finish-modal { max-width: 95%; }
  .ck-finish-btn { padding: 14px 32px; font-size: 14px; }
}

/* 
   DAY NAVIGATION & OVERDUE PANEL
    */
.ck-day-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.ck-day-nav-left { display: flex; align-items: center; gap: 12px; }
.ck-day-nav-right { display: flex; align-items: center; gap: 10px; }
.ck-day-arrow { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--cw-text-secondary); border: 1px solid var(--cw-border); cursor: pointer; transition: all 0.2s; }
.ck-day-arrow:hover { background: var(--cw-primary); color: white; border-color: var(--cw-primary); }
.ck-day-current { text-align: center; }
.ck-day-label { display: block; font-size: 20px; font-weight: 700; color: var(--cw-text-primary); }
.ck-day-date { display: block; font-size: 12px; color: var(--cw-text-muted); }
.ck-date-input { padding: 8px 12px; border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md); font-family: inherit; font-size: 13px; color: var(--cw-text-secondary); cursor: pointer; }

.ck-day-kpis { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ck-day-kpi { flex: 1; min-width: 120px; background: var(--cw-surface); border-radius: var(--cw-radius-lg); padding: 16px; text-align: center; border: 1px solid var(--cw-border-light); box-shadow: var(--cw-shadow-sm); }
.ck-day-kpi-value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.ck-day-kpi-label { font-size: 11px; text-transform: uppercase; color: var(--cw-text-muted); letter-spacing: 0.5px; margin-top: 4px; }

.ck-overdue-panel { background: #FFF3F0; border: 1px solid #FFCDD2; border-radius: var(--cw-radius-lg); margin-bottom: 20px; overflow: hidden; animation: cw-slideDown 0.3s ease; }
.ck-overdue-header { display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-weight: 600; font-size: 14px; color: var(--cw-danger); background: #FFEBEE; border-bottom: 1px solid #FFCDD2; }
.ck-overdue-count { background: var(--cw-danger); color: white; font-size: 11px; padding: 2px 8px; border-radius: var(--cw-radius-pill); font-weight: 700; }
.ck-overdue-list { max-height: 300px; overflow-y: auto; }
.ck-overdue-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid rgba(255,205,210,0.5); gap: 12px; }
.ck-overdue-item:last-child { border-bottom: none; }
.ck-overdue-item-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

/* 
   COMPREHENSIVE LEADERBOARD / REPORT
    */
.ck-report-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.ck-report-period { display: flex; gap: 6px; }
.ck-period-btn { padding: 8px 16px; border-radius: var(--cw-radius-pill); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid var(--cw-border); background: var(--cw-surface); color: var(--cw-text-secondary); transition: all 0.2s; }
.ck-period-btn:hover { border-color: var(--cw-primary); color: var(--cw-primary); }
.ck-period-btn.active { background: var(--cw-primary); color: white; border-color: var(--cw-primary); }

.ck-report-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.ck-report-kpi { background: var(--cw-surface); border-radius: var(--cw-radius-lg); padding: 18px; border: 1px solid var(--cw-border-light); box-shadow: var(--cw-shadow-sm); }
.ck-report-kpi-icon { width: 40px; height: 40px; border-radius: var(--cw-radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.ck-report-kpi-icon .material-icons-outlined { font-size: 22px; }
.ck-report-kpi-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.ck-report-kpi-label { font-size: 12px; color: var(--cw-text-muted); margin-top: 2px; }

.ck-report-section { background: var(--cw-surface); border-radius: var(--cw-radius-lg); padding: 24px; border: 1px solid var(--cw-border-light); margin-bottom: 20px; box-shadow: var(--cw-shadow-sm); }
.ck-report-section-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.ck-report-section-title .material-icons-outlined { font-size: 20px; color: var(--cw-primary); }
.ck-report-section-desc { font-size: 12px; color: var(--cw-text-muted); margin-bottom: 16px; line-height: 1.5; }

.ck-rank-table { width: 100%; border-collapse: collapse; }
.ck-rank-table th { font-size: 11px; text-transform: uppercase; color: var(--cw-text-muted); padding: 10px 12px; text-align: left; border-bottom: 2px solid var(--cw-border-light); letter-spacing: 0.5px; }
.ck-rank-table td { padding: 12px 12px; border-bottom: 1px solid var(--cw-border-light); font-size: 14px; }
.ck-rank-pos { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.ck-rank-pos.gold { background: linear-gradient(135deg, #FFD700, #FFA000); color: white; }
.ck-rank-pos.silver { background: linear-gradient(135deg, #C0C0C0, #909090); color: white; }
.ck-rank-pos.bronze { background: linear-gradient(135deg, #CD7F32, #A0522D); color: white; }
.ck-rank-pos.default { background: var(--cw-border-light); color: var(--cw-text-muted); }

.ck-score-bar { height: 8px; background: var(--cw-border-light); border-radius: 4px; width: 120px; overflow: hidden; }
.ck-score-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }

.ck-nao-feito-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ck-nao-feito-name { font-size: 13px; min-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-nao-feito-track { flex: 1; height: 8px; background: var(--cw-border-light); border-radius: 4px; overflow: hidden; }
.ck-nao-feito-fill { height: 100%; background: var(--cw-danger); border-radius: 4px; }
.ck-nao-feito-count { font-size: 12px; font-weight: 600; color: var(--cw-danger); min-width: 30px; text-align: right; }

.ck-cat-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--cw-radius-md); border: 1px solid var(--cw-border-light); }
.ck-cat-icon { width: 40px; height: 40px; border-radius: var(--cw-radius-md); display: flex; align-items: center; justify-content: center; }

@keyframes cw-slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cw-scaleIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* 
   NAV BADGE (New)
    */
.cw-nav-badge-new {
  background: linear-gradient(135deg, #7C4DFF, #A543FA);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--cw-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
  animation: cws-pulse 2s ease infinite;
}

@keyframes cws-pulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* 
   CW STORE v2  MARKETPLACE (Shopify / Apple style)
    */
.cws { max-width: 1100px; margin: 0 auto; }
.cws-guide { max-width: 860px; margin: 0 auto; padding-bottom: 40px; }

/* Override body bg to white for store pages */
body:has(.cws), body:has(.cws-guide) { background: #FAFBFC; }
body:has(.cws) .cw-header, body:has(.cws-guide) .cw-header { background: #FAFBFC; }


/*  HERO  */
.cws-hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 0 36px;
  animation: cws-fadeUp .5s ease;
}
.cws-hero-left { flex: 1; min-width: 0; }
.cws-hero-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--cw-primary); margin-bottom: 14px;
}
.cws-hero-label .material-icons-outlined { font-size: 16px; }
.cws-hero-title {
  font-size: 30px; font-weight: 700; color: var(--cw-text-primary);
  line-height: 1.25; letter-spacing: -.5px; margin-bottom: 10px;
}
.cws-hero-sub {
  font-size: 14px; color: var(--cw-text-secondary); line-height: 1.6; margin-bottom: 22px; max-width: 460px;
}
.cws-hero-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--cw-surface); border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-lg); padding: 11px 16px; max-width: 420px;
  transition: all .25s ease;
}
.cws-hero-search:focus-within { border-color: var(--cw-primary); box-shadow: 0 0 0 3px rgba(165,67,250,.1); }
.cws-hero-search .material-icons-outlined { color: var(--cw-text-placeholder); font-size: 20px; }
.cws-hero-search input { border: none; outline: none; font-family: inherit; font-size: 14px; color: var(--cw-text-primary); width: 100%; background: transparent; }
.cws-hero-search input::placeholder { color: var(--cw-text-placeholder); }
.cws-search-kbd {
  padding: 2px 8px; border-radius: 4px; font-size: 10px; font-family: inherit;
  background: var(--cw-bg); border: 1px solid var(--cw-border); color: var(--cw-text-muted);
}

/* Hero featured cards */
.cws-hero-cards { display: flex; gap: 14px; flex-shrink: 0; }
.cws-hero-card {
  width: 140px; border-radius: var(--cw-radius-lg);
  background: var(--cw-surface); border: 1px solid var(--cw-border-light);
  overflow: hidden; transition: all .3s ease; cursor: pointer;
  opacity: .85; transform: scale(.95);
}
.cws-hero-card.active, .cws-hero-card:hover { opacity: 1; transform: scale(1); border-color: var(--cw-primary); }
.cws-hero-card-top {
  height: 80px; display: flex; align-items: center; justify-content: center;
}
.cws-hc-logo { display: flex; align-items: center; justify-content: center; }
.cws-hero-card-body { padding: 10px 12px 12px; }
.cws-hc-name { font-size: 12px; font-weight: 700; color: var(--cw-text-primary); margin-bottom: 2px; }
.cws-hc-cat { font-size: 10px; color: var(--cw-text-muted); margin-bottom: 4px; }
.cws-stars { display: flex; align-items: center; gap: 1px; color: #FFB800; }
.cws-stars .material-icons-outlined { font-size: 12px; }
.cws-stars small { font-size: 10px; color: var(--cw-text-muted); margin-left: 4px; font-weight: 600; }

/*  FILTERS  */
.cws-filters {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--cw-border-light);
  animation: cws-fadeUp .5s ease .1s backwards;
}
.cws-filter-scroll {
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
}
.cws-filter-scroll::-webkit-scrollbar { display: none; }
.cws-filter {
  padding: 12px 20px; font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--cw-text-muted); background: transparent; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .2s ease; white-space: nowrap;
}
.cws-filter:hover { color: var(--cw-text-primary); }
.cws-filter.active {
  color: var(--cw-primary); border-bottom-color: var(--cw-primary); font-weight: 600;
}

/*  APP GRID  */
.cws-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px; margin-bottom: 48px;
  animation: cws-fadeUp .5s ease .15s backwards;
}

.cws-app {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px; background: var(--cw-surface);
  border-radius: var(--cw-radius-lg); border: 1px solid var(--cw-border-light);
  cursor: pointer; transition: all .25s ease;
}
.cws-app:hover {
  border-color: var(--cw-primary);
  background: var(--cw-primary-bg);
}
.cws-app-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
}
.cws-app-icon .material-icons-outlined { font-size: 22px; }
.cws-app-body { flex: 1; min-width: 0; }
.cws-app-name {
  font-size: 14px; font-weight: 600; color: var(--cw-text-primary);
  margin-bottom: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.cws-app-tagline { font-size: 12px; color: var(--cw-text-muted); margin-bottom: 8px; }
.cws-app-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cws-stars-sm {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 12px; font-weight: 600; color: #FFB800;
}
.cws-stars-sm .material-icons-outlined { font-size: 14px; }
.cws-app-cat {
  font-size: 11px; color: var(--cw-text-muted);
  background: var(--cw-bg); padding: 2px 8px; border-radius: var(--cw-radius-pill);
}
.cws-app-price {
  font-size: 11px; color: var(--cw-text-muted); font-weight: 500;
}
.cws-app-price.free { color: var(--cw-success); font-weight: 600; }

/* Badges */
.cws-badge-pop {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  background: linear-gradient(135deg, #FFB800, #FF8F00);
  color: white; padding: 2px 7px; border-radius: var(--cw-radius-pill);
}
.cws-badge-new {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  background: linear-gradient(135deg, #00C853, #00E676);
  color: white; padding: 2px 7px; border-radius: var(--cw-radius-pill);
}
.cws-badge-cw {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  background: linear-gradient(135deg, var(--cw-primary), #B96BFB);
  color: white; padding: 2px 7px; border-radius: var(--cw-radius-pill);
}

/*  NO RESULTS  */
.cws-no-results { text-align: center; padding: 60px 20px; }
.cws-no-results h3 { font-size: 18px; font-weight: 600; color: var(--cw-text-primary); margin: 12px 0 6px; }
.cws-no-results p { font-size: 13px; color: var(--cw-text-muted); }

/*  MARKETING BANNER  */
.cws-banner {
  background: var(--cw-surface); border-radius: var(--cw-radius-xl); padding: 48px 40px;
  margin-bottom: 32px; border: 1px solid var(--cw-border-light);
  animation: cws-fadeUp .5s ease .2s backwards;
}
.cws-banner-header { text-align: center; margin-bottom: 40px; }
.cws-banner-tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--cw-primary); margin-bottom: 14px;
}
.cws-banner-header h2 {
  font-size: 22px; font-weight: 600; color: var(--cw-text-primary);
  max-width: 600px; margin: 0 auto; line-height: 1.45;
}
.cws-banner-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cws-banner-card { text-align: center; }
.cws-banner-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; color: white;
}
.cws-banner-icon .material-icons-outlined { font-size: 28px; }
.cws-banner-card h3 { font-size: 15px; font-weight: 700; color: var(--cw-text-primary); margin-bottom: 8px; }
.cws-banner-card p { font-size: 13px; color: var(--cw-text-secondary); line-height: 1.55; }

/*  SUGGESTION  */
.cws-suggest {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px; background: var(--cw-bg);
  border-radius: var(--cw-radius-lg); margin-bottom: 40px;
  border: 1px solid var(--cw-border-light);
}
.cws-suggest .material-icons-outlined { font-size: 24px; color: var(--cw-primary); flex-shrink: 0; }
.cws-suggest div { flex: 1; font-size: 13px; color: var(--cw-text-secondary); }
.cws-suggest strong { color: var(--cw-text-primary); }
.cws-suggest-btn {
  padding: 8px 18px; border-radius: var(--cw-radius-pill); font-family: inherit;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s;
  border: 1px solid var(--cw-primary); background: transparent; color: var(--cw-primary);
  white-space: nowrap;
}
.cws-suggest-btn:hover { background: var(--cw-primary); color: white; }

/* 
   DETAIL SIDEBAR (Chrome Extension style)
    */
.cws-sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  z-index: 999; opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.cws-sidebar-overlay.open { opacity: 1; pointer-events: all; }

.cws-detail {
  position: fixed; top: 0; right: -520px; width: 500px; max-width: 90vw;
  height: 100vh; background: var(--cw-surface);
  box-shadow: -8px 0 40px rgba(0,0,0,.15); z-index: 1000;
  transition: right .35s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
}
.cws-detail.open { right: 0; }
.cws-detail-header {
  display: flex; justify-content: flex-end; padding: 14px 18px 0; flex-shrink: 0;
}
.cws-detail-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--cw-bg); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--cw-text-secondary); transition: all .2s;
}
.cws-detail-close:hover { background: var(--cw-border); color: var(--cw-text-primary); }
.cws-detail-body { flex: 1; overflow-y: auto; padding: 0; }

/* Detail Hero */
.cws-d-hero {
  height: 140px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.cws-d-icon-lg {
  width: 72px; height: 72px; border-radius: 18px; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 36px;
}
.cws-d-icon-lg .material-icons-outlined { font-size: 36px; }
.cws-d-content { padding: 24px; }
.cws-d-name {
  font-size: 20px; font-weight: 700; color: var(--cw-text-primary);
  margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.cws-d-dev { font-size: 13px; color: var(--cw-primary); font-weight: 500; margin-bottom: 10px; }
.cws-d-stars {
  display: flex; align-items: center; gap: 2px; color: #FFB800; margin-bottom: 18px;
}
.cws-d-stars .material-icons-outlined { font-size: 18px; }
.cws-d-rating { font-size: 14px; font-weight: 700; color: var(--cw-text-primary); margin-left: 6px; }
.cws-d-installs { font-size: 12px; color: var(--cw-text-muted); margin-left: 4px; }

.cws-d-price-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--cw-border-light);
}
.cws-d-price { font-size: 13px; color: var(--cw-text-secondary); font-weight: 500; }
.cws-d-install-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 28px; border-radius: var(--cw-radius-pill);
  font-family: inherit; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all .25s;
  background: var(--cw-primary); color: white;
}
.cws-d-install-btn .material-icons-outlined { font-size: 18px; }
.cws-d-install-btn:hover { background: var(--cw-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(165,67,250,.3); }
.cws-d-install-btn.installed { background: var(--cw-success); }
.cws-d-install-btn.installed:hover { background: var(--cw-danger); }

/* Screenshots */
.cws-d-screenshots {
  display: flex; gap: 10px; margin-bottom: 28px; overflow-x: auto;
  scrollbar-width: thin;
}
.cws-d-ss {
  width: 160px; height: 110px; border-radius: var(--cw-radius-md); flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.cws-d-ss small { font-size: 10px; color: var(--cw-text-placeholder); }

/* Section */
.cws-d-section { margin-bottom: 24px; }
.cws-d-section h4 {
  font-size: 14px; font-weight: 700; color: var(--cw-text-primary); margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--cw-border-light);
}
.cws-d-section p { font-size: 13px; color: var(--cw-text-secondary); line-height: 1.6; }

/* Details table */
.cws-d-details { display: flex; flex-direction: column; gap: 0; }
.cws-d-detail {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--cw-border-light); font-size: 13px;
}
.cws-d-detail:last-child { border-bottom: none; }
.cws-d-detail-label { color: var(--cw-text-muted); }
.cws-d-detail span:last-child { color: var(--cw-text-primary); font-weight: 500; }

/* Reviews */
.cws-d-review {
  padding: 14px; background: var(--cw-bg); border-radius: var(--cw-radius-md);
  margin-bottom: 10px;
}
.cws-d-review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cws-d-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.cws-d-review-header strong { font-size: 13px; color: var(--cw-text-primary); }
.cws-d-review-text { font-size: 12px; color: var(--cw-text-secondary); line-height: 1.5; font-style: italic; }
.cws-d-review-date { font-size: 11px; color: var(--cw-text-muted); margin-top: 6px; display: block; }

/*  Animations  */
@keyframes cws-fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/*  Responsive  */
@media (max-width: 900px) {
  .cws-hero { flex-direction: column; gap: 24px; padding: 24px 0; }
  .cws-hero-cards { width: 100%; justify-content: center; }
  .cws-hero-search { max-width: 100%; }
  .cws-grid { grid-template-columns: 1fr; }
  .cws-banner-cards { grid-template-columns: 1fr; gap: 20px; }
  .cws-banner { padding: 32px 24px; }
  .cws-detail { width: 100%; max-width: 100vw; }
}

@media (max-width: 600px) {
  .cws-hero-title { font-size: 22px; }
  .cws-hero-cards { gap: 8px; }
  .cws-hero-card { width: 110px; }
  .cws-suggest { flex-direction: column; text-align: center; }
}

/*  Section Headers  */
.cws-section { margin-bottom: 36px; animation: cws-fadeUp .4s ease backwards; }
.cws-section:nth-child(3) { animation-delay: .1s; }
.cws-section:nth-child(4) { animation-delay: .15s; }
.cws-section:nth-child(5) { animation-delay: .2s; }
.cws-section:nth-child(6) { animation-delay: .25s; }
.cws-section:nth-child(7) { animation-delay: .3s; }
.cws-section:nth-child(8) { animation-delay: .35s; }

.cws-section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--cw-border-light);
}
.cws-section-header .material-icons-outlined { font-size: 22px; }
.cws-section-header h3 {
  font-size: 17px; font-weight: 700; color: var(--cw-text-primary); margin: 0;
}
.cws-section-count {
  font-size: 11px; font-weight: 700; color: var(--cw-text-muted);
  background: var(--cw-bg); padding: 2px 9px; border-radius: var(--cw-radius-pill);
  margin-left: auto;
}

/* 
   DEVELOPER GUIDE
    */

.cws-guide-hero {
  text-align: center; padding: 40px 0 36px;
  animation: cws-fadeUp .5s ease;
}
.cws-guide-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--cw-primary); margin-bottom: 16px;
}
.cws-guide-hero-badge .material-icons-outlined { font-size: 16px; }
.cws-guide-hero h1 {
  font-size: 32px; font-weight: 700; color: var(--cw-text-primary);
  letter-spacing: -.5px; margin-bottom: 10px;
}
.cws-guide-hero p {
  font-size: 15px; color: var(--cw-text-secondary); max-width: 520px; margin: 0 auto; line-height: 1.6;
}

/* Quick links */
.cws-guide-quicklinks {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 36px;
  animation: cws-fadeUp .5s ease .1s backwards;
}
.cws-guide-quicklink {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--cw-surface);
  border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-md);
  text-decoration: none; font-size: 13px; font-weight: 600;
  color: var(--cw-text-primary); transition: all .2s;
}
.cws-guide-quicklink:hover { border-color: var(--cw-primary); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.cws-guide-quicklink .material-icons-outlined { font-size: 20px; }

/* Sections */
.cws-guide-section {
  background: var(--cw-surface); border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-xl); margin-bottom: 20px; overflow: hidden;
  animation: cws-fadeUp .4s ease backwards;
}
.cws-guide-section:nth-child(4) { animation-delay: .15s; }
.cws-guide-section:nth-child(5) { animation-delay: .2s; }
.cws-guide-section:nth-child(6) { animation-delay: .25s; }
.cws-guide-section:nth-child(7) { animation-delay: .3s; }
.cws-guide-section:nth-child(8) { animation-delay: .35s; }
.cws-guide-section:nth-child(9) { animation-delay: .4s; }

.cws-guide-section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 28px; border-bottom: 1px solid var(--cw-border-light);
}
.cws-guide-section-header .material-icons-outlined { font-size: 24px; }
.cws-guide-section-header h2 {
  font-size: 18px; font-weight: 700; color: var(--cw-text-primary); margin: 0;
}
.cws-guide-content {
  padding: 24px 28px;
}
.cws-guide-content h3 {
  font-size: 15px; font-weight: 700; color: var(--cw-text-primary);
  margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--cw-border-light);
}
.cws-guide-content h3:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.cws-guide-content p { font-size: 13px; color: var(--cw-text-secondary); line-height: 1.7; margin-bottom: 12px; }
.cws-guide-content ul { margin: 0 0 16px; padding-left: 20px; }
.cws-guide-content li { font-size: 13px; color: var(--cw-text-secondary); line-height: 1.7; margin-bottom: 6px; }
.cws-guide-content code {
  background: var(--cw-bg); padding: 2px 7px; border-radius: 4px;
  font-size: 12px; color: var(--cw-primary); font-family: 'Fira Code', 'Consolas', monospace;
}

/* Architecture */
.cws-guide-arch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0; }
.cws-guide-arch-item {
  display: flex; gap: 12px; padding: 14px;
  background: var(--cw-bg); border-radius: var(--cw-radius-md);
}
.cws-guide-arch-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
}
.cws-guide-arch-icon .material-icons-outlined { font-size: 20px; }
.cws-guide-arch-item strong { font-size: 13px; color: var(--cw-text-primary); display: block; margin-bottom: 2px; }
.cws-guide-arch-item p { font-size: 12px; color: var(--cw-text-muted); margin: 0; line-height: 1.4; }

/* Code block */
.cws-guide-code {
  background: #1e1e2e; border-radius: var(--cw-radius-md);
  padding: 20px; overflow-x: auto; margin: 14px 0;
}
.cws-guide-code code {
  font-family: 'Fira Code', 'Consolas', monospace; font-size: 12px;
  color: #cdd6f4; background: none; padding: 0; line-height: 1.7;
  white-space: pre;
}
.cws-code-comment { color: #6c7086; }

/* Table */
.cws-guide-table {
  width: 100%; border-collapse: collapse; margin: 14px 0;
  font-size: 13px;
}
.cws-guide-table th {
  text-align: left; font-weight: 600; color: var(--cw-text-primary);
  padding: 10px 12px; border-bottom: 2px solid var(--cw-border);
  background: var(--cw-bg);
}
.cws-guide-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--cw-border-light);
  color: var(--cw-text-secondary);
}
.cws-guide-table td code { font-size: 12px; }
.cws-method {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; color: white; text-transform: uppercase;
}
.cws-method.get { background: #4CAF50; }
.cws-method.post { background: #2196F3; }
.cws-method.patch { background: #FF9800; }
.cws-method.delete { background: #F44336; }

/* Checklist */
.cws-guide-checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 14px 0; }
.cws-guide-check-group {
  padding: 16px; background: var(--cw-bg); border-radius: var(--cw-radius-md);
}
.cws-guide-check-group h4 {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--cw-text-primary); margin: 0 0 10px;
}
.cws-guide-check-group h4 .material-icons-outlined { font-size: 18px; }
.cws-guide-check-group ul { margin: 0; padding-left: 18px; }
.cws-guide-check-group li { font-size: 12px; margin-bottom: 4px; }

/* Timeline */
.cws-guide-timeline { margin: 16px 0; padding-left: 20px; border-left: 2px solid var(--cw-border-light); }
.cws-guide-timeline-item {
  display: flex; gap: 14px; padding: 14px 0;
  position: relative;
}
.cws-guide-timeline-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  margin-left: -27px; margin-top: 3px; box-shadow: 0 0 0 3px var(--cw-surface);
}
.cws-guide-timeline-item strong { font-size: 13px; color: var(--cw-text-primary); display: block; margin-bottom: 2px; }
.cws-guide-timeline-item p { font-size: 12px; color: var(--cw-text-muted); margin: 0; }

/* Design specs */
.cws-guide-specs { display: flex; flex-direction: column; gap: 0; margin: 14px 0; }
.cws-guide-spec {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--cw-border-light); font-size: 13px;
}
.cws-guide-spec:last-child { border-bottom: none; }
.cws-guide-spec strong { color: var(--cw-text-muted); font-weight: 500; }
.cws-guide-spec span:last-child { color: var(--cw-text-primary); font-weight: 500; }

/* FAQ */
.cws-guide-faq { display: flex; flex-direction: column; gap: 8px; }
.cws-guide-faq-item {
  background: var(--cw-bg); border-radius: var(--cw-radius-md);
  overflow: hidden;
}
.cws-guide-faq-item summary {
  padding: 14px 18px; font-size: 14px; font-weight: 600;
  color: var(--cw-text-primary); cursor: pointer; list-style: none;
  transition: background .2s;
}
.cws-guide-faq-item summary::-webkit-details-marker { display: none; }
.cws-guide-faq-item summary::before { content: '\25B8 '; color: var(--cw-primary); margin-right: 6px; }
.cws-guide-faq-item[open] summary::before { content: '\25BE '; }
.cws-guide-faq-item summary:hover { background: var(--cw-border-light); }
.cws-guide-faq-item p { padding: 0 18px 16px; font-size: 13px; color: var(--cw-text-secondary); line-height: 1.6; margin: 0; }

/* CTA */
.cws-guide-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 28px 32px; background: linear-gradient(135deg, var(--cw-primary), #7B1FA2);
  border-radius: var(--cw-radius-xl); color: white; margin-top: 32px;
}
.cws-guide-cta h3 { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: white; }
.cws-guide-cta p { font-size: 13px; opacity: .85; margin: 0; color: rgba(255,255,255,.9); }
.cws-guide-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--cw-radius-pill);
  background: white; color: var(--cw-primary); font-family: inherit;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: all .2s; white-space: nowrap;
}
.cws-guide-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.cws-guide-cta-btn .material-icons-outlined { font-size: 18px; }

/* Guide responsive */
@media (max-width: 900px) {
  .cws-guide-arch { grid-template-columns: 1fr; }
  .cws-guide-checklist { grid-template-columns: 1fr; }
  .cws-guide-cta { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .cws-guide-hero h1 { font-size: 24px; }
  .cws-guide-quicklinks { grid-template-columns: repeat(2, 1fr); }
  .cws-guide-content { padding: 16px 18px; }
  .cws-guide-section-header { padding: 16px 18px; }
}

/* 
   WHATSAPP MODULE
    */

/* Cards */
.wa-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }
.wa-card {
  background: var(--cw-surface); border: 2px solid var(--cw-border-light);
  border-radius: var(--cw-radius-xl); padding: 28px; position: relative;
  transition: all .25s ease; cursor: default;
}
.wa-card:hover { border-color: var(--cw-border); }
.wa-card-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 3px 10px; border-radius: var(--cw-radius-pill);
}
.wa-card-badge.oficial { background: #E8F5E9; color: #2E7D32; }
.wa-card-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.wa-card-icon .material-icons-outlined { font-size: 28px; color: white; }
.wa-card h3 { font-size: 18px; font-weight: 700; color: var(--cw-text-primary); margin: 0 0 4px; }
.wa-card-subtitle { font-size: 12px; color: var(--cw-text-muted); font-weight: 500; margin-bottom: 12px; }
.wa-card-desc p { font-size: 13px; color: var(--cw-text-secondary); line-height: 1.6; margin: 0; }
.wa-card-features {
  list-style: none; margin: 16px 0; padding: 0;
}
.wa-card-features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--cw-text-secondary); padding: 5px 0;
}
.wa-card-features li .material-icons-outlined { font-size: 18px; flex-shrink: 0; }
.wa-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cw-border-light);
}
.wa-card-price { font-size: 14px; font-weight: 700; color: var(--cw-text-primary); }
.wa-card-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--cw-radius-pill); border: none;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: white; transition: all .2s;
}
.wa-card-btn.oficial { background: #25D366; }
.wa-card-btn.oficial:hover { background: #128C7E; }
.wa-card-btn.naooficial { background: #6c757d; }
.wa-card-btn.naooficial:hover { background: #495057; }

/* Connected card state */
.wa-card--connected { border-color: #25D366; box-shadow: 0 0 0 1px rgba(37,211,102,.15), 0 4px 20px rgba(37,211,102,.08); }
.wa-card--connected:hover { border-color: #25D366; }
.wa-connected-panel {
  margin: 12px 0 0; padding: 16px; border-radius: var(--cw-radius-md);
  background: #FAFFFE; border: 1px solid #E8F5E9;
}
.wa-connected-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid #E8F5E9;
}
.wa-connected-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #25D366;
  box-shadow: 0 0 0 3px rgba(37,211,102,.2); animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(37,211,102,.2); } 50% { box-shadow: 0 0 0 6px rgba(37,211,102,.08); } }
.wa-connected-info { display: flex; flex-direction: column; gap: 8px; }
.wa-connected-row { display: flex; justify-content: space-between; align-items: center; }
.wa-connected-label { font-size: 12px; color: var(--cw-text-muted); }
.wa-connected-value { font-size: 13px; color: var(--cw-text-primary); }
.wa-connected-footer {
  display: flex; flex-direction: column; gap: 4px; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid #E8F5E9;
}

/* Modal */
.wa-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999;
  opacity: 0; visibility: hidden; transition: all .3s;
}
.wa-modal-overlay.open { opacity: 1; visibility: visible; }
.wa-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.95);
  width: 520px; max-width: 95vw; max-height: 90vh; overflow-y: auto;
  background: var(--cw-surface); border-radius: var(--cw-radius-xl);
  z-index: 1000; opacity: 0; visibility: hidden; transition: all .3s;
}
.wa-modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.wa-modal-header {
  padding: 28px 28px 20px; text-align: center; color: white; position: relative;
}
.wa-modal-header h2 { font-size: 20px; font-weight: 700; margin: 10px 0 4px; color: white; }
.wa-modal-header p { font-size: 13px; opacity: .85; margin: 0; color: rgba(255,255,255,.9); }
.wa-modal-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.2); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s;
}
.wa-modal-close .material-icons-outlined { font-size: 18px; color: white; }
.wa-modal-close:hover { background: rgba(255,255,255,.3); }
.wa-modal-body { padding: 24px 28px 28px; }

/* Steps */
.wa-steps {
  display: flex; align-items: center; justify-content: center; gap: 0;
  margin-bottom: 24px;
}
.wa-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.wa-step span {
  width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: var(--cw-bg); color: var(--cw-text-muted);
  border: 2px solid var(--cw-border-light); transition: all .3s;
}
.wa-step small { font-size: 10px; color: var(--cw-text-muted); font-weight: 500; }
.wa-step.active span { background: var(--cw-primary); color: white; border-color: var(--cw-primary); }
.wa-step.active small { color: var(--cw-primary); }
.wa-step.done span { background: #25D366; color: white; border-color: #25D366; }
.wa-step-line { width: 40px; height: 2px; background: var(--cw-border-light); margin: 0 6px; margin-bottom: 18px; }

/* Step content */
.wa-step-content { display: none; animation: cws-fadeUp .3s ease; }
.wa-step-content.active { display: block; }
.wa-step-content h3 { font-size: 16px; font-weight: 700; color: var(--cw-text-primary); margin: 0 0 8px; }
.wa-step-content p { font-size: 13px; color: var(--cw-text-secondary); line-height: 1.6; margin-bottom: 16px; }

/* OAuth box */
.wa-oauth-box {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--cw-bg); border-radius: var(--cw-radius-md);
  margin-bottom: 16px;
}
.wa-oauth-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wa-oauth-box strong { font-size: 14px; color: var(--cw-text-primary); display: block; }
.wa-oauth-box p { font-size: 12px; color: var(--cw-text-muted); margin: 0; }

/* Permissions */
.wa-permissions { margin-bottom: 20px; }
.wa-permissions h4 { font-size: 12px; font-weight: 600; color: var(--cw-text-muted); margin: 0 0 8px; }
.wa-permissions ul { list-style: none; padding: 0; margin: 0; }
.wa-permissions li {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 3px 0; color: var(--cw-text-secondary);
}

/* Buttons */
.wa-btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border: none; border-radius: var(--cw-radius-md);
  background: #25D366; color: white; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.wa-btn-primary:hover { opacity: .9; }
.wa-btn-secondary {
  padding: 12px 24px; border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md);
  background: transparent; color: var(--cw-text-secondary); font-family: inherit;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s;
}
.wa-btn-secondary:hover { background: var(--cw-bg); }
.wa-step-actions { display: flex; gap: 10px; margin-top: 20px; }
.wa-step-actions .wa-btn-primary { flex: 1; }

/* Business list */
.wa-business-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.wa-business-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--cw-bg); border: 2px solid var(--cw-border-light);
  border-radius: var(--cw-radius-md); cursor: pointer; transition: all .2s;
}
.wa-business-item:has(input:checked) { border-color: #25D366; background: #E8F5E9; }
.wa-business-item input { display: none; }
.wa-business-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.wa-business-avatar {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.wa-business-avatar .material-icons-outlined { font-size: 20px; color: white; }
.wa-business-info strong { font-size: 14px; color: var(--cw-text-primary); display: block; }
.wa-business-info p { font-size: 12px; color: var(--cw-text-muted); margin: 0; }
.wa-check { color: var(--cw-border-light); font-size: 22px; transition: all .2s; }
.wa-business-item:has(input:checked) .wa-check { color: #25D366; }

/* Phone verify */
.wa-phone-verify { text-align: center; padding: 20px 0; }
.wa-phone-display {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 20px;
}
.wa-phone-display strong { font-size: 18px; color: var(--cw-text-primary); }
.wa-phone-display p { font-size: 12px; color: var(--cw-text-muted); margin: 0; }
.wa-code-inputs { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.wa-code-input {
  width: 44px; height: 52px; text-align: center; font-size: 20px; font-weight: 700;
  border: 2px solid var(--cw-border); border-radius: 10px;
  font-family: 'Fira Code', monospace; color: var(--cw-text-primary);
  background: var(--cw-bg);
}
.wa-code-input:focus { border-color: #25D366; outline: none; }

/* QR Code */
.wa-qr-container { text-align: center; padding: 10px 0 16px; }
.wa-qr-code {
  display: inline-flex; padding: 20px; background: white;
  border-radius: var(--cw-radius-lg); border: 2px solid var(--cw-border-light);
  position: relative;
}
.wa-qr-placeholder { position: relative; }
.wa-qr-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 40px; height: 40px; background: white; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px white;
}
.wa-qr-timer {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; color: var(--cw-text-muted); margin-top: 12px;
}

/* Success */
.wa-success { text-align: center; padding: 20px 0; }
.wa-success-icon { margin-bottom: 16px; }
.wa-success-icon .material-icons-outlined { font-size: 64px; color: #25D366; }
.wa-success h3 { font-size: 18px; font-weight: 700; color: var(--cw-text-primary); margin: 0 0 8px; }
.wa-success p { font-size: 13px; font-weight: 500; color: var(--cw-text-primary); }
.wa-success-feat .material-icons-outlined { font-size: 20px; color: #25D366; }

/* Instructions */
.wa-instructions {
  margin: 0 0 20px; padding-left: 20px;
}
.wa-instructions li {
  font-size: 13px; color: var(--cw-text-secondary); line-height: 1.6;
  padding: 4px 0;
}

/* Architecture diagram */
.wa-arch-diagram { margin: 20px 0; }
.wa-arch-center { text-align: center; margin-bottom: 20px; }
.wa-arch-hub {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px 32px; border-radius: var(--cw-radius-lg); color: white;
}
.wa-arch-hub .material-icons-outlined { font-size: 32px; }
.wa-arch-hub strong { font-size: 14px; }
.wa-arch-modules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.wa-arch-module {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; background: var(--cw-bg); border-radius: var(--cw-radius-md);
  text-align: center;
}
.wa-arch-module-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.wa-arch-module-icon .material-icons-outlined { font-size: 20px; color: white; }
.wa-arch-module strong { font-size: 12px; color: var(--cw-text-primary); }
.wa-arch-module small { font-size: 10px; color: var(--cw-text-muted); }

/* Responsive */
@media (max-width: 768px) {
  .wa-cards { grid-template-columns: 1fr; }
  .wa-arch-modules { grid-template-columns: repeat(2, 1fr); }
  .wa-success-features { grid-template-columns: 1fr; }
  .wa-modal { width: 95vw; }
}

/* 
   CONNECTION HISTORY TIMELINE
    */

.wa-history {
  background: var(--cw-surface); border-radius: var(--cw-radius-xl);
  border: 1px solid var(--cw-border-light); padding: 28px; overflow: hidden;
}
.wa-history-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.wa-history-title { display: flex; align-items: center; gap: 10px; }
.wa-history-title h2 { font-size: 18px; font-weight: 700; color: var(--cw-text-primary); margin: 0; }
.wa-history-filter { display: flex; gap: 6px; }
.wa-history-filter-btn {
  padding: 6px 14px; border-radius: var(--cw-radius-pill); border: 1px solid var(--cw-border);
  background: transparent; font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--cw-text-secondary); cursor: pointer; transition: all .2s;
}
.wa-history-filter-btn:hover { background: var(--cw-bg); }
.wa-history-filter-btn.active {
  background: var(--cw-primary); color: white; border-color: var(--cw-primary);
}

.wa-timeline { position: relative; padding-left: 24px; }
.wa-timeline::before {
  content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 2px; background: linear-gradient(to bottom, var(--cw-border), transparent);
}
.wa-timeline-item { position: relative; margin-bottom: 16px; }
.wa-timeline-item:last-child { margin-bottom: 0; }
.wa-timeline-dot {
  position: absolute; left: -20px; top: 18px; width: 14px; height: 14px;
  border-radius: 50%; border: 3px solid var(--cw-surface); z-index: 1;
}
.wa-timeline-dot.connected { background: #25D366; box-shadow: 0 0 0 3px rgba(37,211,102,.2); }
.wa-timeline-dot.warning { background: #FF9800; box-shadow: 0 0 0 3px rgba(255,152,0,.2); }
.wa-timeline-dot.disconnected { background: #D32F2F; box-shadow: 0 0 0 3px rgba(211,47,47,.2); }
.wa-timeline-dot.info { background: #0288D1; box-shadow: 0 0 0 3px rgba(2,136,209,.2); }

.wa-timeline-card {
  background: var(--cw-bg); border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-md); padding: 16px 18px; transition: all .2s;
}
.wa-timeline-card:hover { border-color: var(--cw-border); box-shadow: var(--cw-shadow-sm); }
.wa-timeline-card.faded { opacity: .7; }
.wa-timeline-card.faded:hover { opacity: 1; }
.wa-timeline-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.wa-timeline-info { display: flex; align-items: center; gap: 8px; }
.wa-timeline-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: var(--cw-radius-pill);
}
.wa-timeline-badge.connected { background: #E8F5E9; color: #2E7D32; }
.wa-timeline-badge.warning { background: #FFF3E0; color: #E65100; }
.wa-timeline-badge.disconnected { background: #FFEBEE; color: #C62828; }
.wa-timeline-badge.info { background: #E1F5FE; color: #01579B; }
.wa-timeline-type { font-size: 12px; color: var(--cw-text-muted); font-weight: 500; }
.wa-timeline-time { font-size: 11px; color: var(--cw-text-muted); }
.wa-timeline-card-body { display: flex; flex-direction: column; gap: 4px; }
.wa-timeline-detail {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--cw-text-secondary);
}
.wa-timeline-card-actions {
  display: flex; gap: 8px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--cw-border-light);
}
.wa-timeline-action-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: var(--cw-radius-pill); border: 1px solid var(--cw-border);
  background: white; font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--cw-text-secondary); cursor: pointer; transition: all .2s;
}
.wa-timeline-action-btn:hover { background: var(--cw-bg); }
.wa-timeline-action-btn .material-icons-outlined { font-size: 14px; }
.wa-timeline-action-btn.danger { color: #D32F2F; border-color: #FFCDD2; }
.wa-timeline-action-btn.danger:hover { background: #FFEBEE; }

/* 
   TEMPLATES PAGE
    */
.wt-page { max-width: 1200px; }
.wt-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.wt-main { min-width: 0; }
.wt-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.wt-header h2 { font-size: 20px; font-weight: 700; color: var(--cw-text-primary); margin: 0 0 4px; }
.wt-header p { font-size: 13px; color: var(--cw-text-secondary); margin: 0; }
.wt-btn-new {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px;
  border-radius: var(--cw-radius-md); border: 1px solid var(--cw-border);
  background: var(--cw-surface); color: var(--cw-text-primary);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .2s; white-space: nowrap; flex-shrink: 0;
}
.wt-btn-new:hover { background: var(--cw-bg); box-shadow: var(--cw-shadow-sm); }
.wt-btn-new .material-icons-outlined { font-size: 18px; color: var(--cw-text-muted); }
/* Toolbar */
.wt-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.wt-sort-wrap {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md); background: var(--cw-surface);
}
.wt-sort-wrap select {
  border: none; outline: none; background: transparent; font-family: inherit;
  font-size: 12px; color: var(--cw-text-secondary); cursor: pointer;
}
/* Filters */
.wt-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.wt-filter-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: var(--cw-radius-pill); border: 1px solid var(--cw-border);
  background: var(--cw-surface); font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--cw-text-secondary); cursor: pointer; transition: all .2s;
}
.wt-filter-chip:hover { background: var(--cw-bg); }
.wt-filter-chip.active { background: var(--cw-text-primary); color: white; border-color: var(--cw-text-primary); }
.wt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wt-dot.approved { background: #4CAF50; }
.wt-dot.pending { background: #FF9800; }
.wt-dot.rejected { background: #EF5350; }
.wt-filter-chip.active .wt-dot { background: white; opacity: .6; }
.wt-chip-count { background: rgba(0,0,0,.08); padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.wt-filter-chip.active .wt-chip-count { background: rgba(255,255,255,.2); }
/* Template Cards */
.wt-list { display: flex; flex-direction: column; gap: 10px; }
.wt-card {
  display: flex; gap: 16px; padding: 16px; background: var(--cw-surface);
  border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-lg);
  transition: all .2s; cursor: pointer;
}
.wt-card:hover { border-color: var(--cw-border); box-shadow: var(--cw-shadow-card); transform: translateY(-1px); }
.wt-card-media {
  width: 72px; height: 56px; border-radius: var(--cw-radius-md); overflow: hidden;
  flex-shrink: 0; background: var(--cw-bg);
}
.wt-card-media img { width: 100%; height: 100%; object-fit: cover; }
.wt-card-media--icon { display: flex; align-items: center; justify-content: center; }
.wt-card-media--icon .material-icons-outlined { font-size: 24px; color: var(--cw-text-muted); }
.wt-card-body { flex: 1; min-width: 0; }
.wt-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.wt-card-name { font-size: 14px; font-weight: 600; color: var(--cw-text-primary); }
.wt-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: var(--cw-radius-pill); white-space: nowrap; }
.wt-badge.approved { background: #E8F5E9; color: #2E7D32; }
.wt-badge.pending { background: #FFF3E0; color: #E65100; }
.wt-badge.rejected { background: #FFEBEE; color: #C62828; }
.wt-card-text { font-size: 12px; color: var(--cw-text-secondary); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-card-tags { display: flex; gap: 10px; margin-top: 8px; }
.wt-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--cw-text-muted); }
.wt-tag .material-icons-outlined { font-size: 13px; }
/* Media upload area */
.wt-media-upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 20px; border: 2px dashed var(--cw-border); border-radius: var(--cw-radius-md);
  cursor: pointer; transition: all .2s; text-align: center;
}
.wt-media-upload:hover { border-color: var(--cw-primary); background: var(--cw-primary-bg); }
.wt-media-upload .material-icons-outlined { font-size: 28px; color: var(--cw-text-muted); }
.wt-media-upload span:last-child { font-size: 12px; color: var(--cw-text-muted); }

/* AI Sidebar */
.wt-sidebar { display: flex; flex-direction: column; gap: 16px; }
.wt-ai-card {
  background: linear-gradient(135deg, #7C4DFF 0%, #B388FF 100%);
  border-radius: var(--cw-radius-xl); padding: 24px; color: white;
}
.wt-ai-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wt-ai-header h3 { font-size: 16px; font-weight: 700; margin: 0; color: white; }
.wt-ai-card > p { font-size: 13px; opacity: .9; line-height: 1.5; margin: 0 0 16px; }
.wt-ai-actions { display: flex; flex-direction: column; gap: 8px; }
.wt-ai-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--cw-radius-md); color: white; font-family: inherit;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s;
}
.wt-ai-btn:hover { background: rgba(255,255,255,.3); transform: translateX(4px); }
.wt-ai-btn .material-icons-outlined { font-size: 18px; }

.wt-tips-card {
  background: var(--cw-surface); border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-xl); padding: 22px;
}
.wt-tips-card h3 {
  display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700;
  color: var(--cw-text-primary); margin: 0 0 16px;
}
.wt-tip-item {
  display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--cw-border-light);
}
.wt-tip-item:last-child { border-bottom: none; }
.wt-tip-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.wt-tip-item strong { font-size: 13px; color: var(--cw-text-primary); display: block; margin-bottom: 2px; }
.wt-tip-item p { font-size: 12px; color: var(--cw-text-muted); margin: 0; line-height: 1.4; }

/*  Template Modal  */
.wt-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999;
  opacity: 0; visibility: hidden; transition: all .3s;
}
.wt-modal-overlay.open { opacity: 1; visibility: visible; }
.wt-modal {
  position: fixed; inset: 24px; z-index: 1000;
  opacity: 0; visibility: hidden; transition: all .3s;
  transform: scale(.97);
}
.wt-modal.open { opacity: 1; visibility: visible; transform: scale(1); }
.wt-modal-inner {
  display: flex; height: 100%; background: var(--cw-surface);
  border-radius: var(--cw-radius-xl); overflow: hidden;
  box-shadow: var(--cw-shadow-modal);
}

/* Modal Form Side */
.wt-modal-form { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wt-modal-form-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--cw-border-light); flex-shrink: 0;
}
.wt-modal-form-header h2 { font-size: 18px; font-weight: 700; color: var(--cw-text-primary); margin: 0; }
.wt-modal-close {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--cw-bg); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; color: var(--cw-text-secondary);
}
.wt-modal-close:hover { background: var(--cw-border-light); }
.wt-modal-form-body { flex: 1; overflow-y: auto; padding: 24px 28px; }
.wt-form-row { display: flex; gap: 12px; }
.wt-form-group { margin-bottom: 18px; flex: 1; }
.wt-form-group label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--cw-text-primary); margin-bottom: 6px;
}
.wt-form-group input, .wt-form-group select, .wt-form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md);
  font-family: inherit; font-size: 13px; color: var(--cw-text-primary); background: var(--cw-surface);
  transition: border-color .2s; outline: none;
}
.wt-form-group input:focus, .wt-form-group select:focus, .wt-form-group textarea:focus {
  border-color: var(--cw-primary);
}
.wt-form-group textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.wt-form-hint {
  display: flex; align-items: center; gap: 4px; margin-top: 6px;
  font-size: 11px; color: var(--cw-text-muted);
}
.wt-ai-inline {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  background: linear-gradient(135deg, #7C4DFF, #B388FF); color: white;
  border: none; border-radius: var(--cw-radius-pill); font-family: inherit;
  font-size: 11px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.wt-ai-inline:hover { opacity: .85; transform: scale(1.05); }
.wt-ai-inline.generating { animation: wt-sparkle 1.5s ease; }
.wt-ai-inline .material-icons-outlined { font-size: 14px; }
@keyframes wt-sparkle {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.1); }
  50% { box-shadow: 0 0 12px rgba(124,77,255,.5); }
}

/* Button builder */
.wt-buttons-builder { display: flex; flex-direction: column; gap: 8px; }
.wt-button-row { display: flex; gap: 8px; }
.wt-button-type { width: 160px; }
.wt-button-text { flex: 1; }
.wt-add-button-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  background: transparent; border: 1px dashed var(--cw-border); border-radius: var(--cw-radius-md);
  font-family: inherit; font-size: 12px; color: var(--cw-text-muted);
  cursor: pointer; transition: all .2s; align-self: flex-start;
}
.wt-add-button-btn:hover { border-color: var(--cw-primary); color: var(--cw-primary); }

/* Modal Footer */
.wt-modal-form-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 28px; border-top: 1px solid var(--cw-border-light); flex-shrink: 0;
}
.wt-modal-cancel {
  padding: 10px 24px; background: transparent; border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md); font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--cw-text-secondary); cursor: pointer; transition: all .2s;
}
.wt-modal-cancel:hover { background: var(--cw-bg); }
.wt-modal-submit {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px;
  background: #25D366; color: white; border: none; border-radius: var(--cw-radius-md);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.wt-modal-submit:hover { background: #128C7E; }
.wt-modal-submit .material-icons-outlined { font-size: 16px; }

/*  WhatsApp Phone Preview  */
.wt-modal-preview {
  width: 360px; flex-shrink: 0; background: #F0F2F5;
  display: flex; flex-direction: column; align-items: center;
  padding: 20px; border-left: 1px solid var(--cw-border-light);
}
.wt-preview-label {
  font-size: 12px; font-weight: 600; color: var(--cw-text-muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px;
}
.wt-phone-mock {
  width: 290px; background: #111B21; border-radius: 28px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  display: flex; flex-direction: column; flex: 1; max-height: 580px;
}
.wt-phone-mock.light-theme {
  background: #E5DDD5;
}
.wt-phone-notch {
  height: 24px; background: #111B21;
  display: flex; align-items: center; justify-content: center;
}
.wt-phone-notch::after {
  content: ''; width: 60px; height: 5px; background: #1a2a33;
  border-radius: 10px;
}
.wt-phone-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: #1F2C34;
}
.wt-phone-contact { display: flex; align-items: center; gap: 8px; flex: 1; }
.wt-phone-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
}
.wt-phone-contact-name { font-size: 13px; font-weight: 600; color: white; }
.wt-phone-contact-status { font-size: 10px; color: #8696a0; }
.wt-phone-chat {
  flex: 1; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><rect fill="%230b141a"/><g fill="%231a2a33" opacity=".3"><rect x="0" y="0" width="20" height="20"/><rect x="40" y="0" width="20" height="20"/><rect x="20" y="20" width="20" height="20"/><rect x="60" y="20" width="20" height="20"/></g></svg>');
  background-color: #0b141a; padding: 12px;
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.wt-phone-date {
  text-align: center; font-size: 10px; color: #8696a0;
  background: #1a2a33; padding: 4px 12px; border-radius: 6px;
  align-self: center; margin-bottom: 4px;
}
.wt-phone-bubble {
  background: #005C4B; padding: 8px 10px; border-radius: 8px 8px 0 8px;
  max-width: 85%; align-self: flex-end; position: relative;
}
.wt-bubble-header {
  font-size: 13px; font-weight: 700; color: #e9edef; margin-bottom: 4px; display: none;
}
.wt-bubble-body { font-size: 12px; color: #e9edef; line-height: 1.5; word-wrap: break-word; }
.wt-bubble-footer {
  font-size: 10px; color: #8696a0; margin-top: 4px; display: none;
}
.wt-bubble-time {
  display: flex; align-items: center; justify-content: flex-end; gap: 3px;
  font-size: 10px; color: rgba(255,255,255,.6); margin-top: 2px;
}
.wt-phone-buttons {
  display: flex; flex-direction: column; gap: 4px; max-width: 85%; align-self: flex-end;
}
.wt-phone-btn {
  background: #1a2a33; color: #53bdeb; text-align: center;
  padding: 8px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.wt-phone-input-bar {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: #1F2C34;
}
.wt-phone-input-field {
  flex: 1; background: #2A3942; border-radius: 20px; padding: 8px 14px;
  font-size: 12px; color: #8696a0;
}
.wt-phone-mic {
  width: 36px; height: 36px; background: #00A884; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Light Theme overrides for WhatsApp Phone Mock */
.wt-phone-mock.light-theme .wt-phone-notch { background: #FFFFFF; }
.wt-phone-mock.light-theme .wt-phone-notch::after { background: #E0E0E0; }
.wt-phone-mock.light-theme .wt-phone-header { background: #075E54; }
.wt-phone-mock.light-theme .wt-phone-chat {
  background-color: #E5DDD5;
  background-image: none;
}
.wt-phone-mock.light-theme .wt-phone-date { background: #E1F3FB; color: #111; }
.wt-phone-mock.light-theme .wt-phone-bubble { background: #DCF8C6; color: #303030; }
.wt-phone-mock.light-theme .wt-bubble-header { color: #000; }
.wt-phone-mock.light-theme .wt-bubble-body { color: #303030; }
.wt-phone-mock.light-theme .wt-bubble-footer { color: #666; }
.wt-phone-mock.light-theme .wt-bubble-time { color: rgba(0,0,0,0.45); }
.wt-phone-mock.light-theme .wt-bubble-time .material-icons-outlined { color: #34B7F1; }
.wt-phone-mock.light-theme .wt-phone-buttons .wt-phone-btn { background: #FFF; color: #00A884; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.wt-phone-mock.light-theme .wt-phone-input-bar { background: #F0F0F0; }
.wt-phone-mock.light-theme .wt-phone-input-field { background: #FFFFFF; color: #333; }

/* Category Boxes for Modal */
.wt-category-boxes { display: flex; gap: 12px; }
.wt-category-box {
  flex: 1; border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md);
  padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; background: var(--cw-surface); transition: all .2s;
}
.wt-category-box:hover { border-color: var(--cw-primary); background: var(--wt-gray); }
.wt-category-box.active { border-color: var(--cw-primary); background: var(--cw-primary-bg); }
.wt-category-box .material-icons-outlined { font-size: 24px; color: var(--cw-text-secondary); }
.wt-category-box.active .material-icons-outlined { color: var(--cw-primary); }
.wt-category-box span { font-size: 13px; font-weight: 600; color: var(--cw-text-primary); }

/*  Carousel / Catalog Card  */
.wt-card-carousel-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 2px;
  scrollbar-width: none;
}
.wt-card-carousel-strip::-webkit-scrollbar { display: none; }
.wt-card-carousel-thumb {
  width: 52px; height: 52px; border-radius: 8px; overflow: hidden;
  flex-shrink: 0; border: 2px solid var(--cw-border-light); position: relative;
  transition: all .2s;
}
.wt-card-carousel-thumb:hover { border-color: var(--cw-primary); transform: scale(1.05); }
.wt-card-carousel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wt-card-carousel-thumb .wt-carousel-count {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white; border-radius: 6px;
}
.wt-card-media--carousel {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #00A884 0%, #25D366 100%);
}
.wt-card-media--carousel .material-icons-outlined { font-size: 24px; color: white; }
.wt-catalog-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; color: #00A884;
  background: #E8F5E9; padding: 2px 8px; border-radius: var(--cw-radius-pill);
  margin-left: 8px;
}
.wt-catalog-badge .material-icons-outlined { font-size: 12px; }

/*  Modal: Template Type Selector  */
.wt-type-boxes { display: flex; gap: 10px; flex-wrap: wrap; }
.wt-type-box {
  flex: 1; min-width: 120px; border: 2px solid var(--cw-border-light);
  border-radius: var(--cw-radius-md); padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; background: var(--cw-surface); transition: all .2s; text-align: center;
}
.wt-type-box:hover { border-color: var(--cw-primary); background: var(--cw-bg); }
.wt-type-box.active { border-color: #00A884; background: #E8F5E9; }
.wt-type-box .material-icons-outlined { font-size: 28px; color: var(--cw-text-muted); transition: color .2s; }
.wt-type-box.active .material-icons-outlined { color: #00A884; }
.wt-type-box span { font-size: 12px; font-weight: 600; color: var(--cw-text-primary); }
.wt-type-box small { font-size: 10px; color: var(--cw-text-muted); line-height: 1.3; }
.wt-type-box .wt-type-api-tag {
  font-size: 9px; font-weight: 700; color: white; background: #00A884;
  padding: 1px 6px; border-radius: 4px; margin-top: 2px;
}

/*  Modal: Catalog Cards Builder  */
.wt-catalog-section { display: none; animation: cws-fadeUp .3s ease; }
.wt-catalog-section.visible { display: block; }
.wt-catalog-cards-builder {
  display: flex; flex-direction: column; gap: 12px;
}
.wt-catalog-card-editor {
  border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-md);
  overflow: hidden; transition: all .2s;
}
.wt-catalog-card-editor:hover { border-color: var(--cw-border); }
.wt-catalog-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--cw-bg); cursor: pointer;
}
.wt-catalog-card-header span { font-size: 13px; font-weight: 600; color: var(--cw-text-primary); }
.wt-catalog-card-header small { font-size: 11px; color: var(--cw-text-muted); }
.wt-catalog-card-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.wt-catalog-card-img-upload {
  width: 100%; height: 100px; border: 2px dashed var(--cw-border);
  border-radius: var(--cw-radius-md); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  transition: all .2s; overflow: hidden;
}
.wt-catalog-card-img-upload:hover { border-color: #00A884; background: #E8F5E9; }
.wt-catalog-card-img-upload .material-icons-outlined { font-size: 24px; color: var(--cw-text-muted); }
.wt-catalog-card-img-upload span { font-size: 11px; color: var(--cw-text-muted); }
.wt-catalog-card-img-upload img {
  width: 100%; height: 100%; object-fit: cover; display: none;
}
.wt-catalog-card-img-upload.has-image { border: none; }
.wt-catalog-card-img-upload.has-image img { display: block; }
.wt-catalog-card-img-upload.has-image .material-icons-outlined,
.wt-catalog-card-img-upload.has-image span { display: none; }
.wt-catalog-card-body input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-sm); font-family: inherit; font-size: 12px;
  color: var(--cw-text-primary); background: var(--cw-surface); outline: none;
}
.wt-catalog-card-body input:focus { border-color: #00A884; }
.wt-catalog-card-buttons {
  display: flex; gap: 6px;
}
.wt-catalog-card-buttons input { flex: 1; }
.wt-catalog-add-card {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; border: 2px dashed var(--cw-border); border-radius: var(--cw-radius-md);
  background: transparent; font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--cw-text-muted); cursor: pointer; transition: all .2s;
}
.wt-catalog-add-card:hover { border-color: #00A884; color: #00A884; background: #E8F5E9; }
.wt-catalog-info-box {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px;
  background: #E8F5E9; border-radius: var(--cw-radius-md);
  font-size: 11px; color: #2E7D32; line-height: 1.5; margin-bottom: 8px;
}
.wt-catalog-info-box .material-icons-outlined { font-size: 16px; flex-shrink: 0; margin-top: 1px; color: #00A884; }

/*  WhatsApp Phone: Carousel Preview  */
.wt-phone-carousel {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0;
  max-width: 85%; align-self: flex-end; scrollbar-width: none;
}
.wt-phone-carousel::-webkit-scrollbar { display: none; }
.wt-phone-carousel-card {
  width: 180px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  background: #005C4B;
}
.wt-phone-mock.light-theme .wt-phone-carousel-card { background: #DCF8C6; }
.wt-phone-carousel-card-img {
  width: 100%; height: 90px; object-fit: cover;
}
.wt-phone-carousel-card-body {
  padding: 8px 10px;
}
.wt-phone-carousel-card-title {
  font-size: 11px; font-weight: 700; color: #e9edef; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wt-phone-mock.light-theme .wt-phone-carousel-card-title { color: #000; }
.wt-phone-carousel-card-desc {
  font-size: 10px; color: rgba(255,255,255,.7); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wt-phone-mock.light-theme .wt-phone-carousel-card-desc { color: #555; }
.wt-phone-carousel-card-btn {
  text-align: center; padding: 7px; font-size: 11px; font-weight: 500;
  color: #53bdeb; border-top: 1px solid rgba(255,255,255,.1); margin-top: 4px;
}
.wt-phone-mock.light-theme .wt-phone-carousel-card-btn {
  color: #00A884; border-top-color: rgba(0,0,0,.06);
}

/* Template responsive */
@media (max-width: 900px) {
  .wt-layout { grid-template-columns: 1fr; }
  .wt-modal-inner { flex-direction: column; }
  .wt-modal-preview { width: 100%; max-height: 400px; }
  .wt-form-row { flex-direction: column; }
  .wt-type-boxes { flex-direction: column; }
}

/* 
   CHATBOT PAGE
    */
.cb-page { max-width: 760px; }
/* Header */
.cb-header-section { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.cb-header-left { display: flex; align-items: center; gap: 14px; }
.cb-header-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--cw-text-primary); display: flex; align-items: center; justify-content: center; }
.cb-header-icon .material-icons-outlined { font-size: 22px; color: white; }
.cb-header-section h2 { font-size: 18px; font-weight: 700; color: var(--cw-text-primary); margin: 0 0 2px; }
.cb-header-section p { font-size: 12px; color: var(--cw-text-muted); margin: 0; }
.cb-status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: #E8F5E9; border-radius: var(--cw-radius-pill); font-size: 12px; font-weight: 600; color: #2E7D32; }
.cb-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #25D366; animation: wa-pulse 2s infinite; }
/* Tabs */
.cb-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--cw-border-light); margin-bottom: 24px; }
.cb-tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border: none; background: transparent; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--cw-text-muted); cursor: pointer; transition: all .2s; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cb-tab .material-icons-outlined { font-size: 18px; }
.cb-tab:hover { color: var(--cw-text-primary); }
.cb-tab.active { color: var(--cw-text-primary); border-bottom-color: var(--cw-text-primary); }
.cb-tab-content { display: none; animation: cws-fadeUp .3s ease; }
.cb-tab-content.active { display: block; }
/* Switch toggle */
.cb-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.cb-switch input { opacity: 0; width: 0; height: 0; }
.cb-slider { position: absolute; cursor: pointer; inset: 0; background: #D1D5DB; border-radius: 24px; transition: .3s; }
.cb-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.cb-switch input:checked + .cb-slider { background: #25D366; }
.cb-switch input:checked + .cb-slider::before { transform: translateX(20px); }
/* AI Hero */
.cb-ai-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; background: var(--cw-surface); border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-lg); margin-bottom: 16px; }
.cb-ai-hero-left { display: flex; align-items: center; gap: 14px; }
.cb-ai-hero-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#7C4DFF,#B388FF); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cb-ai-hero-icon .material-icons-outlined { font-size: 22px; color: white; }
.cb-ai-hero h3 { font-size: 14px; font-weight: 700; color: var(--cw-text-primary); margin: 0 0 2px; }
.cb-ai-hero p { font-size: 12px; color: var(--cw-text-muted); margin: 0; }
/* Settings grid */
.cb-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.cb-setting-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; background: var(--cw-surface); border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-md); }
.cb-setting-header { display: flex; gap: 10px; flex: 1; }
.cb-setting-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.cb-setting-card strong { font-size: 13px; color: var(--cw-text-primary); display: block; margin-bottom: 2px; }
.cb-setting-card p { font-size: 11px; color: var(--cw-text-muted); margin: 0; line-height: 1.4; }
/* Section */
.cb-section { background: var(--cw-surface); border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-lg); padding: 20px; }
.cb-section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.cb-section-title .material-icons-outlined { color: var(--cw-text-muted); }
.cb-section-title h3 { font-size: 14px; font-weight: 700; color: var(--cw-text-primary); margin: 0; }
/* Response card */
.cb-response-card { background: var(--cw-bg); border-radius: var(--cw-radius-md); padding: 16px; margin-bottom: 12px; }
.cb-response-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.cb-response-info { display: flex; flex-direction: column; gap: 4px; }
.cb-response-name { font-size: 14px; font-weight: 600; color: var(--cw-text-primary); }
.cb-response-badge { font-size: 11px; color: #25D366; font-weight: 500; }
.cb-response-preview { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--cw-text-secondary); line-height: 1.5; margin-bottom: 10px; }
.cb-response-actions { display: flex; gap: 8px; }
.cb-action-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; background: var(--cw-surface); border: 1px solid var(--cw-border); border-radius: var(--cw-radius-sm); font-family: inherit; font-size: 11px; font-weight: 500; color: var(--cw-text-secondary); cursor: pointer; transition: all .2s; }
.cb-action-btn:hover { border-color: var(--cw-text-primary); color: var(--cw-text-primary); }
.cb-action-btn .material-icons-outlined { font-size: 14px; }
/* Info banner */
.cb-info-banner { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; background: #F5F3FF; border-radius: var(--cw-radius-md); font-size: 12px; color: #5B21B6; line-height: 1.5; }
.cb-info-banner .material-icons-outlined { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
/* Notification tab */
.cb-notif-master { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px; background: var(--cw-surface); border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-lg); margin-bottom: 12px; }
.cb-notif-master strong { font-size: 14px; color: var(--cw-text-primary); display: block; margin-bottom: 2px; }
.cb-notif-master p { font-size: 12px; color: var(--cw-text-muted); margin: 0; }
.cb-notif-browser { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px; background: var(--cw-surface); border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-md); margin-bottom: 16px; }
.cb-notif-browser strong { font-size: 13px; color: var(--cw-text-primary); display: block; margin-bottom: 2px; }
.cb-notif-browser p { font-size: 11px; color: var(--cw-text-muted); margin: 0; }
.cb-notif-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 0 4px; }
.cb-notif-filter select { padding: 6px 12px; border: 1px solid var(--cw-border); border-radius: var(--cw-radius-sm); font-family: inherit; font-size: 12px; color: var(--cw-text-primary); background: var(--cw-surface); outline: none; }
.cb-notif-list { display: flex; flex-direction: column; gap: 8px; }
.cb-notif-item { background: var(--cw-surface); border: 1px solid var(--cw-border-light); border-radius: var(--cw-radius-md); overflow: hidden; transition: all .2s; }
.cb-notif-item.expanded { border-color: var(--cw-border); }
.cb-notif-item-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; cursor: pointer; }
.cb-notif-item-left { display: flex; align-items: center; gap: 10px; }
.cb-notif-icon { font-size: 20px; }
.cb-notif-item-name { font-size: 13px; font-weight: 500; color: var(--cw-text-primary); }
.cb-notif-item-right { display: flex; align-items: center; gap: 10px; }
.cb-notif-chevron { font-size: 20px; color: var(--cw-text-muted); transition: transform .2s; }
.cb-notif-item.expanded .cb-notif-chevron { transform: rotate(180deg); }
.cb-notif-item-body { padding: 0 16px 16px; }
/* Message preview */
.cb-msg-label { font-size: 11px; color: #7C4DFF; font-weight: 600; margin-bottom: 6px; }
.cb-msg-bubble { background: #DCF8C6; border-radius: 8px 8px 0 8px; padding: 10px 14px; font-size: 13px; color: #303030; line-height: 1.6; margin-bottom: 10px; }
.cb-msg-variables { display: flex; align-items: flex-start; gap: 4px; flex-wrap: wrap; font-size: 11px; color: var(--cw-text-muted); line-height: 1.5; margin-bottom: 8px; }
.cb-msg-variables code { background: #F3E8FF; padding: 1px 5px; border-radius: 3px; font-size: 11px; color: #7C4DFF; }
/* Save */
.cb-save-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; background: var(--cw-text-primary); color: white; border: none; border-radius: var(--cw-radius-md); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; margin-top: 20px; }
.cb-save-btn:hover { opacity: .9; }
.cb-save-btn .material-icons-outlined { font-size: 18px; }
/* Modal */
.cb-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; opacity: 0; visibility: hidden; transition: all .3s; }
.cb-modal-overlay.open { opacity: 1; visibility: visible; }
.cb-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.95); width: 400px; max-width: 95vw; background: var(--cw-surface); border-radius: var(--cw-radius-xl); z-index: 1000; opacity: 0; visibility: hidden; transition: all .3s; overflow: hidden; box-shadow: var(--cw-shadow-modal); }
.cb-modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.cb-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--cw-border-light); }
.cb-modal-header h3 { font-size: 16px; font-weight: 700; color: var(--cw-text-primary); margin: 0; }
.cb-modal-header button { background: none; border: none; cursor: pointer; color: var(--cw-text-muted); transition: all .2s; }
.cb-modal-header button:hover { color: var(--cw-text-primary); }
.cb-modal-body { padding: 20px 22px; }
.cb-chat-preview { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cb-chat-bubble {
  max-width: 85%; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; line-height: 1.5; position: relative;
}
.cb-chat-bubble.received {
  background: var(--cw-bg); color: var(--cw-text-secondary); align-self: flex-start;
  border-radius: 10px 10px 10px 0;
}
.cb-chat-bubble.sent {
  background: #DCF8C6; color: #303030; align-self: flex-end;
  border-radius: 10px 10px 0 10px;
}
.cb-chat-time {
  font-size: 10px; color: var(--cw-text-muted); text-align: right; margin-top: 4px;
}
.cb-modal-note {
  font-size: 12px; color: var(--cw-text-muted); text-align: center;
  line-height: 1.5; margin-bottom: 16px;
}
.cb-modal-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 12px; background: var(--cw-primary); color: white;
  border: none; border-radius: var(--cw-radius-md); font-family: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.cb-modal-action-btn:hover { opacity: .9; }

/* 
   FACEBOOK OAUTH POPUP (Mocked)
    */

.fb-oauth-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1100;
  opacity: 0; visibility: hidden; transition: all .3s;
  backdrop-filter: blur(2px);
}
.fb-oauth-overlay.open { opacity: 1; visibility: visible; }

.fb-oauth-popup {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.95);
  width: 680px; max-width: 95vw; max-height: 90vh;
  background: #FFFFFF; border-radius: 12px;
  z-index: 1200; opacity: 0; visibility: hidden; transition: all .3s;
  box-shadow: 0 25px 60px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.05);
  display: flex; flex-direction: column; overflow: hidden;
}
.fb-oauth-popup.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

/* Popup browser header */
.fb-popup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: #F0F2F5; border-bottom: 1px solid #DADDE1;
  flex-shrink: 0;
}
.fb-popup-url {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #65676B; font-family: system-ui, sans-serif;
}
.fb-popup-controls { display: flex; align-items: center; gap: 4px; }
.fb-popup-close-btn {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: transparent; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: #65676B;
  transition: all .15s;
}
.fb-popup-close-btn:hover { background: #DADDE1; color: #1C1E21; }

/* Popup navbar */
.fb-popup-navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: #FFFFFF; border-bottom: 1px solid #DADDE1;
  flex-shrink: 0;
}
.fb-popup-nav-left { display: flex; align-items: center; gap: 8px; }
.fb-popup-nav-right { display: flex; align-items: center; }
.fb-popup-avatar { display: flex; align-items: center; gap: 2px; cursor: pointer; }

/* Main body */
.fb-popup-body {
  display: flex; flex: 1; overflow-y: auto; min-height: 0;
}

/* Step sidebar (left dots) */
.fb-step-sidebar {
  width: 48px; flex-shrink: 0; padding: 24px 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: #F7F8FA; border-right: 1px solid #EBEDF0;
}
.fb-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #DADDE1; background: white;
  transition: all .3s; position: relative;
}
.fb-step-dot.active {
  border-color: #1877F2; border-width: 3px;
  background: white;
}
.fb-step-dot.active::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px; border-radius: 50%; background: #1877F2;
}
.fb-step-dot.done {
  border-color: #25D366; background: #25D366;
}
.fb-step-dot.done::after {
  content: '\2713'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px; font-weight: 700; color: white;
}

/* Step main content */
.fb-step-main {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0;
}
.fb-step-content {
  display: none; padding: 24px 28px;
  animation: cws-fadeUp .3s ease;
  flex-direction: column; flex: 1;
}
.fb-step-content.active { display: flex; }

/* Hero banner */
.fb-hero-banner {
  background: linear-gradient(135deg, #E3F2FD 0%, #C8E6EC 40%, #FFF3E0 70%, #F3E5F5 100%);
  border-radius: 12px; padding: 32px; text-align: center;
  margin-bottom: 4px; position: relative; overflow: hidden;
}
.fb-hero-illustration {
  position: relative; height: 100px; display: flex;
  align-items: center; justify-content: center;
}
.fb-hero-shapes {
  position: absolute; inset: 0;
}
.fb-shape {
  position: absolute; border-radius: 50%; opacity: .4;
}
.fb-shape-circle { width: 60px; height: 60px; top: 10px; left: 15%; }
.fb-shape-rect { width: 80px; height: 50px; top: 30px; right: 15%; border-radius: 12px; }
.fb-shape-circle2 { width: 40px; height: 40px; bottom: 0; left: 40%; }
.fb-hero-handshake { position: relative; z-index: 1; }

/* Accordion */
.fb-accordion { margin-bottom: 16px; }
.fb-accordion-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border: 1px solid #DADDE1; border-radius: 8px;
  margin-bottom: 8px; cursor: pointer; transition: all .2s;
}
.fb-accordion-item:hover { background: #F7F8FA; }
.fb-accordion-header { display: flex; align-items: center; gap: 10px; }
.fb-accordion-arrow {
  color: #65676B; font-size: 20px; transition: transform .2s;
}
.fb-accordion-item.expanded .fb-accordion-arrow { transform: rotate(180deg); }

/* Terms */
.fb-terms {
  padding: 16px 0; border-top: 1px solid #EBEDF0; margin-top: auto;
}

/* Footer */
.fb-step-footer {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid #EBEDF0; margin-top: 16px;
  gap: 16px;
}
.fb-footer-left {
  font-size: 12px; color: #65676B; line-height: 1.5;
}
.fb-footer-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Buttons */
.fb-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 24px; border: none; border-radius: 6px;
  background: #1877F2; color: white; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.fb-btn-primary:hover { background: #166FE5; }
.fb-btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 24px; border: 1px solid #DADDE1; border-radius: 6px;
  background: white; color: #1C1E21; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.fb-btn-outline:hover { background: #F7F8FA; }

/* Form elements */
.fb-form-group {
  margin-bottom: 20px; position: relative;
}
.fb-form-label {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700; color: #1C1E21;
  margin-bottom: 6px;
}
.fb-select-box {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 1px solid #CCD0D5; border-radius: 8px;
  cursor: pointer; transition: all .2s; background: white;
}
.fb-select-box:hover { border-color: #8A8D91; }
.fb-select-placeholder { }
.fb-select-value { display: flex; align-items: center; gap: 10px; }
.fb-avatar-letter {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* Dropdown */
.fb-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: white; border: 1px solid #CCD0D5;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 10; margin-top: 4px;
  display: none;
}
.fb-dropdown.open { display: block; }
.fb-dropdown-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid #EBEDF0;
}
.fb-dropdown-input {
  border: none; outline: none; font-family: inherit;
  font-size: 14px; color: #1C1E21; width: 100%;
  background: transparent;
}
.fb-dropdown-input::placeholder { color: #8A8D91; }
.fb-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; transition: all .15s;
}
.fb-dropdown-item:hover { background: #F7F8FA; }
.fb-dropdown-item:last-child { border-radius: 0 0 8px 8px; }
.fb-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #CCD0D5; appearance: none;
  flex-shrink: 0; cursor: pointer; transition: all .15s;
}
.fb-radio:checked { border-color: #1877F2; background: #1877F2; }

/* Phone input */
.fb-phone-input {
  display: flex; border: 1px solid #CCD0D5; border-radius: 8px;
  overflow: hidden; transition: all .2s;
}
.fb-phone-input:focus-within { border-color: #1877F2; box-shadow: 0 0 0 2px rgba(24,119,242,.2); }
.fb-phone-country {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px; background: #F7F8FA;
  border-right: 1px solid #CCD0D5; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.fb-phone-number {
  border: none; outline: none; padding: 10px 14px;
  font-family: inherit; font-size: 14px; color: #1C1E21;
  width: 100%; background: transparent;
}

/* QR Center */
.fb-qr-center { text-align: center; padding: 16px 0; }
.fb-qr-code-wrapper {
  display: inline-block; padding: 16px; background: white;
  border-radius: 8px; border: 1px solid #EBEDF0;
}

/* Responsive */
@media (max-width: 768px) {
  .fb-oauth-popup { width: 95vw; max-height: 95vh; }
  .fb-step-sidebar { width: 36px; padding: 16px 0; }
  .fb-step-dot { width: 22px; height: 22px; }
  .fb-step-content { padding: 16px; }
  .fb-step-footer { flex-direction: column; align-items: stretch; }
  .fb-footer-right { justify-content: flex-end; }
  .fb-hero-banner { padding: 20px; }
}

/* 
   DOCUMENT EDITOR
    */

.doc-editor-wrap {
  max-width: 860px; margin: 0 auto;
  padding-bottom: 80px; /* space for fixed footer */
}

/* Toolbar */
.doc-toolbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  padding: 8px 12px; margin-bottom: 16px;
  background: var(--cw-surface); border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-lg);
}
.doc-toolbar-group { display: flex; align-items: center; gap: 1px; }
.doc-toolbar-sep {
  width: 1px; height: 24px; background: var(--cw-border-light); margin: 0 6px;
}
.doc-tb-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: 6px;
  background: transparent; cursor: pointer; transition: all .15s;
  color: var(--cw-text-secondary);
}
.doc-tb-btn:hover { background: var(--cw-bg); color: var(--cw-text-primary); }
.doc-tb-btn:active { background: var(--cw-border-light); }
.doc-tb-btn .material-icons-outlined { font-size: 18px; }
.doc-tb-select {
  padding: 5px 8px; border: 1px solid var(--cw-border-light); border-radius: 6px;
  font-family: inherit; font-size: 12px; color: var(--cw-text-secondary);
  background: var(--cw-bg); cursor: pointer; outline: none;
}
.doc-tb-select:focus { border-color: var(--cw-primary); }

/* Editable content */
.doc-editable {
  min-height: 600px; padding: 32px 40px; outline: none;
  background: var(--cw-surface); border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-lg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 1.75; color: var(--cw-text-primary);
  transition: border-color .2s;
}
.doc-editable:focus { border-color: var(--cw-primary); }

/* Content typography */
.doc-editable h1 {
  font-size: 26px; font-weight: 800; margin: 24px 0 12px;
  color: var(--cw-text-primary); line-height: 1.3;
  padding-bottom: 8px; border-bottom: 2px solid var(--cw-border-light);
}
.doc-editable h2 {
  font-size: 20px; font-weight: 700; margin: 28px 0 10px;
  color: var(--cw-text-primary); line-height: 1.3;
}
.doc-editable h3 {
  font-size: 16px; font-weight: 600; margin: 20px 0 8px;
  color: var(--cw-text-primary);
}
.doc-editable h4 {
  font-size: 14px; font-weight: 600; margin: 16px 0 6px;
  color: var(--cw-text-secondary); text-transform: uppercase; letter-spacing: .3px;
}
.doc-editable p { margin: 0 0 12px; }
.doc-editable ul, .doc-editable ol { margin: 0 0 12px; padding-left: 24px; }
.doc-editable li { margin-bottom: 4px; }
.doc-editable blockquote {
  margin: 16px 0; padding: 14px 18px;
  border-left: 4px solid var(--cw-primary); background: #F3E8FF;
  border-radius: 0 var(--cw-radius-md) var(--cw-radius-md) 0;
  font-size: 13px; color: #4A148C;
}
.doc-editable pre {
  margin: 12px 0; padding: 16px 20px;
  background: #1e1e2e; color: #cdd6f4; border-radius: var(--cw-radius-md);
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap;
}
.doc-editable code {
  padding: 2px 6px; background: #F3E8FF; border-radius: 4px;
  font-family: 'Fira Code', monospace; font-size: 12px; color: #7C4DFF;
}
.doc-editable pre code {
  padding: 0; background: none; color: inherit; border-radius: 0;
}
.doc-editable table {
  width: 100%; border-collapse: collapse; margin: 14px 0;
  font-size: 13px;
}
.doc-editable table th, .doc-editable table td {
  padding: 10px 14px; border: 1px solid var(--cw-border-light);
  text-align: left;
}
.doc-editable table th {
  background: var(--cw-bg); font-weight: 600;
  color: var(--cw-text-primary); font-size: 12px; text-transform: uppercase;
  letter-spacing: .3px;
}
.doc-editable table tr:hover td { background: #FAFBFC; }
.doc-editable hr {
  margin: 24px 0; border: none; height: 1px;
  background: var(--cw-border-light);
}
.doc-editable a { color: var(--cw-primary); text-decoration: underline; }
.doc-editable img { max-width: 100%; border-radius: var(--cw-radius-md); margin: 12px 0; }

/* Header badge inside editor */
.doc-header-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--cw-radius-pill);
  background: linear-gradient(135deg,#E8F5E9,#C8E6C9);
  color: #2E7D32; font-size: 11px; font-weight: 600; letter-spacing: .3px;
  text-transform: uppercase; margin-bottom: 12px;
}
.doc-header-badge .material-icons-outlined { font-size: 14px; }

/* Fixed Footer */
.doc-footer {
  position: fixed; bottom: 0; left: var(--cw-sidebar-width, 230px); right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; z-index: 100;
  background: var(--cw-surface); border-top: 1px solid var(--cw-border-light);
}
.doc-footer-left { display: flex; align-items: center; gap: 8px; }
.doc-footer-icon { font-size: 20px; color: var(--cw-text-muted); }
.doc-footer-status { font-size: 13px; color: var(--cw-text-muted); font-weight: 500; }
.doc-footer-right { display: flex; align-items: center; gap: 14px; }
.doc-footer-saved { font-size: 12px; color: var(--cw-text-muted); }
.doc-save-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border: none; border-radius: var(--cw-radius-pill);
  background: var(--cw-border-light); color: var(--cw-text-muted);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .25s;
}
.doc-save-btn.dirty {
  background: var(--cw-primary); color: white;
  animation: doc-pulse .6s ease;
}
.doc-save-btn.dirty:hover { opacity: .9; }
.doc-save-btn .material-icons-outlined { font-size: 18px; }
.doc-save-btn:disabled { opacity: .7; cursor: not-allowed; }

/* Spin animation for save indicator */
@keyframes doc-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .doc-editable { padding: 20px 16px; }
  .doc-toolbar { padding: 6px 8px; }
  .doc-footer { left: 0; }
}

/* 
   LOGIN PAGE  Glassmorphism + Animated Orbs
    */

.login-body {
  font-family: var(--cw-font-family);
  background: #0F0B1E;
  min-height: 100vh;
  overflow: hidden;
  color: #E2E8F0;
}

.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  padding: 20px;
}

/* Floating animated orbs */
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 8s ease-in-out infinite;
}

.login-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #A543FA 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.login-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #7C4DFF 0%, transparent 70%);
  bottom: -50px;
  right: -50px;
  animation-delay: -3s;
}

.login-orb-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #B96BFB 0%, transparent 70%);
  top: 40%;
  right: 20%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(15px, 15px) scale(1.02); }
}

/* Login card */
.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 48px 40px;
  position: relative;
  z-index: 10;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.login-logo-svg {
  width: 170px;
  height: 36px;
}

.login-logo-badge {
  background: linear-gradient(135deg, #A543FA, #B96BFB);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* Login alerts */
.login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  animation: alertSlide 0.3s ease-out;
}

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

.login-alert .material-icons-outlined {
  font-size: 20px;
  flex-shrink: 0;
}

.login-alert-error {
  background: rgba(239, 83, 80, 0.15);
  color: #EF5350;
  border: 1px solid rgba(239, 83, 80, 0.3);
}

.login-alert-success {
  background: rgba(76, 175, 80, 0.15);
  color: #66BB6A;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Login form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.3px;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 20px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  color: #FFFFFF;
  transition: all 0.2s ease;
  outline: none;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.login-input:focus {
  border-color: #A543FA;
  background: rgba(165, 67, 250, 0.06);
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.15);
}

.login-input:focus ~ .login-input-icon,
.login-input-wrapper:focus-within .login-input-icon {
  color: #A543FA;
}

.login-toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.login-toggle-password:hover {
  color: rgba(255, 255, 255, 0.6);
}

.login-toggle-password .material-icons-outlined {
  font-size: 20px;
}

/* Login button */
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #A543FA, #8B2DE0);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(165, 67, 250, 0.4);
}

.login-btn:hover::before {
  left: 100%;
}

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

.login-btn .material-icons-outlined {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.login-btn:hover .material-icons-outlined {
  transform: translateX(4px);
}

/* Login footer */
.login-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.login-footer-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.login-footer-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/*  Login Light Theme  */
.login-body-light {
  background: var(--cw-bg);
  color: var(--cw-text-primary);
}

.login-card-light {
  background: #FFFFFF;
  border: 1px solid var(--cw-border-light);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  overflow: hidden;
}

.login-hero-image {
  width: 100%;
  background: linear-gradient(135deg, #F3EAFF, #EDE9FE);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
}

.login-hero-img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
}

.login-card-content {
  padding: 32px 40px 40px;
}

.login-card-light .login-title {
  color: var(--cw-text-primary);
}

.login-card-light .login-subtitle {
  color: var(--cw-text-secondary);
}

.login-card-light .login-label {
  color: var(--cw-text-secondary);
}

.login-card-light .login-input {
  background: var(--cw-bg);
  border-color: var(--cw-border);
  color: var(--cw-text-primary);
}

.login-card-light .login-input::placeholder {
  color: var(--cw-text-placeholder);
}

.login-card-light .login-input:focus {
  border-color: var(--cw-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.1);
}

.login-card-light .login-input-icon {
  color: var(--cw-text-muted);
}

.login-card-light .login-input:focus ~ .login-input-icon,
.login-card-light .login-input-wrapper:focus-within .login-input-icon {
  color: var(--cw-primary);
}

.login-card-light .login-toggle-password {
  color: var(--cw-text-muted);
}

.login-card-light .login-toggle-password:hover {
  color: var(--cw-text-secondary);
}

.login-card-light .login-btn {
  box-shadow: none;
}

.login-card-light .login-btn:hover {
  box-shadow: 0 4px 12px rgba(165, 67, 250, 0.25);
}

.login-alert-light.login-alert-error {
  background: var(--cw-danger-bg);
  color: var(--cw-danger);
  border: 1px solid var(--cw-danger-border);
}

.login-alert-light.login-alert-success {
  background: var(--cw-success-bg);
  color: var(--cw-success);
  border: 1px solid var(--cw-success-border);
}

.login-footer-light .login-footer-line {
  background: var(--cw-border);
}

.login-footer-light .login-footer-text {
  color: var(--cw-text-muted);
}

@media (max-width: 480px) {
  .login-card-content {
    padding: 24px 20px 28px;
  }
  .login-hero-image {
    padding: 16px 20px;
  }
}

/*  Sidebar logo image  */
.cw-logo-img {
  max-width: 180px;
  height: auto;
  object-fit: contain;
}

/* 
   FLASH MESSAGES  Global
    */

.cw-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  animation: flashSlideIn 0.3s ease-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes flashSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.cw-flash .material-icons-outlined {
  font-size: 20px;
  flex-shrink: 0;
}

.cw-flash-success {
  background: var(--cw-success-bg);
  color: var(--cw-success);
  border: 1px solid var(--cw-success-border);
}

.cw-flash-error {
  background: var(--cw-danger-bg);
  color: var(--cw-danger);
  border: 1px solid var(--cw-danger-border);
}

.cw-flash-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 2px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.cw-flash-close:hover {
  opacity: 1;
}

.cw-flash-close .material-icons-outlined {
  font-size: 18px;
}

.cw-flash-global {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  min-width: 320px;
  max-width: 480px;
  box-shadow: var(--cw-shadow-lg);
}

/* 
   SIDEBAR USER FOOTER
    */

.cw-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 4px 8px 4px;
  border-radius: var(--cw-radius-md);
  background: linear-gradient(135deg, rgba(165, 67, 250, 0.04), rgba(165, 67, 250, 0.01));
}

.cw-sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.cw-sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.cw-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-sidebar-user-role {
  font-size: 11px;
  color: var(--cw-text-muted);
}

.cw-sidebar-logout-btn {
  background: none;
  border: none;
  color: var(--cw-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cw-sidebar-logout-btn:hover {
  background: var(--cw-danger-bg);
  color: var(--cw-danger);
}

.cw-sidebar-logout-btn .material-icons-outlined {
  font-size: 20px;
}

/* 
   HEADER USER PILL
    */

.cw-header-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-pill);
}

.cw-header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.cw-header-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-primary);
}

/* 
   USER MANAGEMENT  Stats, Table, Forms
    */

/* Stats row */
.users-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.users-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--cw-surface);
  border-radius: var(--cw-radius-lg);
  border: 1px solid var(--cw-border-light);
  box-shadow: var(--cw-shadow-card);
  transition: all 0.2s ease;
}

.users-stat-card:hover {
  box-shadow: var(--cw-shadow-md);
  transform: translateY(-2px);
}

.users-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--cw-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.users-stat-icon .material-icons-outlined {
  font-size: 24px;
}

.users-stat-info {
  display: flex;
  flex-direction: column;
}

.users-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--cw-text-primary);
  line-height: 1;
}

.users-stat-label {
  font-size: 12px;
  color: var(--cw-text-muted);
  margin-top: 4px;
}

/* User table cells */
.user-cell-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.user-name {
  font-weight: 600;
  color: var(--cw-text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-email {
  font-size: 12px;
  color: var(--cw-text-muted);
  margin-top: 2px;
}

.user-date {
  font-size: 12px;
  color: var(--cw-text-muted);
}

.user-perm-all {
  font-size: 12px;
  color: var(--cw-success);
  font-weight: 600;
}

.user-perm-none {
  font-size: 12px;
  color: var(--cw-text-muted);
  font-style: italic;
}

.user-perms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.user-perm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--cw-purple-lighter);
  color: var(--cw-purple);
  border-radius: var(--cw-radius-pill);
  font-size: 11px;
  font-weight: 500;
}

/* User actions */
.user-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.user-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cw-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-action-btn:hover {
  background: var(--cw-sidebar-item-hover);
  color: var(--cw-text-primary);
  border-color: var(--cw-border);
}

.user-action-danger:hover {
  background: var(--cw-danger-bg);
  color: var(--cw-danger);
  border-color: var(--cw-danger-border);
}

.user-action-btn .material-icons-outlined {
  font-size: 18px;
}

/* User form */
.user-form-container {
  max-width: 720px;
  margin: 0 auto;
}

.user-form-back {
  margin-bottom: 16px;
}

.user-form-card {
  padding: 32px;
}

.user-form-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cw-border-light);
}

.user-form-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--cw-radius-lg);
  background: linear-gradient(135deg, #A543FA22, #A543FA08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-form-icon .material-icons-outlined {
  font-size: 28px;
  color: var(--cw-primary);
}

.user-form-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--cw-text-primary);
}

.user-form-subtitle {
  font-size: 13px;
  color: var(--cw-text-muted);
  margin-top: 2px;
}

.user-form-section {
  margin-bottom: 28px;
}

.user-form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin-bottom: 16px;
}

.user-form-section-title .material-icons-outlined {
  font-size: 20px;
  color: var(--cw-primary);
}

.user-form-section-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--cw-text-muted);
}

.user-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.user-form-hint {
  font-size: 12px;
  color: var(--cw-text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.user-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--cw-border-light);
}

/* Override login-field styles when inside user-form */
.user-form .login-field {
  margin-bottom: 0;
}

.user-form .login-label {
  color: var(--cw-text-secondary);
}

.user-form .login-input {
  background: var(--cw-surface);
  border-color: var(--cw-border);
  color: var(--cw-text-primary);
  padding: 12px 12px 12px 40px;
  border-radius: var(--cw-radius-md);
  font-size: 14px;
}

.user-form .login-input::placeholder {
  color: var(--cw-text-placeholder);
}

.user-form .login-input:focus {
  border-color: var(--cw-primary);
  background: var(--cw-surface);
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.1);
}

.user-form .login-input-icon {
  color: var(--cw-text-muted);
}

.user-form .login-input:focus ~ .login-input-icon,
.user-form .login-input-wrapper:focus-within .login-input-icon {
  color: var(--cw-primary);
}

/* Role selector */
.user-role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.user-role-option {
  cursor: pointer;
}

.user-role-radio {
  display: none;
}

.user-role-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--cw-border);
  border-radius: var(--cw-radius-lg);
  transition: all 0.2s ease;
  background: var(--cw-surface);
}

.user-role-card:hover {
  border-color: var(--cw-primary);
  background: rgba(165, 67, 250, 0.02);
}

.user-role-radio:checked + .user-role-card {
  border-color: var(--cw-primary);
  background: rgba(165, 67, 250, 0.04);
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.1);
}

.user-role-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--cw-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-role-icon .material-icons-outlined {
  font-size: 22px;
}

.user-role-info {
  display: flex;
  flex-direction: column;
}

.user-role-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--cw-text-primary);
}

.user-role-desc {
  font-size: 11px;
  color: var(--cw-text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* Permissions grid */
.user-permissions-section {
  margin-top: 20px;
  padding: 20px;
  background: rgba(165, 67, 250, 0.02);
  border-radius: var(--cw-radius-lg);
  border: 1px solid rgba(165, 67, 250, 0.1);
}

.user-permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.user-perm-toggle {
  cursor: pointer;
}

.user-perm-checkbox {
  display: none;
}

.user-perm-toggle-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  background: var(--cw-surface);
  transition: all 0.2s ease;
}

.user-perm-toggle-card:hover {
  border-color: var(--cw-primary);
}

.user-perm-toggle-icon {
  font-size: 20px;
  color: var(--cw-text-muted);
  flex-shrink: 0;
}

.user-perm-toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--cw-text-primary);
  flex: 1;
}

.user-perm-toggle-check {
  font-size: 20px;
  color: transparent;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.user-perm-checkbox:checked + .user-perm-toggle-card {
  border-color: var(--cw-primary);
  background: rgba(165, 67, 250, 0.04);
  box-shadow: 0 0 0 2px rgba(165, 67, 250, 0.12);
}

.user-perm-checkbox:checked + .user-perm-toggle-card .user-perm-toggle-icon {
  color: var(--cw-primary);
}

.user-perm-checkbox:checked + .user-perm-toggle-card .user-perm-toggle-check {
  color: var(--cw-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .users-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .user-form-grid {
    grid-template-columns: 1fr;
  }

  .user-role-selector {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 32px 24px;
  }
}

/* Sprint toggle switch */
.user-sprint-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.user-sprint-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-sprint-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cw-text-primary);
}

.user-sprint-toggle-desc {
  font-size: 12px;
  color: var(--cw-text-muted);
}

.user-sprint-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.user-sprint-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.user-sprint-slider {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 26px;
  transition: background 0.2s;
  cursor: pointer;
}

.user-sprint-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.user-sprint-checkbox:checked + .user-sprint-slider {
  background: #00BCD4;
}

.user-sprint-checkbox:checked + .user-sprint-slider::before {
  transform: translateX(22px);
}

/*
   WELCOME PAGE  Hero, Steps, CTA
    */

.welcome-hero {
  background: #FFFFFF;
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-xl);
  padding: 28px 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.welcome-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(165, 67, 250, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-hero-content {
  position: relative;
  z-index: 1;
}

.welcome-hero-top {
  display: flex;
  align-items: center;
  gap: 32px;
}

.welcome-hero-text {
  flex: 1;
  min-width: 0;
}

.welcome-hero-stats-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  background: var(--cw-surface);
  border-radius: var(--cw-radius-lg);
  border: 1px solid var(--cw-border-light);
  box-shadow: none;
  flex-shrink: 0;
  min-width: 160px;
}

.welcome-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--cw-purple-light);
  color: var(--cw-purple);
  border-radius: var(--cw-radius-pill);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.welcome-hero-badge .material-icons-outlined {
  font-size: 16px;
}

.welcome-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--cw-text-primary);
  line-height: 1.25;
  margin-bottom: 10px;
}

.welcome-hero-highlight {
  background: linear-gradient(135deg, #A543FA, #7C4DFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-hero-desc {
  font-size: 14px;
  color: var(--cw-text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.welcome-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #A543FA, #8B2DE0);
  color: white;
  border-radius: var(--cw-radius-lg);
  font-size: 15px;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: none;
  text-decoration: none;
}

.welcome-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(165, 67, 250, 0.2);
}

.welcome-cta-btn .material-icons-outlined {
  font-size: 20px;
}

.welcome-cta-arrow {
  transition: transform 0.2s ease;
}

.welcome-cta-btn:hover .welcome-cta-arrow {
  transform: translateX(4px);
}

.welcome-hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.welcome-stat {
  display: flex;
  flex-direction: column;
}

.welcome-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--cw-text-primary);
  line-height: 1;
}

.welcome-stat-label {
  font-size: 12px;
  color: var(--cw-text-muted);
  margin-top: 4px;
}

.welcome-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--cw-border);
}

/* Section header */
.welcome-section {
  margin-bottom: 32px;
}

.welcome-section-header {
  text-align: center;
  margin-bottom: 28px;
}

.welcome-section-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--cw-purple-light);
  color: var(--cw-purple);
  border-radius: var(--cw-radius-pill);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.welcome-section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--cw-text-primary);
  margin-bottom: 8px;
}

.welcome-section-desc {
  font-size: 15px;
  color: var(--cw-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Steps */
.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.welcome-step {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 24px;
  background: var(--cw-surface);
  border-radius: var(--cw-radius-xl);
  border: 1px solid var(--cw-border-light);
  box-shadow: none;
  transition: all 0.3s ease;
}

.welcome-step:hover {
  box-shadow: var(--cw-shadow-sm);
  transform: translateY(-2px);
}

.welcome-step-image {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--cw-radius-xl);
  background: linear-gradient(135deg, #F8F6FF, #F0EBFF);
  overflow: hidden;
  padding: 8px;
}

.welcome-step-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--cw-radius-lg);
}

.welcome-step-content {
  flex: 1;
}

.welcome-step-number {
  font-size: 36px;
  font-weight: 900;
  color: rgba(165, 67, 250, 0.1);
  line-height: 1;
  margin-bottom: 4px;
}

.welcome-step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin-bottom: 8px;
}

.welcome-step-text {
  font-size: 13px;
  color: var(--cw-text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.welcome-step-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--cw-purple-lighter);
  color: var(--cw-purple);
  border-radius: var(--cw-radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.welcome-step-tag .material-icons-outlined {
  font-size: 16px;
}

/* Bottom CTA */
.welcome-bottom-cta {
  margin: 20px 0 16px;
  padding: 36px;
  background: linear-gradient(135deg, #A543FA, #7C4DFF);
  border-radius: var(--cw-radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.welcome-bottom-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-bottom-cta::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-bottom-cta-content {
  position: relative;
  z-index: 1;
}

.welcome-bottom-cta-title {
  font-size: 26px;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
}

.welcome-bottom-cta-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.welcome-cta-btn-light {
  background: white;
  color: #A543FA;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.welcome-cta-btn-light:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  color: #8B2DE0;
}

@media (max-width: 768px) {
  .welcome-hero {
    padding: 24px 20px;
  }

  .welcome-hero-top {
    flex-direction: column;
  }

  .welcome-hero-title {
    font-size: 22px;
  }

  .welcome-hero-stats-col {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
  }

  .welcome-step {
    flex-direction: column !important;
    padding: 20px;
    gap: 16px;
  }

  .welcome-step-image {
    width: 100%;
  }

  .welcome-bottom-cta {
    padding: 28px 20px;
  }
}

/* 
   STORE / PROTOTYPES LISTING
    */

.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  background: var(--cw-surface);
  border-radius: var(--cw-radius-xl);
  border: 1px solid var(--cw-border-light);
  box-shadow: var(--cw-shadow-card);
  margin-bottom: 24px;
}

.store-header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.store-header-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--cw-radius-lg);
  background: linear-gradient(135deg, #A543FA22, #A543FA08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.store-header-icon .material-icons-outlined {
  font-size: 24px;
  color: var(--cw-primary);
}

.store-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin-bottom: 2px;
}

.store-header-desc {
  font-size: 13px;
  color: var(--cw-text-muted);
}

.store-header-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.store-header-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--cw-text-secondary);
}

.store-header-stat .material-icons-outlined {
  font-size: 18px;
}

/* Store sections */
.store-section {
  margin-bottom: 40px;
}

.store-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.store-section-label-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.store-section-dot-active {
  background: #4CAF50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.store-section-dot-upcoming {
  background: #FF9800;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

.store-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cw-text-primary);
}

.store-section-count {
  font-size: 12px;
  font-weight: 700;
  color: white;
  background: var(--cw-primary);
  padding: 2px 10px;
  border-radius: var(--cw-radius-pill);
}

.store-section-desc {
  font-size: 13px;
  color: var(--cw-text-muted);
}

/* Store grid */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Store card */
.store-card {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-xl);
  border: 1px solid var(--cw-border-light);
  box-shadow: var(--cw-shadow-card);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.store-card-active {
  cursor: pointer;
}

.store-card-active:hover {
  box-shadow: var(--cw-shadow-lg);
  transform: translateY(-4px);
  border-color: var(--cw-primary);
}

.store-card-upcoming {
  opacity: 0.75;
}

.store-card-upcoming:hover {
  opacity: 1;
  box-shadow: var(--cw-shadow-md);
}

.store-card-banner {
  padding: 28px 24px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.store-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--cw-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.store-card-icon .material-icons-outlined {
  font-size: 26px;
}

.store-card-icon-muted {
  opacity: 0.7;
}

.store-card-status {
  position: absolute;
  top: 16px;
  right: 16px;
}

.store-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--cw-radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.store-status-active {
  background: var(--cw-success-bg);
  color: var(--cw-success);
  border: 1px solid var(--cw-success-border);
}

.store-status-beta {
  background: var(--cw-warning-bg);
  color: var(--cw-warning);
  border: 1px solid var(--cw-warning-border);
}

.store-status-soon {
  background: #F5F5F5;
  color: var(--cw-text-muted);
  border: 1px solid var(--cw-border);
}

.store-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.store-card-body {
  padding: 0 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.store-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin-bottom: 8px;
}

.store-card-desc {
  font-size: 13px;
  color: var(--cw-text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.store-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.store-card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-primary);
  transition: gap 0.2s ease;
}

.store-card-active:hover .store-card-action {
  gap: 8px;
}

.store-card-action .material-icons-outlined {
  font-size: 18px;
}

.store-card-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--cw-text-muted);
  font-weight: 500;
}

.store-card-coming-soon .material-icons-outlined {
  font-size: 16px;
}

.store-section-upcoming {
  padding-top: 32px;
  border-top: 1px dashed var(--cw-border);
}

@media (max-width: 768px) {
  .store-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .store-header-content {
    flex-direction: column;
  }

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

/* 
   PROTOTYPE FORM  CRUD + Icon Gallery + Score
    */

.proto-form-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.proto-form-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--cw-radius-md);
  border: 1px solid var(--cw-border);
  transition: all 0.2s;
}

.proto-form-back:hover { color: var(--cw-primary); border-color: var(--cw-primary); }
.proto-form-back .material-icons-outlined { font-size: 18px; }

.proto-form-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--cw-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.proto-form-title .material-icons-outlined { font-size: 24px; color: var(--cw-primary); }

.proto-form-errors {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--cw-danger-bg);
  border: 1px solid var(--cw-danger-border);
  border-radius: var(--cw-radius-lg);
  margin-bottom: 20px;
  color: var(--cw-danger);
  font-size: 13px;
}

.proto-form-errors ul { margin: 4px 0 0 16px; }

.proto-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-bottom: 24px;
}

.proto-form-section {
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-xl);
  padding: 24px;
}

.proto-form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin-bottom: 20px;
}

.proto-form-section-title .material-icons-outlined { font-size: 20px; color: var(--cw-primary); }

.proto-field { margin-bottom: 16px; }

.proto-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-secondary);
  margin-bottom: 6px;
}

.proto-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--cw-bg);
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  font-family: inherit;
  font-size: 14px;
  color: var(--cw-text-primary);
  transition: border-color 0.2s;
  outline: none;
  box-sizing: border-box;
}

.proto-input:focus { border-color: var(--cw-primary); }
.proto-textarea { resize: vertical; min-height: 80px; }

.proto-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }

.proto-color-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  cursor: pointer;
  padding: 2px;
}

/* Icon preview */
.proto-icon-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.proto-icon-preview-box {
  width: 72px;
  height: 72px;
  border-radius: var(--cw-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background 0.3s;
}

.proto-icon-preview-box .material-icons-outlined { font-size: 36px; }
.proto-icon-preview-label { font-size: 11px; color: var(--cw-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Icon gallery */
.proto-icon-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.proto-icon-option {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cw-bg);
  border: 2px solid transparent;
  border-radius: var(--cw-radius-md);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--cw-text-secondary);
}

.proto-icon-option:hover { border-color: var(--cw-primary); color: var(--cw-primary); background: var(--cw-purple-lighter); }
.proto-icon-option.active { border-color: var(--cw-primary); background: var(--cw-purple-light); color: var(--cw-primary); }
.proto-icon-option .material-icons-outlined { font-size: 22px; }

/* Score section */
.proto-score-section { margin-bottom: 24px; }

.proto-score-live {
  margin-left: auto;
  font-size: 14px;
  font-weight: 800;
  color: var(--cw-primary);
  background: var(--cw-purple-lighter);
  padding: 4px 14px;
  border-radius: var(--cw-radius-pill);
}

.proto-score-subtitle { font-size: 13px; color: var(--cw-text-muted); margin-bottom: 16px; margin-top: -12px; }

.proto-score-bar-wrapper {
  width: 100%;
  height: 8px;
  background: var(--cw-border-light);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.proto-score-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #42A5F5, #1E88E5);
  transition: width 0.4s ease, background 0.4s ease;
}

.proto-criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.proto-criteria-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  background: var(--cw-bg);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-lg);
  cursor: pointer;
  transition: all 0.2s;
  gap: 8px;
}

.proto-criteria-card:hover { border-color: var(--cw-primary); }

.proto-criteria-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.proto-criteria-emoji { font-size: 24px; }

.proto-criteria-points {
  font-size: 11px;
  font-weight: 700;
  color: var(--cw-primary);
  background: var(--cw-purple-lighter);
  padding: 2px 8px;
  border-radius: var(--cw-radius-pill);
}

.proto-criteria-label { font-size: 13px; font-weight: 600; color: var(--cw-text-primary); }

/* Toggle switch */
.proto-criteria-toggle { position: relative; width: 44px; height: 24px; }
.proto-toggle-input { opacity: 0; width: 0; height: 0; position: absolute; }

.proto-toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--cw-border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.proto-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.proto-toggle-input:checked + .proto-toggle-slider { background: var(--cw-primary); }
.proto-toggle-input:checked + .proto-toggle-slider::before { transform: translateX(20px); }

/* Speed options */
.proto-criteria-speed { grid-column: span 2; }

.proto-speed-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}

.proto-speed-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.proto-speed-option:has(.proto-speed-radio:checked) {
  border-color: var(--cw-primary);
  background: var(--cw-purple-lighter);
}

.proto-speed-radio { accent-color: var(--cw-primary); }

.proto-speed-label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--cw-text-primary);
}

.proto-speed-label small { color: var(--cw-text-muted); font-size: 10px; }

/* Hypothesis field enhancements */
.proto-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.proto-label-row .proto-label { margin-bottom: 0; }

.proto-hypothesis-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.proto-hint-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--cw-border);
  border-radius: 50%;
  background: var(--cw-surface);
  color: var(--cw-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.proto-hint-btn:hover {
  border-color: var(--cw-primary);
  color: var(--cw-primary);
  background: var(--cw-primary-bg);
}

.proto-hint-btn .material-icons-outlined { font-size: 16px; }

.proto-wand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border: none;
  border-radius: var(--cw-radius-pill);
  background: linear-gradient(135deg, #7C4DFF, #A543FA);
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(165, 67, 250, 0.25);
}

.proto-wand-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(165, 67, 250, 0.4);
}

.proto-wand-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.proto-wand-btn .material-icons-outlined { font-size: 16px; }

@keyframes wandSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.proto-wand-active .material-icons-outlined {
  animation: wandSpin 0.8s ease infinite;
}

/* Hypothesis info panel */
.proto-hypothesis-info {
  padding: 14px 16px;
  background: linear-gradient(135deg, #F3E5F5 0%, #EDE7F6 50%, #E8EAF6 100%);
  border: 1px solid #CE93D8;
  border-radius: var(--cw-radius);
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #4A148C;
}

.proto-hypothesis-info-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.proto-hypothesis-info-header .material-icons-outlined {
  font-size: 20px;
  color: #7B1FA2;
}

.proto-hypothesis-info-header strong {
  font-size: 14px;
  color: #4A148C;
}

.proto-hypothesis-info p {
  margin: 0 0 10px;
  color: #6A1B9A;
}

.proto-hypothesis-template {
  background: rgba(255,255,255,0.6);
  border-left: 3px solid #7C4DFF;
  padding: 10px 12px;
  border-radius: 0 var(--cw-radius-sm) var(--cw-radius-sm) 0;
  margin-bottom: 10px;
}

.proto-hypothesis-template-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7B1FA2;
  margin-bottom: 4px;
}

.proto-hypothesis-template em {
  font-style: italic;
  color: #4A148C;
  font-size: 13px;
  line-height: 1.6;
}

.proto-hypothesis-template em strong {
  color: #7C4DFF;
  font-weight: 700;
}

.proto-hypothesis-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proto-hypothesis-info li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6A1B9A;
}

.proto-field-hint {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  text-align: right;
  font-weight: 500;
  transition: color 0.2s;
}

/* Form actions */
/* ── Planning Poker ── */
.proto-poker-section { margin-bottom: 24px; }

.proto-poker-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.proto-poker-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 72px;
  min-height: 90px;
  background: var(--cw-surface);
  border: 2px solid var(--cw-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  user-select: none;
}

.proto-poker-card:hover {
  border-color: #7C4DFF;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(124,77,255,0.18);
}

.proto-poker-selected {
  border-color: #7C4DFF;
  background: linear-gradient(135deg, #7C4DFF, #5E35B1);
  box-shadow: 0 6px 20px rgba(124,77,255,0.35);
  transform: translateY(-3px);
}

.proto-poker-selected .proto-poker-value,
.proto-poker-selected .proto-poker-label { color: #fff; }

.proto-poker-radio { display: none; }

.proto-poker-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--cw-text-primary);
  line-height: 1;
}

.proto-poker-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--cw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.proto-poker-card-none .proto-poker-value { color: var(--cw-text-muted); }

.proto-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.proto-btn-cancel {
  padding: 10px 24px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  color: var(--cw-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.proto-btn-cancel:hover { border-color: var(--cw-text-muted); color: var(--cw-text-primary); }

.proto-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: linear-gradient(135deg, #A543FA, #8B2DE0);
  color: white;
  border: none;
  border-radius: var(--cw-radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.proto-btn-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(165,67,250,0.3); }
.proto-btn-submit .material-icons-outlined { font-size: 18px; }

/*  Store extras: ranking, admin buttons, score, category  */

.store-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.store-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--cw-primary);
  color: white;
  border-radius: var(--cw-radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.store-add-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(165,67,250,0.3); }
.store-add-btn .material-icons-outlined { font-size: 18px; }

.store-card { position: relative; }

.store-card-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 20px;
  z-index: 2;
}

.store-rank-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--cw-text-muted);
}

.store-card-score {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.store-score-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--cw-border-light);
  border-radius: 3px;
  overflow: hidden;
}

.store-score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.store-score-value {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.store-card-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}

.store-card-admin-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s;
}

.store-card:hover .store-card-admin-actions { opacity: 1; }

.store-card-edit-btn,
.store-card-del-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--cw-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  color: var(--cw-text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  font-family: inherit;
}

.store-card-edit-btn:hover { color: var(--cw-primary); border-color: var(--cw-primary); }
.store-card-del-btn:hover { color: var(--cw-danger); border-color: var(--cw-danger); }
.store-card-edit-btn .material-icons-outlined,
.store-card-del-btn .material-icons-outlined { font-size: 16px; }

@media (max-width: 768px) {
  .proto-form-grid { grid-template-columns: 1fr; }
  .proto-criteria-grid { grid-template-columns: 1fr 1fr; }
  .proto-criteria-speed { grid-column: span 2; }
  .proto-speed-options { grid-template-columns: 1fr 1fr; }
  .store-header-right { flex-direction: column; }
}

/* 
   LAB LAYOUT  Horizontal Cards + Filters
    */

.lab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-xl);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.lab-header-left { display: flex; align-items: center; gap: 14px; }

.lab-header-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--cw-radius-lg);
  background: linear-gradient(135deg, var(--cw-primary), #8B2DE0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.lab-header-icon .material-icons-outlined { font-size: 24px; }

.lab-header-title { font-size: 20px; font-weight: 700; color: var(--cw-text-primary); margin: 0; }
.lab-header-desc { font-size: 13px; color: var(--cw-text-muted); margin: 2px 0 0; }

.lab-header-right { display: flex; align-items: center; gap: 16px; }

.lab-header-stats { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--cw-text-muted); }
.lab-stat strong { color: var(--cw-text-primary); }
.lab-stat-sep { color: var(--cw-border); }

.lab-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--cw-primary);
  color: white;
  border-radius: var(--cw-radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.lab-add-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(165,67,250,0.3); }
.lab-add-btn .material-icons-outlined { font-size: 18px; }

/* Filters bar */
.lab-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lab-filters-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.lab-filters-right { display: flex; align-items: center; gap: 8px; }

.lab-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  padding: 6px 12px;
  min-width: 180px;
}

.lab-search .material-icons-outlined { font-size: 18px; color: var(--cw-text-muted); }

.lab-search input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--cw-text-primary);
  outline: none;
  width: 100%;
}

.lab-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }

.lab-pill {
  padding: 5px 12px;
  border-radius: var(--cw-radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--cw-text-muted);
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.lab-pill:hover { border-color: var(--cw-primary); color: var(--cw-primary); }
.lab-pill.active { background: var(--cw-purple-lighter); color: var(--cw-primary); border-color: var(--cw-primary); font-weight: 700; }

.lab-filter-select {
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  background: var(--cw-surface);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--cw-text-secondary);
  cursor: pointer;
  outline: none;
  appearance: auto;
}

.lab-filter-select:focus { border-color: var(--cw-primary); }

/* Active filters bar */
.lab-active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cw-text-muted);
  margin-bottom: 12px;
  padding: 6px 12px;
  background: var(--cw-purple-lighter);
  border-radius: var(--cw-radius-md);
}

.lab-clear-filters {
  color: var(--cw-primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: auto;
}

.lab-clear-filters:hover { text-decoration: underline; }

/* Sections */
.lab-section { margin-bottom: 24px; }

.lab-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.lab-section-label h3 { font-size: 15px; font-weight: 700; color: var(--cw-text-primary); margin: 0; }

.lab-section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lab-dot-active { background: #4CAF50; box-shadow: 0 0 6px rgba(76,175,80,0.4); }
.lab-dot-upcoming { background: #FF9800; box-shadow: 0 0 6px rgba(255,152,0,0.4); }

.lab-section-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--cw-text-muted);
  background: var(--cw-bg);
  padding: 2px 8px;
  border-radius: var(--cw-radius-pill);
}

/* Horizontal cards */
.lab-cards { display: flex; flex-direction: column; gap: 8px; }

.lab-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  position: relative;
}

.lab-card:hover { border-color: var(--cw-primary); }
a.lab-card:hover { transform: translateX(2px); }

.lab-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--cw-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.lab-card-icon .material-icons-outlined { font-size: 22px; }
.lab-card-icon-muted { opacity: 0.85; }

.lab-card-rank {
  width: 28px;
  text-align: center;
  font-size: 18px;
  flex-shrink: 0;
}

.lab-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cw-bg);
  border: 1px solid var(--cw-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--cw-text-muted);
}

.lab-card-info { flex: 1; min-width: 0; }

.lab-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.lab-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin: 0;
  white-space: nowrap;
}

.lab-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--cw-radius-pill);
  white-space: nowrap;
}

.lab-badge-active { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }

.lab-card-desc {
  font-size: 12px;
  color: var(--cw-text-muted);
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lab-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--cw-text-muted);
}

.lab-meta-item .material-icons-outlined { font-size: 14px; }

.lab-meta-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 6px;
  background: #F8F9FC;
  border: 1px solid #E8EAF0;
  border-radius: var(--cw-radius-pill);
  margin-left: auto;
}

.lab-meta-score strong {
  font-size: 13px;
  letter-spacing: -0.3px;
}

.lab-mini-bar {
  width: 56px;
  height: 5px;
  background: var(--cw-border-light);
  border-radius: 3px;
  overflow: hidden;
}

.lab-mini-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.lab-card-arrow {
  font-size: 20px;
  color: var(--cw-border);
  flex-shrink: 0;
  transition: color 0.2s;
}

a.lab-card:hover .lab-card-arrow { color: var(--cw-primary); }

.lab-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.lab-card:hover .lab-card-actions { opacity: 1; }

.lab-action-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--cw-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cw-bg);
  border: 1px solid var(--cw-border);
  color: var(--cw-text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  font-family: inherit;
}

.lab-action-btn:hover { color: var(--cw-primary); border-color: var(--cw-primary); }
.lab-action-del:hover { color: var(--cw-danger); border-color: var(--cw-danger); }
.lab-action-btn .material-icons-outlined { font-size: 15px; }

.lab-card-upcoming { background: var(--cw-bg); border-style: dashed; }

/* Tabs */
.lab-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--cw-border-light);
  margin-bottom: 16px;
}

.lab-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.2s;
}

.lab-tab:hover { color: var(--cw-text-primary); }

.lab-tab.active {
  color: var(--cw-primary);
  border-bottom-color: var(--cw-primary);
}

.lab-tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lab-tab-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--cw-bg);
  padding: 1px 7px;
  border-radius: var(--cw-radius-pill);
  color: var(--cw-text-muted);
}

.lab-tab.active .lab-tab-count {
  background: var(--cw-purple-lighter);
  color: var(--cw-primary);
}

/* Tab panels */
.lab-tab-panel { display: none; }
.lab-tab-panel.active { display: block; }

/* Compact cards (less gap) */
.lab-cards-compact { gap: 2px; }
.lab-cards-compact .lab-card { padding: 10px 14px; }
.lab-cards-compact .lab-card-desc { margin-bottom: 3px; }
.lab-cards-compact .lab-card-name-row { margin-bottom: 2px; }

/* Empty state */
.lab-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--cw-text-muted);
  text-align: center;
}

.lab-empty .material-icons-outlined { font-size: 40px; margin-bottom: 8px; opacity: 0.4; }
.lab-empty p { font-size: 14px; margin: 0; }

@media (max-width: 768px) {
  .lab-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .lab-header-right { width: 100%; justify-content: space-between; }
  .lab-filters { flex-direction: column; align-items: flex-start; }
  .lab-filters-right { width: 100%; }
  .lab-card { flex-wrap: wrap; }
  .lab-card-desc { white-space: normal; }
  .lab-card-name-row { flex-wrap: wrap; }
  .lab-tabs { overflow-x: auto; }
}

/* 
   DISCOVERY TAB — Alerts & Incomplete Items
    */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.5); }
  50% { opacity: 0.85; box-shadow: 0 0 0 5px rgba(255, 152, 0, 0); }
}

.lab-discovery-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFF3E0 100%);
  border: 1px solid #FFE0B2;
  border-radius: var(--cw-radius);
  margin-bottom: 16px;
  color: #E65100;
}

.lab-discovery-banner > .material-icons-outlined {
  font-size: 24px;
  color: #FF9800;
  flex-shrink: 0;
  margin-top: 2px;
}

.lab-discovery-banner strong {
  font-size: 14px;
  font-weight: 700;
  color: #BF360C;
  display: block;
  margin-bottom: 2px;
}

.lab-discovery-banner p {
  font-size: 13px;
  color: #8D6E63;
  margin: 0;
}

.lab-card-discovery {
  border-left: 3px solid #FF9800 !important;
  background: linear-gradient(135deg, var(--cw-surface) 0%, #FFFDE7 100%) !important;
}

.lab-discovery-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.lab-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--cw-radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  animation: fadeInUp 0.3s ease;
}

.lab-alert-chip .material-icons-outlined {
  font-size: 14px;
}

.lab-alert-score {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFCC80;
}

.lab-alert-hypothesis {
  background: #F3E5F5;
  color: #7B1FA2;
  border: 1px solid #CE93D8;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lab-action-btn-fill {
  background: #FFF3E0 !important;
  border: 1px solid #FFE0B2 !important;
  color: #E65100 !important;
  border-radius: 8px !important;
  padding: 6px !important;
  transition: all 0.2s ease;
}

.lab-action-btn-fill:hover {
  background: #FFE0B2 !important;
  transform: scale(1.1);
}

.lab-empty-success {
  border: 1px dashed #C8E6C9;
  background: #F1F8E9;
}

.lab-empty-success p {
  color: #2E7D32 !important;
}

/* 
   INLINE TOGGLE SWITCH COMPONENT
    */
.cw-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.cw-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cw-toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  background: #CBD5E1;
  border-radius: 12px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.cw-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cw-toggle input:checked + .cw-toggle-track {
  background: var(--cw-primary);
  box-shadow: 0 0 0 2px var(--cw-primary-bg);
}

.cw-toggle input:checked + .cw-toggle-track::after {
  transform: translateX(16px);
}

.cw-toggle:hover .cw-toggle-track {
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.12);
}

.cw-toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--cw-text-muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.cw-toggle input:checked ~ .cw-toggle-label {
  color: var(--cw-primary);
  font-weight: 600;
}

/* Product idea badge inline */
.lab-idea-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.lab-idea-toggle .cw-toggle-track {
  width: 32px;
  height: 18px;
}

.lab-idea-toggle .cw-toggle-track::after {
  width: 14px;
  height: 14px;
}

.lab-idea-toggle .cw-toggle input:checked + .cw-toggle-track::after {
  transform: translateX(14px);
}

/* Top filter toggle */
.lab-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-pill);
  transition: all 0.25s ease;
  cursor: pointer;
}

.lab-filter-toggle:hover {
  border-color: var(--cw-primary);
  box-shadow: 0 0 0 2px var(--cw-primary-bg);
}

.lab-filter-toggle.active {
  background: var(--cw-primary-bg);
  border-color: var(--cw-primary);
}

.lab-filter-toggle .cw-toggle-label {
  font-size: 13px;
}

.lab-filter-toggle .lab-filter-toggle-icon {
  font-size: 16px;
  color: var(--cw-primary);
}

/* 
   METRICS DASHBOARD
    */

.metrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-xl);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.metrics-header-left { display: flex; align-items: center; gap: 14px; }

.metrics-header-icon {
  width: 44px; height: 44px;
  border-radius: var(--cw-radius-lg);
  background: linear-gradient(135deg, #FF6B35, #F7931E);
  display: flex; align-items: center; justify-content: center;
  color: white;
}

.metrics-header-icon .material-icons-outlined { font-size: 24px; }
.metrics-header-title { font-size: 20px; font-weight: 700; color: var(--cw-text-primary); margin: 0; }
.metrics-header-desc { font-size: 13px; color: var(--cw-text-muted); margin: 2px 0 0; }
.metrics-header-desc em { color: var(--cw-primary); font-style: italic; }

.metrics-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--cw-bg);
  border: 1px solid var(--cw-border); border-radius: var(--cw-radius-md);
  font-size: 13px; font-weight: 600; color: var(--cw-text-secondary);
  text-decoration: none; transition: all 0.2s;
}

.metrics-back-btn:hover { border-color: var(--cw-primary); color: var(--cw-primary); }
.metrics-back-btn .material-icons-outlined { font-size: 18px; }

/* Metrics dropdown */
.kb-metrics-dropdown { position: relative; display: inline-block; }
.kb-metrics-dd-btn { cursor: pointer; font-family: 'Mulish', sans-serif; }
.kb-metrics-dd-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 500;
  background: #fff; border: 1.5px solid #E8E8E8; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12); min-width: 220px; overflow: hidden;
  animation: ddFadeIn 0.15s ease;
}
@keyframes ddFadeIn { from { opacity:0; transform:translateY(-4px) } to { opacity:1; transform:translateY(0) } }
.kb-metrics-dd-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  text-decoration: none; color: #333; border-bottom: 1px solid #F4F4F4;
  transition: background .12s; cursor: pointer;
}
.kb-metrics-dd-item:last-child { border-bottom: none; }
.kb-metrics-dd-item:hover { background: #F3F0FF; }
.kb-metrics-dd-item .material-icons-outlined { font-size: 20px; color: #7C4DFF; flex-shrink: 0; }
.kb-metrics-dd-item strong { display: block; font-size: 13px; font-weight: 700; color: #1A1A2E; }
.kb-metrics-dd-item small { font-size: 11px; color: #AAA; }

/* KPI Row */
.metrics-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.metrics-kpi {
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-lg);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
}

.metrics-kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--cw-radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.metrics-kpi-icon .material-icons-outlined { font-size: 22px; }

.metrics-kpi-data { display: flex; flex-direction: column; }
.metrics-kpi-value { font-size: 22px; font-weight: 800; color: var(--cw-text-primary); line-height: 1.1; }
.metrics-kpi-label { font-size: 11px; font-weight: 600; color: var(--cw-text-muted); }

/* Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.metrics-card {
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-xl);
  padding: 20px;
}

.metrics-card-wide { grid-column: span 2; }

.metrics-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.metrics-card-head h3 {
  font-size: 15px; font-weight: 700; color: var(--cw-text-primary); margin: 0;
}

.metrics-inspired-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: var(--cw-radius-pill);
  background: linear-gradient(135deg, #7C4DFF11, #E040FB11);
  color: #7C4DFF; border: 1px solid #7C4DFF22;
}

/* Pipeline */
.metrics-pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.metrics-pipeline-item {
  text-align: center;
  padding: 12px 8px;
  background: var(--cw-bg);
  border-radius: var(--cw-radius-md);
}

.metrics-pipeline-count { font-size: 24px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.metrics-pipeline-label { font-size: 11px; color: var(--cw-text-muted); font-weight: 600; display: flex; flex-direction: column; gap: 2px; align-items: center; margin-bottom: 8px; }

.metrics-pipeline-bar { height: 4px; background: var(--cw-border-light); border-radius: 2px; overflow: hidden; }
.metrics-pipeline-fill { height: 100%; border-radius: 2px; transition: width 0.4s; }

/* Lists */
.metrics-list { display: flex; flex-direction: column; gap: 6px; }

.metrics-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--cw-bg); border-radius: var(--cw-radius-md);
}

.metrics-list-emoji { font-size: 18px; }
.metrics-list-label { flex: 1; font-size: 13px; font-weight: 600; color: var(--cw-text-secondary); }
.metrics-list-count { font-size: 18px; font-weight: 800; }
.metrics-empty-hint { font-size: 12px; color: var(--cw-text-muted); text-align: center; padding: 12px; margin: 0; }

/* Product Status */
.metrics-status-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }

.metrics-status-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px; background: var(--cw-bg); border-radius: var(--cw-radius-md);
  text-align: center;
}

.metrics-status-emoji { font-size: 20px; margin-bottom: 4px; }
.metrics-status-label { font-size: 11px; font-weight: 600; color: var(--cw-text-muted); margin-bottom: 4px; }
.metrics-status-count { font-size: 20px; font-weight: 800; }

/* Quality indicators */
.metrics-quality { display: flex; gap: 20px; margin-bottom: 16px; }

.metrics-quality-item { display: flex; align-items: center; gap: 14px; flex: 1; }

.metrics-quality-circle { width: 72px; height: 72px; flex-shrink: 0; }

.metrics-circle-svg { width: 100%; height: 100%; }
.metrics-circle-lg { width: 80px; height: 80px; }

.metrics-circle-bg {
  fill: none; stroke: var(--cw-border-light); stroke-width: 3;
}

.metrics-circle-fill {
  fill: none; stroke-width: 3;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dasharray 0.6s;
}

.metrics-circle-text {
  fill: var(--cw-text-primary);
  font-size: 8px; font-weight: 800;
  text-anchor: middle;
  font-family: 'Inter', sans-serif;
}

.metrics-quality-info { display: flex; flex-direction: column; gap: 2px; }
.metrics-quality-info strong { font-size: 13px; color: var(--cw-text-primary); }
.metrics-quality-info span { font-size: 11px; color: var(--cw-text-muted); }
.metrics-quality-info small { font-size: 10px; color: var(--cw-primary); font-weight: 600; }

.metrics-quality-stat {
  display: flex; align-items: center; gap: 14px; flex: 1;
  padding: 12px 16px; background: var(--cw-bg); border-radius: var(--cw-radius-md);
}

.metrics-quality-big { font-size: 32px; font-weight: 800; color: var(--cw-primary); }
.metrics-quality-stat div { display: flex; flex-direction: column; gap: 2px; }
.metrics-quality-stat strong { font-size: 13px; color: var(--cw-text-primary); }
.metrics-quality-stat span { font-size: 11px; color: var(--cw-text-muted); }
.metrics-quality-stat small { font-size: 10px; color: var(--cw-text-muted); }

/* Inspired insight */
.metrics-insight {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px;
  background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
  border: 1px solid #FFE0B2;
  border-radius: var(--cw-radius-md);
}

.metrics-insight-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.metrics-insight strong { font-size: 12px; color: #E65100; display: block; margin-bottom: 2px; }
.metrics-insight p { font-size: 12px; color: #BF360C; margin: 0; line-height: 1.5; font-style: italic; }

/* Health */
.metrics-health { display: flex; align-items: center; gap: 20px; }

.metrics-health-ring { flex-shrink: 0; }

.metrics-health-info { display: flex; flex-direction: column; gap: 4px; }
.metrics-health-status { font-size: 16px; font-weight: 800; }
.metrics-health-info span { font-size: 12px; color: var(--cw-text-muted); }

/* Bars */
.metrics-bars { display: flex; flex-direction: column; gap: 10px; }

.metrics-bar-item { display: flex; flex-direction: column; gap: 4px; }

.metrics-bar-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--cw-text-secondary);
}

.metrics-bar-track { height: 6px; background: var(--cw-border-light); border-radius: 3px; overflow: hidden; }
.metrics-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; min-width: 2px; }

/* Score distribution */
.metrics-score-dist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.metrics-score-tier {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--cw-text-secondary);
}

.metrics-tier-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.metrics-score-tier span:not(.metrics-tier-dot) { flex: 1; }
.metrics-score-tier strong { font-size: 16px; color: var(--cw-text-primary); min-width: 30px; text-align: right; }

.metrics-stacked-bar {
  display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--cw-border-light);
}

.metrics-stacked-bar div { height: 100%; transition: width 0.4s; }

/* Ranking */
.metrics-ranking { display: flex; flex-direction: column; gap: 6px; }

.metrics-rank-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--cw-bg); border-radius: var(--cw-radius-md);
}

.metrics-rank-pos { font-size: 16px; width: 28px; text-align: center; flex-shrink: 0; }

.metrics-rank-icon {
  width: 32px; height: 32px; border-radius: var(--cw-radius-sm);
  display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0;
}

.metrics-rank-icon .material-icons-outlined { font-size: 18px; }

.metrics-rank-info { flex: 1; display: flex; flex-direction: column; }
.metrics-rank-info strong { font-size: 13px; color: var(--cw-text-primary); }
.metrics-rank-info span { font-size: 11px; font-weight: 600; }

.metrics-rank-score { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.metrics-rank-score strong { font-size: 14px; }

.metrics-rank-bar { width: 60px; height: 4px; background: var(--cw-border-light); border-radius: 2px; overflow: hidden; }
.metrics-rank-bar div { height: 100%; border-radius: 2px; }

/* Footer */
.metrics-footer-quote {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 20px;
  background: linear-gradient(135deg, #EDE7F6, #F3E5F5);
  border: 1px solid #D1C4E9;
  border-radius: var(--cw-radius-xl);
}

.metrics-footer-icon { font-size: 24px; flex-shrink: 0; }
.metrics-footer-quote strong { font-size: 13px; color: #4A148C; display: block; margin-bottom: 4px; }
.metrics-footer-quote p { font-size: 13px; color: #6A1B9A; margin: 0; line-height: 1.5; font-style: italic; }

@media (max-width: 1024px) {
  .metrics-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .metrics-grid { grid-template-columns: 1fr; }
  .metrics-card-wide { grid-column: span 1; }
  .metrics-pipeline { grid-template-columns: repeat(3, 1fr); }
  .metrics-status-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .metrics-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .metrics-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .metrics-pipeline { grid-template-columns: repeat(2, 1fr); }
  .metrics-status-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-quality { flex-direction: column; }
  .metrics-health { flex-direction: column; align-items: flex-start; }
}

/* Involved Clients */
.proto-client-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.proto-btn-add-client {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--cw-bg);
  border: 1px dashed var(--cw-border);
  border-radius: var(--cw-radius-md);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--cw-primary);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
}

.proto-btn-add-client:hover {
  border-color: var(--cw-primary);
  background: var(--cw-purple-lighter);
}

.proto-btn-add-client .material-icons-outlined { font-size: 16px; }

/* Saiba mais button */
.metrics-saiba-mais-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--cw-bg);
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-sm);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--cw-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.metrics-saiba-mais-btn:hover {
  color: var(--cw-primary);
  border-color: var(--cw-primary);
  background: var(--cw-purple-lighter);
}

/* Modal */
.metrics-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.metrics-modal {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-lg);
  width: 95%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.3s;
  overflow: hidden;
}

.metrics-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--cw-border-light);
}

.metrics-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin: 0;
}

.metrics-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cw-text-tertiary);
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}

.metrics-modal-close:hover {
  color: var(--cw-text-primary);
  background: var(--cw-bg);
}

.metrics-modal-body {
  padding: 22px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--cw-text-secondary);
}

.metrics-modal-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin: 18px 0 8px;
}

.metrics-modal-body p { margin: 0 0 10px; }

.metrics-modal-formula {
  background: var(--cw-bg);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-md);
  padding: 12px 16px;
  font-family: 'SF Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-primary);
  text-align: center;
  margin: 10px 0 16px;
}

.metrics-modal-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metrics-modal-level {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.metrics-modal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.metrics-modal-level span { font-size: 12px; color: var(--cw-text-tertiary); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* 
   PRIORITIZATION MATRIX — Value × Effort (Canvas Chart)
    */
.matrix-chart-wrap {
  position: relative;
  margin: 12px auto 20px;
  max-width: 920px;
  border-radius: var(--cw-radius-lg);
  overflow: hidden;
  background: linear-gradient(145deg, #FAFBFF 0%, #F4F5FA 50%, #F0F1F8 100%);
  border: 1px solid var(--cw-border);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  padding: 8px;
}

.matrix-chart-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 5;
}

/* Tooltip */
.matrix-tooltip {
  display: none;
  position: absolute;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  min-width: 200px;
  max-width: 260px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  pointer-events: none;
  z-index: 100;
  animation: fadeIn 0.15s ease;
}

.matrix-tooltip strong {
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.matrix-tt-row {
  font-size: 11px;
  color: var(--cw-text-secondary);
  margin: 2px 0;
}

.matrix-tt-quadrant {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-weight: 700;
  font-size: 12px;
}

/* Legend */
.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--cw-border);
  margin-top: 12px;
}

.matrix-legend-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--cw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.matrix-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--cw-text-secondary);
}

.matrix-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Summary cards */
.matrix-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.matrix-summary-card {
  padding: 12px;
  border-radius: var(--cw-radius);
}

.matrix-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.matrix-summary-head strong { font-size: 13px; }

.matrix-summary-count {
  font-size: 20px;
  font-weight: 800;
}

.matrix-summary-desc {
  font-size: 11px;
  color: var(--cw-text-muted);
  margin: 0 0 8px;
}

.matrix-summary-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.matrix-summary-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.7);
  border: 1px solid;
  border-radius: var(--cw-radius-pill);
  font-size: 10px;
  font-weight: 500;
  color: var(--cw-text-secondary);
}

.matrix-summary-more {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--cw-text-muted);
}

.matrix-summary-empty {
  font-size: 11px;
  color: var(--cw-text-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .matrix-summary { grid-template-columns: repeat(2, 1fr); }
  .matrix-chart-wrap canvas { aspect-ratio: 4 / 3; }
}

/* ===============================================================
   SPRINT PLANNER
   =============================================================== */

.sprint-planner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-height: calc(100vh - 200px);
  margin-top: 20px;
}

/* ── Lanes ── */
.sprint-lane {
  display: flex;
  flex-direction: column;
  background: var(--cw-surface);
  border-radius: var(--cw-radius-xl);
  border: 1px solid var(--cw-border-light);
  box-shadow: var(--cw-shadow-card);
  overflow: hidden;
}

.sprint-lane-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--cw-border-light);
  background: linear-gradient(180deg, #FAFAFA 0%, #FFFFFF 100%);
}

.sprint-lane-wish .sprint-lane-header {
  background: linear-gradient(180deg, #F3E8FF 0%, #FFFFFF 100%);
}

.sprint-lane-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sprint-lane-title .material-icons-outlined {
  font-size: 22px;
  color: #78909C;
}

.sprint-lane-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin: 0;
}

.sprint-lane-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: #ECEFF1;
  color: #546E7A;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
}

.sprint-lane-count-wish {
  background: #EDE7F6;
  color: #7C4DFF;
}

.sprint-lane-info {
  font-size: 11px;
  color: var(--cw-text-muted);
  margin-top: 4px;
}

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

.sprint-lane-cards {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s ease;
  min-height: 120px;
}

.sprint-lane-cards.drag-over {
  background: rgba(124, 77, 255, 0.04);
  border: 2px dashed rgba(124, 77, 255, 0.3);
  border-radius: 0 0 16px 16px;
}

.sprint-lane-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--cw-text-muted);
  text-align: center;
}

.sprint-lane-empty .material-icons-outlined {
  font-size: 40px;
  opacity: 0.3;
}

.sprint-lane-empty p {
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

/* ── Cards ── */
.sprint-card {
  display: flex;
  align-items: stretch;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border-light);
  border-radius: var(--cw-radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: grab;
  transition: all 0.2s ease;
  overflow: hidden;
  min-height: 64px;
}

.sprint-card:hover {
  box-shadow: var(--cw-shadow-md);
  transform: translateY(-1px);
  border-color: rgba(124, 77, 255, 0.2);
}

.sprint-card.dragging {
  opacity: 0.4;
  transform: scale(0.97);
  box-shadow: var(--cw-shadow-lg);
}

.sprint-card-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-width: 56px;
  padding: 8px 4px;
  color: white;
  flex-shrink: 0;
}

.sprint-card-score-value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.sprint-card-score-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
  margin-top: 2px;
}

.sprint-card-body {
  flex: 1;
  padding: 10px 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.sprint-card-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sprint-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.sprint-card-priority {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.sprint-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sprint-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.sprint-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, #7C4DFF08, #7C4DFF15);
  border: none;
  cursor: pointer;
  color: #7C4DFF;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sprint-card-arrow:hover {
  background: linear-gradient(135deg, #7C4DFF18, #7C4DFF28);
  color: #5E35B1;
}

.sprint-card-arrow .material-icons-outlined {
  font-size: 22px;
}

.sprint-card-arrow-back {
  background: linear-gradient(135deg, #EF535008, #EF535015);
  color: #EF5350;
}

.sprint-card-arrow-back:hover {
  background: linear-gradient(135deg, #EF535018, #EF535028);
  color: #C62828;
}

@keyframes sprint-card-enter {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Buttons ── */
.sprint-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--cw-radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.sprint-btn .material-icons-outlined {
  font-size: 18px;
}

.sprint-btn-save {
  background: var(--cw-surface);
  color: var(--cw-text-secondary);
  border: 1px solid var(--cw-border);
}

.sprint-btn-save:hover {
  border-color: #4CAF50;
  color: #4CAF50;
  background: #E8F5E9;
}

.sprint-btn-saved {
  background: #E8F5E9 !important;
  color: #4CAF50 !important;
  border-color: #4CAF50 !important;
}

.sprint-btn-simulate {
  background: linear-gradient(135deg, #7C4DFF, #5E35B1);
  color: white;
  box-shadow: 0 2px 8px rgba(124, 77, 255, 0.25);
}

.sprint-btn-simulate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 77, 255, 0.35);
}

.sprint-btn-simulate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sprint-btn-back {
  background: var(--cw-surface);
  color: var(--cw-text-secondary);
  border: 1px solid var(--cw-border);
}

.sprint-btn-back:hover {
  border-color: var(--cw-text-secondary);
}

.sprint-btn-prioritize {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
  color: white;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
}

.sprint-btn-prioritize:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.35);
}

@keyframes sprint-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sprint-spin {
  animation: sprint-spin 1s linear infinite;
}

/* ===============================================================
   SPRINT SIMULATION MODAL
   =============================================================== */

.sprint-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: sprint-modal-in 0.25s ease;
}

@keyframes sprint-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sprint-modal {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-xl);
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: sprint-modal-slide 0.3s ease;
}

@keyframes sprint-modal-slide {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sprint-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--cw-border-light);
  background: linear-gradient(180deg, #F3E8FF 0%, #FFFFFF 100%);
}

.sprint-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sprint-modal-title h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--cw-text-primary);
  margin: 0;
}

.sprint-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cw-text-muted);
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.sprint-modal-close:hover {
  background: var(--cw-danger-bg);
  color: var(--cw-danger);
}

.sprint-sim-controls {
  padding: 16px 24px;
  border-bottom: 1px solid var(--cw-border-light);
  display: flex;
  align-items: center;
  gap: 16px;
}

.sprint-sim-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sprint-sim-control-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-secondary);
}

.sprint-sim-control-group select {
  padding: 6px 12px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-primary);
  background: var(--cw-surface);
  cursor: pointer;
}

/* ── RH Header Cards ── */
.sprint-rh-cards {
  display: flex;
  gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--cw-border-light);
  overflow-x: auto;
}

.sprint-rh-card {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  background: #F8F9FA;
  border-radius: var(--cw-radius-md);
  border: 1px solid var(--cw-border-light);
}

.sprint-rh-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--cw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.sprint-rh-card-days {
  font-size: 20px;
  font-weight: 800;
  color: var(--cw-text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.sprint-rh-card-days small {
  font-size: 11px;
  font-weight: 500;
  color: var(--cw-text-muted);
}

.sprint-rh-card-bar {
  height: 4px;
  background: #E0E0E0;
  border-radius: 2px;
  overflow: hidden;
}

.sprint-rh-card-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ── Simulation Table ── */
.sprint-sim-table-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
}

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

.sprint-sim-table thead th {
  position: sticky;
  top: 0;
  background: var(--cw-surface);
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--cw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 2px solid var(--cw-border-light);
  z-index: 1;
}

.sim-th-name { width: 35%; }
.sim-th-score { width: 10%; text-align: center; }
.sim-th-rh { width: 20%; }
.sim-th-days { width: 20%; }
.sim-th-actions { width: 15%; text-align: center; }

.sprint-sim-table tbody tr {
  border-bottom: 1px solid var(--cw-border-light);
  transition: background 0.15s ease;
}

.sprint-sim-table tbody tr:hover {
  background: #F8F9FA;
}

.sprint-sim-table td {
  padding: 10px 8px;
  vertical-align: middle;
}

.sim-td-score {
  text-align: center;
}

.sim-td-actions {
  text-align: center;
}

.sim-feature-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-primary);
}

.sim-feature-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sim-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.sim-select {
  padding: 6px 10px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--cw-text-primary);
  background: var(--cw-surface);
  cursor: pointer;
  width: 100%;
}

.sim-select:focus {
  border-color: #7C4DFF;
  outline: none;
  box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.15);
}

.sim-input-days {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--cw-text-primary);
  text-align: center;
}

.sim-input-days:focus {
  border-color: #7C4DFF;
  outline: none;
  box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.15);
}

.sim-days-label {
  font-size: 12px;
  color: var(--cw-text-muted);
  margin-left: 4px;
}

.sim-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cw-text-muted);
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.sim-remove-btn:hover {
  background: var(--cw-danger-bg);
  color: var(--cw-danger);
}

.sim-remove-btn .material-icons-outlined {
  font-size: 20px;
}

/* ── Summary ── */
.sprint-sim-summary {
  padding: 16px 24px;
  border-top: 1px solid var(--cw-border-light);
}

.sprint-sim-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sprint-sim-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #F8F9FA;
  border-radius: var(--cw-radius-md);
  border: 1px solid var(--cw-border-light);
}

.sprint-sim-stat .material-icons-outlined {
  font-size: 22px;
  color: #7C4DFF;
  flex-shrink: 0;
}

.sprint-sim-stat div {
  display: flex;
  flex-direction: column;
}

.sprint-sim-stat strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--cw-text-primary);
  line-height: 1;
}

.sprint-sim-stat span {
  font-size: 10px;
  color: var(--cw-text-muted);
  margin-top: 2px;
}

.sprint-sim-stat-highlight {
  background: linear-gradient(135deg, #7C4DFF08, #7C4DFF15);
  border-color: rgba(124, 77, 255, 0.2);
}

.sprint-sim-stat-highlight .material-icons-outlined {
  color: #5E35B1;
}

.sprint-sim-stat-highlight strong {
  color: #5E35B1;
}

/* ── Modal Footer ── */
.sprint-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--cw-border-light);
  background: #FAFAFA;
}

/* ── Toast ── */
.sprint-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--cw-radius-lg);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

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

.sprint-toast-success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #4CAF5044;
}

.sprint-toast-error {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #EF535044;
}

.sprint-toast .material-icons-outlined {
  font-size: 20px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sprint-planner {
    grid-template-columns: 1fr;
  }

  .sprint-lane-cards {
    max-height: 50vh;
  }

  .sprint-sim-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .sprint-modal {
    max-height: 95vh;
  }
}

@media (max-width: 600px) {
  .sprint-card-name {
    max-width: 140px;
  }

  .sprint-sim-summary-cards {
    grid-template-columns: 1fr;
  }

  .sprint-modal-footer {
    flex-direction: column;
    gap: 10px;
  }

  .sprint-modal-footer .sprint-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Form: item type toggle (Épico / História) ── */
.proto-item-type-toggle {
  display: flex;
  gap: 6px;
}
.proto-type-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1.5px solid var(--cw-border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  transition: all 0.15s;
  user-select: none;
}
.proto-type-opt input[type="radio"] { display: none; }
.proto-type-opt .material-icons-outlined { font-size: 17px; }
.proto-type-opt:hover { border-color: #7C4DFF; color: #7C4DFF; background: #F5F3FF; }
.proto-type-opt.active { border-color: #7C4DFF; background: #F5F3FF; color: #5B21B6; font-weight: 700; }
