*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:
        radial-gradient(circle at top left, rgba(0,212,255,.12), transparent 30%),
        linear-gradient(180deg,#020712 0%,#071426 100%);
    color:#f8fafc;
    font-family:Arial, Helvetica, sans-serif;
    min-height:100vh;
}

.topbar{
    height:120px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 28px;
    border-bottom:1px solid rgba(148,163,184,.12);
}

.logo-zone{
    display:flex;
    align-items:center;
    gap:22px;
}

.logo{
    width:95px;
}

h1{
    font-size:56px;
    font-weight:900;
    letter-spacing:3px;
}

h1 span{
    color:#22d3ee;
}

.author{
    color:#facc15;
    font-size:24px;
    margin-top:6px;
    font-style:italic;
}

.subtitle{
    margin-top:10px;
    color:#cbd5e1;
    letter-spacing:2px;
}

.version-box{
    width:260px;
    border:1px solid rgba(148,163,184,.18);
    border-radius:16px;
    padding:18px;
    text-align:center;
    background:rgba(2,8,23,.55);
}

.version-box strong{
    display:block;
    color:#22d3ee;
    font-size:42px;
    margin:8px 0;
}

.main-layout{
    display:grid;
    grid-template-columns:260px 460px 1fr;
    height:calc(100vh - 120px);
}

.sidebar{
    border-right:1px solid rgba(148,163,184,.12);
    padding:18px;
    background:rgba(2,8,23,.45);
    overflow:auto;
}

.side-link{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px;
    margin-bottom:8px;
    border-radius:10px;
    text-decoration:none;
    color:#f8fafc;
    background:rgba(15,23,42,.35);
}

.side-link:hover,
.side-link.active{
    background:rgba(14,165,233,.18);
}

.counter{
    background:#0f172a;
    border-radius:999px;
    padding:4px 10px;
    font-size:12px;
}

.sidebar-bottom{
    margin-top:24px;
}

.refresh-btn{
    display:block;
    width:100%;
    text-align:center;
    text-decoration:none;
    padding:12px;
    border-radius:10px;
    border:0;
    background:#075985;
    color:#fff;
    cursor:pointer;
}

.config-debug{
    margin-top:14px;
    padding:12px;
    border-radius:10px;
    background:rgba(15,23,42,.65);
    color:#94a3b8;
    font-size:12px;
    line-height:1.5;
    border:1px solid rgba(148,163,184,.12);
}

.mail-column{
    overflow:auto;
    border-right:1px solid rgba(148,163,184,.12);
    padding:16px;
}

.mail-card{
    display:block;
    padding:14px;
    border-radius:12px;
    margin-bottom:12px;
    text-decoration:none;
    color:#fff;
    background:rgba(15,23,42,.35);
    border:1px solid rgba(148,163,184,.08);
}

.mail-card:hover{
    transform:translateY(-1px);
    border-color:rgba(34,211,238,.35);
}

.mail-top{
    display:flex;
    justify-content:space-between;
    margin-bottom:12px;
}

.badge{
    font-size:13px;
    font-weight:bold;
}

.mail-date{
    font-size:12px;
    color:#cbd5e1;
}

.mail-sender{
    font-size:14px;
    color:#22d3ee;
    margin-bottom:10px;
}

.mail-subject{
    font-size:15px;
    line-height:1.45;
}

.mail-meta-debug{
    margin-top:8px;
    font-size:11px;
    color:#94a3b8;
}

.mail-card.noise{
    opacity:.75;
}

.mail-card.partenaire_polygone{
    border-left:4px solid #facc15;
    background:linear-gradient(90deg, rgba(250,204,21,.18), rgba(15,23,42,.35));
    box-shadow:0 0 18px rgba(250,204,21,.08);
}

.mail-card.priority{
    border-left:4px solid #facc15;
    background:rgba(120,90,0,.18);
}

.mail-card.transport_logistique{
    border-left:4px solid #38bdf8;
    background:rgba(8,47,73,.22);
}

.mail-card.finance{
    border-left:4px solid #c084fc;
}

.mail-card.juridique{
    border-left:4px solid #fb923c;
}

.mail-card.trusted{
    border-left:4px solid #4ade80;
}

.mail-card.review{
    border-left:4px solid #fde047;
}

.preview-column{
    overflow:auto;
    padding:24px;
}

.preview-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:24px;
}

.preview-title{
    font-size:34px;
    font-weight:800;
    line-height:1.2;
}

.preview-badge{
    display:inline-block;
    margin-top:12px;
    padding:8px 12px;
    border-radius:10px;
    background:#0f172a;
}

.delete-btn{
    border:0;
    background:#7f1d1d;
    color:#fff;
    padding:12px 18px;
    border-radius:10px;
    cursor:pointer;
}

.meta{
    line-height:1.9;
    color:#cbd5e1;
    margin-bottom:24px;
}

.mail-body{
    white-space:pre-wrap;
    line-height:1.7;
    background:rgba(15,23,42,.25);
    border:1px solid rgba(148,163,184,.08);
    border-radius:12px;
    padding:18px;
}

.attachments,
.reply-box{
    margin-top:24px;
    padding:18px;
    border-radius:12px;
    background:rgba(15,23,42,.25);
    border:1px solid rgba(148,163,184,.08);
}

.attachments h3,
.reply-box h3{
    margin-bottom:18px;
}

.attachment{
    display:grid;
    grid-template-columns:1fr 90px 130px;
    gap:12px;
    align-items:center;
    padding:12px;
    border-radius:10px;
    background:rgba(2,8,23,.45);
    margin-bottom:10px;
}

.attachment a{
    color:#22d3ee;
    text-decoration:none;
}

.reply-box label{
    display:block;
    color:#cbd5e1;
    margin:12px 0 6px;
    font-size:14px;
}

.reply-box input,
.reply-box textarea{
    width:100%;
    border:1px solid rgba(148,163,184,.18);
    background:rgba(2,8,23,.75);
    color:#fff;
    border-radius:10px;
    padding:12px;
    font-family:Arial, Helvetica, sans-serif;
    font-size:15px;
}

.reply-box textarea{
    resize:vertical;
}

.send-btn{
    margin-top:14px;
    border:0;
    background:#0f766e;
    color:#fff;
    padding:12px 18px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

.notice{
    padding:14px;
    border-radius:10px;
    margin-bottom:16px;
}

.notice.success{
    background:rgba(22,163,74,.20);
    border:1px solid rgba(34,197,94,.35);
}

.notice.error{
    background:rgba(127,29,29,.35);
    border:1px solid rgba(239,68,68,.35);
}

.empty-preview{
    display:flex;
    align-items:center;
    justify-content:center;
    height:100%;
    color:#94a3b8;
    font-size:24px;
}

@media (max-width:1400px){

    .main-layout{
        grid-template-columns:220px 1fr;
    }

    .preview-column{
        display:none;
    }

}
