*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;background:#f4f7fb;color:#172033}header{height:68px;background:#fff;border-bottom:1px solid #dfe5ee;display:flex;align-items:center;padding:10px 22px;position:fixed;top:0;left:0;right:0;z-index:5}header img,.logo{width:150px;max-height:46px;object-fit:contain}header div{margin-left:18px;display:flex;flex-direction:column}header small{color:#6b7484;margin-top:3px}.menu{display:none;margin-left:auto}aside{position:fixed;top:68px;bottom:0;width:210px;background:#15243a;padding:18px 10px}nav a{display:block;color:#eaf0f7;text-decoration:none;padding:12px 14px;border-radius:8px;margin:4px 0}nav a:hover{background:#243a59}.content{margin-left:210px;padding:94px 26px 40px;max-width:1500px}.titlebar{display:flex;align-items:center;justify-content:space-between;gap:16px}.panel,.card,.setup-card,.login-card{background:#fff;border:1px solid #dfe5ee;border-radius:12px;padding:20px;box-shadow:0 3px 12px #15243a0d}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:18px 0}.card b{font-size:28px;display:block}.card span{color:#667085}.grid{display:grid;gap:16px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.wide{grid-column:1/-1}label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700}input,select,textarea{width:100%;height:42px;border:1px solid #cfd7e3;border-radius:8px;padding:9px 11px;font:inherit;background:#fff}textarea{height:86px;resize:vertical}.actions{display:flex;gap:10px;align-items:end}.btn{height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0 16px;border:1px solid #b8c4d3;border-radius:8px;background:#fff;color:#172033;text-decoration:none;font-weight:700;cursor:pointer}.btn.primary{background:#1673c9;color:#fff;border-color:#1673c9}.full{width:100%}.tablewrap{overflow:auto;background:#fff;border:1px solid #dfe5ee;border-radius:12px;margin-top:16px}table{width:100%;border-collapse:collapse;min-width:760px}th,td{padding:12px;border-bottom:1px solid #e7ebf1;text-align:center;vertical-align:middle}th{background:#eef3f8;font-size:13px}.left{text-align:left}.success,.warning,.alert{padding:13px 15px;border-radius:8px;margin-bottom:16px}.success{background:#eaf7ef}.warning{background:#fff4d8;border:1px solid #e5c46b}.alert{background:#fdecec}.setup{min-height:100vh;display:grid;place-items:center;padding:24px}.setup-card{width:min(920px,100%)}.login-card{width:min(430px,100%)}.login-card form{display:grid;gap:15px}.setup-card>.logo,.login-card>.logo{display:block;margin:0 auto 15px}h1{margin-top:0}h2{font-size:18px}
@media(max-width:760px){header{padding:9px 14px}header img{width:105px}header div strong{font-size:13px}header small{display:none}.menu{display:block;border:0;background:#eef3f8;border-radius:7px;padding:9px 11px;font-size:20px}aside{display:none;top:68px;width:100%;height:auto;bottom:auto;z-index:4}.navopen aside{display:block}.content{margin-left:0;padding:88px 14px 28px}.grid.two,.cards{grid-template-columns:1fr}.wide{grid-column:auto}.titlebar{align-items:flex-start}.actions{flex-wrap:wrap}.btn{min-width:110px}input,select,textarea,.btn{font-size:16px}table{min-width:680px}.setup{padding:12px}.setup-card{padding:16px}}
.login-links{display:flex;justify-content:center;align-items:center;margin-top:14px;min-height:24px}.login-links a{font-weight:700;text-decoration:none}.login-links a:hover{text-decoration:underline}
.table-actions{display:flex;gap:8px;justify-content:center;align-items:center}.btn.small{height:34px;padding:0 10px;font-size:12px}.check{flex-direction:row;align-items:center;gap:9px;padding-top:28px}.check input{width:18px;height:18px}.recovery-note{margin-top:16px}.recovery-note code,.warning code{display:inline-block;padding:3px 6px;background:#eef3f8;border-radius:5px}.login-links span{font-size:13px;color:#667085;text-align:center}
@media(max-width:760px){.table-actions{justify-content:flex-start}.btn.small{min-width:auto}.check{padding-top:0}}
.storagebox{border:1px solid #dfe5ee;border-radius:10px;padding:14px;background:#f8fafc}.storagebox small,.note{color:#667085;font-weight:400}.hidden{display:none!important}.badge{display:inline-flex;align-items:center;min-height:32px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700}.badge.planned{background:#eef3f8;color:#42526a}.statusgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}.statusgrid>div{border:1px solid #e2e8f0;border-radius:9px;padding:13px}.statusgrid b,.statusgrid span{display:block}.statusgrid span{font-size:13px;color:#667085;margin-top:5px}.btn:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:900px){.statusgrid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.statusgrid{grid-template-columns:1fr}.storagebox{padding:12px}}

.docrow{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:4px 0}.docrow span{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* v0.1.5 Local Connector layout */
.page-subtitle{margin:-8px 0 0;color:#667085;font-size:14px}.connector-title{margin-bottom:16px}.connector-version{background:#eaf7ef;color:#25623a}.connector-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:16px;margin-bottom:16px}.connector-main,.connector-key-card,.connector-settings,.storage-guide{margin:0 0 16px}.connector-layout>.panel{margin:0}.section-heading{display:flex;align-items:flex-start;gap:12px;margin-bottom:18px}.section-heading.compact{margin-bottom:16px}.section-heading h2{margin:0 0 4px}.section-heading p{margin:0;color:#667085;font-size:14px;line-height:1.45}.appicon{width:38px;height:38px;flex:0 0 38px;border:1px solid #d8e2ee;border-radius:9px;background:#f5f8fb;display:inline-flex;align-items:center;justify-content:center}.appicon svg,.btnicon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.appicon.small{width:32px;height:32px;flex-basis:32px}.appicon.small svg{width:18px;height:18px}.connector-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}.connector-status>div{min-height:64px;border:1px solid #e1e7ef;border-radius:9px;padding:11px 12px;display:flex;align-items:center;gap:10px}.connector-status b,.connector-status small{display:block}.connector-status small{color:#667085;margin-top:3px}.status-dot{width:9px;height:9px;border-radius:50%;background:#2f855a;flex:0 0 9px}.connector-download{min-width:240px}.btnicon{display:inline-flex;margin-right:8px}.quick-steps{margin-top:18px;padding-top:16px;border-top:1px solid #e7ebf1}.quick-steps h3{font-size:14px;margin:0 0 9px}.quick-steps ol{margin:0;padding-left:20px;color:#4b5565;font-size:13px;line-height:1.7}.quick-steps code{background:#eef3f8;border-radius:5px;padding:2px 5px}.mono-input{font-family:Consolas,"Courier New",monospace;font-size:13px}.helper{display:block;color:#667085;font-weight:400;font-size:12px;margin-top:7px;line-height:1.45}.connector-fields{max-width:900px}.connector-fields textarea{min-height:110px}.security-note{display:flex;align-items:center;gap:12px;margin-top:16px;padding:13px 14px;border:1px solid #dbe5ef;background:#f8fafc;border-radius:9px}.security-note b,.security-note span{display:block}.security-note span{color:#667085;font-size:13px;margin-top:3px}.form-footer{display:flex;justify-content:flex-end;margin-top:18px;padding-top:16px;border-top:1px solid #e7ebf1}.storage-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.storage-options>div{border:1px solid #e1e7ef;border-radius:9px;padding:14px}.storage-options b,.storage-options span{display:block}.storage-options span{color:#667085;font-size:13px;line-height:1.45;margin-top:5px}
@media(max-width:980px){.connector-layout{grid-template-columns:1fr}.storage-options{grid-template-columns:1fr}}
@media(max-width:760px){.connector-title{align-items:flex-start;flex-direction:column}.connector-layout{gap:12px}.connector-main,.connector-key-card,.connector-settings,.storage-guide{padding:16px}.connector-status{grid-template-columns:1fr}.connector-download{width:100%;min-width:0}.section-heading{gap:10px}.storage-options{gap:9px}.form-footer{justify-content:stretch}.form-footer .btn{width:100%}.page-subtitle{line-height:1.4}}
/* v0.1.6 Local Connector page rearrangement */
.connector-overview,.connector-settings,.storage-guide{margin-bottom:16px}.connector-overview-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.connector-overview-head .section-heading{margin-bottom:0}.connector-ready{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-size:13px;font-weight:700;color:#25623a;background:#eef8f1;border:1px solid #d6eadc;border-radius:8px;padding:9px 11px}.connector-install-row{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(360px,1.2fr);gap:24px;align-items:end;margin-top:20px;padding-top:18px;border-top:1px solid #e7ebf1}.connector-download-area{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.connector-download-area small{color:#667085;font-size:12px}.connector-key-inline{max-width:620px}.quick-instruction{display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));align-items:center;gap:10px;margin-top:18px;padding:12px 14px;background:#f8fafc;border:1px solid #e1e7ef;border-radius:9px;font-size:13px}.quick-instruction>span{padding-left:10px;border-left:1px solid #dfe5ee;color:#4b5565;line-height:1.4}.connector-config-grid{display:grid;grid-template-columns:minmax(220px,300px) minmax(420px,1fr);gap:22px;align-items:start}.connector-config-grid textarea{height:104px;min-height:104px}.connector-bottom-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px;padding-top:16px;border-top:1px solid #e7ebf1}.connector-bottom-row .security-note{margin:0;flex:1}.connector-bottom-row>.btn{flex:0 0 auto;min-width:210px}.storage-guide .storage-options>div{min-height:82px}.connector-title{align-items:flex-end}
@media(max-width:1050px){.quick-instruction{grid-template-columns:1fr 1fr}.quick-instruction>b{grid-column:1/-1}.quick-instruction>span{border-left:0;padding-left:0}.connector-config-grid{grid-template-columns:1fr}.connector-config-grid label:first-child{max-width:360px}}
@media(max-width:760px){.connector-title{align-items:flex-start}.connector-overview-head{display:block}.connector-ready{margin-top:14px}.connector-install-row{grid-template-columns:1fr;gap:16px}.connector-download-area{align-items:stretch}.connector-key-inline{max-width:none}.quick-instruction{grid-template-columns:1fr}.quick-instruction>b{grid-column:auto}.connector-bottom-row{align-items:stretch;flex-direction:column}.connector-bottom-row>.btn{width:100%;min-width:0}.storage-options{grid-template-columns:1fr}.connector-version{margin-top:4px}}

/* v0.1.7 standard material and finish selectors */
.custom-entry{margin-top:8px}.custom-entry.hidden{display:none}
/* v0.1.9 template editing and multi template note picker */
.note-template-block{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:14px;align-items:start;padding:14px;border:1px solid #dfe5ee;border-radius:10px;background:#fbfcfe}.note-template-block textarea{min-height:150px}.template-picker{display:grid;gap:9px}.template-picker select[multiple]{height:150px;padding:6px}.template-picker .btn{width:100%}.template-picker small{color:#667085;font-weight:400;line-height:1.4}.tablewrap a{color:#1668b2;text-decoration:none}.tablewrap a:hover{text-decoration:underline}
@media(max-width:900px){.note-template-block{grid-template-columns:1fr}}
.template-editor{margin-bottom:16px}.template-filters{display:grid;grid-template-columns:minmax(240px,1.5fr) minmax(190px,1fr) minmax(150px,.65fr) auto;gap:14px;align-items:end;margin-bottom:14px}.template-summary{margin:4px 2px 12px;color:#667085;font-size:13px}.template-group{background:#fff;border:1px solid #dfe5ee;border-radius:12px;margin-bottom:12px;overflow:hidden}.template-group>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:15px 18px;font-weight:700;background:#f8fafc}.template-group>summary::-webkit-details-marker{display:none}.template-group>summary:before{content:'▾';font-size:13px;color:#667085;margin-right:8px}.template-group:not([open])>summary:before{content:'▸'}.template-group>summary span:first-of-type{flex:1}.template-count{font-size:12px;color:#667085;font-weight:600}.tablewrap.grouped{margin:0;border:0;border-top:1px solid #e5eaf0;border-radius:0}.sort-link{color:#172033;text-decoration:none;white-space:nowrap}.sort-link:hover{text-decoration:underline}.template-text-cell{min-width:360px;line-height:1.45}.template-status{display:inline-flex;align-items:center;justify-content:center;min-width:66px;height:28px;padding:0 9px;border-radius:999px;font-size:12px;font-weight:700}.template-status.active{background:#eaf7ef;color:#25623a}.template-status.inactive{background:#eef1f5;color:#667085}
@media(max-width:900px){.template-filters{grid-template-columns:1fr 1fr}.template-filters .actions{grid-column:1/-1}}
@media(max-width:760px){.template-filters{grid-template-columns:1fr}.template-filters .actions{grid-column:auto}.template-group>summary{padding:14px}.template-text-cell{min-width:280px}.template-count{white-space:nowrap}}
/* Phase 2 v0.2.0 */
.p2tabs{margin:0 0 16px;flex-wrap:wrap}.p2tabs .btn{min-width:112px;text-align:center}@media(max-width:700px){.p2tabs{display:grid;grid-template-columns:1fr 1fr}.p2tabs .btn{min-width:0}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
