/* Beauty Matic Member Web App — UI Kit styles */
@import url('colors_and_type.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--cream-50); color: var(--fg-1); font-family: var(--font-sans); }

/* ===== App Shell ===== */
.bm-app { min-height: 100vh; display: grid; grid-template-rows: 64px 1fr; }
.bm-app-body { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - 64px); }

/* ===== Top Bar ===== */
.bm-topbar {
  display: grid; grid-template-columns: 248px 1fr auto; align-items: center;
  gap: 16px; padding: 0 24px; background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.bm-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg-1); }
.bm-logo img { width: 28px; height: 28px; }
.bm-logo span { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.bm-logo span i { font-style: italic; color: var(--sage-500); font-weight: 500; }
.bm-topbar-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 9px 14px; max-width: 480px;
}
.bm-topbar-search input { border: none; background: transparent; outline: none; flex: 1; font-size: 14px; color: var(--fg-1); font-family: var(--font-sans); }
.bm-topbar-search input::placeholder { color: var(--fg-4); }
.bm-topbar-search kbd { font-family: var(--font-mono); font-size: 11px; color: var(--fg-4); background: var(--sage-50); padding: 2px 6px; border-radius: 4px; }
.bm-topbar-right { display: flex; align-items: center; gap: 12px; }
.bm-icon-btn { position: relative; width: 40px; height: 40px; border: none; background: transparent; border-radius: 50%; color: var(--fg-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background var(--duration-base) var(--ease-out); }
.bm-icon-btn:hover { background: var(--sage-50); }
.bm-icon-dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--mint-500); border: 2px solid var(--cream-50); }
.bm-icon-badge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--berry); color: white; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bm-topbar-user { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--border); }
.bm-topbar-user-name { font-size: 13px; font-weight: 600; color: var(--fg-1); }
.bm-topbar-user-rank { font-size: 11px; color: var(--sage-500); display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.bm-rank-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-500); }

/* ===== Avatar ===== */
.bm-avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; background: var(--sage-100); color: var(--sage-700); border-radius: 50%; font-weight: 700; overflow: visible; flex-shrink: 0; }
.bm-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ===== SideNav ===== */
.bm-sidenav { padding: 20px 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px; background: var(--cream-50); }
.bm-sidenav-section { display: flex; flex-direction: column; gap: 2px; }
.bm-sidenav-divider { height: 1px; background: var(--border); margin: 4px 8px; }
.bm-sidenav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: none; background: transparent; border-radius: var(--radius-md);
  color: var(--fg-2); font-size: 14px; font-weight: 500; cursor: pointer;
  text-align: left; font-family: var(--font-sans);
  transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.bm-sidenav-item:hover { background: var(--sage-50); color: var(--fg-1); }
.bm-sidenav-item.is-active { background: var(--mint-100); color: var(--mint-700); font-weight: 600; }
.bm-sidenav-item.is-active i { color: var(--mint-600); }
.bm-sidenav-promo { margin-top: auto; padding: 16px; border-radius: var(--radius-lg); background: var(--sage-100); display: flex; flex-direction: column; gap: 10px; }
.bm-sidenav-promo-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--sage-600); text-transform: uppercase; }
.bm-sidenav-promo-title { font-size: 13px; color: var(--sage-800); line-height: 1.4; }

/* ===== Buttons ===== */
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; font-family: var(--font-sans); font-size: 14px;
  font-weight: 600; border-radius: var(--radius-pill); border: none;
  cursor: pointer; letter-spacing: -0.01em;
  transition: background var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), transform var(--duration-fast);
}
.bm-btn-sm { padding: 8px 14px; font-size: 13px; }
.bm-btn-lg { padding: 14px 28px; font-size: 15px; }
.bm-btn-primary { background: var(--mint-500); color: white; box-shadow: var(--shadow-sm); }
.bm-btn-primary:hover { background: var(--mint-600); box-shadow: var(--shadow-mint); }
.bm-btn-secondary { background: var(--sage-100); color: var(--sage-700); }
.bm-btn-secondary:hover { background: var(--sage-200); }
.bm-btn-ghost { background: transparent; color: var(--sage-600); padding: 12px 14px; }
.bm-btn-ghost:hover { background: var(--sage-50); }
.bm-btn-outline { background: transparent; color: var(--fg-1); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); }
.bm-btn-outline:hover { background: var(--sage-50); border-color: var(--sage-300); }

