:root {
  --background: #f7f8fa;
  --foreground: #15171a;
  --card: #ffffff;
  --card-foreground: #181a1d;
  --primary: #17191c;
  --primary-foreground: #ffffff;
  --secondary: #f1f2f4;
  --secondary-foreground: #25272b;
  --muted: #f3f4f6;
  --muted-foreground: #6d727a;
  --accent: #eef7f3;
  --accent-foreground: #176d4d;
  --destructive: #d92d20;
  --border: #e5e7eb;
  --input: #dfe2e6;
  --ring: #25282d;
  --success: #15805d;
  --warning: #a15c00;
  --radius: 12px;
  --sidebar-width: 278px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 48px rgba(16, 24, 40, .16);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
  color: var(--foreground);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button:focus-visible { outline: 2px solid #6b7280; outline-offset: 2px; }
svg { display: block; width: 18px; height: 18px; stroke-width: 1.8; }
.hidden { display: none !important; }
.muted { color: var(--muted-foreground); }

.app-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted-foreground);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #d8dadd;
  border-top-color: var(--foreground);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.brand-mark-light { background: #fff; color: #15171a; }

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #7d838c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow-light { color: rgba(255, 255, 255, .58); }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 46%) 1fr;
  background: #fff;
}

.login-brand-panel {
  min-height: 100vh;
  padding: 46px 54px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 78% 15%, rgba(255, 255, 255, .08), transparent 30%),
    linear-gradient(150deg, #101215 0%, #191d21 64%, #20262a 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -280px;
  bottom: -210px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .018), 0 0 0 140px rgba(255, 255, 255, .012);
}

.brand-lockup, .mobile-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.login-brand-copy {
  margin: auto 0;
  position: relative;
  z-index: 1;
  max-width: 510px;
}

.login-brand-copy h1 {
  margin: 0 0 24px;
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 650;
}

.login-brand-copy p {
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, .63);
  font-size: 16px;
  line-height: 1.75;
}

.login-brand-footer {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, .36);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-form-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 44px;
}

.login-card { width: min(100%, 400px); }
.mobile-brand { display: none; margin-bottom: 48px; }

.login-card h2 {
  margin: 0 0 7px;
  font-size: 28px;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.login-card > .field-group:first-of-type { margin-top: 30px; }
.login-card .button-full { margin-top: 22px; }

.form-note {
  margin: 18px 0 0;
  text-align: center;
  color: #92979e;
  font-size: 12px;
}

.field-group {
  display: grid;
  align-content: start;
  align-self: start;
  gap: 7px;
  margin-top: 18px;
}

.field-group label, .label-row {
  color: #363a40;
  font-size: 13px;
  font-weight: 600;
}

.field-group label span { color: var(--destructive); }
.field-group small { color: var(--muted-foreground); font-size: 11px; }
.inline-link {
  border: 0;
  padding: 0;
  color: #2563eb;
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.inline-link:hover { text-decoration: underline; }

input, select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--input);
  border-radius: 9px;
  outline: none;
  padding: 0 12px;
  color: var(--foreground);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}

textarea {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: 9px;
  outline: none;
  padding: 10px 12px;
  resize: vertical;
  color: var(--foreground);
  background: #fff;
  box-shadow: var(--shadow-sm);
  line-height: 1.55;
}

textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(25, 28, 31, .1); }

input::placeholder { color: #a5a9af; }
input:focus, select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(25, 28, 31, .1);
}

input.cube-date-input {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23565b62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}
input.cube-date-input[readonly], input.cube-date-input:disabled {
  padding-right: 12px;
  background-image: none;
}
.cube-native-date-picker {
  position: fixed !important;
  z-index: -1 !important;
  left: 50% !important;
  bottom: 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: .01 !important;
  pointer-events: none !important;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.password-toggle { position: absolute; right: 4px; top: 4px; }

.button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  transition: background .15s, border-color .15s, transform .05s;
}

