body { margin: 0; background: #fff; font-family: Arial, Helvetica, sans-serif; color: #000; }
.frame { width: 650px; margin: 4px auto; border: 1px solid #aaa; min-height: 300px; padding-bottom: 30px; }
.frame.wide { width: 800px; }
.banner { background: #6633ff; color: #fff; text-align: center; padding: 10px 0 8px; }
.banner .t1 { font-size: 24px; font-weight: bold; }
.banner .t2 { font-size: 20px; font-weight: bold; font-style: italic; }
.logout { text-align: right; font-size: 11px; padding: 6px 8px 0; }
.logout a { color: #00c; }
h2.title { text-align: center; font-size: 18px; text-decoration: underline; margin: 22px 0; }
.menu { text-align: center; }
.menu button, .toolbar button { display: block; margin: 4px auto; width: 150px; padding: 4px 0; font-weight: bold;
  font-size: 12px; background: #eee; border: 0; cursor: pointer; }
.menu button:hover, .toolbar button:hover { background: #ddd; }
.menu button.admin { background: #fff3c4; }
.toolbar { text-align: center; margin: 4px 0 18px; }
.toolbar button { display: inline-block; width: auto; padding: 5px 7px; margin: 0 1px; }
.toolbar button.on { background: #fff3c4; }
.footer { text-align: center; font-size: 10px; margin-top: 60px; }
.footer a { color: #00c; text-decoration: none; }
ul.links { width: 260px; margin: 0 auto; font-size: 13px; line-height: 1.45; }
ul.links a { color: #00c; }
ul.links.small { width: 150px; font-size: 8px; }
.adminbar { text-align: center; margin: 14px 0; }
button.small { font-size: 11px; padding: 2px 8px; cursor: pointer; }
button.primary { font-weight: bold; }

/* Login */
.login { text-align: center; font-size: 11px; }
.login table { margin: 0 auto; }
.login td { padding: 1px 2px; }
.login input[type=text], .login input[type=password] { width: 155px; font-size: 11px; border: 1px solid #99c; background: #eef3ff; }
.login .btns { margin-top: 12px; }
.login .btns button { font-size: 10px; font-weight: bold; background: #eee; border: 0; padding: 3px 6px; cursor: pointer; }
.login .error { color: #c00; margin-top: 10px; min-height: 14px; }

/* Calendars */
table.cal { border-collapse: collapse; margin: 0 auto; }
table.cal td, table.cal th { border: 1px solid #888; }
.navbar { background: #0000ff; color: #fff; }
.navbar a { color: #fff; text-decoration: none; cursor: pointer; font-size: 13px; }
.navbar select { background: #0000ff; color: #fff; font-weight: bold; font-size: 18px; border: 1px solid #fff; }
.navbar .cur { font-size: 10px; font-weight: bold; position: absolute; right: 2px; top: 2px; }
.navbar td { text-align: center; padding: 4px; position: relative; }
th.dayhead { background: #0000ff; color: #fff; font-size: 11px; line-height: 1.1; }
th.rowhead { font-size: 14px; width: 54px; vertical-align: top; padding-top: 6px; }
td.wcell { width: 114px; height: 44px; vertical-align: top; text-align: center; font-size: 10px; position: relative; }
td.wcell .top { color: #000; }
td.wcell .bot { color: #00c; position: absolute; bottom: 2px; left: 0; right: 0; }
td.wcell .x { color: red; font-size: 20px; position: absolute; top: 10px; left: 0; right: 0; }
.can-edit td.wcell:hover, .can-edit th.dayhead.day:hover, .can-edit table.year td:hover { outline: 2px solid #f90; outline-offset: -2px; cursor: pointer; }

td.mcell { width: 82px; height: 64px; vertical-align: top; font-size: 12px; padding: 2px 4px; }
td.mcell .d { font-family: "Times New Roman", serif; font-weight: bold; font-size: 15px; }
td.mcell .vc { color: #b455d6; }
td.mcell.today { background: #00ffff; }
td.mcell .vw { background: #0000ff; color: #fff; font-size: 10px; padding: 0 2px; display: inline-block; cursor: pointer; text-decoration: none; }
td.mcell select { width: 80px; font-size: 10px; margin-top: 1px; }
td.mcell select.vc { color: #b455d6; }
.legend { text-align: right; font-size: 12px; width: 600px; margin: 8px auto 20px; }
.legend span.sw { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin: 0 2px 0 10px; }

table.summary { border-collapse: collapse; margin: 0 auto; font-size: 11px; }
table.summary td, table.summary th { border: 1px solid #888; text-align: center; padding: 1px 4px; }
table.summary th { background: #0000ff; color: #fff; }
table.summary td:first-child { text-align: left; width: 82px; }
table.summary input { width: 38px; font-size: 11px; text-align: center; }

table.year td { width: 54px; height: 28px; font-size: 9px; text-align: center; }
table.year th.m { background: #0000ff; color: #fff; font-size: 11px; }
table.year th.m a { color: #fff; }
table.year th.rowhead { font-size: 12px; color: #00c; text-decoration: underline; }

.msg { text-align: center; }
.msg textarea { width: 345px; height: 145px; font-size: 11px; }
.msg .lbl { font-size: 11px; font-weight: bold; }

/* Modal + flash */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-start; justify-content: center; z-index: 50; }
.modal { background: #fff; margin-top: 90px; min-width: 320px; max-width: 520px; border: 1px solid #555; box-shadow: 0 6px 24px rgba(0,0,0,.3); font-size: 13px; }
.mtitle { background: #0000ff; color: #fff; font-weight: bold; padding: 6px 10px; }
.mbody { padding: 12px 14px 4px; }
.mbody label { display: block; margin: 0 0 8px; }
.mbody label span { display: inline-block; width: 110px; }
.mbody input[type=text], .mbody select, .mbody textarea { width: 260px; font-size: 13px; }
.mbody textarea { height: 70px; }
.mbody .daypair { margin-bottom: 10px; }
.mbody .daypair b { display: block; margin-bottom: 4px; }
.merr { color: #c00; padding: 0 14px; min-height: 14px; font-size: 12px; }
.mbtns { padding: 8px 14px 12px; text-align: right; }
.mbtns button { margin-left: 6px; padding: 3px 12px; cursor: pointer; }
#flash { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 6px 16px;
  font-size: 13px; border-radius: 3px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
#flash.show { opacity: 1; }
#flash.err { background: #c00; }

/* Admin */
.admin-section { width: 760px; margin: 0 auto 26px; font-size: 12px; }
.admin-section h3 { background: #0000ff; color: #fff; font-size: 13px; padding: 4px 8px; margin: 0 0 6px; }
.admin-section table { border-collapse: collapse; width: 100%; }
.admin-section th { text-align: left; font-size: 11px; border-bottom: 1px solid #888; padding: 2px 4px; }
.admin-section td { padding: 2px 4px; border-bottom: 1px solid #eee; }
.admin-section input[type=text], .admin-section input[type=password] { font-size: 12px; }
.admin-section input.n { width: 44px; }
.admin-section .note { color: #555; margin: 4px 0 8px; }
table.edit-links { margin: 0 auto; font-size: 12px; }
table.edit-links input.lbl { width: 170px; } table.edit-links input.url { width: 300px; }

/* Call planner */
.planner-frame { width: auto; max-width: 1240px; padding: 0 10px 30px; }
.legend-row { text-align: center; font-size: 13px; margin: 4px 0 10px; }
.legend-row span { margin: 0 9px; white-space: nowrap; }
.legend-row .sw { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 5px; border: 1px solid #888; }
.pnav { display: flex; justify-content: center; align-items: center; gap: 40px; margin: 6px 0 10px; font-weight: bold; position: relative; }
.pnav a { cursor: pointer; font-size: 15px; }
.pnav select { font-size: 15px; padding: 2px 6px; }
.pnav .curlink { position: absolute; right: 6px; font-weight: normal; font-size: 13px; color: #00c; text-decoration: underline; }
.ptools, .pbanner { text-align: center; font-size: 12px; margin: 0 0 8px; padding: 5px; background: #f4f4f4; border: 1px solid #ddd; }
.ptools label { margin: 0 6px; white-space: nowrap; }
.ptools .lbl { font-weight: bold; margin-right: 4px; }
.ptools .sep { display: inline-block; width: 1px; height: 14px; background: #bbb; margin: 0 10px; vertical-align: middle; }
.pbanner { background: #fff3c4; border-color: #e0c060; }
.pbanner button { margin-left: 6px; }
.pgrid-wrap { overflow-x: auto; }
table.pgrid { border-collapse: collapse; margin: 0 auto; user-select: none; }
table.pgrid th, table.pgrid td { border: 1px solid #666; }
table.pgrid tr.dow th { background: #0000ff; color: #fff; font-size: 12px; width: 26px; padding: 2px 0; }
table.pgrid tr.dow th:first-child { background: #0000ff; }
table.pgrid tr.dnum th { font-size: 12px; padding: 2px 0; }
table.pgrid tr.dnum th:first-child { text-align: right; padding-right: 6px; font-weight: normal; }
table.pgrid th.name { text-align: left; font-size: 12px; padding: 1px 6px; white-space: nowrap; min-width: 92px; }
table.pgrid th.name.nocaller { color: #777; font-weight: normal; }
table.pgrid td { width: 26px; height: 20px; padding: 0; }
table.pgrid .out { background: #888; }
table.pgrid td.off, .sw.off { background: #e01b1b; }
table.pgrid td.nocall, .sw.nocall { background: #555; }
table.pgrid td.hospital, .sw.hospital { background: #f39c12; }
table.pgrid td.c-wk, .sw.c-wk { background: #46d6dc; }
table.pgrid td.c-fri, .sw.c-fri { background: #0b5d1e; }
table.pgrid td.c-sat, .sw.c-sat { background: #f2e600; }
table.pgrid td.c-sun, .sw.c-sun { background: #c21fd6; }
table.pgrid td.conflict { box-shadow: inset 0 0 0 3px #e01b1b; }
table.pgrid td.proposed { outline: 2px dashed #000; outline-offset: -3px; }
table.pgrid.paintable td[data-doc] { cursor: crosshair; }
table.pgrid.paintable td[data-doc]:hover { box-shadow: inset 0 0 0 2px #00c; }
table.pgrid .st { width: 38px; text-align: center; font-size: 11px; background: #f4f4f4; }
table.pgrid tr.who td { font-size: 9px; text-align: center; height: 18px; color: #333; }
table.pgrid tr.who th { font-size: 11px; text-align: right; padding-right: 6px; font-weight: normal; }
.pbottom { display: flex; gap: 24px; justify-content: center; align-items: flex-start; margin-top: 16px; flex-wrap: wrap; }
#issues { width: 470px; font-size: 12px; }
.iss-h { background: #0000ff; color: #fff; font-weight: bold; padding: 3px 8px; }
.iss { padding: 3px 8px; border-bottom: 1px solid #eee; }
.iss.error { color: #b00; font-weight: bold; }
.iss.warn { color: #8a5a00; }
.iss.info { color: #444; }
.iss.ok { color: #070; }
table.pstats { border-collapse: collapse; font-size: 11px; }
table.pstats th { background: #0000ff; color: #fff; padding: 2px 6px; }
table.pstats td { border: 1px solid #bbb; padding: 1px 6px; text-align: center; }
table.pstats td:first-child { text-align: left; }
.rule { color: #c90; }
.rules-note { max-width: 900px; margin: 16px auto 0; font-size: 11px; color: #555; text-align: center; }

/* Reports / printing */
@media print {
  .toolbar, .logout, .adminbar, #flash { display: none !important; }
  .frame { border: 0; }
  .can-edit td.wcell:hover { outline: none; }
}
body.report .toolbar, body.report .logout { display: none; }
body.report-small td.wcell { height: 30px; font-size: 8px; width: 90px; }
body.report-small th.rowhead { font-size: 11px; }
body.report-small td.wcell .x { font-size: 14px; top: 6px; }