/* ===== Chip ===== */
.bm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; }
.bm-chip-mint { background: var(--mint-100); color: var(--mint-700); }
.bm-chip-sage { background: var(--sage-100); color: var(--sage-700); }
.bm-chip-rose { background: #F8E4DF; color: #8B3A52; }
.bm-chip-gold { background: #F4ECD8; color: #8C6F2F; }
.bm-chip-neutral { background: var(--ink-100); color: var(--fg-2); }
.bm-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ===== Card / Eyebrow / SectionTitle / Stat ===== */
.bm-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.bm-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--sage-500); text-transform: uppercase; margin-bottom: 6px; }
.bm-section-title { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.bm-section-title h2 { font-family: var(--font-sans); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--fg-1); margin: 0; }
.bm-stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: var(--radius-lg); background: white; border: 1px solid var(--border); }
.bm-stat-label { font-size: 12px; color: var(--fg-3); font-weight: 500; }
.bm-stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 500; color: var(--fg-1); letter-spacing: -0.02em; }
.bm-stat-delta { font-size: 12px; color: var(--mint-700); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.bm-stat-delta-down { color: var(--danger); }
.bm-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }

/* ===== Tabs / Filters ===== */
.bm-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--sage-50); border-radius: var(--radius-pill); }
.bm-tab { padding: 8px 16px; border: none; background: transparent; border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--fg-3); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.bm-tab.is-active { background: white; color: var(--fg-1); box-shadow: var(--shadow-xs); }
.bm-tab-count { font-size: 11px; color: var(--fg-4); font-family: var(--font-mono); }
.bm-tab.is-active .bm-tab-count { color: var(--sage-500); }

/* ===== Field / Input ===== */
.bm-field { display: flex; flex-direction: column; gap: 6px; }
.bm-field-label { font-size: 13px; font-weight: 600; color: var(--fg-1); }
.bm-field-hint { font-size: 11px; color: var(--fg-3); }
.bm-field-err { font-size: 11px; color: var(--danger); }
.bm-input-wrap { position: relative; display: flex; align-items: center; }
.bm-input-wrap.has-icon i { position: absolute; left: 12px; color: var(--fg-4); }
.bm-input-wrap.has-icon .bm-input { padding-left: 36px; }
.bm-input { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: white; font-family: var(--font-sans); font-size: 14px; color: var(--fg-1); transition: border-color var(--duration-base), box-shadow var(--duration-base); }
.bm-input:focus { outline: none; border-color: var(--mint-500); box-shadow: 0 0 0 3px rgba(61, 168, 105, 0.15); }

/* ===== Screen ===== */
.bm-screen { padding: 32px 40px 64px; max-width: 1280px; }
.bm-screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.bm-screen-title { font-family: var(--font-display); font-weight: 500; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; color: var(--fg-1); margin: 4px 0 8px; max-width: 720px; }
.bm-screen-sub { font-size: 16px; color: var(--fg-3); margin: 0; max-width: 640px; line-height: 1.5; }

/* ===== Catalog ===== */
.bm-catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.bm-catalog-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.bm-cat-pill { padding: 8px 14px; border: 1px solid var(--border); background: white; border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--fg-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all var(--duration-base) var(--ease-out); }
.bm-cat-pill:hover { background: var(--sage-50); border-color: var(--sage-300); }
.bm-cat-pill.is-active { background: var(--ink-700); border-color: var(--ink-700); color: white; }
.bm-cat-pill-count { font-size: 11px; color: var(--fg-4); font-family: var(--font-mono); }
.bm-cat-pill.is-active .bm-cat-pill-count { color: var(--ink-300); }
.bm-catalog-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-3); font-size: 13px; }
.bm-catalog-sort select { border: 1px solid var(--border); background: white; padding: 8px 12px; border-radius: var(--radius-md); font-family: var(--font-sans); font-size: 13px; color: var(--fg-1); cursor: pointer; }

