/* =============================================
   Noscasamos — Admin Panel
   Modern minimal · same soul, sharper lines
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* brand */
  --rose: #C9A9A6;
  --rose-dark: #A6807C;
  --rose-light: #F2E4E2;
  --rose-50: #FBF5F4;
  --champagne: #E8D5B7;
  --champagne-light: #F5EDE0;
  --cream: #FBF9F7;
  --gold: #C7A95E;

  /* neutrals */
  --ink-900: #1F1D1C;
  --ink-700: #3D3938;
  --ink-500: #7A7471;
  --ink-300: #BEB8B5;
  --ink-100: #EDE9E6;
  --white: #FFFFFF;

  /* surface */
  --bg: #F8F6F3;
  --surface: #FFFFFF;
  --surface-2: #FBF9F7;
  --border: rgba(31, 29, 28, 0.06);
  --border-strong: rgba(31, 29, 28, 0.12);

  /* effects */
  --shadow-xs: 0 1px 2px rgba(31, 29, 28, 0.04);
  --shadow-sm: 0 2px 4px rgba(31, 29, 28, 0.04), 0 1px 2px rgba(31, 29, 28, 0.03);
  --shadow-md: 0 4px 12px rgba(31, 29, 28, 0.06), 0 2px 4px rgba(31, 29, 28, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(31, 29, 28, 0.12), 0 4px 12px rgba(31, 29, 28, 0.06);
  --shadow-glow: 0 0 0 4px rgba(166, 128, 124, 0.08);

  /* geometry */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* layout */
  --sidebar-w: 260px;
  --topbar-h: 72px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
*::selection { background: var(--rose-light); color: var(--rose-dark); }

html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

a { color: var(--rose-dark); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--ink-900); }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 500;
  color: var(--ink-900);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h1 { font-size: 2rem; font-weight: 500; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 12px; color: var(--ink-500); }

/* =====================================================
   AUTH LAYOUT (signin)
   ===================================================== */
.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at top left, rgba(201, 169, 166, 0.18), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(199, 169, 94, 0.12), transparent 50%),
    linear-gradient(180deg, var(--cream) 0%, var(--rose-50) 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 0c16.5 0 30 13.5 30 30S76.5 60 60 60 30 46.5 30 30 43.5 0 60 0z' fill='%23C9A9A6' fill-opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-wrap {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px 40px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.auth-brand {
  text-align: center;
  margin-bottom: 36px;
}
.auth-brand i {
  display: inline-flex;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--rose-light), var(--champagne-light));
  color: var(--rose-dark);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.auth-brand h1 { margin: 0; font-size: 1.75rem; }
.auth-brand p { margin: 6px 0 0; color: var(--ink-500); font-size: 0.88rem; }

.auth-form .form-group { margin-bottom: 18px; }
.auth-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-900);
  background: var(--surface-2);
  outline: none;
  transition: all 0.2s var(--ease);
}
.auth-form input:hover { border-color: var(--ink-300); }
.auth-form input:focus {
  border-color: var(--rose-dark);
  background: var(--white);
  box-shadow: var(--shadow-glow);
}

.auth-error {
  color: #B0403C;
  font-size: 0.82rem;
  min-height: 18px;
  margin: 4px 0 14px;
  font-weight: 500;
}

.auth-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--ink-500);
}
.auth-footer a { color: var(--ink-500); }
.auth-footer a:hover { color: var(--rose-dark); }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  text-decoration: none;
  line-height: 1;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--ink-900);
  color: var(--white);
  padding: 14px 24px;
}
.btn-primary:hover:not(:disabled) {
  background: var(--rose-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--ink-700);
}
.btn-secondary:hover { background: var(--white); border-color: var(--ink-300); color: var(--ink-900); }

.w-100 { width: 100%; }

/* =====================================================
   APP LAYOUT
   ===================================================== */
.app-layout { display: flex; min-height: 100vh; }

.app-sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 20;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 22px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.app-brand i {
  display: inline-flex;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--rose-light), var(--champagne-light));
  color: var(--rose-dark);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.app-nav {
  flex: 1;
  padding: 8px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.app-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-500);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s var(--ease);
}
.app-nav a:hover { background: var(--surface-2); color: var(--ink-900); }
.app-nav a.active {
  background: var(--ink-900);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.app-nav a.active i { color: var(--white); }
.app-nav i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: var(--ink-500);
  transition: color 0.15s var(--ease);
}
.app-nav a:hover i { color: var(--rose-dark); }

