* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #323130;
  background: #f3f2f1;
}
a { color: #00144e; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- top band: CSG navy, mirrors the merged-header concept ---- */
.csg-header {
  height: 64px;
  background: #00144e;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #fff;
  position: relative;
}
.csg-brand { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.csg-brand img { height: 40px; width: auto; display: block; }
.csg-brand .title { font-size: 18px; font-weight: 600; }

.csg-search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 468px;
  max-width: 40vw;
  height: 34px;
  background: #fff;
  border-radius: 17px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.csg-search .glyph {
  width: 12px; height: 12px; border: 2px solid #666; border-radius: 50%;
  position: relative; margin-right: 8px; flex: none;
}
.csg-search .glyph::after {
  content: ''; position: absolute; width: 2px; height: 6px; background: #666;
  transform: rotate(-45deg); left: 11px; top: 9px; border-radius: 1px;
}
.csg-search input {
  border: none; outline: none; font-size: 14px; width: 100%; background: transparent; color: #323130;
}

.csg-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.csg-copilot {
  height: 28px; line-height: 26px; padding: 0 12px; border-radius: 14px;
  background: transparent; border: 1px solid rgba(255,255,255,.55);
  color: #fff; font-size: 12px;
}
.csg-copilot:hover { background: rgba(255,255,255,.15); text-decoration: none; color: #fff; }
.csg-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: block; }
.csg-avatar img { width: 36px; height: 36px; display: block; }

/* ---- body layout: quick launch + main, like a team site ---- */
.csg-body { display: flex; align-items: flex-start; }
.csg-nav {
  width: 220px; flex: none; background: #fff; min-height: calc(100vh - 64px);
  border-right: 1px solid #e1dfdd; padding: 16px 0;
}
.csg-nav a {
  display: block; padding: 8px 20px; color: #323130; font-size: 14px;
}
.csg-nav a:hover { background: #f3f2f1; text-decoration: none; }

.csg-main { flex: 1; padding: 24px; display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 900px) { .csg-main { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid #e1dfdd; border-radius: 4px;
  padding: 18px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.06); margin-bottom: 20px;
}
.card h2 { margin: 0 0 12px; font-size: 20px; font-weight: 600; color: #323130; }
.card h2.links-heading { font-size: 28px; }

table.events { width: 100%; border-collapse: collapse; }
table.events td { padding: 8px 6px; border-bottom: 1px solid #f0efee; font-size: 14px; vertical-align: top; }
table.events tr:last-child td { border-bottom: none; }
.ev-title { font-weight: 600; }
.ev-when { color: #605e5c; white-space: nowrap; }
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  background: #eef1f8; color: #00144e; font-size: 12px; font-weight: 600;
}

ul.links { list-style: none; margin: 0; padding: 0; }
ul.links li { padding: 7px 0; display: flex; align-items: center; }
ul.links li::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: #a8a6a4;
  margin-right: 12px; flex: none;
}
ul.links a { font-size: 14px; font-weight: 600; }
ul.links li { flex-wrap: wrap; }
.link-desc { flex-basis: 100%; margin-left: 20px; color: #605e5c; font-size: 12px; }

.doc-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #f0efee; font-size: 14px; }
.doc-row:last-child { border-bottom: none; }
.doc-size { color: #605e5c; font-size: 12px; }
.muted { color: #a19f9d; font-size: 13px; }

.footer { text-align: center; color: #a19f9d; font-size: 12px; padding: 20px; }

/* ---- actions, upload, modal ---- */
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.btn-sm {
  background: #00144e; color: #fff; border: none; border-radius: 4px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-sm:hover { background: #001f73; }
.btn-sm.ghost { background: #f3f2f1; color: #323130; }
.btn-sm.ghost:hover { background: #e1dfdd; }
.row-actions a, .doc-actions a { text-decoration: none; margin-left: 8px; font-size: 14px; }
.doc-actions { display: inline-flex; align-items: center; gap: 4px; }
table.events td.row-actions { white-space: nowrap; text-align: right; }

.dropzone {
  border: 2px dashed #c8c6c4; border-radius: 6px; padding: 16px; text-align: center;
  color: #605e5c; font-size: 13px; margin-bottom: 12px; transition: all .15s;
}
.dropzone.over { border-color: #00144e; background: #eef1f8; color: #00144e; }
.dropzone .link { color: #00144e; font-weight: 600; cursor: pointer; text-decoration: underline; }

.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal {
  background: #fff; border-radius: 8px; padding: 24px 28px; width: 380px; max-width: 92vw;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.modal h3 { margin: 0 0 16px; color: #00144e; }
.modal label { display: block; font-size: 13px; color: #605e5c; margin-bottom: 12px; }
.modal input {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid #c8c6c4; border-radius: 4px; font-size: 14px; box-sizing: border-box;
}
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; }
.btn-sm.danger { background: #a4373a; }
.btn-sm.danger:hover { background: #86292c; }

/* ---- month calendar ---- */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { margin: 0; min-width: 168px; text-align: center; font-size: 18px; }
.cal-arrow {
  border: 1px solid #e1dfdd; background: #fff; border-radius: 4px; width: 30px; height: 30px;
  font-size: 18px; line-height: 1; cursor: pointer; color: #00144e;
}
.cal-arrow:hover { background: #f3f2f1; }
.cal-today { margin-left: 4px; }

.calgrid { border: 1px solid #e1dfdd; border-radius: 6px; overflow: hidden; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); background: #faf9f8; }
.cal-dow div { padding: 8px 6px; font-size: 12px; font-weight: 600; color: #605e5c; text-align: center; border-bottom: 1px solid #e1dfdd; }
.cal-cells { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell {
  min-height: 92px; border-right: 1px solid #f0efee; border-bottom: 1px solid #f0efee;
  padding: 4px; cursor: pointer; position: relative; overflow: hidden;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: #f7f9fd; }
.cal-cell.other { background: #fafafa; }
.cal-cell.other .cal-num { color: #c8c6c4; }
.cal-num { font-size: 12px; color: #323130; text-align: right; padding: 2px 4px; }
.cal-cell.today .cal-num {
  background: #00144e; color: #fff; border-radius: 50%; width: 22px; height: 22px;
  line-height: 18px; margin-left: auto; text-align: center; padding: 2px 0;
}
.cal-ev {
  color: #fff; font-size: 11px; line-height: 1.3; padding: 2px 6px; border-radius: 3px;
  margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.cal-ev:hover { filter: brightness(1.1); }
.cal-more { font-size: 10px; color: #605e5c; padding: 0 4px; }

/* ---- documents library page ---- */
.csg-nav a.active { background: #eef1f8; color: #00144e; font-weight: 600; border-left: 3px solid #00144e; padding-left: 17px; }
.lib-main { flex: 1; padding: 20px 24px; min-width: 0; }
.lib-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lib-toolbar label.btn-sm { cursor: pointer; }
.lib-crumbs { font-size: 14px; margin-bottom: 12px; color: #605e5c; }
.lib-crumbs a { color: #00144e; font-weight: 600; }
.lib-crumbs .sep { margin: 0 6px; color: #a19f9d; }
.lib-drop { border: 2px solid transparent; border-radius: 6px; transition: all .15s; }
.lib-drop.over { border-color: #00144e; background: #eef1f8; }
.lib-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e1dfdd; border-radius: 4px; overflow: hidden; }
.lib-table thead th {
  text-align: left; font-size: 12px; font-weight: 600; color: #605e5c;
  padding: 10px 12px; border-bottom: 1px solid #e1dfdd; background: #faf9f8;
}
.lib-table td { padding: 9px 12px; font-size: 14px; border-bottom: 1px solid #f0efee; vertical-align: middle; }
.lib-table tbody tr:hover { background: #f7f9fd; }
.lib-table tbody tr:last-child td { border-bottom: none; }
.lib-table .c-name a { color: #323130; font-weight: 600; }
.lib-table .c-name a:hover { color: #00144e; }
.lib-table .c-mod, .lib-table .c-by, .lib-table .c-size { color: #605e5c; white-space: nowrap; }
.lib-table .c-size { text-align: right; }
.lib-table .c-act { text-align: right; white-space: nowrap; }
.lib-table .c-act a { text-decoration: none; margin-left: 8px; }
@media (max-width: 720px) { .lib-table .c-by, .lib-table .c-mod { display: none; } }

/* ---- landing / denied / error ---- */
.center-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #00144e;
}
.panel {
  background: #fff; border-radius: 8px; padding: 40px 44px; max-width: 440px; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.panel img { height: 56px; margin-bottom: 20px; }
.panel h1 { font-size: 22px; margin: 0 0 10px; color: #00144e; }
.panel p { color: #605e5c; font-size: 14px; line-height: 1.5; }
.btn {
  display: inline-block; margin-top: 20px; background: #00144e; color: #fff;
  padding: 10px 22px; border-radius: 4px; font-size: 14px; font-weight: 600;
}
.btn:hover { background: #001f73; text-decoration: none; color: #fff; }