.bm-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bm-product { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
.bm-product:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bm-product-thumb { position: relative; aspect-ratio: 1.1 / 1; background: var(--sage-50); overflow: hidden; }
.bm-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bm-product-fav { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(255,255,255,0.9); backdrop-filter: blur(6px); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--fg-2); }
.bm-product-fav:hover { color: var(--berry); }
.bm-product-flag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; background: var(--mint-500); color: white; font-size: 11px; font-weight: 700; border-radius: var(--radius-pill); letter-spacing: 0.02em; }
.bm-product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.bm-product-cat { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--sage-500); text-transform: uppercase; }
.bm-product-name { font-family: var(--font-display); font-size: 20px; font-weight: 500; color: var(--fg-1); letter-spacing: -0.01em; }
.bm-product-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-3); }
.bm-product-rating { color: #C9A24C; font-weight: 700; }
.bm-product-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.bm-product-price { font-family: var(--font-display); font-size: 18px; font-weight: 500; color: var(--fg-1); }
.bm-product-add { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--mint-500); color: white; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background var(--duration-base), box-shadow var(--duration-base), transform var(--duration-fast); }
.bm-product-add:hover { background: var(--mint-600); box-shadow: var(--shadow-mint); }
.bm-product-add:active { transform: scale(0.96); }
.bm-dot-sep { color: var(--fg-5); }

/* ===== Profile / Rank ===== */
.bm-rank-hero { display: grid; grid-template-columns: minmax(280px, 1fr) 1.4fr; gap: 32px; padding: 28px 32px; background: linear-gradient(135deg, var(--sage-50) 0%, var(--mint-50) 100%); border: 1px solid var(--sage-200); border-radius: var(--radius-xl); margin-bottom: 28px; align-items: center; }
.bm-rank-hero-left { display: flex; align-items: center; gap: 20px; }
.bm-rank-hero-img { width: 96px; height: 96px; }
.bm-rank-hero-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--sage-600); text-transform: uppercase; }
.bm-rank-hero-name { font-family: var(--font-display); font-size: 36px; font-weight: 500; color: var(--sage-800); letter-spacing: -0.02em; line-height: 1.1; }
.bm-rank-hero-points { font-size: 14px; color: var(--fg-2); margin-top: 4px; }
.bm-rank-hero-points span { color: var(--fg-3); }
.bm-rank-hero-progress { display: flex; flex-direction: column; gap: 10px; }
.bm-rank-progress-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--fg-2); font-weight: 600; }
.bm-rank-progress-next { color: var(--sage-600); }
.bm-rank-progress-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg-4); font-family: var(--font-mono); }

.bm-progress { width: 100%; height: 8px; background: var(--sage-100); border-radius: var(--radius-pill); overflow: hidden; }
.bm-progress-tall { height: 12px; }
.bm-progress-fill { height: 100%; border-radius: var(--radius-pill); transition: width var(--duration-slow) var(--ease-out); }
.bm-progress-mint { background: linear-gradient(90deg, var(--mint-400), var(--mint-500)); }

.bm-rank-grid-section { margin-bottom: 32px; }
.bm-rank-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.bm-rank-badge { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: all var(--duration-base) var(--ease-out); }
.bm-rank-badge img { width: 72px; height: 72px; }
.bm-rank-badge-name { font-size: 13px; font-weight: 700; color: var(--fg-1); letter-spacing: 0.04em; text-transform: uppercase; }
.bm-rank-badge-pts { font-family: var(--font-mono); font-size: 11px; color: var(--fg-4); }
.bm-rank-badge.is-current { border-color: var(--mint-400); box-shadow: 0 0 0 3px var(--mint-100); }
.bm-rank-badge.is-locked { opacity: 0.55; filter: grayscale(0.4); }

