/*
 * apple-theme.css
 * v20260226_1
 *
 * Purpose:
 * - Provide a clean, Apple-like visual polish WITHOUT rebuilding the SPA.
 * - Keep changes additive (no reliance on internal class names from the build).
 */

:root {
  --sw-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "PingFang TC", "Noto Sans CJK SC", "Noto Sans CJK TC", sans-serif;
  --sw-radius: 18px;
  --sw-radius-lg: 22px;
  --sw-border: rgba(0,0,0,0.10);
  --sw-border-soft: rgba(0,0,0,0.06);
  --sw-shadow: 0 10px 30px rgba(0,0,0,0.10);
  --sw-shadow-soft: 0 8px 24px rgba(0,0,0,0.08);
  --sw-bg: rgba(255,255,255,0.85);
  --sw-bg-solid: #ffffff;
  --sw-muted: rgba(0,0,0,0.55);
}

html, body {
  font-family: var(--sw-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global: reduce "boxy" feeling on large cards where possible */
#company-rev-cards-20260226_1 {
  margin-top: 6px;
}

/* Company revenue injected cards (from company-dashboard.js) */
.sw-card {
  background: var(--sw-bg);
  border: 1px solid var(--sw-border-soft);
  border-radius: var(--sw-radius-lg);
  box-shadow: var(--sw-shadow-soft);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  overflow: hidden;
}

.sw-card-inner {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sw-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sw-card-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 20px;
  line-height: 1.2;
}

.sw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--sw-border-soft);
  font-weight: 800;
  font-size: 13px;
}

.sw-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sw-metric-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sw-muted);
}

.sw-metric-value {
  font-size: 40px;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

@media (max-width: 900px) {
  .sw-metric-grid { grid-template-columns: 1fr; }
  .sw-metric-value { font-size: 36px; }
}

/* Language toggle (injected button) */
#lang-toggle-btn {
  border-radius: 12px !important;
  border: 1px solid var(--sw-border) !important;
  background: rgba(255,255,255,0.88) !important;
  box-shadow: var(--sw-shadow-soft) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

#lang-toggle-btn:active {
  transform: translateY(1px);
}

/* ================================
   SALES DEPT Sidebar Group Boxes
   ================================ */

.pi-salesdept-group-wrapper{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:10px;
}

.pi-groupbox{
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow:hidden;
}

.pi-groupbox-title{
  padding: 10px 12px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
}

.pi-groupbox-body{
  display:flex;
  flex-direction:column;
}

.pi-groupbox-body > *{
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.pi-groupbox-body > *:first-child{
  border-top: none;
}


/* SALES DEPT groupbox actions */
.pi-groupbox-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.pi-groupbox-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.pi-groupbox-action-btn{
  width:32px;
  height:32px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.08);
  background:rgba(255,255,255,0.85);
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
  font-size:18px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pi-groupbox-action-btn:active{
  transform:translateY(1px);
}
.pi-groupbox-action-btn.delete{
  color:#d11a1a;
}
