/* Геометрия раздела. Общие компоненты определяются в aart-ui. */
@layer aart-legacy {
/* Самостоятельная оболочка A·ART: рабочий кабинет и обзор для заказчика. */
.workspace { --canvas: #f8f9fc; }
.cabinet-switch { display: inline-flex; flex: 0 0 auto; gap: 3px; padding: 4px; border: 1px solid #e9eaf2; border-radius: 12px; background: #f3f3f8; }
.cabinet-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.cabinet-switch button[aria-pressed="true"] { background: #fff; color: #6421ed; box-shadow: 0 1px 4px rgba(32,35,41,.1); }
.cabinet-switch .icon { width: 16px; height: 16px; }
.cabinet-switch button:focus-visible, .cabinet-breadcrumb button:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.cabinet-sidebar-content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.sidebar-current { margin: 0 0 22px; }
.sidebar-current > span { display: block; margin: 0 6px 8px; color: #7b8495; font-size: 11px; font-weight: 600; }
.sidebar-current-card { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fafaff; }
.sidebar-project-avatar { display: flex; flex: 0 0 36px; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 9px; background: #eee7ff; color: #6421ed; font-size: 18px; font-weight: 650; }
.sidebar-current-card > div { min-width: 0; }
.sidebar-current-card strong { display: block; font-size: 12px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-current-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.cabinet-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; color: #7b8495; font-size: 12px; font-weight: 400; }
.cabinet-breadcrumb strong { color: #576174; font-weight: 600; }
.cabinet-breadcrumb button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.cabinet-breadcrumb button:hover { color: var(--purple); }
.designer-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 0 0 25px; }
.designer-summary > div { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 13px; align-items: center; padding: 20px; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; }
.designer-summary .icon { grid-row: 1 / 3; width: 40px; height: 40px; padding: 10px; border-radius: 11px; color: #6421ed; background: #f0ebff; }
.designer-summary strong { font-size: 24px; font-weight: 650; line-height: 1.2; }
.designer-summary span { color: var(--muted); font-size: 12px; }
.project-title-actions { display: flex; align-items: center; gap: 20px; flex: 0 0 auto; }
.project-title-actions .button { min-height: 40px; padding: 10px 14px; font-size: 12px; }
.customer-home-view, .customer-project-view { max-width: 1440px; margin: 0 auto; padding: 36px clamp(28px,3vw,54px) 60px; }
.customer-home-view > .cabinet-breadcrumb, .customer-project-view > .cabinet-breadcrumb { margin-bottom: 14px; }
.customer-home-view .home-heading h1, .customer-project-view .home-heading h1 { margin-top: 0; font-size: 36px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.customer-project-view .home-heading { align-items: flex-start; margin-bottom: 30px; }
.customer-project-card { min-height: 210px; }
.customer-empty { padding: 80px 40px; border-style: solid; }
.customer-empty > .icon { width: 58px; height: 58px; padding: 15px; border-radius: 16px; color: #6421ed; background: #f0ebff; }
.customer-empty p { max-width: 510px; font-size: 14px; }
.customer-empty strong { color: var(--text); }
.cabinet-readonly { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 13px; margin-top: 8px; border-radius: 9px; background: #f0ebff; color: #6421ed; font-size: 12px; }
.cabinet-readonly .icon { width: 15px; height: 15px; }
.customer-overview-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 22px; }
.cabinet-panel { min-width:0; padding: 26px; border: 1px solid var(--line-strong); border-radius: 16px; background: #fff; }
.cabinet-panel-heading { display: flex; align-items: center; gap: 9px; padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); margin-bottom: 22px; }
.cabinet-panel-heading > .icon { color: #6421ed; width: 19px; height: 19px; }
.cabinet-panel h2 { margin: 0; font-size: 18px; font-weight: 650; }
.customer-formats { display: flex; flex-direction: column; gap: 15px; }
.customer-format { display: flex; align-items: center; gap: 16px; }
.customer-format > span { display: flex; flex:0 0 52px; align-items: center; justify-content: center; width: 52px; height: 64px; border: 1px solid #dcd2f5; border-radius: 9px; background: #f7f4ff; color: #6421ed; }
.customer-format > div { min-width:0; overflow-wrap:anywhere; }
.customer-format strong { font-size: 15px; }
.customer-format p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.customer-meta { display: flex; flex-direction: column; gap: 15px; margin: 0; }
.customer-meta > div { display: grid; grid-template-columns: minmax(130px,.9fr) minmax(0,1fr); gap: 15px; font-size: 13px; }
.customer-meta dt { color: var(--muted); }
.customer-meta dd { margin: 0; overflow-wrap: anywhere; }
.customer-next { display: flex; gap: 20px; align-items: center; margin-top: 24px; padding: 27px 30px; border: 1px solid var(--line-strong); border-radius: 16px; background: #fff; }
.customer-next-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 13px; background: #f0ebff; color: #6421ed; }
.customer-next h2 { font-size: 18px; margin: 0 0 7px; font-weight: 650; }
.customer-next p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0; max-width: 740px; }
.cabinet-loading { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; margin: 20px 0; }
.cabinet-loading .spinner { width: 18px; height: 18px; }
/* Доступ к проекту: общие размеры форм, спокойные секции и видимое закрытие. */
#project-customers-dialog { width:min(680px,calc(100vw - 32px)); max-width:680px; max-height:calc(100dvh - 48px); padding:0; border:1px solid var(--line-strong); border-radius:20px; background:var(--surface,#fff); color:var(--text); font-size:14px; line-height:1.5; overflow:auto; overscroll-behavior:contain; scroll-padding-top:104px; }
#project-customers-dialog .project-customers-heading { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin:0; padding:20px 24px 16px; border-bottom:1px solid var(--line-strong); background:var(--surface,#fff); }
#project-customers-dialog .project-customers-heading>div { min-width:0; }
#project-customers-dialog h2 { margin:0; font-size:22px; font-weight:700; line-height:1.3; letter-spacing:-.02em; overflow-wrap:anywhere; }
#project-customers-dialog .project-customers-project { margin:6px 0 0; color:var(--muted,#6c727b); font-size:13px; font-weight:400; line-height:1.5; overflow-wrap:anywhere; }
#project-customers-dialog .dialog-close { position:static; flex:0 0 44px; width:44px; height:44px; min-height:44px; margin:-4px -8px 0 0; padding:12px; border:0; border-radius:12px; background:transparent; color:var(--muted,#6c727b); }
#project-customers-dialog .dialog-close:hover { background:var(--canvas,#f7f9fb); color:var(--text); }
#project-customers-dialog .dialog-close>.icon { width:20px; height:20px; }
#project-customers-dialog .project-customers-body { padding:24px; }
#project-customers-dialog .project-customers-note { margin:0 0 var(--ui-section-gap,24px); padding:12px 16px; border:1px solid var(--line-strong); border-radius:12px; background:var(--canvas,#f7f9fb); color:var(--muted,#6c727b); font-size:13px; line-height:1.6; }
#project-customers-dialog h3 { margin:0; font-size:16px; font-weight:650; line-height:1.4; letter-spacing:0; }
#project-customers-dialog .project-customers-body :is(.project-known-customer,.project-invite-section,.project-customers-members) { min-width:0; margin:0; }
#project-customers-dialog .project-customers-body .project-known-customer { padding:0; border:0; }
#project-customers-dialog .project-customers-body :is(.project-invite-section,.project-existing-customer,.project-customers-members) { margin-top:var(--ui-section-gap,24px); padding:var(--ui-section-gap,24px) 0 0; border:0; border-top:1px solid var(--line-strong); border-radius:0; background:transparent; }
#project-customers-dialog :is(.project-known-customer,.project-invite-section)>p { margin:8px 0 16px; color:var(--muted,#6c727b); font-size:13px; line-height:1.6; }
#project-customers-dialog label { display:block; min-width:0; margin:0; color:var(--text); font-size:var(--ui-label-font,12px); font-weight:600; line-height:1.5; }
#project-customers-dialog :is(input,select) { box-sizing:border-box; display:block; width:100%; min-width:0; max-width:100%; height:var(--ui-control-height,44px); min-height:var(--ui-control-height,44px); margin:8px 0 0; padding:10px 12px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface,#fff); color:var(--text); font-family:inherit; font-size:var(--ui-control-font,14px); font-weight:400; line-height:1.5; }
#project-customers-dialog input::placeholder { color:var(--muted,#6c727b); opacity:1; }
#project-customers-dialog .button { min-height:var(--ui-control-height,44px); max-width:100%; margin:0; padding:10px 16px; border-radius:12px; font-size:var(--ui-control-font,14px); font-weight:600; line-height:1.5; white-space:normal; }
#project-customers-dialog .button-primary { background:var(--primary,#6410f5); border-color:var(--primary,#6410f5); }
#project-customers-dialog .button-primary:hover:not(:disabled) { background:var(--color-purple-deep,#5000d4); border-color:var(--color-purple-deep,#5000d4); }
#project-customers-dialog :is(.form-hint,.form-error,.cabinet-loading) { margin:8px 0 0; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
#project-customers-dialog .form-hint { color:var(--muted,#6c727b); }
#project-customers-dialog .form-error { color:var(--red); }
#project-customers-dialog :is(input,select,.button,.text-button,summary,.dialog-close):focus-visible { outline:2px solid var(--primary,#6410f5); outline-offset:3px; }
#project-customers-dialog .project-customer-known-search-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:12px; margin:16px 0; }
#project-customers-dialog #project-customer-known-form>label { margin:0; }
#project-customers-dialog #project-customer-known-recipient { margin:8px 0 16px; }
#project-customers-dialog #project-customer-known-add { font-size:var(--ui-control-font,14px); }
#project-customers-dialog #project-customer-known-more { margin-top:12px; }
#project-customers-dialog .project-invite-create-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:12px; }
#project-customers-dialog .project-invite-create-row>label { display:block; }
#project-customers-dialog .project-invite-share { margin-top:16px; padding-top:16px; border-top:1px solid var(--line-strong); }
#project-customers-dialog .project-invite-share>label { margin:0 0 8px; }
#project-customers-dialog .project-invite-url-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:12px; }
#project-customers-dialog .project-invite-url-row>input { width:100%; margin:0; }
#project-customers-dialog .project-invite-share>p { margin:8px 0 0; color:var(--muted,#6c727b); font-size:12px; line-height:1.6; }
#project-customers-dialog #project-invite-list { margin-top:16px; }
#project-customers-dialog .project-customers-body .project-invite-membership-note { margin:12px 0 0; font-size:12px; }
#project-customers-dialog .project-existing-customer>summary { width:fit-content; max-width:100%; color:var(--primary,#6410f5); font-size:14px; font-weight:600; line-height:1.5; cursor:pointer; }
#project-customers-dialog .project-existing-customer>form { margin-top:16px; }
#project-customers-dialog .project-customer-add-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:12px; margin-top:8px; }
#project-customers-dialog .project-customer-add-row>input { margin:0; }
#project-customers-dialog .project-customers-list { margin-top:12px; }
#project-customers-dialog :is(.project-customer,.project-invite-row) { display:flex; align-items:center; gap:12px; padding:16px 0; border-top:1px solid var(--line-strong); }
#project-customers-dialog :is(.project-customer,.project-invite-row):first-child { padding-top:0; border-top:0; }
#project-customers-dialog .customer-person-avatar { display:inline-flex; flex:0 0 40px; width:40px; height:40px; align-items:center; justify-content:center; border-radius:12px; background:var(--accent-soft,#f1ebff); color:var(--primary,#6410f5); font-size:14px; font-weight:600; }
#project-customers-dialog :is(.project-customer,.project-invite-row)>div { flex:1; min-width:0; overflow-wrap:anywhere; }
#project-customers-dialog :is(.project-customer,.project-invite-row) strong { display:block; font-size:14px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
#project-customers-dialog :is(.project-customer,.project-invite-row) small { display:block; margin-top:4px; color:var(--muted,#6c727b); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
#project-customers-dialog :is(.project-customer,.project-invite-row)>.text-button { flex:0 0 auto; max-width:45%; padding:8px 0; color:var(--red); font-size:12px; line-height:1.5; white-space:normal; text-align:right; }
#project-customers-dialog .project-customers-empty { margin:0; padding:12px 16px; border:1px solid var(--line-strong); border-radius:12px; background:var(--canvas,#f7f9fb); color:var(--muted,#6c727b); font-size:13px; line-height:1.6; }
@media(max-width:560px) {
  #project-customers-dialog { width:calc(100vw - 24px); max-height:calc(100dvh - 24px); border-radius:16px; }
  #project-customers-dialog .project-customers-heading { padding:20px 20px 16px; }
  #project-customers-dialog .project-customers-body { padding:20px; }
  #project-customers-dialog .project-invite-create-row { grid-template-columns:minmax(0,1fr); }
  #project-customers-dialog .project-invite-create-row>.button { justify-self:start; }
  #project-customers-dialog :is(.project-customer-add-row,.project-invite-url-row) { grid-template-columns:minmax(0,1fr); }
  #project-customers-dialog .project-invite-url-row>.button { justify-self:start; }
  #project-customers-dialog .project-customer { flex-wrap:wrap; }
  #project-customers-dialog .project-customer>.text-button { max-width:100%; margin-left:52px; }
}
@media(max-width:360px) {
  #project-customers-dialog .project-customers-heading { padding-inline:16px; }
  #project-customers-dialog .project-customers-body { padding:16px; }
  #project-customers-dialog .project-customer-known-search-row { grid-template-columns:minmax(0,1fr); }
  #project-customers-dialog .project-customer-known-search-row>.button { justify-self:start; }
  #project-customers-dialog .project-invite-row { flex-wrap:wrap; }
  #project-customers-dialog .project-invite-row>.text-button { max-width:100%; text-align:left; }
}
/* Текущий этап разработки — ПК. Мобильная компоновка продолжит прежний baseline. */
@media (min-width: 1100px) {
  .workspace { --sidebar-width: 248px; }
  .topbar { gap: 18px; padding-left: 24px; padding-right: 24px; border-bottom: 1px solid var(--line-strong); }
  .topbar > .brand { min-width: calc(var(--sidebar-width) - 24px); }
  .topbar-location { font-size: 12px; }
  .topbar-actions { gap: 12px; }
  .topbar-actions > .button { font-size: 12px; padding-left: 11px; padding-right: 11px; }
  .sidebar { padding: 25px 16px 18px; border-right: 1px solid var(--line-strong); }
  .sidebar-heading { margin-top: 4px; margin-bottom: 15px; }
  .sidebar-heading h2 { font-size: 13px; }
  .projects-home-button { margin-bottom: 18px; padding: 10px 12px; min-height: 40px; border-radius: 9px; background: #f0ebff; color: #6421ed; font-weight: 600; }
  .button-new { min-height: 43px; padding: 10px 13px; border-radius: 10px; font-size: 12px; margin-bottom: 17px; }
  .project-search { min-height: 40px; border-radius: 10px; font-size: 12px; }
  .project-list { margin-top: 14px; }
  .project-item { padding: 11px 10px; border-radius: 10px; }
  .project-item-text strong { font-size: 12px; }
  .project-item-text small { font-size: 10px; }
  .projects-home-view { padding: 36px clamp(28px,3vw,54px) 60px; }
  .home-heading { margin-bottom: 27px; }
  .home-heading h1 { font-size: 38px; font-weight: 650; line-height: 1.25; margin: 16px 0 9px; }
  .home-heading p { margin: 0; }
  .home-resume { padding: 23px 27px; background: #fff; border-color: var(--line-strong); }
  .home-resume .section-kicker { font-size: 10px; letter-spacing: .1em; }
  .home-resume h2 { font-size: 23px; }
  .home-projects { grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); }
  .home-project-card { padding: 22px; }
  .project-titlebar { padding-left: 32px; padding-right: 32px; }
}

/* Обзор заказчика остаётся читаемым на узком экране. */
@media(max-width:900px) {
  .workspace .customer-overview-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
  .workspace .customer-project-view .home-heading { flex-wrap:wrap; gap:12px; }
  .workspace .customer-project-view .home-heading>div { min-width:0; }
  .workspace .cabinet-panel { padding:22px; }
  .workspace .customer-meta>div { grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:12px; }
}
@media(max-width:560px) {
  .workspace .cabinet-panel { padding:20px; }
  .workspace .cabinet-panel-heading { gap:8px; margin-bottom:18px; padding-bottom:16px; }
  .workspace .cabinet-panel-heading>.icon { flex:none; }
  .workspace .cabinet-panel h2 { font-size:17px; }
  .workspace .customer-meta>div { grid-template-columns:minmax(0,1fr); gap:5px; font-size:13px; line-height:1.6; }
  .workspace .customer-meta dd { min-width:0; overflow-wrap:break-word; }
  .workspace .customer-format { gap:12px; }
  .workspace .customer-format strong { font-size:14px; }
  .workspace .customer-project-view .cabinet-readonly { white-space:normal; }
}
}
