.agenda-app {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #152238;
    background: #f3f7fc;
}
.agenda-standalone { margin: 0; min-width: 980px; background: linear-gradient(180deg,#eef5ff 0,#f8fbff 260px); }
.agenda-app * { box-sizing: border-box; }
.agenda-app button,.agenda-app input,.agenda-app select,.agenda-app textarea { font: inherit; }
.agenda-app button { cursor: pointer; }
.agenda-app { min-height: 100vh; padding: 18px; }
.agenda-app.is-embedded { min-height: 760px; padding: 0; background: transparent; }
.agenda-app.is-embedded .agenda-shell { max-width: none; }
.agenda-app.is-embedded .agenda-grid-wrap { height: calc(100vh - 245px); }
.agenda-module-page { width: 100%; min-width: 0; }
.agenda-admin-form select { min-width: 190px; }
.agenda-admin-form input[type="checkbox"] { width: 20px; height: 20px; }
.agenda-loading,.agenda-error { padding: 40px; text-align: center; color: #5d6b80; }
.agenda-shell { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 14px; max-width: 1900px; margin: 0 auto; }
.agenda-card { background: rgba(255,255,255,.95); border: 1px solid #d7e2ef; border-radius: 18px; box-shadow: 0 12px 32px rgba(46,78,120,.08); }
.agenda-sidebar { padding: 18px; align-self: start; position: sticky; top: 16px; }
.agenda-brand { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:18px; }
.agenda-brand h1 { font-size:20px; margin:0; }
.agenda-test-chip { font-size:11px; font-weight:800; color:#835b00; background:#fff1bd; padding:5px 8px; border-radius:999px; }
.agenda-side-action { width:100%; margin-bottom:8px; }
.agenda-native-state { font-size:12px; line-height:1.45; padding:10px; border-radius:10px; background:#f5f8fc; color:#596a7f; margin:10px 0 18px; }
.agenda-native-state.ok { color:#17643c; background:#eaf8f0; }
.agenda-calendar-list { display:grid; gap:8px; }
.agenda-calendar-row { display:flex; align-items:center; gap:9px; font-size:13px; cursor:pointer; }
.agenda-dot { width:10px; height:10px; border-radius:50%; flex:0 0 10px; }
.agenda-calendar-row small { display:block; color:#7b899a; }
.agenda-main { min-width:0; overflow:hidden; }
.agenda-toolbar { display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid #dce6f0; }
.agenda-toolbar button { flex:0 0 auto; }
.agenda-toolbar h2 { margin:0 10px; font-size:19px; min-width:250px; }
.agenda-toolbar-spacer { flex:1; }
.agenda-notice { margin:0 16px 12px; padding:10px 12px; border-radius:10px; background:#eaf8f0; color:#17643c; font-size:13px; }
.agenda-notice.error { background:#fff0ef; color:#9c3028; }
.agenda-week-head { display:grid; grid-template-columns:58px repeat(7,minmax(120px,1fr)); border-bottom:1px solid #dce6f0; background:#fafcff; }
.agenda-day-head { min-height:62px; padding:10px 8px; text-align:center; border-left:1px solid #e0e8f1; }
.agenda-day-head strong { display:block; font-size:14px; }
.agenda-day-head span { display:block; color:#77869a; font-size:12px; margin-top:3px; }
.agenda-day-head.today strong { color:#1477db; }
.agenda-grid-wrap { overflow:auto; height:calc(100vh - 132px); min-height:620px; }
.agenda-grid { position:relative; display:grid; grid-template-columns:58px repeat(7,minmax(120px,1fr)); height:1536px; min-height:1536px; background:repeating-linear-gradient(to bottom,transparent 0,transparent 63px,#dfe7f0 63px,#dfe7f0 64px); }
.agenda-hours { grid-column:1; position:relative; }
.agenda-hour-label { position:absolute; right:8px; transform:translateY(-7px); color:#758398; font-size:11px; }
.agenda-day-column { position:relative; border-left:1px solid #dfe7f0; }
.agenda-day-column:hover { background:rgba(39,137,238,.025); }
.agenda-event { position:absolute; left:4px; right:4px; min-height:28px; border-radius:7px; border-left:4px solid var(--event-color); padding:5px 7px; background:color-mix(in srgb,var(--event-color) 18%,white); color:color-mix(in srgb,var(--event-color) 58%,#0a1625); overflow:hidden; text-align:left; box-shadow:0 1px 2px rgba(25,51,83,.08); }
.agenda-event strong { display:block; font-size:12px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agenda-event span { display:block; font-size:10px; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agenda-event.sync-pending::after { content:"↻"; position:absolute; right:5px; top:3px; font-weight:800; }
.agenda-event.is-all-day { z-index:3; }
.agenda-now { position:absolute; left:0; right:0; height:2px; background:#ef3d45; z-index:4; pointer-events:none; }
.agenda-now::before { content:""; width:8px; height:8px; border-radius:50%; background:#ef3d45; position:absolute; left:-4px; top:-3px; }
.agenda-modal-backdrop { position:fixed; inset:0; z-index:20; display:grid; place-items:center; background:rgba(14,28,47,.34); backdrop-filter:blur(5px); padding:24px; }
.agenda-modal { width:min(640px,100%); padding:20px; }
.agenda-modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.agenda-modal h3 { margin:0; }
.agenda-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.agenda-field { display:grid; gap:5px; font-size:12px; color:#53657a; }
.agenda-field.wide { grid-column:1/-1; }
.agenda-field input,.agenda-field select,.agenda-field textarea { width:100%; border:1px solid #cbd8e6; border-radius:10px; padding:10px; background:white; color:#16263b; }
.agenda-field textarea { min-height:90px; resize:vertical; }
.agenda-modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.agenda-modal-actions .danger-button { margin-right:auto; }
@media(max-width:1150px){ .agenda-shell{grid-template-columns:200px minmax(0,1fr)} .agenda-app:not(.is-embedded){padding:8px} }