.button:active { transform: translateY(1px); }
.button:disabled { opacity: .58; cursor: not-allowed; transform: none; }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-sm); }
.button-primary:hover { background: #2a2d31; }
.button-outline { background: #fff; border-color: var(--border); color: #383c42; }
.button-outline:hover { background: #f7f8f9; border-color: #d6d9dd; }
.button-destructive { background: #fff; border-color: #f0c9c5; color: #b42318; }
.button-lg { min-height: 44px; }
.button-sm { min-height: 32px; padding: 0 11px; font-size: 12px; }
.button-full { width: 100%; }

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: inline-grid;
  place-items: center;
  color: #6f747c;
}

.icon-button:hover { background: var(--muted); color: var(--foreground); }

.alert {
  margin-top: 20px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 9px;
  font-size: 12px;
}
.alert-error { color: #9e2a20; border-color: #f1c4bf; background: #fff5f4; }

.dashboard-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: #f8f8f9;
  border-right: 1px solid var(--border);
}

.sidebar-brand {
  min-height: 66px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand .brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid #171717;
  border-radius: 50%;
  background: #fff;
  color: #171717;
  font-size: 13px;
}
.sidebar-brand-copy { display: grid; line-height: 1.15; }
.sidebar-brand-copy strong { font-size: 15px; letter-spacing: -.025em; }
.sidebar-brand-copy small { margin-top: 4px; color: #8a8d92; font-size: 10px; }

.sidebar-quick-actions { padding: 4px 4px 10px; }
.sidebar-quick-create {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #0f0f10;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: background .15s, transform .05s;
}
.sidebar-quick-create:hover { background: #292929; }
.sidebar-quick-create:active { transform: translateY(1px); }
.quick-create-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111;
}
.quick-create-icon svg { width: 13px; height: 13px; stroke-width: 2.4; }

.sidebar-nav { flex: 1; min-height: 0; padding: 6px 4px 12px; overflow-y: auto; }
.nav-label { margin: 12px 10px 7px; color: #8b8e93; font-size: 11px; font-weight: 600; letter-spacing: 0; }
.nav-label-spaced { margin-top: 22px; }

.nav-item {
  width: 100%;
  min-height: 40px;
  margin: 1px 0;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  color: #3f4145;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.nav-item:hover { background: #eeeeef; color: #18191b; }
.nav-item.active { background: #e7e7e9; color: #111214; font-weight: 650; }
.nav-item svg { width: 18px; height: 18px; stroke-width: 1.9; }
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 6px; border-radius: 20px; background: #d9d9dc; color: #55575b; font-size: 10px; text-align: center; }

.sidebar-footer { flex: 0 0 auto; padding: 4px; }
.sidebar-utilities { padding-bottom: 8px; }
.sidebar-utility {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  color: #3f4145;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}
.sidebar-utility:hover { background: #eeeeef; color: #18191b; }
.sidebar-utility svg { width: 18px; height: 18px; }

.sidebar-account { position: relative; }

.sidebar-user {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  box-shadow: none;
  text-align: left;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.sidebar-user:hover,
.sidebar-user[aria-expanded="true"] { background: #ededee; border-color: transparent; }

.avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e7e9ec;
  color: #44484e;
  font-size: 11px;
  font-weight: 750;
}

.avatar-sm { width: 31px; height: 31px; border-radius: 8px; }
.shop-avatar { overflow: hidden; background: #fff; }
.shop-avatar img { width: 100%; height: 100%; display: block; object-fit: contain; }
.sidebar-user-copy { min-width: 0; flex: 1; display: grid; }
.sidebar-user-copy strong, .sidebar-user-copy span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user-copy strong { font-size: 12px; }
.sidebar-user-copy span { color: #92969c; font-size: 10px; }
.sidebar-user-more { flex: 0 0 auto; color: #5f6267; }
.sidebar-user-more svg { width: 18px; height: 18px; }

.account-menu {
  position: absolute;
  z-index: 45;
  bottom: 0;
  left: calc(100% + 10px);
  width: 258px;
  padding: 5px;
  border: 1px solid #dedee1;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(18, 18, 23, .16), 0 2px 8px rgba(18, 18, 23, .08);
  transform-origin: bottom left;
  animation: account-menu-in .14s ease-out;
}
@keyframes account-menu-in {
  from { opacity: 0; transform: translateX(-4px) scale(.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.account-menu-header { display: flex; align-items: center; gap: 10px; padding: 8px; }
.account-menu-copy { min-width: 0; display: grid; flex: 1; line-height: 1.35; }
.account-menu-copy strong,
.account-menu-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-copy strong { font-size: 12px; }
.account-menu-copy span { color: #7d8086; font-size: 10px; }
.account-menu-separator { height: 1px; margin: 4px -5px; background: #e8e8ea; }
.account-menu-item {
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #2f3135;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}
.account-menu-item:hover { background: #f1f1f2; color: #111214; }
.account-menu-item svg { width: 17px; height: 17px; color: #6d7075; }
.account-menu-logout { color: #b42318; }
.account-menu-logout svg { color: currentColor; }

.main-column { min-height: 100vh; margin-left: var(--sidebar-width); }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 70px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
}

.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.breadcrumb span { color: #9a9ea5; }
.breadcrumb i { color: #c6c8cb; font-style: normal; }
.breadcrumb strong { font-weight: 600; }
.breadcrumb-link { padding: 0; border: 0; background: transparent; color: #666b73; cursor: pointer; font: inherit; font-weight: 500; }
.breadcrumb-link:hover { color: #202327; text-decoration: underline; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.status-dot-wrap { display: flex; align-items: center; gap: 7px; color: #7c8188; font-size: 10px; }
.status-dot-wrap i { width: 7px; height: 7px; border-radius: 50%; background: #20a477; box-shadow: 0 0 0 3px #e5f5ef; }
.mobile-menu { display: none; }

.main-content { max-width: 1480px; margin: 0 auto; padding: 34px 36px 60px; outline: 0; }

.page-heading {
  min-height: 76px;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.page-heading h1 { margin: 0 0 5px; font-size: 26px; line-height: 1.2; letter-spacing: -.04em; }
.page-heading p { margin: 0; font-size: 13px; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  min-height: 134px;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.metric-card-header { display: flex; align-items: center; justify-content: space-between; color: #777c84; }
.metric-card-label { font-size: 12px; font-weight: 600; }
.metric-icon { width: 31px; height: 31px; border-radius: 8px; display: grid; place-items: center; background: #f2f3f5; color: #62676e; }
.metric-icon svg { width: 15px; height: 15px; }
.metric-value { margin-top: 17px; font-size: 29px; font-weight: 650; line-height: 1; letter-spacing: -.045em; }
.metric-hint { margin-top: 8px; color: #989ca2; font-size: 10px; }
.metric-hint strong { color: var(--success); font-weight: 600; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 20px; }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.card-header { padding: 20px 21px 15px; }
.card-header-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.card-header h2 { margin: 0; font-size: 14px; letter-spacing: -.015em; }
.card-header p { margin: 4px 0 0; color: #969aa1; font-size: 10px; }

.compact-list { min-height: 320px; }
.compact-row {
  min-height: 63px;
  padding: 10px 21px;
  border-top: 1px solid #f0f1f2;
  display: grid;
  grid-template-columns: minmax(180px, 1.7fr) minmax(110px, .7fr) 90px;
  align-items: center;
  gap: 14px;
}

.person-cell { min-width: 0; display: flex; align-items: center; gap: 11px; }
.person-copy { min-width: 0; display: grid; }
.person-copy strong, .person-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-copy strong { font-size: 12px; font-weight: 600; }
.person-copy span { color: #92969d; font-size: 10px; }
.project-assignees { min-width: 105px; display: grid; gap: 3px; }
.project-assignees span { color: #777d85; font-size: 9px; line-height: 1.35; white-space: nowrap; }
.project-assignees strong { color: #454a51; font-weight: 650; }

.badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #e2e4e7;
  border-radius: 20px;
  background: #f8f8f9;
  color: #656a71;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { border-color: #cfe8df; background: #eff9f5; color: #137052; }
.badge-muted { background: #f3f4f5; color: #7d8289; }
.badge-admin { border-color: #ddd9f4; background: #f5f3ff; color: #6556a8; }
.badge-manager { border-color: #d6e2f1; background: #f1f7fd; color: #42698f; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge-role::before { display: none; }

.activity-list { padding: 1px 21px 15px; min-height: 320px; }
.activity-item { position: relative; min-height: 55px; padding: 9px 0 9px 28px; display: grid; align-content: center; }
.activity-item::before { content: ""; position: absolute; left: 6px; top: 25px; bottom: -15px; width: 1px; background: #e5e7e9; }
.activity-item:last-child::before { display: none; }
.activity-dot { position: absolute; left: 1px; top: 19px; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: #838890; box-shadow: 0 0 0 1px #dfe1e4; }
.activity-item strong { font-size: 11px; font-weight: 600; }
.activity-item span { color: #969aa0; font-size: 9px; }

.loading-block { position: relative; overflow: hidden; }
.loading-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.8) 45%, transparent 65%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.employee-card { overflow: hidden; }
.toolbar { min-height: 70px; padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.search-wrap { width: min(390px, 100%); position: relative; }
.search-wrap > span { position: absolute; z-index: 1; left: 12px; top: 12px; color: #92969c; }
.search-wrap svg { width: 16px; height: 16px; }
.search-wrap input { padding-left: 37px; box-shadow: none; }
.toolbar-filters { display: flex; gap: 8px; }
.toolbar-filters select { width: 130px; box-shadow: none; }

.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { height: 42px; padding: 0 16px; border-bottom: 1px solid var(--border); background: #fafafb; color: #7f848b; font-size: 10px; font-weight: 650; letter-spacing: .02em; white-space: nowrap; }
.data-table td { height: 67px; padding: 10px 16px; border-bottom: 1px solid #f0f1f2; color: #4d5259; font-size: 11px; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfcfd; }
.table-actions-heading, .table-actions { text-align: right !important; }
.table-actions { display: flex; justify-content: flex-end; gap: 4px; }
.table-actions .icon-button { width: 30px; height: 30px; border: 1px solid transparent; }
.table-actions .icon-button:hover { border-color: var(--border); background: #fff; }
.table-actions .icon-button-danger:hover { border-color: #f0c9c5; background: #fff5f4; color: #b42318; }
.table-actions .icon-button svg { width: 15px; height: 15px; }
.table-actions .button svg { width: 14px; height: 14px; }
.project-action-menu { display: inline-flex; }
.project-action-dropdown { position: fixed; z-index: 90; width: 214px; max-height: calc(100vh - 16px); padding: 6px; border: 1px solid var(--border); border-radius: 10px; display: grid; gap: 2px; overflow-y: auto; background: #fff; box-shadow: 0 14px 36px rgba(20, 24, 30, .16); text-align: left; }
.project-action-dropdown button, .project-action-dropdown a { width: 100%; min-height: 38px; padding: 7px 9px; border: 0; border-radius: 7px; display: flex; align-items: center; gap: 9px; background: transparent; color: #3f444b; font-size: 11px; text-align: left; text-decoration: none; }
.project-action-dropdown button:hover, .project-action-dropdown button:focus-visible, .project-action-dropdown a:hover, .project-action-dropdown a:focus-visible { background: #f3f4f6; color: #202327; outline: 0; }
.project-action-dropdown button svg, .project-action-dropdown a svg { flex: 0 0 auto; width: 15px; height: 15px; color: #747980; }
.project-action-dropdown button span, .project-action-dropdown a span { min-width: 0; display: flex; align-items: baseline; gap: 5px; }
.project-action-dropdown button small, .project-action-dropdown a small { color: #999da3; font-size: 9px; }
.table-permission-button { padding-inline: 9px; }
.shop-badge-list { max-width: 260px; display: flex; flex-wrap: wrap; gap: 4px; }
.table-footer { min-height: 46px; padding: 0 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; color: #999da3; font-size: 10px; }
.empty-state { padding: 50px 20px !important; text-align: center !important; color: #92969d !important; }

.dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 42px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow: auto;
}

.dialog::backdrop { background: rgba(17, 20, 24, .48); backdrop-filter: blur(2px); }
.dialog-sm { width: min(460px, calc(100vw - 32px)); }
.dialog-xl { width: min(1180px, calc(100vw - 32px)); }
.dialog form { padding: 23px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.dialog-header h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.dialog-header p { margin: 5px 0 0; color: var(--muted-foreground); font-size: 11px; }
.dialog .alert { margin: -6px 0 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; column-gap: 15px; }
.form-grid-full { grid-column: 1 / -1; }
.customer-primary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 15px; }
.dialog-footer { margin-top: 25px; padding-top: 17px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 9px; }
.shop-logo-control { min-height: 108px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; gap: 14px; background: #fafbfc; }
.shop-logo-preview { flex: 0 0 auto; width: 148px; height: 82px; border: 1px dashed #c8ccd1; border-radius: 9px; display: grid; place-items: center; overflow: hidden; background: #fff; color: #969ba2; }
.shop-logo-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.shop-logo-preview > span { width: 28px; height: 28px; }
.shop-logo-preview > span svg { width: 100%; height: 100%; }
.shop-logo-actions { min-width: 0; display: grid; gap: 7px; }
.shop-logo-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-logo-actions small { color: var(--muted-foreground); font-size: 9px; line-height: 1.45; }
.shop-logo-actions #shop-logo-remove, .shop-logo-actions #shop-stamp-remove { color: #b42318; }
.shop-primary-color { min-height: 38px; padding: 4px; cursor: pointer; }

.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; width: min(360px, calc(100vw - 32px)); display: grid; gap: 9px; }
.toast { padding: 13px 15px; border: 1px solid #dcdfe2; border-radius: 10px; display: flex; gap: 10px; align-items: flex-start; background: #fff; box-shadow: 0 12px 30px rgba(16, 24, 40, .14); animation: toast-in .2s ease-out; }
.toast svg { width: 17px; height: 17px; margin-top: 1px; color: var(--success); }
.toast-error svg { color: var(--destructive); }
.toast strong { display: block; font-size: 12px; }
.toast p { margin: 2px 0 0; color: var(--muted-foreground); font-size: 10px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.mobile-overlay { position: fixed; z-index: 25; inset: 0; background: rgba(15, 18, 22, .44); }

/* Scheduling workspace */
.toolbar-count { font-size: 11px; white-space: nowrap; }
.toolbar-filters-wide select { width: 150px; }
.project-toolbar { align-items: center; }
.queue-hint { min-height: 34px; padding: 0 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; color: #8a8f96; background: #fcfcfd; font-size: 10px; }
.queue-hint svg { width: 14px; height: 14px; }
.drag-column { width: 34px; padding-right: 0 !important; }
.drag-handle { color: #a4a8ae; cursor: grab; }
.drag-handle:active { cursor: grabbing; }
.project-row[draggable="true"] { cursor: default; }
.project-row.dragging { opacity: .42; background: #eef1f4; }
.project-row.drag-over { box-shadow: inset 0 2px var(--primary); }
.project-title-cell { max-width: 300px; }
#items-page .data-table { min-width: 1540px; }
#items-page .data-table th:first-child,
#items-page .data-table td:first-child { width: 60px; min-width: 60px; max-width: 60px; padding-right: 6px; padding-left: 6px; text-align: center; }
#items-page .data-table th:nth-child(2),
#items-page .data-table td:nth-child(2) { width: 290px; min-width: 290px; }
#items-page .data-table th:nth-child(6) { width: 120px; }
#items-page .data-table th:nth-child(8) { width: 185px; }
#items-page .project-table th:last-child,
#items-page .project-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 142px;
  min-width: 142px;
  background: #fff;
  box-shadow: inset 1px 0 0 #d2d7dd;
}
#items-page .project-table th:last-child::before,
#items-page .project-table td:last-child::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -16px;
  width: 16px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(38, 45, 54, 0), rgba(38, 45, 54, .08));
}
#items-page .project-table th:last-child { z-index: 3; background: #fafafb; }
#items-page .project-table td:last-child.action-menu-open { z-index: 100; }
#items-page .project-table tbody tr:hover td:last-child { background: #fcfcfd; }
#items-page .project-table tbody tr.is-collaboration-active td:last-child { background: #f4f6f8; }
.project-filter-row th { height: 46px; padding: 7px 8px; border-bottom-color: #e1e4e7; background: #fff; }
.project-filter-row input, .project-filter-row select { width: 100%; min-height: 30px; height: 30px; padding: 0 8px; border-radius: 7px; font-size: 9px; font-weight: 500; letter-spacing: 0; box-shadow: none; }
.project-filter-row input.cube-date-input { padding-right: 30px; background-position: right 7px center; background-size: 15px 15px; }
.project-filter-row .button { width: 100%; min-height: 30px; height: 30px; padding: 0 8px; font-size: 9px; }
#items-page .project-filter-row th:last-child { background: #fff; }
.items-workspace { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; }
.items-workspace.has-collaboration { grid-template-columns: minmax(0, 1fr) 380px; }
.items-list-card { min-width: 0; }
.projects-main-column, .projects-list-card { min-width: 0; }
#items-page .items-list-card .toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
#items-page .items-list-card .search-wrap { width: 100%; }
#items-page .items-list-card .toolbar-filters { width: 100%; }
#items-page .items-list-card .toolbar-filters select,
#items-page .items-list-card .toolbar-filters input { flex: 1; width: auto; min-width: 0; }
#items-page .items-list-card .table-wrap.is-drag-scrolling { cursor: grabbing; user-select: none; }
.item-financial-summary { padding: 14px 16px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; background: #fafbfc; }
.item-financial-summary-card { position: relative; min-width: 0; min-height: 94px; padding: 13px 14px 12px 17px; border: 1px solid #e2e5e8; border-radius: 10px; display: grid; align-content: space-between; gap: 6px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .025); }
.item-financial-summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #76818c; }
.item-financial-summary-invoice::before { background: #b46d43; }
.item-financial-summary-receipt::before { background: #3b8b63; }
.item-financial-summary-label { color: #68717b; font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.item-financial-summary-values { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 13px; font-variant-numeric: tabular-nums; }
.item-financial-summary-value { min-width: 0; display: flex; align-items: baseline; gap: 5px; }
.item-financial-summary-value span { color: #7e8790; font-size: 8px; font-weight: 700; }
.item-financial-summary-value strong { color: #252b31; font-size: 18px; line-height: 1.15; letter-spacing: -.02em; }
.item-financial-summary-card small { overflow: hidden; color: #858d95; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.item-financial-summary-loading { color: #969da5; font-size: 10px; }
#items-page .data-table tbody tr.is-collaboration-active, #projects-page .data-table tbody tr.is-collaboration-active { background: #f4f6f8; box-shadow: inset 3px 0 #4f565e; }
#items-page .table-actions .icon-button.is-active, #projects-page .table-actions .icon-button.is-active { border-color: #cfd3d8; color: #252a30; background: #eef0f2; }
.item-collaboration-panel { position: sticky; top: 94px; height: min(720px, calc(100dvh - 118px)); min-height: 560px; display: none; overflow: hidden; animation: item-collaboration-in .18s ease-out; }
.items-workspace.has-collaboration .item-collaboration-panel { display: block; }
.item-collaboration-backdrop { display: none; }
@keyframes item-collaboration-in { from { opacity: .5; transform: translateX(10px); } }
.item-collaboration-empty { height: 100%; padding: 34px; display: grid; place-content: center; justify-items: center; gap: 14px; color: #7e848b; text-align: center; }
.item-collaboration-empty-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #616870; background: #eff1f3; }
.item-collaboration-empty-icon svg { width: 20px; height: 20px; }
.item-collaboration-empty h2 { margin: 0 0 5px; color: #34393f; font-size: 14px; }
.item-collaboration-empty p { max-width: 250px; margin: 0; font-size: 10px; line-height: 1.6; }
.item-collaboration-content { height: 100%; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.item-collaboration-header { flex: 0 0 auto; min-height: 90px; padding: 16px 17px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; background: rgba(255,255,255,.98); }
.item-collaboration-header > div { min-width: 0; }
.item-collaboration-header .eyebrow { margin-bottom: 4px; font-size: 8px; }
.item-collaboration-header h2 { margin: 0; overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.item-collaboration-header p { margin: 4px 0 0; color: var(--muted-foreground); font-size: 9px; }
.item-collaboration-header .icon-button { flex: 0 0 auto; width: 30px; height: 30px; }
.item-collaboration-scroll { min-height: 0; flex: 1 1 auto; padding: 16px 14px 24px; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; background: #fff; }
.item-collaboration-scroll:focus-visible { outline: 2px solid #9ca3af; outline-offset: -3px; }
.item-related-files { margin-bottom: 18px; padding: 10px; border-radius: 13px; background: #f4f5f6; }
.item-related-files > header { margin-bottom: 8px; padding: 0 2px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item-related-files > header > div { display: flex; align-items: center; gap: 6px; }
.item-related-files > header svg { width: 14px; height: 14px; }
.item-related-files > header strong { font-size: 10px; }
.item-related-files > header small { overflow: hidden; color: #747d86; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.item-related-files .comment-file-card { border-color: #e0e3e6; box-shadow: none; }
.item-message-list { min-height: 0; flex: 1 0 auto; display: grid; align-content: start; gap: 14px; }
.item-message-list:has(.item-message-empty), .item-message-list:has(.item-message-loading) { min-height: 100%; }
.item-message-empty { min-height: 300px; padding: 24px; display: grid; place-content: center; justify-items: center; gap: 8px; color: #7b838c; text-align: center; }
.item-message-empty > span { width: 42px; height: 42px; margin-bottom: 4px; border-radius: 13px; display: grid; place-items: center; color: #505860; background: #f1f2f3; }
.item-message-empty svg { width: 19px; height: 19px; }
.item-message-empty strong { color: #2f3439; font-size: 13px; }
.item-message-empty p { max-width: 245px; margin: 0; font-size: 9px; line-height: 1.55; }
.item-message-loading { min-height: 260px; display: grid; place-items: center; color: #7b838c; font-size: 10px; }
.item-message-row { min-width: 0; display: flex; align-items: flex-end; gap: 8px; }
.item-message-row.is-own { flex-direction: row-reverse; }
.item-message-avatar { flex: 0 0 auto; width: 28px; height: 28px; border: 1px solid #e0e3e6; border-radius: 50%; display: grid; place-items: center; color: #59616a; background: #f5f6f7; font-size: 8px; font-weight: 750; }
.item-message-content { min-width: 0; max-width: 82%; display: grid; gap: 4px; }
.item-message-content > header { padding: 0 3px; display: flex; align-items: center; gap: 7px; }
.item-message-content > header strong { font-size: 9px; font-weight: 650; }
.item-message-content > header time { color: #7b838c; font-size: 8px; }
.item-message-row.is-own .item-message-content { justify-items: end; }
.item-message-row.is-own .item-message-content > header { justify-content: flex-end; }
.item-message-bubble { min-width: 72px; padding: 10px 12px; border: 1px solid #e2e4e7; border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.035); }
.item-message-row.is-own .item-message-bubble { border-color: #e5e7e9; border-radius: 14px 14px 4px 14px; background: #f0f1f2; box-shadow: none; }
.item-message-bubble .rich-text-view { font-size: 10px; line-height: 1.55; }
.item-message-bubble .rich-text-view p { margin-bottom: 5px; }
.item-message-bubble .comment-file-card.is-compact { background: rgba(255,255,255,.76); }
.item-comment-composer { flex: 0 0 auto; max-height: 55%; padding: 9px 12px 12px; border-top: 1px solid #eceef0; display: grid; gap: 8px; overflow-y: auto; background: rgba(255,255,255,.98); box-shadow: 0 -10px 24px rgba(20,24,29,.025); }
.item-comment-input-shell { padding: 4px; border: 1px solid #dfe2e5; border-radius: 18px; overflow: hidden; background: #f3f4f5; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.item-comment-input-shell:focus-within { border-color: #dfe2e5; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.item-comment-input-shell .safe-editor { border: 0; border-radius: 14px 14px 7px 7px; background: transparent; box-shadow: none; }
.item-comment-input-shell .safe-editor:focus-within { border-color: transparent; box-shadow: none; }
.editor-toolbar.item-comment-toolbar { min-height: 30px; padding: 4px 5px; border: 0; border-top: 1px solid #e2e4e7; border-radius: 0; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; background: rgba(255,255,255,.64); }
.editor-toolbar.item-comment-toolbar button, .editor-toolbar.item-comment-toolbar label { min-width: 25px; min-height: 24px; height: 24px; padding: 0 5px; font-size: 8px; }
.editor-toolbar.item-comment-toolbar > span { width: 1px; height: 15px; flex: 0 0 1px; }
.item-comment-composer .comment-rich-editor { min-height: 70px; max-height: 130px; padding: 11px 12px 7px; border: 0; border-radius: 0; font-size: 11px; overflow-y: auto; box-shadow: none; }
.item-comment-actions { min-height: 40px; padding: 4px 5px 4px 6px; display: flex; align-items: center; gap: 6px; }
.item-composer-icon-button { flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border: 1px solid #d8dce0; border-radius: 50%; display: grid; place-items: center; color: #565e67; background: rgba(255,255,255,.76); cursor: pointer; }
.item-composer-icon-button:hover, .item-composer-icon-button.drag-active, .item-composer-icon-button.is-active { border-color: #bfc5cb; color: #22272d; background: #fff; }
.item-composer-icon-button svg { width: 16px; height: 16px; }
.item-composer-format-button > span { font-size: 11px; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.item-comment-file-hint { margin-right: auto; color: #a0a4aa; font-size: 8px; }
.button.item-composer-send-button { flex: 0 0 auto; width: 34px; min-width: 34px; min-height: 34px; height: 34px; padding: 0; border-radius: 50%; color: #fff; background: #1b1e22; }
.button.item-composer-send-button:hover { background: #30343a; }
.button.item-composer-send-button:disabled { width: auto; padding: 0 10px; border-radius: 999px; }
.item-composer-send-button svg { width: 15px; height: 15px; }
.item-comment-composer > .comment-file-preview-list { max-height: 150px; overflow-y: auto; }
.item-comment-composer .comment-file-card { min-height: 44px; grid-template-columns: 32px minmax(0, 1fr) auto; border-radius: 12px; background: #f5f6f7; }
.item-comment-composer .comment-file-thumbnail, .item-comment-composer .comment-file-type-icon { width: 32px; height: 32px; }
.item-comment-composer .pending-comment-file > .icon-button { top: 8px; right: 65px; width: 27px; height: 27px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.project-title-cell .person-copy strong { font-size: 12px; }
.project-title-cell .person-copy span { max-width: 260px; }
.project-no { color: #92979e; font-size: 9px; font-variant-numeric: tabular-nums; }
.item-document-stage { display: grid; justify-items: start; gap: 3px; }
.item-shop-cell { text-align: center; }
.item-shop-logo { width: 38px; height: 38px; margin: 0 auto; border: 1px solid #e1e4e7; border-radius: 9px; display: grid; place-items: center; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.035); }
.item-shop-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.item-shop-short-name { display: inline-block; max-width: 48px; overflow: hidden; color: #4d555d; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.item-list-amount { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; }
.item-list-amount span { color: #8b929a; font-size: 8px; font-weight: 650; }
.item-list-amount strong { color: #343a41; font-size: 11px; font-weight: 700; }
.item-list-amount-empty { color: #9ca1a8; }
#items-page .project-amount-heading, #items-page .project-amount-cell { text-align: right; }
#items-page .data-table th { color: #68717b; }
#items-page .item-shop-column select { padding-right: 17px; padding-left: 4px; background-position: right 3px center; }
.item-sort-button { width: fit-content; padding: 4px 0; border: 0; display: inline-flex; align-items: center; gap: 5px; color: inherit; background: transparent; font: inherit; font-weight: inherit; letter-spacing: inherit; white-space: nowrap; cursor: pointer; }
.item-sort-button::after { content: "↕"; color: #adb3ba; font-size: 9px; font-weight: 500; line-height: 1; }
.item-sort-button:hover, .item-sort-button:focus-visible, .item-sort-button.is-active { color: #252b31; }
.item-sort-button:focus-visible { border-radius: 4px; outline: 2px solid rgba(8, 121, 189, .28); outline-offset: 2px; }
.item-sort-button.is-active[data-direction="asc"]::after { content: "↑"; color: #0879bd; }
.item-sort-button.is-active[data-direction="desc"]::after { content: "↓"; color: #0879bd; }
#items-page .item-shop-column .item-sort-button { width: 100%; justify-content: center; }
#items-page .project-amount-heading .item-sort-button { margin-left: auto; justify-content: flex-end; }
#items-page .project-no { color: #626c77; font-size: 11px; font-weight: 700; letter-spacing: .01em; }
#items-page .project-title-cell .person-copy { max-width: 290px; }
#items-page .project-title-cell .project-no { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
#items-page .project-title-cell .person-copy strong,
#items-page .project-title-cell .person-copy > span:last-child { max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#items-page .project-title-cell .person-copy > span:last-child { color: #707984; }
#items-page .item-list-date > span:not(.item-list-date-title),
#items-page .item-list-date small,
#items-page .table-footer,
#items-page .item-collaboration-header p,
#items-page .comment-file-copy span,
#items-page .item-message-content time { color: #707984; }
.item-list-date { min-width: 145px; display: grid; justify-items: start; gap: 2px; }
.item-list-date-title { max-width: 165px; display: flex; align-items: center; gap: 5px; }
.item-list-date-title strong { overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.item-list-date > span:not(.item-list-date-title), .item-list-date small { color: #8e939a; font-size: 8px; white-space: nowrap; }
.item-list-date small { color: #a0a4aa; }
.item-list-date-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #8b9199; }
.item-list-date-dot-completion { background: #3e9860; }
.item-list-date-dot-renewal { background: #d69024; }
.item-list-date.is-today > span:not(.item-list-date-title) { color: #a46713; font-weight: 650; }
.item-list-date.is-past .item-list-date-title strong, .item-list-date.is-past > span:not(.item-list-date-title) { color: #b42318; }
.date-range { display: grid; gap: 2px; color: #60656c; }
.date-range small { color: #9b9fa5; }
.color-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--dot-color, #64748b); }
.config-badge::before { background: var(--badge-color, currentColor); }

.project-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.summary-chip { min-height: 76px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; gap: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.summary-chip i { width: 10px; height: 38px; border-radius: 5px; background: var(--chip-color, #64748b); }
.summary-chip div { display: grid; }
.summary-chip strong { font-size: 20px; letter-spacing: -.04em; line-height: 1.1; }
.summary-chip span { color: var(--muted-foreground); font-size: 10px; }

.project-form-sections { display: block; }
.project-tab-panel { display: none; }
.project-tab-panel.active { display: block; }
.project-tab-panel .form-section + .form-section { margin-top: 14px; }
.project-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 15px; }
.project-approval-request-preview { display: none; }
#project-dialog.approval-mode { width: min(1480px, calc(100vw - 32px)); overflow: hidden; }
#project-dialog.approval-mode #project-form { height: min(900px, calc(100vh - 42px)); display: flex; flex-direction: column; }
#project-dialog.approval-mode .dialog-header, #project-dialog.approval-mode .dialog-footer { flex: 0 0 auto; }
#project-dialog.approval-mode .project-form-sections { min-height: 0; flex: 1 1 auto; overflow: hidden; }
#project-dialog.approval-mode #project-tab-schedule.active { height: 100%; }
.project-approval-layout { height: 100%; display: grid; grid-template-columns: minmax(320px, .82fr) minmax(620px, 1.65fr); gap: 14px; }
.project-approval-request-preview, .project-approval-form-column { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#project-dialog.approval-mode .project-approval-request-preview { padding: 18px; border: 1px solid var(--border); border-radius: 11px; display: block; background: #fcfcfd; }
.project-approval-form-column { padding-right: 3px; }
.approval-request-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.approval-request-heading h3 { margin: 4px 0 0; font-size: 15px; }
.approval-request-title { margin-top: 16px; color: #282c31; font-size: 16px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.approval-request-meta { margin-top: 16px; padding: 13px 14px; border: 1px solid #e2e4e7; border-radius: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 15px; background: #fff; }
.approval-request-meta div { min-width: 0; display: grid; gap: 3px; }
.approval-request-meta span { color: #959aa1; font-size: 9px; }
.approval-request-meta strong { font-size: 11px; overflow-wrap: anywhere; }
.approval-request-section { margin-top: 14px; padding: 15px; border: 1px solid #e2e4e7; border-radius: 9px; background: #fff; }
.approval-request-section h4 { margin: 0 0 10px; color: #747980; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.approval-request-section .attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hours-day-equivalent.has-value { color: #246b49; font-weight: 700; }
.project-span-2 { grid-column: span 2; }
.project-span-3 { grid-column: span 3; }
.project-span-all { grid-column: 1 / -1; }
.form-section { padding: 17px 18px 20px; border: 1px solid var(--border); border-radius: 11px; background: #fcfcfd; }
.form-section h3, .detail-comments h3 { margin: 0 0 4px; font-size: 13px; letter-spacing: -.01em; }
.form-section .field-group { margin-top: 13px; }
.section-heading-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-heading-row > div { display: grid; gap: 3px; }
.section-note { color: #9a9ea5; font-size: 10px; }
.status-fixed-note { display: inline-flex; align-items: center; gap: 6px; color: #986313; font-size: 10px; font-weight: 650; }
.status-fixed-note i { width: 7px; height: 7px; border-radius: 50%; background: #d97706; }
.dialog.create-mode #project-title-field { grid-column: 1 / -1; }

.safe-editor { overflow: hidden; border: 1px solid var(--input); border-radius: 9px; background: #fff; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.safe-editor:focus-within { border-color: #9aa0a7; box-shadow: 0 0 0 3px rgba(32, 35, 39, .08); }
.editor-toolbar { min-height: 40px; padding: 5px 7px; border-bottom: 1px solid var(--border); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; background: #f8f9fa; }
.editor-toolbar > span { width: 1px; height: 20px; margin: 0 3px; background: #dfe2e5; }
.editor-toolbar button { min-width: 31px; min-height: 29px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #555a61; font-size: 10px; font-weight: 600; }
.editor-toolbar button:hover, .editor-toolbar button.active { border-color: #d5d8dc; background: #fff; color: #202327; }
.editor-color-control { min-width: 45px; min-height: 29px; padding: 0 7px; border: 1px solid transparent; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: #555a61; cursor: pointer; }
.editor-color-control:hover { border-color: #d5d8dc; background: #fff; color: #202327; }
.editor-color-control > span { border-bottom: 2px solid currentColor; font-size: 11px; font-weight: 700; line-height: 16px; }
.editor-color-control input { width: 17px; height: 17px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; cursor: pointer; }
.editor-color-control input::-webkit-color-swatch-wrapper { padding: 0; }
.editor-color-control input::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.14); border-radius: 50%; }
.rich-editor { min-height: 170px; max-height: 380px; padding: 14px 15px; overflow: auto; color: #30343a; font-size: 12px; line-height: 1.65; outline: 0; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #a2a6ac; pointer-events: none; }
.rich-editor p { margin: 0 0 8px; }
.rich-editor ul, .rich-editor ol { margin: 6px 0; padding-left: 24px; }
.rich-editor a, .rich-text-view a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }

.item-dates-section { margin-top: 14px; }
.item-dates-section .section-heading-row { align-items: center; }
.item-dates-section .button svg { width: 14px; height: 14px; }
.item-date-list { margin-top: 14px; display: grid; gap: 10px; }
.item-date-empty { min-height: 72px; padding: 13px 15px; border: 1px dashed #c8ccd1; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 11px; color: #8b9097; background: #fafbfc; text-align: left; }
.item-date-empty > span { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: #eceef1; color: #737980; }
.item-date-empty svg { width: 17px; height: 17px; }
.item-date-empty div { display: grid; gap: 2px; }
.item-date-empty strong { color: #5c6168; font-size: 10px; }
.item-date-empty small { color: #969ba2; font-size: 9px; }
.item-date-row { padding: 13px; border: 1px solid #dfe2e5; border-radius: 10px; display: grid; grid-template-columns: 150px minmax(190px, 1fr) 175px 36px; align-items: end; gap: 10px 12px; background: #fff; box-shadow: var(--shadow-sm); }
.form-section .item-date-row .field-group { min-width: 0; margin-top: 0; }
.item-date-note-field { grid-column: 1 / -2; }
.item-date-remove { align-self: end; margin-bottom: 2px; }

.image-dropzone { min-height: 94px; padding: 16px; border: 1px dashed #bdc2c8; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 12px; background: #fafbfc; color: #60656c; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.image-dropzone:hover, .image-dropzone:focus-visible, .image-dropzone.drag-active { border-color: #656b73; background: #f3f5f7; box-shadow: 0 0 0 3px rgba(32, 35, 39, .06); outline: 0; }
.image-dropzone-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: #e9ebee; color: #5d6269; }
.image-dropzone-icon svg { width: 18px; height: 18px; }
.image-dropzone > div { display: grid; gap: 3px; }
.image-dropzone strong { font-size: 11px; }
.image-dropzone small { color: #94989e; font-size: 9px; }
.image-preview-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.image-preview-card { position: relative; min-width: 0; margin: 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #fff; cursor: grab; }
.image-preview-card.dragging { opacity: .4; }
.image-preview-card.drag-over { box-shadow: inset 0 0 0 2px #596068; }
.image-preview-card img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: #eef0f2; }
.image-preview-card figcaption { padding: 7px 8px; display: grid; gap: 2px; }
.image-preview-card figcaption strong, .image-preview-card figcaption small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-card figcaption strong { font-size: 9px; }
.image-preview-card figcaption small { color: #999da3; font-size: 8px; }
.image-preview-card .icon-button { position: absolute; top: 5px; right: 5px; width: 27px; height: 27px; background: rgba(255,255,255,.94); color: #b42318; box-shadow: var(--shadow-sm); }
.image-order { position: absolute; top: 6px; left: 6px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 6px; display: grid; place-items: center; background: rgba(20,23,26,.78); color: #fff; font-size: 8px; }
.attachment-kind-field { width: min(260px, 100%); display: grid; gap: 7px; }
.attachment-kind-field label { color: #5d6269; font-size: 10px; font-weight: 600; }
.check-row { min-height: 38px; margin-top: 12px; display: flex; align-items: center; gap: 9px; color: #454950; font-size: 12px; }
.check-row input { width: 16px; height: 16px; box-shadow: none; }
.multi-check-grid { padding: 7px; border: 1px solid var(--border); border-radius: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; background: #fafafb; }
.multi-check-option { min-width: 0; min-height: 54px; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; display: flex; align-items: center; gap: 9px; background: #fff; cursor: pointer; }
.multi-check-option:hover { border-color: #d6d9dd; }
.multi-check-option:has(input:checked) { border-color: #9ca2aa; background: #f3f4f6; box-shadow: inset 0 0 0 1px #c8ccd1; }
.multi-check-option input { flex: 0 0 auto; width: 16px; height: 16px; box-shadow: none; }
.multi-check-option span { min-width: 0; display: grid; }
.multi-check-option strong, .multi-check-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-check-option strong { font-size: 11px; }
.multi-check-option small { color: #92969d; font-size: 9px; }
.role-active-row { align-self: end; margin-bottom: 2px; }
.section-label { margin: 22px 0 10px; color: #747980; font-size: 11px; font-weight: 650; letter-spacing: .04em; }

.attachment-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.attachment-card { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #f1f2f4; }
.attachment-card img { width: 100%; height: 100%; object-fit: cover; }
.attachment-card.attachment-open, .attachment-open { padding: 0; color: inherit; cursor: zoom-in; }
.attachment-open { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.attachment-open:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: -3px; }
.attachment-card .icon-button { position: absolute; top: 5px; right: 5px; background: rgba(255,255,255,.92); color: #b42318; }
.attachment-kind { position: absolute; left: 5px; bottom: 5px; padding: 2px 6px; border-radius: 10px; background: rgba(20,23,26,.78); color: #fff; font-size: 8px; }

.image-lightbox { width: auto; max-width: none; max-height: none; padding: 0; border: 0; overflow: visible; background: transparent; }
.image-lightbox::backdrop { background: rgba(8, 10, 13, .86); backdrop-filter: blur(3px); }
.image-lightbox-shell { position: relative; display: grid; justify-items: center; gap: 10px; }
.image-lightbox img { max-width: calc(100vw - 64px); max-height: calc(100vh - 96px); border-radius: 10px; display: block; object-fit: contain; background: #111; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.image-lightbox p { max-width: min(760px, calc(100vw - 80px)); margin: 0; overflow: hidden; color: rgba(255,255,255,.82); font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.image-lightbox-close { position: absolute; z-index: 2; top: 10px; right: 10px; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; display: grid; place-items: center; color: #fff; background: rgba(10,12,15,.68); cursor: pointer; }
.image-lightbox-close:hover { background: rgba(10,12,15,.88); }
.image-lightbox-close svg { width: 18px; height: 18px; }

.detail-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.detail-shell { padding: 23px; }
.detail-status-row { margin: -5px 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.detail-view-tabs { margin: 0 0 16px; }
.project-detail-tab-panel { display: none; }
.project-detail-tab-panel.active { display: block; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-panel { padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #fcfcfd; }
.detail-panel-full { grid-column: 1 / -1; }
.detail-panel h3 { margin: 0 0 10px; font-size: 11px; color: #747980; text-transform: uppercase; letter-spacing: .06em; }
.detail-panel p { margin: 0; color: #3f444b; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich-text-view { color: #3f444b; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.rich-text-view p { margin: 0 0 8px; white-space: pre-wrap; }
.rich-text-view p:last-child { margin-bottom: 0; }
.rich-text-view ul, .rich-text-view ol { margin: 5px 0; padding-left: 22px; }
.detail-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.detail-meta-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-meta div { display: grid; gap: 2px; }
.detail-meta span { color: #9a9ea5; font-size: 9px; }
.detail-meta strong { font-size: 11px; font-weight: 600; }
.item-date-detail-list { display: grid; gap: 8px; }
.item-date-detail { min-width: 0; padding: 11px 12px; border: 1px solid #e1e4e7; border-radius: 9px; display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: start; gap: 12px; background: #fff; }
.item-date-detail > div { min-width: 0; display: grid; gap: 2px; }
.item-date-detail strong { font-size: 11px; overflow-wrap: anywhere; }
.item-date-detail span:not(.item-date-type), .item-date-detail small { color: #92979e; font-size: 9px; overflow-wrap: anywhere; }
.item-date-detail small { margin-top: 2px; color: #676c73; }
.item-date-type { width: fit-content; padding: 3px 7px; border-radius: 999px; color: #4e5968; background: #edf0f3; font-size: 8px; font-weight: 700; white-space: nowrap; }
.item-date-type-completion { color: #30633f; background: #e7f4eb; }
.item-date-type-renewal { color: #8a5b14; background: #fff2d8; }
.item-date-detail.is-today { border-color: #e1b86f; background: #fffaf1; }
.item-date-detail.is-past { opacity: .72; }
.schedule-late-text { color: #b42318; }
.project-detail-footer { position: sticky; z-index: 4; bottom: -23px; margin: 20px -23px -23px; padding: 17px 23px 23px; background: rgba(255, 255, 255, .98); box-shadow: 0 -12px 24px rgba(17, 20, 24, .04); }
.completion-empty { padding: 26px 18px; border: 1px dashed #d8dce0; border-radius: 10px; display: grid; justify-items: center; gap: 5px; color: #8d9299; background: #fafbfc; text-align: center; }
.completion-empty strong { color: #555b62; font-size: 12px; }
.completion-empty p { margin: 0; font-size: 10px; }
.detail-comments { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.comment-list { margin-top: 14px; display: grid; gap: 10px; }
.comment-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; background: #fafafb; }
.comment-item header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.comment-item strong { font-size: 11px; }
.comment-item time { color: #9a9ea5; font-size: 9px; }
.comment-item p { margin: 0; font-size: 12px; white-space: pre-wrap; }
.comment-form { margin-top: 12px; display: grid; justify-items: end; gap: 9px; }
.comments-dialog { width: min(940px, calc(100vw - 24px)); }
.comments-section-heading { margin-bottom: 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.comments-section-heading > div { min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.comments-section-heading h3 { margin: 0; font-size: 12px; }
.comments-section-heading p { margin: 3px 0 0; color: var(--muted-foreground); font-size: 9px; line-height: 1.45; }
.comments-section-icon { flex: 0 0 auto; width: 31px; height: 31px; border-radius: 8px; display: grid; place-items: center; background: #edf0f2; color: #596068; }
.comments-section-icon svg { width: 15px; height: 15px; }
.comments-section-count { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #666c73; background: #eceef0; font-size: 8px; font-weight: 700; }
.comment-file-list, .comment-file-preview-list { display: grid; gap: 8px; }
.comment-file-list.in-comment { margin-top: 10px; }
.comment-file-card { min-width: 0; min-height: 58px; padding: 7px 8px; border: 1px solid #e0e3e6; border-radius: 9px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 9px; background: #fff; }
.comment-file-card.is-compact { min-height: 50px; grid-template-columns: 38px minmax(0, 1fr) auto; background: #fdfdfd; }
.comment-file-thumbnail, .comment-file-type-icon { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; display: grid; place-items: center; overflow: hidden; background: #edf0f2; color: #596068; }
.comment-file-card.is-compact .comment-file-thumbnail, .comment-file-card.is-compact .comment-file-type-icon { width: 38px; height: 38px; }
.comment-file-thumbnail { cursor: zoom-in; }
.comment-file-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; }
.comment-file-type-icon { position: relative; }
.comment-file-type-icon svg { width: 20px; height: 20px; }
.comment-file-type-icon b { position: absolute; right: 3px; bottom: 3px; padding: 1px 3px; border-radius: 3px; background: #fff; color: #626970; box-shadow: 0 1px 3px rgba(0,0,0,.1); font-size: 6px; line-height: 1.2; }
.comment-file-copy { min-width: 0; display: grid; gap: 3px; }
.comment-file-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.comment-file-copy span { color: #92979e; font-size: 8px; }
.comment-file-actions { display: flex; align-items: center; gap: 6px; }
.comment-file-actions .icon-button { width: 30px; height: 30px; }
.comment-file-pending { padding: 4px 7px; border-radius: 999px; background: #f0f1f3; color: #747a81; font-size: 8px; font-weight: 700; }
.pending-comment-file { position: relative; }
.pending-comment-file > .icon-button { position: absolute; z-index: 2; top: 14px; right: 76px; width: 29px; height: 29px; color: #b42318; background: #fff; box-shadow: var(--shadow-sm); }
.compact-empty-state { padding: 18px 12px !important; }
.comment-compose-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); justify-items: stretch; gap: 14px; }
.comment-compose-form .field-group { width: 100%; margin: 0; }
.comment-rich-editor { min-height: 126px; max-height: 260px; }
.comment-image-dropzone { min-height: 82px; }
.comment-submit-row { display: flex; justify-content: flex-end; }
.comment-item .rich-text-view { font-size: 11px; }
.comment-item .attachment-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 10px; }
.activity-mini-list { display: grid; gap: 9px; }
.activity-mini-item { display: flex; align-items: flex-start; gap: 9px; }
.activity-mini-item > i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #92979e; }
.activity-mini-item div { display: grid; }
.activity-mini-item strong { font-size: 10px; font-weight: 600; }
.activity-mini-item span { color: #9a9ea5; font-size: 9px; }
.activity-dialog-list { display: grid; gap: 8px; }
.activity-dialog-item { min-height: 52px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: flex-start; gap: 10px; background: #fafafb; }
.activity-dialog-item > i { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #7d838b; }
.activity-dialog-item div { min-width: 0; display: grid; gap: 3px; }
.activity-dialog-item strong { font-size: 11px; font-weight: 600; }
.activity-dialog-item time { color: #999da3; font-size: 9px; }
.item-document-dialog { width: min(800px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.item-document-shell { padding: 23px; }
.item-document-content { display: grid; gap: 14px; }
.item-document-group { padding: 15px; border: 1px solid var(--border); border-radius: 11px; background: #fafafb; }
.item-document-group > header { margin-bottom: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.item-document-group > header div { display: grid; gap: 3px; }
.item-document-group > header h3 { margin: 0; font-size: 13px; }
.item-document-group > header p { margin: 0; color: #8c9198; font-size: 9px; }
.item-document-group > header > span { padding: 3px 7px; border-radius: 999px; background: #e8eaed; color: #656b72; font-size: 8px; font-weight: 700; }
.item-document-version-list { display: grid; gap: 7px; }
.item-document-version { min-width: 0; padding: 10px 11px; border: 1px solid #e0e3e6; border-radius: 9px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; background: #fff; }
.item-document-version.is-current { border-color: #b9bec5; }
.item-document-version-main { min-width: 0; display: flex; align-items: center; gap: 9px; }
.item-document-file-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: #edf0f3; color: #4f565e; }
.item-document-file-icon svg { width: 15px; height: 15px; stroke-width: 1.8; }
.item-document-version-main > div, .item-document-version-meta { min-width: 0; display: grid; gap: 3px; }
.item-document-version-main strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.item-document-version-main span, .item-document-version-meta span { color: #92979e; font-size: 8px; }
.item-document-version-meta { justify-items: end; }
.item-document-version-meta strong { font-size: 10px; white-space: nowrap; }
.item-document-future-note { margin: 0; color: #999da3; font-size: 9px; text-align: center; }
.item-document-create { padding: 12px; border: 1px dashed #cfd3d8; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; }
.item-document-create div { display: grid; gap: 3px; }
.item-document-create strong { font-size: 10px; }
.item-document-create span { color: #92979e; font-size: 8px; }
.item-document-version-actions { display: flex; align-items: center; gap: 7px; }
.receipt-proof-dropzone { min-height: 106px; }
.receipt-proof-summary { min-width: 0; margin-top: 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; gap: 9px; background: #fafafb; }
.receipt-proof-file-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: #e9ebee; color: #555c64; }
.receipt-proof-file-icon svg { width: 15px; height: 15px; }
.receipt-proof-summary > div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.receipt-proof-summary strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.receipt-proof-summary small { color: #92979e; font-size: 8px; }
.receipt-proof-summary .icon-button { flex: 0 0 auto; width: 30px; height: 30px; color: #a92515; }
.receipt-lock-warning { margin: 18px 0 0; padding: 10px 11px; border: 1px solid #ead8b2; border-radius: 8px; background: #fffaf0; color: #765713; font-size: 10px; line-height: 1.45; }
.receipt-lock-warning code { font-size: 9px; }

.calendar-controls { display: flex; align-items: center; gap: 10px; }
.calendar-controls > select { width: 170px; }
.tabs-list { width: fit-content; padding: 3px; border-radius: 9px; display: flex; gap: 2px; background: #e9ebee; }
.tab-trigger { min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #6f747b; font-size: 11px; font-weight: 600; }
.tab-trigger.active { background: #fff; color: #202327; box-shadow: var(--shadow-sm); }
.calendar-card { overflow: hidden; }
.calendar-toolbar { min-height: 58px; padding: 0 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.calendar-toolbar h2 { width: 150px; margin: 0 8px; font-size: 14px; }
.calendar-view-badge { margin-left: auto; padding: 4px 9px; border-radius: 20px; background: #f0f2f5; color: #6e737a; font-size: 10px; font-weight: 600; }
.calendar-scroll { overflow: auto; }
.schedule-calendar { min-width: 840px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays div { height: 38px; border-bottom: 1px solid var(--border); display: grid; place-items: center; color: #8e9399; background: #fafafb; font-size: 10px; font-weight: 650; }
.calendar-day { min-height: 126px; padding: 8px; border-right: 1px solid #eceef0; border-bottom: 1px solid #eceef0; background: #fff; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: #fafafb; color: #b5b8bd; }
.calendar-day.rest-day { background: #f7f8fa; }
.calendar-day.holiday { background: #fff7f5; }
.calendar-day.today { box-shadow: inset 0 0 0 1px #9da2a8; }
.calendar-day-heading { display: flex; align-items: center; gap: 5px; min-width: 0; }
.calendar-day-number { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; font-size: 10px; font-weight: 600; }
.calendar-holiday-label { min-width: 0; overflow: hidden; color: #b42318; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.calendar-day.today .calendar-day-number { background: var(--primary); color: #fff; }
.calendar-events { margin-top: 5px; display: grid; gap: 3px; }
.calendar-event { width: 100%; padding: 4px 6px; border: 0; border-left: 3px solid var(--event-color, #64748b); border-radius: 5px; background: color-mix(in srgb, var(--event-color, #64748b) 9%, white); text-align: left; overflow: hidden; }
.calendar-event strong, .calendar-event span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event strong { font-size: 9px; }
.calendar-event span { color: #7f848b; font-size: 8px; }

.settings-layout { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-tabs { width: 100%; padding: 5px; flex-direction: column; }
.settings-tabs .tab-trigger { width: 100%; text-align: left; }
.setting-name-cell { display: flex; align-items: center; gap: 9px; }
.setting-color-swatch { width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(0,0,0,.08); background: var(--setting-color); }

.permission-grid { display: grid; gap: 16px; }
.permission-group { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fcfcfd; }
.permission-group h3 { margin: 0 0 10px; font-size: 12px; }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; }
.permission-option { min-height: 34px; display: flex; align-items: center; gap: 8px; color: #4d5259; font-size: 11px; }
.permission-option input { width: 16px; height: 16px; box-shadow: none; }

@media (max-width: 1050px) {
  .project-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar-filters-wide { flex-wrap: wrap; }
  .project-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #project-dialog.approval-mode { overflow: auto; }
  #project-dialog.approval-mode #project-form { height: auto; display: block; }
  #project-dialog.approval-mode .project-form-sections { overflow: visible; }
  #project-dialog.approval-mode #project-tab-schedule.active { height: auto; }
  .project-approval-layout { height: auto; grid-template-columns: 1fr; }
  .project-approval-request-preview, .project-approval-form-column { overflow: visible; }
  .project-span-3 { grid-column: 1 / -1; }
  .image-preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .items-workspace, .items-workspace.has-collaboration { grid-template-columns: 1fr; }
  .item-collaboration-panel { position: relative; top: auto; height: min(700px, calc(100dvh - 110px)); }
}

@media (max-width: 820px) {
  .calendar-heading { align-items: stretch; }
  .calendar-controls { flex-wrap: wrap; }
  .calendar-controls > select { flex: 1; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-tabs { flex-direction: row; width: fit-content; }
  .multi-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-financial-summary { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .project-summary { grid-template-columns: 1fr 1fr; }
  .summary-chip { min-height: 68px; padding: 12px; }
  .toolbar-filters-wide select { width: 100%; flex-basis: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-panel-full { grid-column: auto; }
  .detail-meta { grid-template-columns: 1fr; }
  .detail-meta-wide { grid-template-columns: 1fr; }
  .project-detail-footer { flex-wrap: wrap; }
  .project-detail-footer .button { flex: 1 1 150px; }
  .attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comment-item .attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-options { grid-template-columns: 1fr; }
  .calendar-controls { align-items: stretch; flex-direction: column; }
  .calendar-controls > select { width: 100%; }
  .project-form-grid { grid-template-columns: 1fr; }
  .project-span-2, .project-span-3, .project-span-all { grid-column: auto; }
  .dialog.create-mode #project-title-field { grid-column: auto; }
  .editor-toolbar > span { display: none; }
  .rich-editor { min-height: 150px; }
  .image-dropzone { align-items: flex-start; justify-content: flex-start; }
  .image-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .multi-check-grid { grid-template-columns: 1fr; }
  .item-dates-section .section-heading-row { align-items: stretch; flex-direction: column; }
  .item-dates-section .section-heading-row .button { width: 100%; }
  .item-date-row { grid-template-columns: 1fr 42px; }
  .item-date-row .field-group { grid-column: 1 / -1; }
  .item-date-row > .field-group:nth-child(1) { grid-column: 1; grid-row: 1; }
  .item-date-label-field { grid-row: 2; }
  .item-date-row > .field-group:nth-child(3) { grid-row: 3; }
  .item-date-note-field { grid-column: 1 / -1; grid-row: 4; }
  .item-date-remove { grid-column: 2; grid-row: 1; justify-self: end; }
  .item-date-detail { grid-template-columns: 1fr; gap: 7px; }
  .shop-logo-control { align-items: stretch; flex-direction: column; }
  .shop-logo-preview { width: 100%; height: 100px; }
  .item-document-version { grid-template-columns: minmax(0, 1fr) auto; }
  .item-document-version-meta { display: none; }
  .item-document-version .button { grid-column: 1 / -1; width: 100%; }
  .comment-file-card { grid-template-columns: 42px minmax(0, 1fr); }
  .comment-file-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .comment-file-actions .button { width: auto; }
  .pending-comment-file > .icon-button { top: 8px; right: 8px; }
  .item-collaboration-panel { min-height: 520px; }
  .item-comment-toolbar { overflow-x: auto; flex-wrap: nowrap; }
  .item-comment-toolbar > span { display: block; flex: 0 0 1px; }
  .item-comment-file-hint { display: none; }
}

@media (max-width: 1050px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .activity-card { min-height: auto; }
}

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { padding: 30px 22px; }
  .mobile-brand { display: flex; }

  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: 10px 0 30px rgba(16, 24, 40, .12); }
  .sidebar.open { transform: translateX(0); }
  .account-menu { right: 0; bottom: calc(100% + 8px); left: 0; width: auto; transform-origin: bottom center; }
  .main-column { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { padding: 0 18px; justify-content: flex-start; gap: 12px; }
  .topbar-actions { margin-left: auto; }
  .main-content { padding: 27px 20px 50px; }
  body.item-collaboration-drawer-open, body.project-collaboration-drawer-open { overflow: hidden; }
  .item-collaboration-backdrop { position: fixed; z-index: 54; inset: 0; display: block; background: rgba(15, 18, 22, .42); backdrop-filter: blur(1px); }
  .item-collaboration-panel { position: fixed; z-index: 55; inset: 0 0 0 auto; top: 0; width: min(380px, 100vw); height: 100dvh; min-height: 0; max-height: none; border-width: 0 0 0 1px; border-radius: 14px 0 0 14px; transform: translateX(102%); visibility: hidden; animation: none; transition: transform .22s cubic-bezier(.2,.8,.2,1), visibility .22s; box-shadow: -18px 0 48px rgba(16,24,40,.16); }
  .item-collaboration-panel.is-open { transform: translateX(0); visibility: visible; }
}

@media (max-width: 620px) {
  .status-dot-wrap { display: none; }
  .page-heading { flex-direction: column; align-items: stretch; }
  .page-heading .button { width: 100%; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 120px; padding: 16px; }
  .metric-value { font-size: 26px; }
  .metric-hint { line-height: 1.3; }
  .compact-row { grid-template-columns: 1fr 75px; }
  .compact-row > :nth-child(2) { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-wrap { width: 100%; }
  .toolbar-filters { width: 100%; }
  .toolbar-filters select { flex: 1; width: auto; min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-full { grid-column: auto; }
  .customer-primary-grid { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
