/* Out Sales360 company app: shared styles. Archivo Narrow, regular weight, white or navy text only. */
*{box-sizing:border-box;font-weight:400}
html,body{margin:0;min-height:100%}
body{font-family:'Archivo Narrow',Arial,sans-serif;color:#fff;font-size:16px;line-height:1.4;background:radial-gradient(900px 600px at 85% -5%,rgba(240,92,245,.28),rgba(240,92,245,0) 70%),radial-gradient(900px 700px at 0% 100%,rgba(75,21,111,.7),rgba(75,21,111,0) 70%),#0C0826;background-attachment:fixed}
h1,h2,h3,p{margin:0}
a{color:#fff;text-decoration:none}
button,input,select{font-family:inherit;font-size:16px;color:#fff}
.hide{display:none!important}

.glass{background:rgba(26,16,66,.78);border:1px solid #3A2A82;border-radius:18px;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;padding:11px 18px;min-height:46px;cursor:pointer;color:#fff;border:0;transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.btn:hover{transform:translateY(-3px)}
.btn:active{transform:translateY(2px);box-shadow:none!important}
.btn[disabled]{cursor:wait;transform:none}
.btn-solid{background:#F05CF5;color:#0C0826;box-shadow:0 5px 0 #A12DA6}
.btn-line{background:#1A1042;border:2px solid #fff;box-shadow:0 5px 0 #331EB8}
.btn-icon{padding:11px 14px;position:relative}
.badge{position:absolute;top:-8px;right:-8px;min-width:22px;height:22px;border-radius:999px;background:#F05CF5;color:#0C0826;font-size:13px;display:flex;align-items:center;justify-content:center;padding:0 6px}

/* form */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:15px}
.input{background:#1A1042;border:1px solid #3A2A82;border-radius:12px;padding:0 14px;min-height:48px;outline:0;width:100%;transition:border-color .15s ease,box-shadow .15s ease}
.input:focus{border-color:#F05CF5;box-shadow:0 0 0 3px rgba(240,92,245,.35)}
.input::placeholder{color:#fff;opacity:1}
select.input{appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,#fff 50%),linear-gradient(135deg,#fff 50%,transparent 50%);background-position:calc(100% - 20px) 21px,calc(100% - 14px) 21px;background-size:6px 6px;background-repeat:no-repeat;padding-right:38px}
option{background:#1A1042;color:#fff}
.link{border-bottom:1px solid #fff;cursor:pointer;background:none;border-top:0;border-left:0;border-right:0;padding:0}
.chip{display:inline-block;border:1px solid #fff;border-radius:999px;padding:2px 10px;font-size:13px;white-space:nowrap}

/* sign-in */
.auth{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.auth-card{width:100%;max-width:440px;padding:32px 28px;display:flex;flex-direction:column;gap:20px}
.brand{display:flex;align-items:center;gap:12px;font-size:25px}

/* shell */
.shell{display:flex;min-height:100vh}
.side{flex:0 0 260px;padding:22px 16px;display:flex;flex-direction:column;gap:22px;background:rgba(12,8,38,.78);border-right:1px solid #3A2A82;position:sticky;top:0;height:100vh;overflow-y:auto}
.nav{display:flex;flex-direction:column;gap:3px}
.nav-group{font-size:13px;padding:12px 14px 4px}
.nav a{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:12px;transition:transform .15s ease,background .15s ease}
.nav a:hover{background:#2A1C7A;transform:translateY(-2px)}
.nav a:active{transform:translateY(1px)}
.nav a.on{background:#331EB8;box-shadow:0 4px 0 #1B0F6B}
.who{margin-top:auto;padding:14px;display:flex;flex-direction:column;gap:6px}
.who .org{font-size:17px}
.main{flex:1 1 0;min-width:0;padding:20px 28px 48px;display:flex;flex-direction:column;gap:20px}
.top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px}
.top-r{display:flex;flex-wrap:wrap;align-items:center;gap:14px}
.menu-btn{display:none}
.scrim{display:none}

/* plan warnings */
.notices{display:flex;flex-direction:column;gap:12px}
.notices:empty{display:none}
.notice{padding:14px 18px;border-radius:14px;background:rgba(26,16,66,.78);border:1px solid #3A2A82;font-size:16px;line-height:1.45}
.notice.warn{border-color:#fff}
.notice.full{border-color:#FF8FB1;border-width:2px}

/* dashboard */
.page{display:flex;flex-direction:column;gap:20px}
.title h1{font-size:34px}
.title p{margin-top:6px;font-size:17px}
.grid{display:grid;gap:16px}
.kpis{grid-template-columns:repeat(auto-fit,minmax(236px,1fr))}
.kpi{padding:16px 18px;display:flex;flex-direction:column;gap:8px;transition:transform .18s ease,box-shadow .18s ease}
.kpi:hover{transform:translateY(-4px);box-shadow:0 8px 0 #331EB8}
.kpi .l{font-size:15px}
.kpi .v{font-size:34px;line-height:1.05}
.kpi .v small{font-size:18px}
.kpi .d{font-size:14px}
.up{color:#5CE1A8}
.down{color:#FF8FB1}
.cards{grid-template-columns:repeat(auto-fit,minmax(340px,1fr))}
.card{padding:18px 20px;display:flex;flex-direction:column;gap:14px;min-width:0}
.card h2{font-size:21px}
.wide{grid-column:1/-1}
.empty{font-size:16px;padding:14px;border:1px dashed #fff;border-radius:12px}
.bars{display:flex;flex-direction:column;gap:12px}
.bar-row{display:flex;flex-direction:column;gap:5px}
.bar-top{display:flex;justify-content:space-between;gap:12px}
.bar{height:10px;border-radius:999px;background:#130B35;overflow:hidden}
.bar>i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#331EB8,#F05CF5)}
.list{display:flex;flex-direction:column;border-radius:12px;overflow:hidden}
.list>*:nth-child(odd){background:#1E1456}
.list>*:nth-child(even){background:#130B35}
.li{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:12px 14px;transition:background .15s ease}
.li:hover{background:#331EB8!important}
.li .s{font-size:14px}
.chart{width:100%;height:auto;display:block}
.chart text{fill:#fff;font-size:12px;font-family:'Archivo Narrow',Arial,sans-serif}

/* notifications panel */
.panel{position:absolute;right:0;top:56px;width:min(400px,92vw);z-index:30;padding:14px;display:flex;flex-direction:column;gap:10px;background:#1A1042;max-height:70vh;overflow-y:auto}
.rel{position:relative}
.nt{padding:12px 14px;display:flex;flex-direction:column;gap:3px;cursor:pointer;border-radius:12px;transition:background .15s ease}
.nt.un{border-left:4px solid #F05CF5}
.nt .s{font-size:14px}

/* switcher dialog */
.modal{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(12,8,38,.8)}
.dlg{width:100%;max-width:520px;padding:24px;display:flex;flex-direction:column;gap:16px;background:#1A1042;max-height:88vh;overflow-y:auto}
.place{display:flex;flex-direction:column;gap:2px;text-align:left;width:100%;padding:12px 14px;border-radius:12px;background:#130B35;border:1px solid #3A2A82;cursor:pointer;transition:transform .15s ease,background .15s ease}
.place:hover{background:#331EB8;transform:translateY(-2px)}
.place.on{border-color:#F05CF5}
.place .s{font-size:14px}

/* toast: centred mid-page, tilts up in 3D, with a drawn tick */
.toast{position:fixed;left:50%;top:50%;z-index:200;display:flex;align-items:center;gap:14px;padding:18px 26px 18px 18px;border-radius:20px;background:#331EB8;border:2px solid #fff;box-shadow:0 10px 0 #1B0F6B,0 30px 60px rgba(0,0,0,.5);font-size:19px;text-align:left;max-width:min(520px,90vw);pointer-events:none;opacity:0;transform:translate(-50%,-50%) perspective(700px) rotateX(-42deg) scale(.78);transition:opacity .2s ease,transform .2s ease}
.toast.show{opacity:1;transform:translate(-50%,-50%) perspective(700px) rotateX(0) scale(1);transition:opacity .2s ease,transform .5s cubic-bezier(.2,1.5,.4,1)}
.toast.err{background:#7A1346;box-shadow:0 10px 0 #4A0B2B,0 30px 60px rgba(0,0,0,.5)}
.toast-ic{flex:none;width:46px;height:46px;border-radius:50%;background:#F05CF5;color:#1B0F6B;display:grid;place-items:center;box-shadow:0 4px 0 #9B2FA0;transform:scale(0)}
.toast.err .toast-ic{background:#fff;color:#7A1346;box-shadow:0 4px 0 #4A0B2B}
.toast.show .toast-ic{animation:toast-pop .5s .1s cubic-bezier(.2,1.7,.4,1) forwards}
.toast .tk{stroke-dasharray:24;stroke-dashoffset:24}
.toast.show .tk{animation:toast-tick .35s .38s ease forwards}
@keyframes toast-pop{from{transform:scale(0) rotate(-40deg)}to{transform:scale(1) rotate(0)}}
@keyframes toast-tick{to{stroke-dashoffset:0}}

.spin{width:34px;height:34px;border-radius:50%;border:4px solid #3A2A82;border-top-color:#F05CF5;animation:sp .9s linear infinite;margin:40px auto}
@keyframes sp{to{transform:rotate(360deg)}}

/* record pages: toolbar, filters, rows, pager */
.page-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:14px}
.toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.toolbar .search{flex:1 1 280px;min-width:0}
.filter-toggle{display:none}
.filters{display:flex;flex-wrap:wrap;gap:12px;width:100%}
.filters .input{width:auto;min-width:150px;flex:1 1 150px}
.rows{border-radius:14px;overflow:hidden;border:1px solid #3A2A82}
.row{display:grid;grid-template-columns:var(--cols);gap:14px;padding:12px 16px;align-items:center;transition:background .15s ease,box-shadow .15s ease}
.row.head{background:#2A1C7A;font-size:14px;padding-top:10px;padding-bottom:10px}
.row.b{cursor:pointer}
.row.b:nth-child(even){background:#1E1456}
.row.b:nth-child(odd){background:#130B35}
.row.b:hover,.row.b:focus-visible{background:#331EB8;box-shadow:inset 4px 0 0 #F05CF5;outline:0}
.row.b:active{background:#2A1C7A}
.cell{min-width:0;overflow-wrap:anywhere}
.nm{font-size:17px}
.sub{font-size:14px}
.tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.pager{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px}
.pager .btns{display:flex;gap:12px}
.count{font-size:15px}

/* side panel */
.drawer-wrap{position:fixed;inset:0;z-index:70;display:flex;justify-content:flex-end}
.drawer-scrim{position:absolute;inset:0;background:rgba(12,8,38,.8)}
.drawer{position:relative;width:min(580px,100vw);height:100%;display:flex;flex-direction:column;background:#1A1042;border-left:1px solid #3A2A82;border-radius:18px 0 0 18px;animation:slidein .25s ease}
@keyframes slidein{from{transform:translateX(40px);opacity:0}to{transform:none;opacity:1}}
.dr-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid #3A2A82}
.dr-head h2{font-size:24px;min-width:0;overflow-wrap:anywhere}
.dr-body{flex:1 1 auto;overflow-y:auto;padding:20px 22px;display:flex;flex-direction:column;gap:18px}
.dr-foot{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end;padding:14px 22px calc(14px + env(safe-area-inset-bottom));border-top:1px solid #3A2A82;background:#1A1042}
body.noscroll{overflow:hidden}
.dl{display:grid;grid-template-columns:minmax(100px,150px) 1fr;gap:12px 16px}
.dl dt{font-size:14px}
.dl dd{margin:0;overflow-wrap:anywhere}
.sec{display:flex;flex-direction:column;gap:10px}
.sec h3{font-size:18px}
.frm{display:flex;flex-direction:column;gap:18px}
.mrow{display:flex;gap:8px}
.mrow .input{flex:1 1 auto;min-width:0}
.mrow .btn{min-height:48px;padding:0 14px}
.hint{font-size:14px}
.hint:empty{display:none}
.ferr{border:1px solid #FF8FB1;border-radius:12px;padding:12px 14px}
.ta{position:relative}
.ta-list{position:absolute;left:0;right:0;top:100%;margin-top:4px;z-index:5;background:#1A1042;border:1px solid #3A2A82;border-radius:12px;overflow:hidden}
.ta-item{display:block;width:100%;text-align:left;padding:12px 14px;background:none;border:0;cursor:pointer}
.ta-item:hover,.ta-item:focus-visible{background:#331EB8;outline:0}

@media (max-width:900px){
  .filter-toggle{display:inline-flex}
  .filters{display:none}
  .filters.open{display:flex}
  .filters .input{flex:1 1 100%}
  .row{grid-template-columns:1fr;gap:4px;padding:14px 16px}
  .row.head{display:none}
  .cell[data-l]:not(:empty)::before{content:attr(data-l) ': ';font-size:14px}
  .drawer{width:100vw;border-radius:0;border-left:0}
  .dr-head,.dr-body,.dr-foot{padding-left:16px;padding-right:16px}
  .dr-foot .btn{flex:1 1 140px}
  .dl{grid-template-columns:1fr;gap:2px 0}
  .dl dd{margin-bottom:10px}
}

@media (max-width:900px){
  .main{padding:16px 16px 40px}
  .side{position:fixed;left:0;top:0;z-index:60;width:min(300px,86vw);transform:translateX(-102%);transition:transform .25s ease;background:#120A34}
  .side.open{transform:none}
  .scrim.open{display:block;position:fixed;inset:0;z-index:55;background:rgba(12,8,38,.7)}
  .menu-btn{display:inline-flex}
  .title h1{font-size:28px}
  .cards{grid-template-columns:1fr}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .kpi{padding:12px 14px}
  .kpi .l{font-size:14px}
  .kpi .v{font-size:23px}
  .kpi .v small{font-size:15px}
  .kpi .d{font-size:13px}
  .card{padding:16px}
  .top-r{flex:1 1 0;min-width:0;justify-content:flex-end}
  .top-r .grow{flex:1 1 180px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* team and access */
.tabs{display:flex;flex-wrap:wrap;gap:10px}
#tabbody{display:flex;flex-direction:column;gap:16px}
.tab.on{background:#331EB8;border-color:#F05CF5}
.opt{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid #3A2A82;border-radius:12px;background:#130B35;cursor:pointer;transition:background .15s ease,border-color .15s ease}
.opt:hover{background:#331EB8}
.opt.on{border-color:#F05CF5;background:#2A1C7A}
.opt input{flex:none;width:20px;height:20px;margin-top:3px;accent-color:#F05CF5}
.opt .t{display:block}
.opt .s{display:block;font-size:14px}
.checks{display:flex;flex-direction:column;gap:8px}
.chk{display:flex;align-items:center;gap:10px;cursor:pointer;min-height:32px}
.chk input{width:20px;height:20px;accent-color:#F05CF5;flex:none}
.linkbox{display:flex;gap:8px}
.linkbox .input{flex:1 1 auto;min-width:0}
.pm{display:flex;flex-direction:column;gap:10px}
.pm-mod{border:1px solid #3A2A82;border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:8px;background:#130B35}
.pm-acts{display:flex;flex-wrap:wrap;gap:8px 20px}
.acts{display:flex;flex-wrap:wrap;gap:12px}
.pgnote{border:1px solid #3A2A82;border-radius:12px;padding:12px 14px;background:#130B35}
@media (max-width:900px){
  .tabs .tab{flex:1 1 calc(50% - 10px)}
  .linkbox{flex-direction:column}
  .page-head .acts,.page-head .acts .btn{width:100%}
}
