/* D-CRM — unified minimal product design layer. */
:root {
  color-scheme: light;
  --navy:#1d1d1f;--blue:#0071e3;--bg:#f5f5f7;--line:rgba(0,0,0,.08);
  --muted:#6e6e73;--ink:#1d1d1f;--ink-soft:#424245;--surface:rgba(255,255,255,.94);
  --surface-2:#f2f2f5;--sidebar:#1d1d1f;--sidebar-hover:rgba(255,255,255,.1);
  --sidebar-text:#c7c7cc;--accent:#0071e3;--accent-ink:#0066cc;--accent-soft:#e8f2ff;
  --forest:#248a3d;--forest-soft:#eaf7ed;--danger:#d70015;--danger-soft:#fff0f1;
  --shadow-sm:0 1px 2px rgba(0,0,0,.03),0 1px 8px rgba(0,0,0,.025);
  --shadow-md:0 8px 30px rgba(0,0,0,.08),0 2px 8px rgba(0,0,0,.04);
  --shadow-lg:0 24px 80px rgba(0,0,0,.16),0 8px 24px rgba(0,0,0,.08);
  --radius-sm:12px;--radius-md:16px;--radius-lg:22px;
  --font-sans:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",Inter,system-ui,sans-serif;
  --font-serif:var(--font-sans);--apple-ease:cubic-bezier(.22,1,.36,1)
}
html{scroll-behavior:smooth;background:var(--bg)}
body{min-height:100vh;font-family:var(--font-sans)!important;font-size:15px;letter-spacing:-.012em;background:radial-gradient(circle at 74% -10%,rgba(0,113,227,.055),transparent 32rem),var(--bg)!important;color:var(--ink)!important}
::selection{background:rgba(0,113,227,.18)}
*{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.18) transparent}
*::-webkit-scrollbar{width:9px;height:9px}*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:99px;background:rgba(0,0,0,.17);background-clip:padding-box}
h1,h2,h3,.kpi b,.chartcard h2,.identity h1,.workspace-head h2{font-family:var(--font-sans)!important;letter-spacing:-.035em}
h1{margin:0 0 8px;font-size:clamp(30px,3vw,48px);line-height:1.05;font-weight:720}h2{font-weight:680}a{color:var(--accent-ink)}
button,input,select,textarea{font-family:inherit}
button,.primary-button,.soft-button,.back-button{min-height:42px;border-radius:999px!important;font-weight:620!important;letter-spacing:-.01em;transition:transform .32s var(--apple-ease),box-shadow .32s var(--apple-ease),background-color .22s ease,color .22s ease,border-color .22s ease,opacity .22s ease!important}
button:not(.sidebar-toggle):not(.account-button):not(.catalog-city):not(.tag):hover,.primary-button:hover,.soft-button:hover,.back-button:hover{transform:translateY(-1px) scale(1.012);box-shadow:0 8px 22px rgba(0,0,0,.1)}
button:not(.sidebar-toggle):not(.account-button):active,.primary-button:active,.soft-button:active,.back-button:active{transform:scale(.975);transition-duration:.08s!important}
button:not(.ghost):not(.soft-button):not(.back-button):not(.sidebar-toggle):not(.account-button):not(.catalog-city):not(.tag):not(.chat-user){background:var(--accent);color:#fff}
button.ghost,.soft-button,.back-button{border:1px solid rgba(0,0,0,.055)!important;background:rgba(0,0,0,.045)!important;color:var(--ink)!important;box-shadow:none!important}
button.ghost:hover,.soft-button:hover,.back-button:hover{background:rgba(0,0,0,.075)!important}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(0,113,227,.28)!important;outline-offset:2px}
input,select,textarea,.modalbox input,.modalbox select,.modalbox textarea,.deal-filters input,.deal-filters select,.task-filters input,.task-filters select{border:1px solid rgba(0,0,0,.1)!important;border-radius:12px!important;background:rgba(255,255,255,.96)!important;color:var(--ink)!important;box-shadow:inset 0 1px 1px rgba(0,0,0,.02);transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}
input:focus,select:focus,textarea:focus{border-color:rgba(0,113,227,.62)!important;box-shadow:0 0 0 4px rgba(0,113,227,.1)!important;outline:none}

