.avatar { display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 50%; background: #f0f2f6; }
.avatar svg { width: 52%; height: 52%; color: #778096; stroke-width: 1.6; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-button, .avatar-button { padding: 0; border: 0; background: transparent; cursor: pointer; }

.button { padding: 11px 16px; border: 0; border-radius: 13px; font-size: 13px; font-weight: 700; cursor: pointer; }
.button-primary, .primary { color: #fff; background: var(--accent); }
.button-secondary, .secondary { background: #eef0f4; }
.danger-button { color: var(--danger); background: #fff0f0; }

.field { display: block; min-width: 0; margin-bottom: 16px; font-size: 12px; font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%; min-width: 0; max-width: 100%; margin-top: 7px; padding: 12px 13px; resize: none; border: 1px solid #dfe2e9;
  border-radius: 13px; outline: 0; background: #fff;
}
.field input[type="time"] {
  display: block; width: 100%; min-width: 0; max-width: 100%; min-inline-size: 0;
  overflow: hidden; appearance: none; -webkit-appearance: none; -webkit-min-logical-width: 0;
}
.field input[type="time"]::-webkit-date-and-time-value { min-width: 0; margin: 0; text-align: left; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #8bb2fa; box-shadow: 0 0 0 3px #e7f0ff; }
.optional { float: right; color: var(--faint); font-size: 9px; font-weight: 500; }
.work-hours { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-width: 0; }
.work-hours > .field { min-width: 0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: #21253c38; backdrop-filter: blur(10px); animation: fade-in .18s; }
.modal { position: relative; width: min(470px, 100%); max-height: calc(100dvh - 40px); padding: 28px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #fff; border-radius: 26px; background: #fffffff5; box-shadow: 0 30px 70px #20263e35; animation: rise-in .22s; }
.modal.account-modal { height: min(760px, calc(100dvh - 40px)); }
.modal-close { position: absolute; top: 16px; right: 18px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #eef0f4; color: #777; font-size: 21px; cursor: pointer; }
.modal-kicker, .section-label, .eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.modal h2 { margin: 0 0 8px; font-size: 23px; }
.modal-copy { margin: 0 0 25px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.image-editor { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.image-editor .avatar { width: 64px; height: 64px; }
.image-editor label { cursor: pointer; }
.account-tabs { display: flex; margin: 22px 0; border-bottom: 1px solid var(--line); }
.account-tabs button { padding: 10px 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #8b93a5; font-size: 12px; cursor: pointer; }
.account-tabs button.active { color: var(--accent); border-color: var(--accent); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 24px; }
.setting-row strong, .danger-zone strong { font-size: 13px; }
.setting-row p, .danger-zone p { margin: 4px 0 0; color: #9299a9; font-size: 11px; line-height: 1.5; }
.team-settings { padding: 22px 0; border-top: 1px solid #eceef2; }
.settings-section-head { margin-bottom: 14px; }
.settings-section-head strong { font-size: 13px; }
.settings-section-head p { margin: 4px 0 0; color: #9299a9; font-size: 11px; line-height: 1.5; }
.settings-member-list { display: grid; gap: 7px; }
.settings-member { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px; border-radius: 13px; background: #f6f7f9; }
.settings-member .avatar { flex: 0 0 auto; width: 34px; height: 34px; }
.settings-member > div { min-width: 0; }
.settings-member strong { display: block; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.settings-member p { margin: 3px 0 0; overflow: hidden; color: #9299a9; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-remove { margin-left: auto; padding: 7px 9px; border: 0; border-radius: 9px; background: #fff0f0; color: var(--danger); font-size: 10px; cursor: pointer; }
.danger-zone { padding-top: 22px; border-top: 1px solid #eceef2; }
.danger-zone .danger-button { margin-top: 15px; }
.danger-zone .button + .button { margin-left: 8px; }
.danger-text { color: var(--danger); }
.switch input { display: none; }
.switch span { position: relative; display: block; width: 42px; height: 25px; border-radius: 99px; background: #d8dbe2; cursor: pointer; transition: .2s; }
.switch span::after { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px #0002; content: ""; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(17px); }
.toast { position: fixed; z-index: 30; bottom: 85px; left: 50%; width: max-content; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px; background: #24283a; color: #fff; box-shadow: 0 8px 25px #0003; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .25s; font-size: 12px; line-height: 1.4; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (max-width: 600px) {
  .work-hours { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 440px) {
  .modal-backdrop { align-items: end; padding: 10px; }
  .modal { width: 100%; max-height: calc(100dvh - 20px); padding: 24px 20px; border-radius: 24px; }
  .modal.account-modal { height: calc(100dvh - 20px); }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .button { min-height: 42px; }
  .settings-member { align-items: flex-start; }
  .field input, .field textarea, .field select { font-size: 16px; }
}
