/* Tabs + Views (Projctr parity) */
.tabs{display:flex;gap:6px;padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.08)}
.tab{border:1px solid rgba(0,0,0,.12);background:rgba(255,255,255,.8);color:var(--ink);border-radius:12px;padding:6px 12px;cursor:pointer}
.tab.active{background:#eef1ff;border-color:rgba(125,139,255,.45)}
.view{display:none;padding:14px}
.view.active{display:block}

/* Project/Briefs table (lifted from Projctr’s list) */
table.projects{width:100%;border-collapse:collapse;font-size:15px;color:#222}
table.projects thead {
	background: #2D5CF5;
	text-transform: uppercase;
	font-size: 14px !important;
	letter-spacing: .05em;
	color: #f3f5f2;
	font: var(--font-title);
}
table.projects th, table.projects td{
  text-align:left;padding:12px 16px;border-bottom:1px solid rgba(0,0,0,.04);vertical-align:middle
}

table.projects th {
	font-weight: 500 !important;
	font-family: var(--font-title);
	letter-spacing: -0.01rem;
}

table.projects tbody tr{height:var(--row-h);transition:background .2s ease}

/* inline input feel */
table.projects td input, table.projects td textarea, table.projects td select{
  background:transparent;border:none;color:#222;font:inherit;width:100%;padding:0;outline:none;
  -webkit-appearance:none !important; -moz-appearance:none !important; appearance:none !important;
}
table.projects td input:hover, table.projects td textarea:hover{border-bottom:1px dotted var(--brand1);cursor:text}
table.projects td input:focus, table.projects td textarea:focus{background:rgba(0,0,0,.03)}

/* Month divider + monthly totals row */
.month-divider td{
  background:rgba(0,0,0,.02);color:#666;font-size:12px;text-transform:uppercase;letter-spacing:.05em;
  padding:8px 16px;border-top:1px solid rgba(0,0,0,.08)
}
.month-totals td{
  background:rgba(0,0,0,.02); font-weight:500;
}
.month-totals .ok{color:#000}
.month-totals .over{color:var(--bad)}

.projects{
  width:100%;
  table-layout:auto;
}

/* Date In */
.projects th:nth-child(1),
.projects td:nth-child(1){ width: 160px; }

/* Deadline */
.projects th:nth-child(2),
.projects td:nth-child(2){ width: 160px; }

/* Title */
.projects th:nth-child(3),
.projects td:nth-child(3){ min-width: 390px }

/* Client user */
.projects th:nth-child(4),
.projects td:nth-child(4) { width: 180px; }

/* Status */
.projects th:nth-child(5),
.projects td:nth-child(5) { width: 180px; }

/* Brief btn */
.projects th:nth-child(6),
.projects td:nth-child(6),

/* Time */
.projects th:nth-child(7),
.projects td:nth-child(7),

/* Approval link */
.projects th:nth-child(8),
.projects td:nth-child(8){ width: 120px; }

/* Actions */
.projects th:nth-child(9),
.projects td:nth-child(9){ width: 180px; }

/* Keep actions from wrapping */
.projects td:last-child,
.projects th:last-child{
  width: 180px;
  white-space: nowrap;
}

.projects{ min-width: 1440px; }
.projects-shell{ overflow-x: auto; }

.projects td:nth-child(3){font-weight:500;}

/* Status cell + dot */
.status-cell{padding:0 !important}
.status-wrapper{display:flex;align-items:center;height:100%;width:100%;gap:8px}
.status-dot{flex-shrink:0;width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 2px rgba(0,0,0,.1)}

/* Status colours (Projctr map) */
.status-none .status-dot{background:#8a93b0}
.status-submitted .status-dot{background:#0A84FF}
.status-read .status-dot{background:#8E8E93}
.status-inprogress .status-dot{background:var(--brand1)}
.status-onapproval .status-dot{background:#FE9F0A}
.status-approved .status-dot{background:#30D158}
.status-cancelled .status-dot{background:#F43F5E}

/* Styled select */
table.projects td select{line-height:38px;background:#f3f5f2;cursor:pointer;transition:background .2s ease}
table.projects td select:hover{background:var(--brand1); color:#f3f5f2;}
table.projects td select:focus{background:var(--brand1); color:#f3f5f2;outline:none}

/* Time cell (currency-style prefix is not used; keep padding) */
.time-cell input{padding-left:2px}

/* Row actions (edit/delete etc) */
.row-actions{padding:0 10px}
.row-actions .link{background:transparent;border:0;color:#4a4a4a;cursor:pointer}
.row-actions .link:hover{color:#000}

/* Empty state */
.projects-empty{text-align:center;padding:40px;color:#777;font-style:italic;background:rgba(0,0,0,.02);border-radius:var(--round)}

/* Edit flag */
.red-dot{display:inline-block;width:8px;height:8px;margin-left:8px;border-radius:999px;background:#ff3b30;box-shadow:0 0 0 2px #fff;vertical-align:middle}

/* Users view — card list */
.user-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:18px;padding:14px 16px;box-shadow:0 6px 16px rgba(0,0,0,.06)}
.user-card .uc-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.user-card .uc-name{font-weight:600;font-size:16px;letter-spacing:.01em;color:#ff5c7a}
.user-card .uc-badges{display:flex;gap:8px;align-items:center}
.user-card .uc-pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:600;background:rgba(0,0,0,.06);color:rgba(0,0,0,.75)}
.user-card .uc-lines{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.user-card .uc-line{display:flex;gap:12px;align-items:baseline;justify-content:space-between;padding:6px 0;border-top:1px solid rgba(0,0,0,.06)}
.user-card .uc-line:first-child{border-top:0}
.user-card .uc-line .k{font-size:13px;color:rgba(0,0,0,.55);flex:0 0 84px}
.user-card .uc-line .v{font-size:13px;color:rgba(0,0,0,.85);word-break:break-word;text-align:right}
.user-card .mono{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:12px}

@media (max-width: 980px){
  .user-card .uc-line{flex-direction:column;align-items:flex-start}
  .user-card .uc-line .v{text-align:left}
}

/* Panel headers */
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.panel-title {
	font-weight: 400;
	font-size: 28px;
	color: rgba(243, 245, 242,0.5);
	letter-spacing: -0.05rem;
	font-family: var(--font-title);
	padding: 18px 14px;
	background: var(--brand1);
	border-top-right-radius: 16px;
	border-top-left-radius: 16px;
min-width:1440px;
}

/* Users grid */
.users-grid{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));gap:12px}
@media (max-width: 1200px){ .users-grid{grid-template-columns:repeat(3, minmax(0, 1fr));} }
@media (max-width: 900px){ .users-grid{grid-template-columns:repeat(2, minmax(0, 1fr));} }
@media (max-width: 620px){ .users-grid{grid-template-columns:1fr;} }
.user-card .uc-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end}
.user-card .uc-actions .icon-btn {
	padding: 4px;
	border-radius: 99px;
	background: var(--brand1);
	width: 54px;
	height: 54px;
}
.user-card .uc-role{font-size:14px;color:rgba(0,0,0,.7);margin-top:2px}

/* Settings summary */
.settings-summary{display:grid;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));gap:12px}
.settings-summary .sum-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:18px;padding:14px 16px;box-shadow:0 6px 16px rgba(0,0,0,.06)}
.settings-summary .k{font-size:11px;color:rgba(0,0,0,.55);margin-bottom:4px}
.settings-summary .v{font-size:14px;font-weight:700;color:#000}



/* Icon buttons (Brief + row actions) */
.icon-btn:hover {
	background: var(--bad);
	border-radius: 99px;
Opacity:0.85;
}
.icon-btn:active{transform:translateY(1px)}
.icon-btn .label{font-size:10px;font-weight:600;color:var(--brand1)}
.icon-btn svg{width:18px;height:18px;display:block;fill:var(--brand1);stroke:var(--brand1)}
.icon-btn .dot{width:8px;height:8px;border-radius:50%;background:var(--bad);display:inline-block;margin-left:2px}

/* Toolbar labels sit on a dark toolbar — keep text light, keep icons brand-coloured */
.toolbar .icon-btn .label{color:#f3f5f2}

/* Modal sizing + scroll safety (brief/details) */
.modal .card{width:calc(100vw - 40px)}
#briefViewModal .card{max-width:980px;max-height:90vh}
#briefViewBody{max-height:calc(90vh - 140px);overflow:auto;}

/* Compact modals */
#confirmModal .card{max-width:520px}
#timeModal .card{max-width:520px}

/* Settings card */
.settings-summary{max-width:480px;margin:0 auto;display:block}
.settings-card{background:rgba(255,255,255,1);border-radius:18px;padding:16px 18px;box-shadow:0 6px 16px rgba(0,0,0,.06)}
.settings-card .sc-row{display:flex;justify-content:space-between;gap:14px;align-items:baseline;padding-top:10px;}
.settings-card .sc-row:first-child{border-top:0;padding-top:0;margin-top:0}
.settings-card .k{font-size:14px;color:rgba(0,0,0,.55)}
.settings-card .v {
	font-size: 14px;
	font-weight: 700;
	color: var(--brand1);
	text-align: center;
	/* background: rgba(0,0,0,0.08); */
	padding: 4px 8px;
	border-radius: 99px;
	border: 1px dotted var(--brand1);
}

table.projects td select{padding-left: 16px; border-radius: 16px;}

.pill.pill--link {
	background: #f3f5f2;
	padding: 12px;
	border-radius: 99px;
	text-decoration: none;
	color: var(--brand1);
}

.pill.pill--link:hover {
	background: var(--brand1);
	text-decoration: none;
	color: #f3f5f2;
}

#briefsTable tbody .icon-btn, .users-grid .user-card .uc-actions .icon-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 10px;
	background: var(--brand1);
	cursor: pointer;
	border-radius: 99px;
	width: 38px;
	height: 38px;
	margin-right: 8px;
}

#briefsTable tbody .icon-btn:hover, .users-grid .user-card .uc-actions .icon-btn:hover, #briefsTable tbody .icon-btn:focus-visible {
	filter:brightness(1.2);
}

.toolbar .icon-btn {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.toolbar .icon-btn:hover,
.toolbar .icon-btn:focus-visible {
  border-color: rgba(255,255,255,0.10) !important;
}

.toolbar .icon-btn.brand {
  background: transparent !important;
  border-color: transparent !important;
}

/* ================================
   BRIEF CHANGED INDICATOR (ADMIN)
================================ */
#briefsTable tbody .icon-btn.is-dirty {
  background: var(--bad) !important; /* red */
}

.period-title .period-prefix{
  margin-right: .5rem;
  opacity: .75;
  font-weight: 400;
}

/* ---------- Brief icon + paperclip badge ---------- */

/* Make the brief icon button a positioning context */
#briefsTable tbody .icon-btn{
  position: relative;
  overflow: visible; /* allow badge to sit outside */
}

/* Ensure the base brief icon has a predictable box */
#briefsTable tbody .icon-btn .icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Turn the clip into a badge overlay */
#briefsTable tbody .icon-btn .icon-clip{
  position: absolute;
  top: -6px;
  right: -6px;
  margin-left: 0;       /* override old inline spacing */
  opacity: 1;
  pointer-events: none; /* click goes to the brief button */
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #daffdc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* Size the SVG neatly inside the badge */
#briefsTable tbody .icon-btn .icon-clip svg{
  width: 12px;
  height: 12px;
  display: block;
  fill: var(--ok);
}

/* ---------- Attachments (Brief modal) ---------- */
.icon-btn .icon-clip { margin-left: 6px; opacity: .9; }
.icon-btn .icon-clip svg { width: 16px; height: 16px; display:block; }

.attch-block {
	margin: 14px;
	padding: 14px;
	border-top: 1px solid rgba(255,255,255,.08);
	background: #f3f5f2;
	border-radius: 16px;
}
.attch-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--brand1);
	padding-bottom: 6px;
}
.attch-title { font-weight: 650; }
.attch-cap { font-size: 12px; opacity: .8; }

.attch-list { display:flex; flex-direction:column; gap:8px; }
.attch-row { display:flex; align-items:center; gap:10px; padding:10px; border-radius: 12px; background: rgba(255,255,255,.04); }
.attch-link { flex:1; text-decoration:none; }
.attch-link:hover { text-decoration: underline; }
.attch-meta { font-size: 12px; opacity: .75; display:flex; gap:6px; flex-wrap: wrap; }
.attch-del { flex: 0 0 auto; }
.attch-empty { padding:10px; border-radius: 12px; background: rgba(255,255,255,.03); font-size: 13px; opacity: .8; }

.attch-actions { display:flex; align-items:center; gap:10px; margin-top: 10px; }
.attch-hint { font-size: 12px; opacity: .75; }

.attch-uploads { display:flex; flex-direction:column; gap:10px; margin-top: 10px; }
.attch-upload { padding:10px; border-radius: 12px; background: rgba(255,255,255,.03); }
.attch-upload-top { display:flex; justify-content:space-between; gap:10px; margin-bottom: 8px; }
.attch-upload-name { font-size: 13px; font-weight: 600; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.attch-upload-size { font-size: 12px; opacity: .75; }
.attch-upload-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow:hidden; }
.attch-upload-bar .fill { height: 100%; width: 0%; background: var(--brand1); border-radius: 999px; transition: width .15s linear; }
.attch-upload-status { font-size: 12px; margin-top: 6px; opacity: .75; }

/* ---------- Attachments: delete/bin colour ---------- */
.attch-del, .attch-del button, .attch-del .icon-btn {
	color: var(--bad);
	background: var(--bad);
	width: 38px;
	height: 38px;
	border-radius: 99px;
}

.attch-del svg{
  fill: var(--bad);
  stroke: var(--bad);
}

/* Optional: stronger hover */
.attch-del button:hover svg,
.attch-del .icon-btn:hover svg{
  filter: brightness(0.95);
}

.projects-shell {
	background: rgba(243, 245, 242,0.4);
	/* padding: 14px; */
	border-radius: 16px;
}

/* Make sure the table can show rounded corners on cells */
table.projects {
  border-collapse: separate;
  border-spacing: 0;
}

/* Round bottom-left and bottom-right of the period totals row */
table.projects tr.period-totals td:first-child {
  border-bottom-left-radius: 16px;
}

table.projects tr.period-totals td:last-child {
	border-bottom-right-radius: 16px;
}

/* If your row has a background, ensure the radius is visible */
table.projects tr.period-totals td {
  background-clip: padding-box;
}

.pill strong {
	font-size: 18px;
	font-weight: 400;
	color: #ff5c7a;
	letter-spacing: -0.03rem;
	padding: 4px 8px;
	background: rgba(255,255,255,0.8);
	border-radius: 99px;
}

.pill.usage strong {
	font-size: 16px;
	font-weight: 500;
	color: var(--ink);
	letter-spacing: -0.03rem;
	background: none !important;
}

/* Scoped panel head overrides (prevents global .panel-head/.panel-title styles bleeding in) */
#view-clients .projects-shell > .panel-head,
#view-reports .projects-shell > .panel-head{
  /* reset/override whatever global is doing */
  background: transparent;
  border: 0;
  padding: 0 0 10px 0;        /* keeps your shell padding intact */
  margin: 0 0 12px 0;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  /* optional: subtle divider like other headers */
  border-bottom: 1px solid var(--line, rgba(0,0,0,.12));
}

#view-clients .projects-shell > .panel-head .panel-title, #view-reports .projects-shell > .panel-head .panel-title {
	line-height: 1.15;
	margin: 0;
	padding: 0px !important;
	background: transparent;
	color: var(--brand1);
}

#view-clients .projects-shell > .panel-head .muted,
#view-reports .projects-shell > .panel-head .muted{
  margin-top: 6px;
  /* max-width: 70ch; - prevents overly-wide subtitle runs */
}

/* keep CTA buttons aligned and consistent in these heads */
#view-clients .projects-shell > .panel-head .btn,
#view-reports .projects-shell > .panel-head .btn{
  margin-top: 2px;
  white-space: nowrap;
}

.period-title {
	background: rgba(255,255,255,0.6);
}

/* Ensure the right totals cell actually right-aligns its contents */
tr.period-totals td.ta-right{
  text-align: right;
}

/* If the td is (or becomes) flex, force the pill to the right
tr.period-totals td.ta-right{
  display: flex;
  justify-content: flex-end;
  align-items: center;
}*/

.users-grid .user-card .uc-actions .icon-btn, .user-card .uc-actions {margin-right:0 !important;}