/* Application shell */
.shell{grid-template-columns:252px minmax(0,1fr)!important;background:transparent;transition:grid-template-columns .45s var(--apple-ease)!important}
.shell.sidebar-collapsed{grid-template-columns:88px minmax(0,1fr)!important}
.shell.sidebar-collapsed .brand{flex-direction:column;align-items:center;gap:12px}
.shell.sidebar-collapsed .brand-short{font-size:12px;white-space:nowrap}
.nav-icon{flex-shrink:0;font-size:18px}
.nav-icon svg{display:block;width:20px;height:20px;flex-shrink:0}
.nav button:focus-visible{outline:2px solid #64b5ff;outline-offset:-2px}
html body .side{position:sticky!important;top:0;height:100vh;overflow:hidden auto;padding:24px 14px!important;background:linear-gradient(180deg,rgba(255,255,255,.035),transparent 18rem),#1d1d1f!important;color:var(--sidebar-text);border-right:1px solid rgba(255,255,255,.035)}
.brand{min-height:48px!important;padding:4px 8px 26px!important;color:#f5f5f7!important;font-size:15px!important;letter-spacing:-.02em!important}.brand span{color:#f5f5f7!important}
.sidebar-toggle{border:1px solid rgba(255,255,255,.09)!important;border-radius:50%!important;background:rgba(255,255,255,.07)!important;box-shadow:none!important;color:#f5f5f7!important}.sidebar-toggle:hover{background:rgba(255,255,255,.14)!important;transform:scale(1.05)}
html body .nav{gap:4px}html body .nav button{min-height:44px;width:100%;padding:10px 13px;border:0;border-radius:12px!important;background:transparent!important;color:#a8a8ad!important;box-shadow:none!important;font-size:14px;font-weight:520!important;transition:color .22s ease,background-color .22s ease,transform .3s var(--apple-ease)!important}
html body .nav button:hover{background:rgba(255,255,255,.07)!important;color:#fff!important;transform:translateX(2px)!important}
html body .nav button.active{background:rgba(255,255,255,.115)!important;color:#fff!important;font-weight:620!important}
html body .nav button.active:before{left:-14px;top:12px;bottom:12px;width:3px;background:#0a84ff!important;box-shadow:0 0 14px rgba(10,132,255,.72)}
.nav-icon{opacity:.76}.nav button.active .nav-icon{opacity:1;color:#64b5ff}.main{min-width:0}
html body .top{height:72px;position:sticky;top:0;z-index:30;padding:0 36px;border-bottom:1px solid rgba(0,0,0,.06)!important;background:rgba(255,255,255,.74)!important;-webkit-backdrop-filter:saturate(180%) blur(22px);backdrop-filter:saturate(180%) blur(22px)}
.top>b{font-size:14px;font-weight:650}.account-button{border-radius:999px!important;color:var(--ink-soft)!important;transition:background .2s ease!important}.account-button:hover{background:rgba(0,0,0,.05)!important;transform:none!important;box-shadow:none!important}
.avatar,.profile-avatar{background-color:#1d1d1f!important;color:#fff!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18),0 2px 8px rgba(0,0,0,.12)}
.platform-switcher select{border-color:rgba(0,0,0,.08)!important;background-color:rgba(255,255,255,.75)!important}
html body .page{width:100%;max-width:1680px;margin:0 auto;padding:42px clamp(22px,3.2vw,54px) 80px}
.view.active{display:block}.view>.row.space:first-child{margin-bottom:24px}.view>.row.space:first-child p{margin:8px 0 0;font-size:16px}

/* Cards and data */
html body .card,html body .item,.developer-group,.achievement-table-card,.achievement-revenue,.achievement-certificates,.integration-card,.communication-card,.smm-card,.document-card{border:1px solid rgba(0,0,0,.065)!important;border-radius:var(--radius-lg)!important;background:rgba(255,255,255,.9)!important;box-shadow:var(--shadow-sm)!important}
html body .card,html body .item,.task-card,.deal-card,.catalog-complex-card,.partner-card{transition:transform .48s var(--apple-ease),box-shadow .48s var(--apple-ease),border-color .3s ease!important}
html body .card:hover,html body .item:hover,.task-card:hover,.deal-card:hover,.catalog-complex-card:hover,.partner-card:hover{border-color:rgba(0,0,0,.1)!important;box-shadow:var(--shadow-md)!important}
.kpis{gap:16px!important}.kpi{min-height:138px;display:grid;align-content:center;padding:24px!important}.kpi b{font-size:clamp(32px,3vw,46px)!important;font-weight:680!important;line-height:1}.kpi .muted{margin-top:9px;font-size:14px}
.dashgrid{gap:16px!important;margin-top:16px!important}.chartcard{min-height:300px;padding:26px!important}.chartcard h2{font-size:22px}.track{height:7px!important;background:#e9e9ed!important}.fill{background:linear-gradient(90deg,#0a84ff,#64b5ff)!important}.donut:after{background:#fff!important}
.task-column,.deal-column,.column{border:1px solid rgba(0,0,0,.055)!important;border-top-width:3px!important;border-radius:18px!important;background:rgba(232,232,237,.52)!important;padding:12px!important}
.task-card,.deal-card,.lead{border:1px solid rgba(0,0,0,.065)!important;border-radius:14px!important;background:rgba(255,255,255,.96)!important;box-shadow:0 1px 3px rgba(0,0,0,.035)!important}
.task-card:hover,.deal-card:hover,.lead:hover{transform:translateY(-2px)!important;box-shadow:0 12px 28px rgba(0,0,0,.085)!important}
.deal-stage,.task-stage,.platform-tag,.notice,.catalog-city{border-radius:999px!important}
.deal-filters,.task-filters,.catalog-searchbar{border:1px solid rgba(0,0,0,.065)!important;border-radius:18px!important;background:rgba(255,255,255,.86)!important;box-shadow:var(--shadow-sm);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.deal-autocomplete,#catalogSuggestions,.catalog-price-panel,.task-scheduler{border-color:rgba(0,0,0,.08)!important;border-radius:16px!important;box-shadow:var(--shadow-lg)!important}.deal-autocomplete button:hover,.catalog-suggestion:hover{background:#f2f2f7!important}
.catalog-complex-card{border-radius:22px!important;box-shadow:var(--shadow-sm)!important}.catalog-complex-photo{border-radius:17px!important}

/* Feature polish */
.achievement-hero{border:1px solid rgba(255,255,255,.12)!important;border-radius:24px!important;background:radial-gradient(circle at 82% 10%,rgba(100,181,255,.34),transparent 22rem),linear-gradient(135deg,#1d1d1f 0%,#28282c 58%,#084f91 140%)!important;color:#fff!important;box-shadow:0 22px 60px rgba(0,0,0,.14)}
.achievement-leader{border-radius:16px!important;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.achievement-periods button.active{background:var(--ink)!important}
.achievement-table th,.report-table th{color:var(--muted)!important;font-size:11px!important;letter-spacing:.04em}.achievement-table td,.report-table td{border-color:rgba(0,0,0,.055)!important}
.chat-layout,.communications-layout{overflow:hidden;border:1px solid rgba(0,0,0,.065)!important;border-radius:24px!important;background:rgba(255,255,255,.92)!important;box-shadow:var(--shadow-sm)}
.chat-users,.communications-list{background:#f5f5f7!important;border-color:rgba(0,0,0,.055)!important}.chat-users .chat-user{border:0!important;border-radius:14px!important;background:transparent!important;color:var(--ink)!important;box-shadow:none!important}.chat-user:hover,.chat-user.active{background:#fff!important;color:var(--ink)!important;box-shadow:0 3px 14px rgba(0,0,0,.06)!important}.chat-user b,.chat-user strong{color:var(--ink)!important}.chat-user small,.chat-user span{color:var(--muted)!important}
.integration-card,.smm-card,.document-card{padding:22px!important}

/* Modal and login */
html body .modal{background:rgba(0,0,0,.28)!important;-webkit-backdrop-filter:saturate(135%) blur(18px)!important;backdrop-filter:saturate(135%) blur(18px)!important;animation:apple-backdrop-in .25s ease}
html body .modalbox,.dialog-card{border:1px solid rgba(255,255,255,.7)!important;border-radius:26px!important;background:rgba(255,255,255,.94)!important;box-shadow:0 34px 100px rgba(0,0,0,.24)!important;animation:apple-modal-in .48s var(--apple-ease)}
html body .login{margin-top:max(7vh,48px);padding:44px;border:1px solid rgba(255,255,255,.75)!important;border-radius:28px!important;background:rgba(255,255,255,.78)!important;box-shadow:0 30px 100px rgba(0,0,0,.12)!important;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.login h1{font-size:30px}

/* Full deal page */
html body .app-shell{grid-template-columns:252px minmax(0,1fr);background:transparent;transition:grid-template-columns .45s var(--apple-ease)}html body .app-shell.sidebar-collapsed{grid-template-columns:88px minmax(0,1fr)}
html body .crm-side{position:sticky;top:0;height:100vh;overflow:hidden auto;padding:24px 14px;background:linear-gradient(180deg,rgba(255,255,255,.035),transparent 18rem),#1d1d1f!important;border-right:1px solid rgba(255,255,255,.035)}
.crm-brand{color:#fff!important;font-size:15px!important}.crm-brand span{color:#fff!important}html body .crm-nav{gap:4px}
html body .crm-nav a{min-height:44px;padding:10px 13px;border-radius:12px;color:#a8a8ad;font-size:14px;font-weight:520;transition:background .22s ease,color .22s ease,transform .3s var(--apple-ease)}
html body .crm-nav a:hover{background:rgba(255,255,255,.07);color:#fff;transform:translateX(2px)}html body .crm-nav a.active{background:rgba(255,255,255,.115);color:#fff}html body .crm-nav a.active:before{background:#0a84ff;box-shadow:0 0 14px rgba(10,132,255,.72)}
html body .crm-top{height:72px;padding:0 36px;border-bottom:1px solid rgba(0,0,0,.06);background:rgba(255,255,255,.74);-webkit-backdrop-filter:saturate(180%) blur(22px);backdrop-filter:saturate(180%) blur(22px)}
html body .deal-page{max-width:1680px;padding:34px clamp(20px,3vw,48px) 64px;gap:20px}
html body .panel{border:1px solid rgba(0,0,0,.065);border-radius:24px;background:rgba(255,255,255,.93);box-shadow:var(--shadow-sm)}
.identity{border-color:rgba(0,0,0,.06)!important;background:linear-gradient(145deg,#fff,#f7f7f9)!important}.identity h1{font-size:30px!important;font-weight:700}
.stage-card{border-left-width:4px!important;border-radius:16px!important;box-shadow:inset 0 0 0 1px rgba(0,0,0,.025)}.stage-card select{background:transparent!important;box-shadow:none!important}.stage-progress i{transition:width .55s var(--apple-ease),background .3s ease!important}
.tag{border-color:rgba(0,113,227,.18)!important;background:var(--accent-soft)!important;color:var(--accent-ink)!important}.tag:hover{border-color:rgba(0,113,227,.38)!important}
.timeline{scroll-behavior:smooth}.timeline-title{border-color:rgba(0,0,0,.06)!important}.event{border-color:rgba(0,0,0,.055)!important}.event-dot{background:#eef5ff!important;color:var(--accent-ink)!important}.event.task-done .event-dot{background:var(--forest-soft)!important;color:var(--forest)!important}
.composer{border-color:rgba(0,0,0,.06)!important;background:rgba(248,248,250,.92)!important}

/* Motion */
@keyframes apple-view-in{from{opacity:0;transform:translateY(13px)}to{opacity:1;transform:translateY(0)}}
@keyframes apple-modal-in{from{opacity:0;transform:translateY(18px) scale(.975)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes apple-backdrop-in{from{opacity:0}to{opacity:1}}@keyframes apple-item-in{from{opacity:0;transform:translateY(10px) scale(.992)}to{opacity:1;transform:translateY(0) scale(1)}}
.view.active .kpis>*,.view.active .dashgrid>*,.view.active .list>*,.view.active .deal-board>*,.view.active .task-board>*,.view.active .catalog-cards>*{transition:transform .48s var(--apple-ease),box-shadow .48s var(--apple-ease),border-color .3s ease}
@media(max-width:900px){html body .page{padding:28px 18px 60px}html body .top{padding:0 18px}.account-name,.platform-switcher label{display:none}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}html body .deal-page{padding:20px 16px 48px}}
@media(max-width:800px){
  html body .shell,html body .shell.sidebar-collapsed{grid-template-columns:minmax(0,1fr)!important}
  html body .side{position:relative!important;top:auto;height:auto;max-width:100vw;display:flex;align-items:center;gap:8px;padding:10px 12px!important;overflow-x:auto!important;overflow-y:hidden!important;background:rgba(29,29,31,.96)!important;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}
  html body .brand,html body .shell.sidebar-collapsed .brand{min-width:auto!important;min-height:44px!important;flex:0 0 auto;flex-direction:row;align-items:center;padding:0 8px 0 0!important}
  html body .brand-full,html body .shell.sidebar-collapsed .brand-full{display:inline!important;white-space:nowrap}
  html body .brand-short,html body .sidebar-toggle{display:none!important}
  html body .nav,html body .shell.sidebar-collapsed .nav{display:flex!important;width:auto;min-width:max-content;overflow:visible}
  html body .nav button,html body .shell.sidebar-collapsed .nav button{width:auto;min-width:auto;max-width:none;padding:10px 12px;justify-content:flex-start;overflow:visible;white-space:nowrap}
  html body .shell.sidebar-collapsed .nav-label{display:inline!important}
  html body .nav button:hover,html body .crm-nav a:hover{transform:none!important}
  html body .crm-side{height:auto;background:rgba(29,29,31,.94)!important;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}
}
@media(max-width:560px){.kpis{grid-template-columns:1fr!important}.kpi{min-height:112px}h1{font-size:32px}html body .modalbox{border-radius:22px!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
.subscription-notice{margin:16px 24px 0;padding:13px 16px;border:1px solid #d8e7fb;border-radius:16px;background:#f3f8ff;color:#1d3557;display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:14px}.subscription-notice.is-expired{border-color:#ead9cf;background:#fff7f2;color:#783d25}.subscription-notice .ghost{white-space:nowrap;text-decoration:none}@media(max-width:720px){.subscription-notice{margin:12px;align-items:flex-start;flex-direction:column}}
