.button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 0 24px;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  transition: .14s ease;
}
.button.primary { background: var(--color-primary); color: #fff; box-shadow: 0 10px 24px rgba(236,0,97,.20); }
.button.primary:hover { background: var(--color-primary-2); }
.button.secondary { background: #fff; color: var(--color-text); border: 1px solid #d8dae3; box-shadow: 0 4px 11px rgba(18,22,33,.04); }
.button.ghost { background: transparent; color: var(--color-muted); }
.button.outline-primary { color: var(--color-primary); background:#fff; border:1px solid var(--color-primary); }
.button.danger { background: var(--color-danger); color: #fff; }
.button.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.icon-button {
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid #d8dae3; background: #fff;
  display:grid; place-items:center;
  cursor: pointer; font-size: 20px; color:#1d1f28;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.card-header {
  min-height: 64px;
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--color-border);
}
.card-header h2 { font-size: 22px; font-weight: 720; letter-spacing: -.03em; margin: 0; }
.card-header p { color: var(--color-muted); font-size: 14px; margin: 8px 0 0; }
.card-body { padding: 20px 24px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.metric-card { min-height: 116px; padding: 22px 28px; display:flex; align-items:center; gap:24px; }
.metric-icon {
  width: 56px; height: 56px; border-radius: 18px; display:grid; place-items:center;
  background: var(--color-primary-light); color: var(--color-primary); font-size: 26px; font-weight: 720;
  flex: 0 0 auto;
}
.metric-card span { color: #4b4d58; font-size: 15px; font-weight: 500; }
.metric-card strong { display: block; font-size: 30px; margin: 4px 0 8px; letter-spacing: -.035em; color:#0c0c10; }
.metric-card small { color: var(--color-primary); font-size: 14px; }
.metric-card small.up { color: var(--color-success); }
.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1;
}
.badge.success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid #cdf0d7; }
.badge.warning { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid #ffe2b8; }
.badge.danger { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid #ffd0d9; }
.badge.info { background: var(--color-info-bg); color: var(--color-info); border: 1px solid #d3e9ff; }
.badge.default { background: #f1f2f5; color: #626570; border:1px solid #e2e4e9; }
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; background: currentColor; }
.data-table { overflow: hidden; }
.data-table table { table-layout: auto; }
.data-table th, .data-table td { text-align: left; padding: 18px 18px; border-bottom: 1px solid var(--color-border); font-size: 15px; vertical-align: middle; }
.data-table th { color: #424450; font-size: 14px; font-weight: 610; background: #fff; }
.data-table tbody tr { transition:.12s; }
.data-table tbody tr:hover td { background: #fffbfd; }
.table-title { font-weight: 600; color: #111216; }
.table-title.link { color:#111216; 
  font-weight: 600;
}
.table-subtitle { display: block; color: var(--color-muted); font-size: 13px; margin-top: 8px; font-weight: 430; }
.project-name-cell, .person-cell { display: flex; align-items: center; gap: 12px; }
.person-cell .avatar { margin-right: 0; }
.project-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--color-primary-light); color: var(--color-primary);
  font-weight: 720; font-size: 26px; flex:0 0 auto;
}
.task-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display:inline-grid; place-items:center; font-size:17px; font-weight:800;
  background:#f3e9ff; color:#8f42ff; margin-right:12px;
}
.task-icon.shopify { background:#eaf8df; color:#5aae28; }
.task-icon.bot { background:#e5f1ff; color:#126fd2; }
.task-icon.test { background:#fff2d9; color:#dd8d20; }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(135deg, #1f2937, #9f1239);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
  flex: 0 0 auto;
}
.avatar-sm { width:34px; height:34px; font-size: 10px; }
.avatar-md { width:44px; height:44px; font-size:12px; }
.avatar-lg { width:58px; height:58px; font-size:16px; }
.avatar::after { content:""; }
.progress {
  height: 7px; border-radius: 999px; background: #ececf1; overflow: hidden; min-width:120px;
}
.progress > span { display: block; height: 100%; background: var(--color-primary); border-radius: inherit; }
.progress-cell { min-width:150px; }
.filters { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; align-items:center; justify-content:flex-end; }
.search-input, .select-input, .text-input, .form-control {
  border: 1px solid #dfe1e8;
  border-radius: 10px;
  background: #fff;
  padding: 0 16px;
  color: var(--color-text);
  min-height: 54px;
  outline: none;
  box-shadow: 0 4px 11px rgba(18,22,33,.025);
}
.search-input { min-width: 420px; }
.select-input { min-width: 172px; }
.action-menu { position: relative; }
.action-menu-content {
  position: absolute; right: 0; top: 54px;
  width: 220px; padding: 8px; border: 1px solid var(--color-border);
  border-radius: 10px; background: #fff; box-shadow: var(--shadow-soft);
  display: none; z-index: 40;
}
.action-menu.open .action-menu-content { display: grid; }
.action-menu-content button, .action-menu-content a {
  background: none; border: 0; text-align: left; padding: 12px 14px;
  border-radius: 10px; cursor: pointer; font-weight: 610; font-size: 15px;
  display:flex; align-items:center; gap:12px;
}
.action-menu-content button:hover, .action-menu-content a:hover { background: #fff1f6; color: var(--color-primary); }
.action-menu-content .danger-action { color: var(--color-danger); background:#fff0f3; }
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(8,9,12,.58);
  opacity: 0; visibility: hidden; transition: .2s;
  z-index: 50;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 430px;
  background: #fff; z-index: 60;
  box-shadow: -24px 0 60px rgba(0,0,0,.14);
  transform: translateX(105%); transition: .25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-header { padding: 34px 32px 18px; display: flex; justify-content: space-between; gap: 16px; }
.drawer-header h2 { font-size: 29px; letter-spacing: -.045em; margin:0; }
.drawer-header p { color: var(--color-muted); font-size: 14px; margin-top: 9px; }
.drawer-form { padding: 10px 32px 28px; overflow-y: auto; display: grid; gap: 20px; flex:1; }
.drawer-form label { display: grid; gap: 9px; font-size: 14px; color: #40424d; font-weight: 610; }
.drawer-form label > span { font-weight: 610; }
.drawer-form label.required > span::after { content:" *"; color: var(--color-primary); }
.drawer-form input, .drawer-form select, .drawer-form textarea {
  border: 1px solid #dfe1e8;
  border-radius: 10px;
  padding: 13px 14px;
  min-height: 50px;
  color: var(--color-text);
  background: #fff;
  width: 100%;
  outline: none;
  font-weight: 400;
}
.drawer-form input::placeholder, .drawer-form textarea::placeholder { color: #9a9dab; font-weight: 400; }
.drawer-form textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.textarea-compact { min-height: 92px !important; }
.drawer-actions { margin-top: auto; display: flex; gap: 14px; justify-content: flex-end; padding-top: 18px; position: sticky; bottom: 0; background: linear-gradient(to bottom, rgba(255,255,255,0.92), #fff 18px); padding-bottom: 4px; border-top: 1px solid rgba(223,225,232,.7); }
.drawer-actions .button { flex:1; min-height: 48px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.toggle-row { display:flex !important; flex-direction:row; align-items:center; gap:14px !important; }
.switch { width:44px; height:28px; border-radius:999px; background:#d8dbe3; position:relative; flex:0 0 auto; }
.switch::before { content:""; width:22px; height:22px; border-radius:50%; background:#fff; position:absolute; top:3px; left:3px; box-shadow:0 2px 6px rgba(0,0,0,.12); }
.switch.on { background: var(--color-primary); }
.switch.on::before { transform: translateX(16px); }
.field-chip { min-height:50px; border:1px solid #dfe1e8; border-radius:8px; display:flex; align-items:center; gap:10px; padding:0 14px; background:#fff; }
.chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip { background:#f5f6f8; border:1px solid #dfe1e8; border-radius:6px; padding:8px 12px; font-size:14px; }

.drawer.drawer-lg { width: min(560px, calc(100vw - 24px)); }
.drawer.drawer-md { width: min(500px, calc(100vw - 24px)); }
.drawer-close-button {
  flex: 0 0 auto;
}
.drawer-close-symbol {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
  color: #434754;
  transform: translateY(-1px);
}

.multi-select {
  position: relative;
}
.multi-select-trigger {
  width: 100%;
  min-height: 50px;
  border: 1px solid #dfe1e8;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.multi-select-trigger .chips {
  flex: 1;
}
.multi-select-chevron {
  color: #8a8d9b;
  font-size: 16px;
  width: 16px;
  height: 16px;
  transition: transform .18s ease;
}
.multi-select.open .multi-select-chevron {
  transform: rotate(180deg);
}
.multi-select-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dfe1e8;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .10);
  padding: 8px;
  display: none;
  z-index: 15;
}
.multi-select.open .multi-select-panel {
  display: grid;
}
.multi-option {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 10px;
  border-radius: 8px;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer;
}
.multi-option:hover {
  background: #f8f9fc;
}
.multi-option input {
  width: 16px;
  height: 16px;
  min-height: auto;
  accent-color: var(--color-primary);
}
.chip-removable {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5f6f8;
  border: 1px solid #dfe1e8;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #30323a;
}
.chip-remove {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  color: #7d8190;
  cursor: pointer;
}
.multi-select-empty {
  color: #9a9dab;
  font-size: 14px;
  font-weight: 400;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--color-sidebar); color: #fff;
  padding: 12px 16px; border-radius: 999px;
  opacity: 0; visibility: hidden; transition: .2s; z-index: 80;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: none; place-items: center; z-index: 70;
}
.modal.open { display: grid; }
.modal-card { width: 540px; max-width: calc(100% - 32px); padding: 34px 36px; background:#fff; border-radius: 18px; border: 1px solid rgba(223,225,232,.9); box-shadow: var(--shadow-soft); text-align:center; }
.modal-icon { width:64px; height:64px; border-radius:50%; margin:0 auto 18px; display:grid; place-items:center; background:var(--color-primary-light); color:var(--color-danger); font-size:30px; }
.modal-card h2 { margin: 0 0 12px; font-size: 28px; letter-spacing:-.04em; }
.modal-card p { color: var(--color-muted); line-height: 1.5; margin: 0 0 20px; font-size: 14px; }
.modal-alert { text-align:left; border:1px solid #ffd0d9; background:#fff5f7; color:#222; border-radius:10px; padding:18px 20px; margin:24px 0; display:flex; gap:14px; align-items:flex-start; }
.modal-alert strong { display:block; margin-bottom:4px; }
.modal-actions { display:grid; grid-template-columns: 1fr 1fr; gap:14px; }


/* Refined typography and icon treatment */
.button { letter-spacing: -.01em; }
.button-icon { width: 18px; height: 18px; font-size: 18px; }
.button.primary { background: linear-gradient(135deg, #f00664 0%, #d9005a 100%); }
.card { backdrop-filter: saturate(1.05); }
.metric-icon { font-size: 24px; }
.metric-card { gap: 22px; }
.metric-card span, .data-table th, .drawer-form label { letter-spacing: -.005em; }
.metric-card strong, .card-header h2, .table-toolbar h2, .drawer-header h2, .modal-card h2 { font-weight: 720; }
.table-title { font-weight: 600; letter-spacing: -.01em; }
.project-icon { font-size: 24px; }
.task-icon { font-size: 18px; }
.icon-action { width: 30px; height: 30px; border-radius: 8px; font-size: 17px; color:#323746; }
.icon-action:hover { background:#f7f7fa; color:var(--color-primary); }
.action-icon { width: 18px; height: 18px; font-size: 18px; }
.input-with-icon { position: relative; display: inline-flex; align-items: center; }
.input-with-icon .input-icon { position:absolute; left:18px; width:18px; height:18px; font-size:18px; color:#8a8d9b; pointer-events:none; }
.input-with-icon .search-input { padding-left: 48px; }
.status-dot-label { font-weight:650; }
.badge { font-weight:650; }
.task-icon.icon-bag { background:#eaf8df; color:#5aae28; }
.task-icon.icon-bot { background:#e5f1ff; color:#126fd2; }
.task-icon.icon-server { background:#f3e9ff; color:#8f42ff; }
.task-icon.icon-flask { background:#fff2d9; color:#dd8d20; }
.compact-icon { width:42px !important; height:42px !important; font-size:20px !important; }
