/* PersonalOS 17 — Phase 1: Bento Grid / Minimal design language. */
html[data-ui-style="bento-minimal"] {
  --radius-lg: 21px;
  --radius-md: 15px;
  --radius-sm: 11px;
  --shadow: 0 8px 26px rgba(31, 48, 82, .055);
  --shadow-pop: 0 20px 54px rgba(31, 48, 82, .16);
}

html[data-ui-style="bento-minimal"] body,
html[data-ui-style="bento-minimal"] .app-shell,
html[data-ui-style="bento-minimal"] .app-frame { background: var(--bg); }

html[data-ui-style="bento-minimal"] .sidebar {
  border-right-color: var(--border);
  box-shadow: 5px 0 24px rgba(31, 48, 82, .025);
}
html[data-ui-style="bento-minimal"] .brand-row { padding-bottom: 25px; }
html[data-ui-style="bento-minimal"] .nav-group + .nav-group { margin-top: 20px; }
html[data-ui-style="bento-minimal"] .nav-item {
  min-height: 45px;
  margin: 3px 0;
  border-radius: 13px;
  padding-right: 13px;
  padding-left: 13px;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
html[data-ui-style="bento-minimal"] .nav-item:hover { transform: translateX(2px); }
html[data-ui-style="bento-minimal"] .nav-item.active {
  border-color: transparent;
  background: var(--primary-soft);
}
html[data-ui-style="bento-minimal"] .nav-item.active::before { display: none; }
html[data-ui-style="bento-minimal"] .sidebar-bottom { border-top-color: var(--border); }
html[data-ui-style="bento-minimal"] .drive-chip,
html[data-ui-style="bento-minimal"] .quick-add-button { border-radius: 14px; }

html[data-ui-style="bento-minimal"] .topbar {
  border-bottom-color: color-mix(in srgb, var(--border) 72%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
}
html[data-ui-style="bento-minimal"] .main-content { max-width: 1680px; padding-top: 31px; }
html[data-ui-style="bento-minimal"] .page-header { margin-bottom: 25px; }
html[data-ui-style="bento-minimal"] .page-kicker { letter-spacing: 1.35px; }
html[data-ui-style="bento-minimal"] .page-title { letter-spacing: -.95px; }
html[data-ui-style="bento-minimal"] .page-description { max-width: 760px; }

html[data-ui-style="bento-minimal"] .surface-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 7px 22px rgba(31, 48, 82, .035);
}
html[data-ui-style="bento-minimal"] .surface-card-header { padding: 20px 21px 0; }
html[data-ui-style="bento-minimal"] .surface-card-body { padding: 19px 21px 21px; }
html[data-ui-style="bento-minimal"] .dashboard-grid,
html[data-ui-style="bento-minimal"] .dashboard-column { gap: 18px; }
html[data-ui-style="bento-minimal"] .kpi-card,
html[data-ui-style="bento-minimal"] .quick-action,
html[data-ui-style="bento-minimal"] .p2-note-card,
html[data-ui-style="bento-minimal"] .p4-budget-card,
html[data-ui-style="bento-minimal"] .p4-account-card,
html[data-ui-style="bento-minimal"] .p5-file-card,
html[data-ui-style="bento-minimal"] .p6-world-card {
  border-radius: 16px;
}
html[data-ui-style="bento-minimal"] .primary-button,
html[data-ui-style="bento-minimal"] .secondary-button,
html[data-ui-style="bento-minimal"] .ghost-button,
html[data-ui-style="bento-minimal"] .danger-button,
html[data-ui-style="bento-minimal"] .icon-button { border-radius: 12px; }
html[data-ui-style="bento-minimal"] .input-control,
html[data-ui-style="bento-minimal"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
html[data-ui-style="bento-minimal"] select,
html[data-ui-style="bento-minimal"] textarea { border-radius: 12px; }
html[data-ui-style="bento-minimal"] .mobile-bottom-nav {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px) saturate(1.1);
}
html[data-ui-style="bento-minimal"] .app-footer { border-top-color: var(--border); }

/* Bento presentation for the 10-style selector in Settings. */
.pos16-theme-panel { margin-bottom: 17px; }
.pos16-theme-panel-header { align-items: flex-start; }
.pos16-section-eyebrow { margin: 0 0 6px; color: var(--primary); font-size: 9px; font-weight: 850; letter-spacing: 1.25px; }
.pos16-theme-panel-header h2 { margin: 0; color: var(--text); font-size: 17px; font-weight: 790; letter-spacing: -.35px; }
.pos16-theme-panel-header p:not(.pos16-section-eyebrow) { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.pos16-rollout-badge { flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .45px; }
.pos16-theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pos16-theme-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pos16-theme-card:not(:disabled):hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 48%, var(--border)); box-shadow: 0 9px 22px rgba(31,48,82,.08); }
.pos16-theme-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 13%, transparent), 0 8px 22px rgba(31,48,82,.055); }
.pos16-theme-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 2px; }
.pos16-theme-card.is-upcoming { cursor: not-allowed; opacity: .68; }
.pos16-theme-card-copy { display: flex; min-height: 58px; flex-direction: column; gap: 4px; }
.pos16-theme-card-copy strong { color: var(--text); font-size: 11px; font-weight: 780; line-height: 1.35; }
.pos16-theme-card-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.pos16-theme-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-top: 8px; border-top: 1px solid var(--border); }
.pos16-theme-phase, .pos16-theme-state { color: var(--muted); font-size: 9px; font-weight: 750; }
.pos16-theme-card.is-selected .pos16-theme-state { color: var(--primary); }
.pos16-theme-preview { display: flex; height: 80px; gap: 7px; padding: 8px; overflow: hidden; border: 1px solid rgba(125,145,170,.16); border-radius: 11px; background: #f2f5fb; }
.pos16-preview-rail { display: flex; width: 15px; flex: 0 0 15px; flex-direction: column; gap: 5px; padding: 5px 3px; border-radius: 5px; background: #fff; }
.pos16-preview-rail i { display: block; height: 4px; border-radius: 4px; background: #d9dfed; }
.pos16-preview-rail i:first-child { background: #6e7fe8; }
.pos16-preview-board { display: grid; flex: 1; grid-template-columns: 1.2fr .8fr; grid-template-rows: repeat(2, 1fr); gap: 5px; }
.pos16-preview-tile { display: block; min-width: 0; border: 1px solid rgba(120,140,170,.12); border-radius: 5px; background: #fff; box-shadow: 0 2px 4px rgba(40,55,80,.045); }
.pos16-preview-tile-a { grid-row: span 2; background: linear-gradient(145deg, #fff 20%, #e5eaff); }
.pos16-preview-tile-b { background: linear-gradient(145deg, #fff 20%, #dff5ef); }
.pos16-preview-tile-c { background: linear-gradient(145deg, #fff 20%, #f8e9dc); }
.pos16-preview-tile-d { display: none; }
.pos16-preview-liquid-glass { background: linear-gradient(135deg,#d9e8ff,#f4e8ff 48%,#d6f4f0); }
.pos16-preview-liquid-glass .pos16-preview-rail,
.pos16-preview-liquid-glass .pos16-preview-tile { background: rgba(255,255,255,.68); backdrop-filter: blur(5px); }
.pos16-preview-dark-luxe { background: #171c28; }
.pos16-preview-dark-luxe .pos16-preview-rail,
.pos16-preview-dark-luxe .pos16-preview-tile { background: #252d3b; border-color: #3c4655; }
.pos16-preview-dark-luxe .pos16-preview-rail i:first-child { background: #d9b978; }
.pos16-preview-neo-brutalism { background: #ffe7a7; }
.pos16-preview-neo-brutalism .pos16-preview-rail,
.pos16-preview-neo-brutalism .pos16-preview-tile { border: 2px solid #171717; border-radius: 2px; background: #fff; box-shadow: 2px 2px #171717; }
.pos16-preview-editorial { background: #eee8dc; }
.pos16-preview-editorial .pos16-preview-rail { background: #d8cbb8; }
.pos16-preview-editorial .pos16-preview-tile { border-radius: 2px; background: #fffaf1; }
.pos16-preview-soft-tactile { background: #e7ebf1; }
.pos16-preview-soft-tactile .pos16-preview-rail,
.pos16-preview-soft-tactile .pos16-preview-tile { border: 0; border-radius: 8px; background: #e7ebf1; box-shadow: 3px 3px 6px #c4cad3,-3px -3px 6px #fff; }
.pos16-preview-spatial-3d { background: radial-gradient(circle at 70% 30%,#c7d9ff,#eef2ff 60%); }
.pos16-preview-spatial-3d .pos16-preview-tile { transform: perspective(80px) rotateY(-7deg) rotateX(3deg); box-shadow: 4px 5px 8px rgba(35,55,95,.2); }
.pos16-preview-retro-futurism { background: linear-gradient(135deg,#c9f7f6,#a8d9f6 48%,#d8f2ff); }
.pos16-preview-retro-futurism .pos16-preview-tile { background: rgba(255,255,255,.72); border-radius: 9px; }
.pos16-preview-biophilic { background: #e9efe1; }
.pos16-preview-biophilic .pos16-preview-rail { background: #d8e5d0; }
.pos16-preview-biophilic .pos16-preview-tile { border-radius: 12px; background: #f8f8ee; }
.pos16-preview-kinetic { background: #f1eaff; }
.pos16-preview-kinetic .pos16-preview-tile { border-radius: 3px; background: #fff; }
.pos16-preview-kinetic .pos16-preview-tile-a { background: linear-gradient(135deg,#8f6ee8,#d4b5f7); }
.pos16-theme-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.pos16-theme-note-icon { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 850; }
.pos16-theme-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.pos16-theme-note strong { color: var(--text); }

@media (max-width: 1120px) {
  .pos16-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  html[data-ui-style="bento-minimal"] .main-content { padding-top: 20px; }
  html[data-ui-style="bento-minimal"] .surface-card-header { padding: 16px 15px 0; }
  html[data-ui-style="bento-minimal"] .surface-card-body { padding: 15px; }
  .pos16-theme-panel-header { flex-direction: column; }
  .pos16-theme-grid { grid-template-columns: minmax(0, 1fr); }
  .pos16-theme-card { display: grid; grid-template-columns: minmax(92px, .72fr) minmax(0, 1.3fr); align-items: center; column-gap: 12px; }
  .pos16-theme-preview { grid-row: span 2; height: 76px; }
  .pos16-theme-card-copy { min-height: 0; }
  .pos16-theme-card-meta { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-ui-style="bento-minimal"] *, .pos16-theme-card { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
