*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(180deg,#edf6ff,#f8fbff 48%,#edf3f8);color:#10233d}.topnav{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;background:#071e3d;color:#fff;position:sticky;top:0;z-index:10}.brand{font-size:25px;font-weight:900}.brand span{color:#75caff}.brand small{font-size:12px;background:#ffffff1c;padding:5px 7px;border-radius:999px}.topnav nav{display:flex;gap:14px}.topnav a{color:#fff;text-decoration:none;font-size:14px}.container{max-width:1300px;margin:auto;padding:24px}.hero{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.hero h1{font-size:30px;margin:8px 0}.hero p{color:#6d7c90}.badge,.public-note{display:inline-block;padding:7px 10px;border-radius:999px;background:#e7f7ef;color:#167454;font-size:12px;font-weight:800}.grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(390px,.9fr);gap:20px}.card,.letter,.table-card,.kpi,.login-card{background:#fff;border:1px solid #dce7f1;border-radius:20px;box-shadow:0 18px 48px rgba(7,30,61,.11)}.card{padding:20px}.card h2{font-size:18px;margin:18px 0 8px}.card h2:first-child{margin-top:0}.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}label{display:block;font-size:12px;font-weight:800;margin:11px 0 6px}input,textarea{width:100%;padding:12px 13px;border:1px solid #dce7f1;border-radius:11px;background:#fbfdff;font:inherit;outline:none}textarea{min-height:145px;resize:vertical;line-height:1.55}input:focus,textarea:focus{border-color:#68b8f6;box-shadow:0 0 0 3px #54b9ff22}.btn{display:inline-block;border:0;border-radius:10px;padding:11px 14px;font-weight:800;text-decoration:none;cursor:pointer}.primary{background:linear-gradient(135deg,#0d63b8,#39aaf5);color:#fff}.soft{background:#eaf4ff;color:#0b4a84}.full{width:100%;margin-top:14px;padding:14px}.voice-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}.voice-row span{font-size:12px;color:#6d7c90}.channels{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.channel{padding:12px;border:1px solid #dce7f1;border-radius:12px;background:#fbfdff;cursor:pointer}.channel.active{background:#edf7ff}.preview-card{position:sticky;top:84px;height:max-content}.letter{overflow:hidden}.letter-head{padding:25px;background:linear-gradient(135deg,#071e3d,#0d63b8);color:#fff;font-size:29px;font-weight:900}.letter-head span{color:#75caff}.letter-body{padding:26px}.letter-body h3{font-size:27px;color:#0b376d;margin:0 0 15px}.subject-box{padding:15px;background:#eef7ff;border-radius:15px;font-weight:800;margin-bottom:18px}.letter-text{white-space:pre-wrap;line-height:1.7}.signature{margin-top:23px;padding-top:16px;border-top:1px solid #e5edf4;font-size:25px;color:#0b376d;font-weight:700}.signature small{font-size:12px;color:#6d7c90;font-weight:400}.fake-actions{display:flex;gap:8px;margin-top:20px}.fake-actions button{flex:1;border:0;padding:11px;border-radius:10px;background:#0d63b8;color:white}.public-page{padding:25px}.public-container{max-width:820px;margin:auto}.public-letter{margin-top:14px}.reply-card{margin-top:18px}.callback-form{margin-top:12px}.center-page{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:min(440px,100%);padding:24px}.login-card h1{font-size:25px}.alert{padding:11px 13px;border-radius:10px;margin-bottom:14px}.alert.error{background:#ffeaea;color:#9c3535}.alert.success{background:#e9f8f1;color:#167454}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}.kpi{padding:16px}.kpi strong{display:block;font-size:28px;color:#0b4a84}.kpi span{font-size:12px;color:#718196}.table-card{overflow:auto}table{width:100%;border-collapse:collapse;min-width:1100px}th,td{padding:11px 12px;border-bottom:1px solid #edf1f5;text-align:left;font-size:12px;vertical-align:top}th{background:#f7fafc;color:#48617b}.status{display:inline-block;padding:5px 7px;border-radius:999px;background:#eef2f6;color:#56687b;font-size:10px;font-weight:800}.status.sent{background:#e8f7ef;color:#177250}.status.simulated{background:#fff4df;color:#96631c}.status.error{background:#ffeaea;color:#9e3535}.status.pending{background:#eef2f6}.reply-snippet{max-width:220px;margin-top:5px;color:#607087;line-height:1.4}.mini{padding:7px 9px}@media(max-width:980px){.grid2{grid-template-columns:1fr}.preview-card{position:static}.kpis{grid-template-columns:1fr 1fr}}@media(max-width:620px){.container{padding:12px}.topnav{padding:13px}.topnav nav{gap:8px}.row2,.channels,.kpis{grid-template-columns:1fr}.public-page{padding:12px}.letter-body,.letter-head{padding:20px}}
select{width:100%;padding:12px 13px;border:1px solid #dce7f1;border-radius:11px;background:#fbfdff;font:inherit;color:#10233d;outline:none}
.theme-green .letter-head{background:linear-gradient(135deg,#075741,#1baa75)}
.theme-green .letter-body h3,.theme-green .signature{color:#0b6c4f}
.theme-green .subject-box{background:#edf9f4}
.theme-gold .letter-head{background:linear-gradient(135deg,#3c2e13,#b88728)}
.theme-gold .letter-body h3,.theme-gold .signature{color:#6a4f1d}
.theme-gold .subject-box{background:#fbf6e9}
.theme-orange .letter-head{background:linear-gradient(135deg,#7b2f00,#e8892e)}
.theme-orange .letter-body h3,.theme-orange .signature{color:#a4480e}
.theme-orange .subject-box{background:#fff3e9}
.fake-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.fake-actions .ok{background:#18a36d}.fake-actions .no{background:#d9534f}.fake-actions .appt{background:#e8892e}
.action-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin-top:22px}
.action-grid form{margin:0}.action-grid .btn{width:100%;text-align:center}
.accept{background:#18a36d;color:#fff}.refuse{background:#fff0f0;color:#a13937}.appointment{background:#e8892e;color:#fff}
.kpis5{grid-template-columns:repeat(5,1fr)}
.status.accepted{background:#e8f7ef;color:#13704e}.status.refused{background:#ffeaea;color:#9b3737}.status.opened{background:#fff4df;color:#96631c}.status.replied,.status.callback_requested,.status.appointment_requested{background:#eaf4ff;color:#0b4a84}
.reminder{background:#fff4df;color:#96631c}
.button-stack{display:flex;gap:6px;flex-wrap:wrap}
.contact-list{display:grid;gap:9px}.contact-item,.template-item{padding:12px;border:1px solid #e1e9f1;border-radius:12px;background:#fbfdff}.contact-item strong,.template-item strong{display:block}.contact-item span,.template-item span{display:block;color:#52677d;margin-top:3px}.contact-item small,.template-item small{display:block;color:#7b8897;margin-top:4px}
@media(max-width:900px){.kpis5{grid-template-columns:1fr 1fr}.action-grid{grid-template-columns:1fr}}

.template-help{margin-top:8px;padding:9px 11px;border-radius:10px;background:#f4f8fc;color:#6b7a8d;font-size:12px}

.template-search-box{margin-bottom:10px;padding:12px;border:1px solid #e1e9f1;border-radius:12px;background:#f8fbfe}.template-search-box input{background:#fff}

.letter-topgrid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.letter-senderbox,.letter-recipientbox{font-size:13px;line-height:1.55;color:#30465e}
.letter-senderbox strong,.letter-recipientbox strong{font-size:16px;color:#10233d}
.letter-recipientbox{text-align:right}
.letter-date-line{margin-top:14px;font-weight:700}
.pro-letter .subject-box{font-weight:700}
@media(max-width:900px){
  .letter-topgrid{grid-template-columns:1fr}
  .letter-recipientbox{text-align:left}
}

.lang-note{margin-bottom:10px;padding:10px 12px;border-radius:10px;background:#f4f8fc;color:#5c6c7d;font-size:12px;line-height:1.5}
.lang-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:10px}
.lang-card{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #e1e9f1;border-radius:12px;background:#fff;cursor:pointer}
.lang-card input{display:none}
.lang-card .flag{font-size:24px;line-height:1}
.lang-card .lang-label{font-size:13px;font-weight:700;color:#163e68}
.lang-card.active{background:#edf7ff;border-color:#63b6f5;box-shadow:0 0 0 2px rgba(13,99,184,.08)}
@media(max-width:900px){.lang-grid{grid-template-columns:1fr 1fr}}

.translate-panel{margin-top:12px;padding:14px;border:1px solid #dce7f1;border-radius:14px;background:#f8fbfe}
.translate-action-wrap{display:flex;flex-direction:column;justify-content:flex-end}
.translate-btn{width:100%;background:linear-gradient(135deg,#6b46c1,#0d63b8);color:#fff}
.translate-btn:disabled{opacity:.65;cursor:wait}
.translation-status{margin-top:9px;font-size:12px;color:#5f7185;line-height:1.45}

.voice-reader{margin-top:20px;padding:16px;border:1px solid #dce7f1;border-radius:16px;background:linear-gradient(180deg,#f8fbff,#f2f7fc)}
.voice-reader-title{font-weight:900;color:#123f71;margin-bottom:10px}
.voice-reader-controls{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.voice-reader-controls .btn{width:100%}
.voice-play{background:#0d63b8;color:#fff}.voice-soft{background:#eaf4ff;color:#0b4a84}.voice-stop{background:#fff0f0;color:#a13937}
.voice-settings{margin-top:10px}.voice-status{margin-top:9px;font-size:12px;color:#617287}.public-voice-reader{margin-bottom:6px}
@media(max-width:760px){.voice-reader-controls{grid-template-columns:1fr 1fr}}

/* V7 — Assistant vocal */
.assistant-v7{margin-bottom:20px;padding:18px;border:1px solid #cddff0;border-radius:18px;background:linear-gradient(135deg,#f6fbff,#edf6ff);box-shadow:0 12px 30px rgba(13,99,184,.08)}
.assistant-v7-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.assistant-v7-head h2{margin:5px 0 0!important}
.assistant-chip{display:inline-block;padding:6px 9px;border-radius:999px;background:#0d63b8;color:#fff;font-size:11px;font-weight:800}
.assistant-orb{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#7447d8,#0d63b8);color:#fff;font-weight:900;box-shadow:0 8px 22px rgba(74,63,180,.25)}
.assistant-example{margin:12px 0;padding:10px 12px;border-radius:11px;background:#fff;color:#5e7083;font-size:12px;line-height:1.5}
.assistant-command{min-height:105px;background:#fff}
.assistant-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}
.assistant-mic{background:#eaf4ff;color:#0b4a84}
.assistant-run{background:linear-gradient(135deg,#7447d8,#0d63b8);color:#fff}
.assistant-check{display:flex;align-items:center;gap:8px;font-weight:500;margin-top:10px}
.assistant-check input{width:auto}
.assistant-status{margin-top:8px;font-size:12px;color:#53687c}
.draft-notice{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px;padding:10px 12px;border-radius:11px;background:#fff8e8;border:1px solid #f1d89d;color:#765318;font-size:12px}
.draft-notice>div{display:flex;gap:6px}

/* V7 — Attachments */
.attachment-upload{padding:14px;border:1px dashed #9ebbd4;border-radius:14px;background:#f8fbfe}
.attachment-help{font-size:11px;color:#738397;margin-top:7px}
.attachment-preview{display:grid;gap:7px;margin-top:10px}
.attachment-item{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;background:#fff;border:1px solid #e1e9f1;font-size:12px}
.attachment-item strong{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.attachment-item span{color:#728196}
.preview-attachments{margin-top:18px;padding:12px;border-radius:12px;background:#f6f9fc;border:1px solid #e0e8f0}
.preview-attachments strong{display:block;margin-bottom:6px;color:#244c75}
.public-attachments{margin-top:22px;padding:14px;border-radius:15px;background:#f7fafc;border:1px solid #dfe8f0}
.public-attachments-title{font-weight:900;color:#163f69;margin-bottom:9px}
.public-attachment{display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center;padding:10px;margin-top:7px;border-radius:10px;background:#fff;border:1px solid #e1e8ef;color:#183e65;text-decoration:none}
.public-attachment:hover{border-color:#73b9ed;background:#f8fcff}
.public-attachment-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.public-attachment small{color:#778596}

@media(max-width:700px){
  .assistant-buttons{grid-template-columns:1fr}
  .draft-notice{align-items:flex-start;flex-direction:column}
}