.app-sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}
.app-sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-500);
  font-size: 0.84rem;
  font-weight: 500;
}
.app-sidebar-footer a:hover { background: var(--surface-2); color: var(--rose-dark); }
.app-sidebar-footer i { font-size: 0.95rem; }

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  height: var(--topbar-h);
  padding: 0 36px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink-900);
}
.app-user-menu { display: flex; align-items: center; gap: 14px; }
.app-user-name {
  color: var(--ink-700);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  background: var(--surface-2);
  border-radius: 999px;
  border: 1px solid var(--border);
}
.app-logout {
  color: var(--ink-500);
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s var(--ease);
  border: 1px solid transparent;
}
.app-logout:hover {
  background: var(--rose-50);
  color: var(--rose-dark);
  border-color: var(--border);
}

.app-content {
  flex: 1;
  padding: 32px 36px 48px;
  max-width: 1440px;
  width: 100%;
}

.app-section { margin-top: 40px; }
.app-section h2 { font-size: 1.3rem; margin-bottom: 18px; }

/* =====================================================
   KPI GRID
   ===================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.kpi-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.2s var(--ease);
  overflow: hidden;
}
.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(201,169,166,0.04) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.kpi-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.kpi-card:hover::before { opacity: 1; }

.kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.kpi-rose        .kpi-icon { background: var(--rose-light);       color: var(--rose-dark); }
.kpi-rose-dark   .kpi-icon { background: var(--rose-dark);        color: var(--white); }
.kpi-champagne   .kpi-icon { background: var(--champagne-light);  color: var(--gold); }
.kpi-gold        .kpi-icon { background: linear-gradient(135deg, var(--gold), #E0C48A); color: var(--white); }

.kpi-body { min-width: 0; position: relative; z-index: 1; }
.kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-900);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.kpi-label {
  color: var(--ink-500);
  font-size: 0.8rem;
  margin-top: 6px;
  letter-spacing: 0.01em;
  font-weight: 500;
}

/* =====================================================
   QUICK ACTIONS
   ===================================================== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  color: var(--ink-700);
  transition: all 0.18s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.quick-card:hover {
  border-color: var(--rose);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--ink-900);
  background: var(--white);
}
.quick-card i {
  font-size: 1.6rem;
  color: var(--rose-dark);
  width: 48px; height: 48px;
  background: var(--rose-50);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s var(--ease);
}
.quick-card:hover i {
  background: var(--rose-light);
  transform: scale(1.05);
}
.quick-card span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-900);
}

/* =====================================================
   TABLES
   ===================================================== */
.app-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.app-table {
  width: 100%;
  border-collapse: collapse;
}
.app-table th,
.app-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.app-table th {
  background: var(--surface-2);
  font-size: 0.74rem;
  color: var(--ink-500);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
}
.app-table tr:last-child td { border-bottom: none; }
.app-table tr:hover td { background: var(--surface-2); }
.app-table td { color: var(--ink-700); }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.badge-draft    { background: var(--ink-100); color: var(--ink-700); }
.badge-active   { background: #E3F1E8; color: #2E7A4D; }
.badge-archived { background: var(--ink-100); color: var(--ink-500); }

/* =====================================================
   LIST VIEWS (page head, empty state, table extras)
   ===================================================== */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-subtitle {
  color: var(--ink-500);
  font-size: 0.92rem;
  margin: 0;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 60px 32px;
  text-align: center;
  color: var(--ink-500);
}
.empty-state i {
  font-size: 2.5rem;
  color: var(--ink-300);
  display: inline-block;
  margin-bottom: 12px;
}
.empty-state h3 { color: var(--ink-900); margin-bottom: 6px; }
.empty-state p { max-width: 400px; margin: 0 auto 20px; }

.pill-count {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-500);
  font-size: 0.82rem;
  font-weight: 500;
}

