:root{--primary:#173640;--primary-light:#245363;--primary-deep:#0f2932;--gold:#d7af38;--gold-light:#e8ca72;--gold-dark:#bd9226;--ink:#173640;--muted:#6f787b;--line:#e5e6e4;--bg:#f6f6f4;--white:#fff;--danger:#b84242;--shadow-card:0 10px 25px rgb(23 54 64 / 18%);--shadow-elevated:0 18px 40px rgb(23 54 64 / 22%)}
*{box-sizing:border-box}
body{margin:0;font:14px/1.5 Inter,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit}
button{cursor:pointer;border:0;border-radius:999px;background:linear-gradient(135deg,var(--gold-dark),var(--gold-light));color:var(--primary);padding:11px 20px;font-weight:700;transition:transform .25s ease,box-shadow .25s ease,background .25s ease}
button:hover{transform:translateY(-1px);box-shadow:0 5px 18px rgb(215 175 56 / 32%)}
.auth{min-height:100vh;display:grid;place-items:center;padding:28px 16px;background:radial-gradient(circle at 12% 12%,rgb(215 175 56 / 16%),transparent 28%),radial-gradient(circle at 88% 82%,rgb(36 83 99 / 55%),transparent 32%),linear-gradient(135deg,var(--primary-deep),var(--primary-light))}
.auth-card{width:min(440px,92vw);background:rgb(255 255 255 / 98%);padding:40px;border:1px solid rgb(215 175 56 / 24%);border-radius:16px;box-shadow:0 24px 70px rgb(4 22 28 / 38%)}
.brand{display:flex;gap:16px;align-items:center;margin-bottom:30px}
.brand>span,.logo{display:grid;place-items:center;background:linear-gradient(135deg,var(--gold-dark),var(--gold-light));color:var(--primary);font-weight:900;box-shadow:0 6px 20px rgb(215 175 56 / 28%)}
.brand>span{width:52px;height:52px;border-radius:50%;font-size:17px}
.brand h1,.brand p{margin:0}.brand h1{font-size:26px;line-height:1.1}.brand p{color:var(--muted);margin-top:4px}.auth h2{font-size:24px;margin:0 0 20px}
label{display:grid;gap:7px;color:#485b61;font-weight:600;margin-bottom:16px}
input,textarea,select{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px 13px;background:var(--white);color:var(--ink);outline:none;transition:border-color .2s ease,box-shadow .2s ease}
input:focus,textarea:focus,select:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgb(215 175 56 / 18%)}
textarea{min-height:85px;resize:vertical}.auth form>button,.panel>button,dialog form>button{width:100%}.auth a{color:var(--gold-dark);font-weight:700}.error{color:var(--danger);min-height:20px}
.shell{height:100vh;display:flex;background:var(--bg)}
.sidebar{width:76px;background:linear-gradient(180deg,var(--primary),var(--primary-deep));padding:17px 12px;display:flex;align-items:center;flex-direction:column;gap:10px;box-shadow:5px 0 24px rgb(23 54 64 / 12%);z-index:3}
.logo{width:46px;height:46px;margin-bottom:22px;border-radius:50%}
.nav{width:46px;height:46px;background:transparent;font-size:20px;color:#b8c7cb;padding:0;border:1px solid transparent;box-shadow:none}
.nav:hover,.nav.active{transform:none;background:rgb(255 255 255 / 9%);border-color:rgb(215 175 56 / 42%);color:var(--gold-light);box-shadow:none}.nav.active{background:rgb(215 175 56 / 14%)}.nav.bottom{margin-top:auto}
.view{flex:1;min-width:0}.chat-layout{display:grid;grid-template-columns:360px 1fr}.inbox{background:var(--white);border-right:1px solid var(--line);min-width:0}
.inbox header,.page header{height:94px;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:var(--white)}
small{font-size:10px;letter-spacing:1.8px;color:var(--gold-dark);font-weight:800}h2{margin:3px 0 0;font-size:23px;line-height:1.2}
.icon{background:#faf6e8;color:var(--gold-dark);font-size:18px;padding:8px 12px;box-shadow:none}.icon:hover{background:#f4e7bc;box-shadow:none}.search{margin:16px;width:calc(100% - 32px);background:var(--bg)}
.conversation{display:flex;gap:12px;margin:0 10px 4px;padding:15px 13px;border-left:3px solid transparent;border-radius:12px;cursor:pointer;transition:background .2s ease,border-color .2s ease}
.conversation:hover,.conversation.active{background:#faf7ec;border-left-color:var(--gold)}
.avatar{flex:0 0 44px;height:44px;border-radius:50%;background:var(--primary);color:var(--gold-light);display:grid;place-items:center;font-weight:750}.conversation-main{min-width:0;flex:1}.row{display:flex;justify-content:space-between;gap:8px}.conversation p{margin:5px 0 0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge{background:var(--gold);color:var(--primary);border-radius:20px;padding:2px 7px;font-size:11px;font-weight:800}
.chat{display:flex;flex-direction:column;background:linear-gradient(rgb(246 246 244 / 94%),rgb(246 246 244 / 94%)),radial-gradient(circle at center,var(--gold) 1px,transparent 1px);background-size:auto,24px 24px}.chat.empty{display:grid;place-items:center}.empty-state{display:grid;text-align:center;gap:7px;color:var(--muted)}.empty-state b{color:var(--primary);font-size:19px}
.chat-head{height:78px;padding:14px 22px;background:var(--white);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;box-shadow:0 3px 14px rgb(23 54 64 / 5%)}.chat-head .person{display:flex;gap:12px;align-items:center}.chat-head p{margin:3px 0;color:var(--muted)}
.window{font-size:12px;padding:7px 11px;border-radius:20px;background:#edf3f4;color:var(--primary)}.window.closed{background:#fff2e8;color:#9a542f}.messages{flex:1;overflow:auto;padding:26px;display:flex;flex-direction:column;gap:11px}.bubble{max-width:70%;background:var(--white);padding:11px 14px;border-radius:5px 15px 15px 15px;box-shadow:0 3px 12px rgb(23 54 64 / 9%)}.bubble.outbound{align-self:flex-end;background:#f8edc8;border-radius:15px 5px 15px 15px}.bubble p{margin:0;white-space:pre-wrap}.bubble footer{font-size:10px;color:var(--muted);text-align:right;margin-top:5px}
.composer{padding:15px 20px;background:var(--white);display:flex;gap:10px;border-top:1px solid var(--line)}.composer input{flex:1}.composer .template-button{background:#f8edc8;color:var(--primary);box-shadow:none}
.page{overflow:auto}.page>header,.page>.search,.page>.cards,.panel{max-width:1050px;margin-left:auto;margin-right:auto}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px;padding:14px 22px}
.contact-card,.panel{background:var(--white);border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow-card)}.contact-card{transition:transform .25s ease,box-shadow .25s ease}.contact-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-elevated)}.contact-card h3{margin:0 0 7px;font-size:18px}.contact-card p{color:var(--muted);margin:5px 0}.contact-card button{margin-top:12px;background:transparent;border:2px solid var(--gold);color:var(--gold-dark);box-shadow:none}.panel{margin-top:28px;max-width:650px!important}.hint{color:var(--muted);word-break:break-all}
dialog{border:1px solid rgb(215 175 56 / 24%);border-radius:16px;padding:28px;width:min(460px,92vw);color:var(--ink);box-shadow:0 20px 65px rgb(4 22 28 / 35%)}dialog::backdrop{background:rgb(15 41 50 / 78%);backdrop-filter:blur(3px)}.dialog-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.dialog-title h2{margin:0}.dialog-title button{background:transparent;color:var(--muted);font-size:24px;padding:3px 8px;box-shadow:none}
#toast{position:fixed;right:20px;bottom:20px;background:var(--primary);color:var(--white);padding:13px 18px;border:1px solid rgb(215 175 56 / 34%);border-radius:12px;box-shadow:var(--shadow-elevated);opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none}#toast.show{opacity:1;transform:none}
@media(max-width:760px){.auth-card{padding:30px 24px}.sidebar{width:58px;padding-left:6px;padding-right:6px}.logo,.nav{width:42px;height:42px}.chat-layout{grid-template-columns:1fr}.chat{position:fixed;inset:0 0 0 58px;z-index:2}.chat.empty{display:none}.inbox{border:0}.bubble{max-width:88%}}
