* { box-sizing: border-box; margin: 0; }
:root {
  --azure: #1c4e99;        /* Click2Cloud primary blue */
  --azure-dark: #124559;
  --navy: #201c50;         /* Click2Cloud deep navy */
  --teal: #2cd7cc;         /* Click2Cloud teal accent */
  --blue: #257dff;
  --bg: #f6f8fa;
  --panel: #ffffff;
  --border: #e1e4e8;
  --text: #201f1e;
  --muted: #605e5c;
}
body {
  font-family: "Segoe UI", -apple-system, system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: var(--azure); text-decoration: none; }
a:hover { text-decoration: underline; }

/* top bar */
.topbar {
  background: linear-gradient(90deg, var(--navy) 0%, #124559 100%);
  color: #fff; height: 50px;
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  position: sticky; top: 0; z-index: 20;
  border-bottom: 2px solid var(--teal);
}
.brand { color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 30px; display: block; }
.brand-accent { color: var(--teal); }
.brand-product { font-weight: 500; opacity: .95; border-left: 1px solid rgba(255,255,255,.35); padding-left: 10px; }
.topbar-sub { opacity: .8; font-size: 13px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.topbar-user { background: rgba(44,215,204,.15); border: 1px solid rgba(44,215,204,.4); padding: 4px 10px; border-radius: 12px; }
.topbar-logout { color: #fff; opacity: .85; }
.topbar-logout:hover { color: var(--teal); text-decoration: none; }

/* login */
.login-body {
  background: linear-gradient(135deg, var(--navy) 0%, #124559 60%, #0c4743 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-wrap { width: 380px; max-width: 92vw; }
.login-card {
  background: rgba(255,255,255,.98); border-radius: 10px; padding: 36px 34px 30px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.login-logo { height: 52px; display: block; margin: 0 auto 14px; }
.login-card h1 { text-align: center; font-size: 22px; color: var(--navy); margin-bottom: 4px; }
.login-brand { text-align: center; font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-btn { width: 100%; padding: 10px; font-size: 14.5px; margin-top: 6px; }
.login-error {
  background: #fde7e9; border: 1px solid #f1bbbf; color: #8a1f2b;
  padding: 8px 12px; border-radius: 4px; font-size: 13px; margin-bottom: 14px;
}
.login-foot { text-align: center; color: rgba(255,255,255,.75); font-size: 12px; margin-top: 18px; }
.prewrap { white-space: pre-wrap; }

/* layout */
.layout { display: flex; min-height: calc(100vh - 48px); }
.sidenav {
  width: 220px; background: #eff3f6; border-right: 1px solid var(--border);
  padding: 12px 0; flex-shrink: 0;
}
.sidenav a {
  display: block; padding: 8px 18px; color: var(--text); font-size: 13.5px;
}
.sidenav a:hover { background: #e3e9ee; text-decoration: none; }
.sidenav a.active { background: #dcecec; border-left: 3px solid var(--teal); padding-left: 15px; font-weight: 600; }
.sidenav-group { padding: 14px 18px 4px; font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; }
.sidenav-project { display: flex; align-items: center; gap: 8px; padding: 6px 14px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.proj-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { flex: 1; padding: 24px 32px; max-width: 1300px; }

/* headings */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* stats */
.stat-row { display: flex; gap: 14px; margin: 16px 0 22px; flex-wrap: wrap; }
.stat-tile {
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 22px; min-width: 130px; text-align: center;
}
.stat-num { font-size: 26px; font-weight: 600; color: var(--azure); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.proj-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 16px; color: var(--text); display: block;
}
.proj-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); text-decoration: none; }
.proj-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.proj-card-title { font-weight: 600; font-size: 15px; }
.proj-card-head .pill { margin-left: auto; }
.proj-avatar {
  background: linear-gradient(135deg, var(--navy), #124559); color: var(--teal); border-radius: 4px; font-weight: 600;
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.proj-avatar.lg { width: 40px; height: 40px; font-size: 15px; }

/* pills, tags, avatars */
.pill { padding: 3px 10px; border-radius: 12px; font-size: 12px; background: #e1e4e8; white-space: nowrap; }
.pill.sm { padding: 1px 8px; font-size: 11px; }
.status-active { background: #cfe8ff; color: #005a9e; }
.status-completed { background: #d6f0d6; color: #1e6b1e; }
.status-planning { background: #fff1c9; color: #7a5b00; }
.status-on-hold { background: #f3d6d8; color: #8a1f2b; }
.tag-row { margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: #e8f1fa; color: #005a9e; border-radius: 3px; padding: 2px 8px; font-size: 12px; }
.avatar {
  background: #773b93; color: #fff; border-radius: 50%; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
}

/* progress */
.progress { background: #e1e4e8; border-radius: 4px; height: 8px; margin: 10px 0 6px; overflow: hidden; }
.progress.sm { height: 6px; width: 140px; margin: 4px 0 2px; }
.progress-fill { background: #339933; height: 100%; border-radius: 4px; }

/* panels & two-col */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 18px; margin-bottom: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* bars */
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-label { width: 120px; font-size: 13px; flex-shrink: 0; }
.bar-label.wide { width: 210px; }
.bar-track { flex: 1; background: #eef1f4; border-radius: 3px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; }
.bar-num { width: 46px; text-align: right; font-size: 12px; color: var(--muted); }

/* tables */
.table { width: 100%; border-collapse: collapse; background: var(--panel); }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 8px 10px; border-bottom: 2px solid var(--border);
}
.table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:hover td { background: #f8fafc; }
.table.kv td:first-child { width: 180px; color: var(--muted); }
.backlog-table td { vertical-align: middle; }

/* work item badges */
.wi-badge {
  color: #fff; font-size: 10px; font-weight: 700; border-radius: 3px;
  padding: 2px 5px; display: inline-block; min-width: 18px; text-align: center;
}
.state-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }

/* board */
.board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 20px; }
.board-col { background: #eef1f4; border-radius: 6px; min-width: 270px; flex: 1; }
.board-col-head {
  padding: 10px 14px; font-weight: 600; border-top: 3px solid #ccc;
  border-radius: 6px 6px 0 0; background: #e7ebef;
}
.board-col-body { padding: 10px; min-height: 220px; display: flex; flex-direction: column; gap: 10px; }
.board-col-body.drag-over { outline: 2px dashed var(--azure); outline-offset: -4px; border-radius: 6px; }
.wi-card {
  background: var(--panel); border: 1px solid var(--border); border-left: 4px solid #ccc;
  border-radius: 4px; padding: 10px 12px; cursor: grab;
}
.wi-card.dragging { opacity: .5; }
.wi-card-title { font-size: 13px; margin-bottom: 6px; }
.wi-card-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.wi-card-assignee { margin-top: 6px; font-size: 12px; display: flex; align-items: center; gap: 6px; }

/* forms */
.form-card { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 20px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 14px; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
input, select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #c8c6c4; border-radius: 3px;
  font-family: inherit; font-size: 13.5px; margin-top: 4px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--azure); outline-offset: -1px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; margin-top: 0; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* buttons */
.btn {
  display: inline-block; padding: 7px 16px; border-radius: 3px; border: 1px solid #c8c6c4;
  background: #fff; color: var(--text); font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.btn:hover { background: #f3f2f1; text-decoration: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--azure); }
.btn-danger { background: #cc293d; border-color: #cc293d; color: #fff; }
.btn-icon { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 2px 6px; }
.btn-icon:hover { color: #cc293d; }

/* misc */
.flash {
  background: #dff6dd; border: 1px solid #b7e0b2; color: #1e6b1e;
  padding: 8px 14px; border-radius: 4px; margin-bottom: 14px;
}
.danger-zone { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--muted); }
.sprint-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sprint-right { text-align: right; }

/* assessment */
.assess-area { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--azure); }
.assess-q { margin-bottom: 12px; }
.assess-q-text { font-size: 13.5px; margin-bottom: 4px; }
.assess-q-controls { display: flex; gap: 10px; }
.assess-q-controls select { width: 190px; margin-top: 0; }
.assess-q-controls input { flex: 1; margin-top: 0; }

/* report / print */
.report { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 28px 34px; }
.report h1 { font-size: 20px; margin-bottom: 4px; }
.report h2 { margin: 22px 0 8px; font-size: 15px; color: var(--azure); }
.report-head { border-bottom: 2px solid var(--teal); padding-bottom: 12px; }
.report-brand { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.report-brand .brand-accent { color: #0aa79d; }
.footer {
  padding: 14px 32px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--border); background: var(--panel);
}
@media print { .footer { display: none !important; } }
@media print {
  .topbar, .sidenav, .no-print, .flash { display: none !important; }
  .content { padding: 0; max-width: none; }
  .report { border: none; padding: 0; }
  body { background: #fff; }
  .table tr:hover td { background: transparent; }
}