/* Table enhancements */
.cell-sub {
  color: var(--ink-500);
  font-size: 0.8rem;
  margin-top: 3px;
}
.cell-features {
  color: var(--ink-500);
  font-size: 0.82rem;
  max-width: 340px;
  line-height: 1.4;
}
.cell-actions {
  text-align: right;
  width: 80px;
  white-space: nowrap;
}
.cell-actions a,
.btn-icon-danger {
  display: inline-flex;
  width: 32px; height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--ink-500);
  transition: all 0.15s var(--ease);
}
.cell-actions a:hover {
  background: var(--rose-50);
  color: var(--rose-dark);
}
.btn-icon-danger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.btn-icon-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}
.modal-box h3 { margin: 0 0 12px; font-size: 1.1rem; }
.modal-box p  { margin: 0 0 24px; color: var(--ink-600); font-size: 0.95rem; line-height: 1.5; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }
.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
}
.btn-danger:hover { background: #b91c1c; }

.app-table code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--ink-700);
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}

/* Avatar cells */
.avatar-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-light), var(--champagne-light));
  color: var(--rose-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* =====================================================
   FORMS
   ===================================================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-500);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.15s var(--ease);
}
.back-link:hover { color: var(--rose-dark); }
.back-link i { font-size: 1rem; }

.app-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 960px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-xs);
}
.form-card h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.form-row:last-child { margin-bottom: 0; }

.form-group { display: flex; flex-direction: column; min-width: 0; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.form-group small {
  color: var(--ink-500);
  font-size: 0.76rem;
  margin-top: 6px;
  line-height: 1.4;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink-900);
  background: var(--surface-2);
  outline: none;
  transition: all 0.2s var(--ease);
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: var(--ink-300); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--rose-dark);
  background: var(--white);
  box-shadow: var(--shadow-glow);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7471' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.input-with-prefix {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
  transition: all 0.2s var(--ease);
}
.input-with-prefix:focus-within {
  border-color: var(--rose-dark);
  background: var(--white);
  box-shadow: var(--shadow-glow);
}
.input-prefix {
  padding: 12px 10px 12px 14px;
  color: var(--ink-500);
  font-size: 0.85rem;
  background: transparent;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.input-with-prefix input {
  border: none !important;
  background: transparent !important;
  padding: 12px 14px !important;
  flex: 1;
  min-width: 0;
  box-shadow: none !important;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.form-error {
  color: #B0403C;
  font-size: 0.85rem;
  min-height: 18px;
  margin-top: -4px;
  font-weight: 500;
}

/* Status switcher (dentro del form de invitación) */
.status-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.status-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-500);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.status-btn:hover:not(.active) { color: var(--ink-900); background: var(--surface); }
.status-btn.active { background: var(--ink-900); color: var(--white); box-shadow: var(--shadow-sm); }

.form-hint {
  margin: 16px 0 0;
  color: var(--ink-500);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-hint a { font-weight: 500; }

/* Chips (asignación de clientes) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  padding: 4px 0;
}
.chips-empty {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.88rem;
  font-style: italic;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-900);
  transition: all 0.15s var(--ease);
}
.chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.chip-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-light), var(--champagne-light));
  color: var(--rose-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.chip-x {
  background: transparent;
  border: none;
  padding: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  color: var(--ink-500);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s var(--ease);
}
.chip-x:hover { background: var(--rose-light); color: var(--rose-dark); }
.chip-x i { font-size: 0.95rem; }

.chip-add-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  align-items: stretch;
}
.chip-add-select {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink-900);
  background: var(--surface-2);
  outline: none;
  transition: all 0.2s var(--ease);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7471' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.chip-add-select:focus {
  border-color: var(--rose-dark);
  background-color: var(--white);
  box-shadow: var(--shadow-glow);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .app-content { padding: 24px 24px 40px; }
  .app-topbar { padding: 0 24px; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .app-sidebar { transform: translateX(-100%); transition: transform 0.2s var(--ease); }
  .app-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); width: 260px; }
  .app-main { margin-left: 0; }
  .app-topbar { padding: 0 16px; }
  .app-content { padding: 20px 16px 32px; }
  .app-user-name { display: none; }
  h1 { font-size: 1.6rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-value { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 36px 24px 28px; border-radius: var(--radius-lg); }
}

/* Scroll styling */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); }
