:root {
    font-family: Inter, Arial, sans-serif;
    color: #26364a;
    background: #f3f6fa;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 1120px; background: #f3f6fa; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.shell { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 238px;
    background: #17365d; color: #fff; box-shadow: 4px 0 16px rgba(20,40,70,.12);
}
.brand {
    height: 70px; display: flex; align-items: center; gap: 12px;
    padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand-mark {
    width: 38px; height: 38px; display: grid; place-items: center;
    background: #55a2df; border-radius: 9px; font-weight: 800;
}
.brand strong, .brand span { display: block; }
.brand span { font-size: 11px; opacity: .75; margin-top: 3px; }
nav { padding: 12px 8px; }
nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    margin: 2px 0; border-radius: 6px; text-decoration: none;
    color: rgba(255,255,255,.82); font-size: 13px;
}
nav a:hover, nav a.active { background: #2f5597; color: #fff; }
.menu-icon { width: 20px; text-align: center; }
.workspace { margin-left: 238px; width: calc(100% - 238px); }
.topbar {
    height: 70px; background: #fff; border-bottom: 1px solid #dfe6ee;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 26px; position: sticky; top: 0; z-index: 10;
}
.topbar small, .topbar strong { display: block; }
.topbar small { color: #7a899a; font-size: 9px; letter-spacing: .08em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.revision-badge {
    background: #e7f2ff; color: #205b95; border: 1px solid #b9d5ef;
    padding: 6px 9px; border-radius: 5px; font-size: 11px; font-weight: 700;
}
.status-badge {
    background: #eef2f6; color: #516174; padding: 5px 9px;
    border-radius: 999px; font-size: 11px; text-transform: capitalize;
}
.avatar {
    width: 34px; height: 34px; display: grid; place-items: center;
    border-radius: 50%; background: #17365d; color: #fff; font-size: 12px;
}
.content { padding: 24px 28px 40px; }
.page-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.page-header h1 { margin: 0; color: #17365d; font-size: 25px; }
.page-header p { margin: 6px 0 0; color: #718096; font-size: 13px; }
.button, button {
    border: 1px solid #cfd8e5; background: #fff; color: #314158;
    border-radius: 6px; padding: 8px 13px; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.button.primary, button.primary {
    background: #2463a7; border-color: #2463a7; color: #fff; font-weight: 600;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card, .panel {
    background: #fff; border: 1px solid #dfe6ee; border-radius: 9px;
    box-shadow: 0 2px 7px rgba(20,40,70,.04);
}
.stat-card { padding: 18px; border-left: 4px solid #3f82bd; }
.stat-card.green { border-left-color: #2b8a57; }
.stat-card.amber { border-left-color: #e39a1e; }
.stat-card.red { border-left-color: #d44b45; }
.stat-card span { display: block; color: #77869a; font-size: 12px; }
.stat-card strong { display: block; font-size: 24px; margin-top: 5px; }
.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.map-panel { grid-row: span 2; }
.panel { overflow: hidden; }
.panel-header {
    padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #e5ebf2;
}
.panel-header h2 { margin: 0; font-size: 14px; }
.map-placeholder {
    height: 398px; position: relative; overflow: hidden;
    background: linear-gradient(135deg,#e5efe3,#dce8f3);
}
.map-placeholder::before {
    content: ""; position: absolute; width: 520px; height: 35px;
    background: rgba(255,255,255,.65); transform: rotate(-16deg); top: 120px; left: -45px;
}
.map-placeholder span {
    position: absolute; left: 15px; bottom: 14px; background: rgba(255,255,255,.9);
    padding: 7px 10px; border-radius: 4px; font-size: 11px;
}
.map-shape { position: absolute; border: 2px solid #3878ac; background: rgba(85,162,223,.18); }
.map-shape.one { width: 260px; height: 145px; left: 115px; top: 125px; transform: skew(-12deg) rotate(-7deg); }
.map-shape.two { width: 125px; height: 95px; left: 380px; top: 210px; transform: rotate(18deg); }
.issue-list { list-style: none; margin: 0; padding: 8px 16px 16px; }
.issue-list li { padding: 10px 2px; border-bottom: 1px solid #eef2f6; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.amber { background: #e39a1e; } .dot.red { background: #d44b45; }
.context-list { padding: 6px 16px 16px; font-size: 12px; }
.toolbar { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #e5ebf2; }
.toolbar input { min-width: 320px; }
input, select, textarea {
    width: 100%; border: 1px solid #cfd8e5; border-radius: 6px;
    padding: 9px 10px; background: #fff; color: #314158;
}
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid #edf1f5; text-align: left; font-size: 12px; }
th { background: #f7f9fc; color: #65758a; font-size: 10px; text-transform: uppercase; }
.form-panel { padding-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 18px; }
.form-grid label, .form-panel form label { display: block; font-size: 12px; font-weight: 600; }
.form-grid label input, .form-grid label select, .form-grid label textarea,
.form-panel form input, .form-panel form textarea {
    margin-top: 6px; font-weight: 400;
}
.form-grid .full { grid-column: 1/-1; }
.form-actions { padding: 0 18px; display: flex; justify-content: flex-end; gap: 9px; }
.split-grid, .dossier-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; }
.revision-list { padding: 8px 14px 15px; }
.revision-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px; border: 1px solid #e3e9f0; border-radius: 6px; margin-top: 8px;
}
.revision-item.official { border-color: #7db2dd; background: #f2f8fd; }
.revision-item strong, .revision-item span { display: block; }
.revision-item span { color: #77869a; font-size: 11px; margin-top: 3px; }
.revision-item em {
    background: #e7f2ff; color: #205b95; font-style: normal;
    padding: 5px 8px; border-radius: 5px; font-size: 10px; font-weight: 700;
}
.progress { height: 7px; background: #e9eef4; border-radius: 999px; overflow: hidden; flex: 1; }
.progress span { display: block; height: 100%; background: #3c82bd; }
.progress.big { margin: 17px; height: 10px; }
.dossier-sections { padding: 0 17px 17px; }
.dossier-row { display: grid; grid-template-columns: 150px 1fr 40px; gap: 12px; padding: 9px 0; align-items: center; font-size: 12px; }
.legend-list { padding: 10px 17px 18px; }
.legend-list p { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid #eef2f6; font-size: 12px; }
.legend-list strong { margin-left: auto; }
.legend { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend.confirmed { background: #2b8a57; }.legend.extracted { background: #3c82bd; }
.legend.premise { background: #a474d1; }.legend.pending { background: #e39a1e; }
.empty-state { min-height: 380px; display: grid; place-items: center; align-content: center; text-align: center; color: #77869a; }
.empty-state h2 { color: #425268; margin-bottom: 3px; }
.empty-icon {
    width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center;
    background: #e9f2fb; color: #2f6ca5; font-weight: 800; font-size: 22px;
}
.alert { padding: 11px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 12px; }
.alert.success { background: #e8f6ee; color: #246b46; border: 1px solid #b9dfca; }
.alert.error { background: #feeceb; color: #9c2f2a; border: 1px solid #efc1bd; }

.auth-body{min-width:0;min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#17365d,#2f5597)}.login-card{width:410px;background:#fff;border-radius:14px;padding:30px;box-shadow:0 24px 70px rgba(0,0,0,.25)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}.login-brand strong,.login-brand span{display:block}.login-brand span{font-size:11px;color:#718096}.login-card h1{margin:0;color:#17365d}.login-card label{display:block;font-size:12px;font-weight:600;margin-bottom:13px}.login-card label input{margin-top:6px}.login-card button{width:100%}.login-card small{display:block;margin-top:18px;text-align:center;color:#8794a5}.topbar.multi{gap:18px}.context-selectors{display:flex;gap:10px;align-items:center;flex:1}.context-selectors form{margin:0}.context-selectors label{display:block;font-size:9px;color:#6d7d90}.context-selectors select{min-width:210px;padding:5px 8px;margin-top:2px;font-size:12px}.user-name{font-size:12px;white-space:nowrap}.logout-button{color:#a43b36;padding:6px 9px;font-size:11px}

.alert.info{background:#eaf3fb;color:#245b87;border:1px solid #bad5eb}
.admin-stats{grid-template-columns:repeat(2,minmax(220px,1fr));max-width:650px}
.form-note{padding:12px;border:1px solid #dfe6ee;background:#f7f9fc;border-radius:6px;color:#65758a;font-size:12px}

.button.danger,button.danger{background:#fff1f0;border-color:#e2aaa6;color:#a8342e}.button.small,button.small{padding:5px 9px;font-size:11px}.muted{color:#8794a5;font-size:11px}