.bm-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bm-benefit-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.bm-benefit-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg-2); }
.bm-benefit-list li i { color: var(--mint-500); }
.bm-benefit-list li.is-locked { color: var(--fg-4); }
.bm-benefit-list li.is-locked i { color: var(--fg-5); }

.bm-activity-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.bm-activity-list li { display: flex; gap: 12px; align-items: flex-start; }
.bm-activity-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--mint-100); color: var(--mint-700); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bm-activity-icon-rose { background: #F8E4DF; color: #8B3A52; }
.bm-activity-icon-gold { background: #F4ECD8; color: #8C6F2F; }
.bm-activity-title { font-size: 14px; font-weight: 600; color: var(--fg-1); }
.bm-activity-meta { font-size: 12px; color: var(--fg-3); margin-top: 2px; }

/* ===== News & Training ===== */
.bm-featured { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 32px; background: var(--sage-800); color: white; border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 28px; }
.bm-featured-bg { position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, var(--mint-700) 0%, transparent 60%), radial-gradient(circle at 20% 90%, var(--sage-600) 0%, transparent 50%); opacity: 0.7; pointer-events: none; }
.bm-featured-body { position: relative; z-index: 1; max-width: 560px; }
.bm-featured-body .bm-eyebrow { color: var(--mint-300); }
.bm-featured-title { font-family: var(--font-display); font-weight: 500; font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; margin: 8px 0 12px; }
.bm-featured-sub { font-size: 15px; color: var(--sage-200); margin: 0 0 20px; line-height: 1.5; }
.bm-featured-actions { display: flex; gap: 10px; }
.bm-featured .bm-btn-ghost { color: var(--sage-100); }
.bm-featured .bm-btn-ghost:hover { background: rgba(255,255,255,0.08); }
.bm-featured-author { position: relative; z-index: 1; align-self: flex-end; display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: rgba(255,255,255,0.07); border-radius: var(--radius-lg); }
.bm-featured-author .bm-avatar { background: var(--mint-300); color: var(--sage-800); }
.bm-featured-author-name { font-size: 13px; font-weight: 600; color: white; }
.bm-featured-author-role { font-size: 11px; color: var(--mint-300); }

.bm-tabs-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.bm-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }

.bm-module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.bm-module { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: all var(--duration-base) var(--ease-out); }
.bm-module:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.bm-module.is-locked { opacity: 0.6; }
.bm-module-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--sage-500); text-transform: uppercase; }
.bm-module-title { font-family: var(--font-sans); font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--fg-1); margin: 0; }
.bm-module-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.bm-module-progress { flex: 1; display: flex; align-items: center; gap: 8px; max-width: 180px; }
.bm-module-progress span { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.bm-module-play { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--mint-500); color: white; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bm-module-play:hover { background: var(--mint-600); box-shadow: var(--shadow-mint); }
.bm-module.is-locked .bm-module-play { background: var(--ink-200); color: var(--fg-4); cursor: not-allowed; box-shadow: none; }

.bm-news-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bm-news-item { display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; transition: all var(--duration-base) var(--ease-out); }
.bm-news-item:hover { border-color: var(--sage-300); box-shadow: var(--shadow-sm); }
.bm-news-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--fg-3); flex-shrink: 0; }
.bm-news-date { font-weight: 600; }
.bm-news-title { flex: 1; font-size: 15px; font-weight: 600; color: var(--fg-1); line-height: 1.4; }
.bm-news-item i { color: var(--fg-4); }

@media (max-width: 1100px) {
  .bm-product-grid { grid-template-columns: repeat(2, 1fr); }
  .bm-stat-row { grid-template-columns: repeat(2, 1fr); }
  .bm-rank-grid { grid-template-columns: repeat(3, 1fr); }
  .bm-two-col { grid-template-columns: 1fr; }
  .bm-rank-hero { grid-template-columns: 1fr; }
}
