/* AMS — blue and white firm theme; works in light and dark mode; A4 print rules. */
:root { --ams-blue: #1f4e9e; --ams-blue-2: #163a78; --ams-sky: #e8f0fc; --ams-side-w: 248px; }
[data-bs-theme="dark"] { --ams-sky: #1b2740; }
body { font-family: Arial, "Liberation Sans", Helvetica, sans-serif; background: var(--bs-tertiary-bg); }
.ams-top { background: linear-gradient(90deg, var(--ams-blue-2), var(--ams-blue)); min-height: 56px; }
.ams-search { max-width: 520px; }
.ams-firm { max-width: 220px; }
.ams-side { flex-shrink: 0; width: var(--ams-side-w); min-height: calc(100vh - 56px); background: var(--bs-body-bg); border-right: 1px solid var(--bs-border-color);
  position: sticky; top: 56px; align-self: flex-start; max-height: calc(100vh - 56px); overflow-y: auto; }
.ams-side .nav-link { color: var(--bs-body-color); border-radius: .4rem; margin: 1px .5rem; padding: .45rem .75rem; font-size: .92rem; }
.ams-side .nav-link:hover { background: var(--ams-sky); }
.ams-side .nav-link.active { background: var(--ams-blue); color: #fff; }
.ams-side .menu-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); padding: .9rem 1.25rem .25rem; }
.ams-main { min-width: 0; }
.ams-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .6rem; }
.kpi { border-left: 4px solid var(--ams-blue); }
.kpi .v { font-size: 1.6rem; font-weight: 700; color: var(--ams-blue); }
[data-bs-theme="dark"] .kpi .v { color: #8fb3ff; }
.table-sm td, .table-sm th { vertical-align: middle; }
.status-badge { font-size: .74rem; }
.wp-proc textarea { min-height: 70px; }
.planned { color: #6c757d; font-style: italic; }
.gantt { width: 100%; overflow-x: auto; }
.gantt svg text { font-size: 11px; fill: var(--bs-body-color); }
.gantt .bar-plan { fill: #9db7e6; }
.gantt .bar-actual { fill: #1f8a4c; }
.gantt .bar-phase { fill: #1f4e9e; opacity: .85; }
.gantt .today { stroke: #d63384; stroke-width: 1.5; }
.gantt .grid { stroke: var(--bs-border-color); }
.preview-page { max-width: 820px; box-shadow: 0 2px 12px rgba(0,0,0,.18); background: #fff; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ams-blue-2), var(--ams-blue) 60%, #4f7fd1); }
.login-card { width: 100%; max-width: 420px; }
.mw-640 { max-width: 640px; } .mt-6vh { margin-top: 6vh; }
.pointer { cursor: pointer; }
.untrusted { border-left: 3px solid #ffc107; padding-left: .5rem; }
@media (max-width: 991.98px) {
  .ams-side { position: fixed; z-index: 1030; left: calc(-1 * var(--ams-side-w)); transition: left .2s; height: calc(100vh - 56px); }
  .ams-side.open { left: 0; box-shadow: 0 0 24px rgba(0,0,0,.25); }
}
@media print {
  @page { size: A4; margin: 15mm; }
  .ams-top, .ams-side, .no-print, .toast-container { display: none !important; }
  .ams-main { padding: 0 !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
}
.mh-360 { max-height: 360px; } .w-0 { width: 0; }
