/* Admin area: plain, flat, neutral. Scoped to body.adm so the public portal is untouched.
   Loaded after style.css and deliberately overrides its decorative layers. */
body.adm { background: #f5f6f5; color: #1f2622; font-size: 15px; line-height: 1.65; }
.adm .container { max-width: 1120px; }
.adm a { color: #1d4a24; }

/* ---------- header ---------- */
.adm .nav, .adm .nav-admin { position: static; background: #fff; box-shadow: none; border-bottom: 1px solid #dfe3e0; }
.adm .nav .container { max-width: 1120px; }
.adm .nav-inner { padding: 8px 16px; gap: 20px; flex-wrap: nowrap; }
.adm .brand { color: #1f2622; }
.adm .logo { height: 38px; }
.adm .nav-links { flex: 1; justify-content: flex-start; gap: 0; flex-wrap: nowrap; }
.adm .nav-links a, .adm .btn-link { color: #4a544d; background: none; border-radius: 0; padding: 14px 12px; font-size: 15px; font-weight: 500; gap: 0; box-shadow: none; }
.adm .nav-links a:hover, .adm .btn-link:hover { background: none; color: #1f2622; text-decoration: none; }
.adm .nav-links a.active { color: #1f2622; font-weight: 700; background: none; box-shadow: inset 0 -2px 0 #1d4a24; }
.adm .nav-links .sep { width: 1px; align-self: stretch; background: #dfe3e0; margin: 12px 8px; }
.adm .ico, .adm .avatar { display: none; }
.adm .nav-user { gap: 4px; }
.adm .user-pill { background: none; border: 0; border-radius: 0; color: #4a544d; padding: 4px 8px; font-size: 14px; }
.adm .user-pill:hover, .adm .user-pill.active { background: none; color: #1f2622; text-decoration: underline; }
.adm .logout { padding: 4px 8px; font-size: 14px; color: #4a544d; }
.adm .logout:hover { background: none; color: #b3261e; }
.adm .nav-links a span, .adm .logout span, .adm .user-name { display: inline; }

/* ---------- page heads ---------- */
.adm .page-head { display: flex; align-items: baseline; gap: 12px; margin: 24px 0 14px; flex-wrap: wrap; }
.adm .page-title { font-size: 21px; font-weight: 700; color: #1f2622; margin: 24px 0 14px; }
.adm .page-head .page-title { margin: 0; }
.adm .date-pill { background: none; border: 0; box-shadow: none; padding: 0; color: #6b756e; font-weight: 400; font-size: 14px; }
.adm .back-link { display: inline-block; margin: 18px 0 0; font-size: 14px; }

/* ---------- cards ---------- */
.adm .card { background: #fff; border: 1px solid #dfe3e0; border-radius: 6px; box-shadow: none; padding: 18px 20px; margin-bottom: 16px; }
.adm .card h2, .adm .card h3 { color: #1f2622; font-weight: 700; }
.adm .card > h3:first-child { font-size: 16px; margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid #e6e9e7; display: block; }
.adm .card > h3:first-child::before { display: none; }
.adm .muted { color: #6b756e; }
.adm .grid-2col { gap: 16px; }

/* ---------- numbers ---------- */
.adm .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-bottom: 16px; background: #fff; border: 1px solid #dfe3e0; border-radius: 6px; }
.adm .stat { background: none; border: 0; border-radius: 0; box-shadow: none; display: block; padding: 14px 18px; text-align: right; transform: none !important; border-inline-start: 1px solid #e6e9e7; }
.adm .stat:first-child { border-inline-start: 0; }
.adm .stat::after { display: none; }
.adm .stat-ico { display: none; }
.adm .stat b { font-size: 26px; font-weight: 700; color: #1f2622 !important; line-height: 1.2; display: block; }
.adm .stat span { color: #6b756e; font-size: 14px; font-weight: 400; }
.adm a.stat:hover { background: #f5f6f5; text-decoration: none; }

/* ---------- tables ---------- */
.adm .table { width: 100%; border-collapse: collapse; }
.adm .table th { background: none; color: #6b756e; font-size: 13px; font-weight: 700; padding: 8px 10px; text-align: right; border-bottom: 1px solid #c9d0cb; }
.adm .table td { padding: 9px 10px; border-bottom: 1px solid #e6e9e7; vertical-align: top; }
.adm .table tr:last-child td { border-bottom: 0; }
.adm .table tr:has(td):hover { background: #fafbfa; }
.adm .table td[dir="ltr"] a { background: none; padding: 0; border-radius: 0; font-family: inherit; font-size: inherit; font-weight: 700; }
.adm .table td a { font-weight: 500; }

/* ---------- status / priority ---------- */
.adm .chip { background: none !important; border: 1px solid #c9d0cb; border-radius: 3px; color: #3b453e !important; padding: 1px 8px; font-size: 13px; font-weight: 400; display: inline-block; }
.adm .badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 4px; padding: 2px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.adm .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.adm .badge.st-new { background: #fff1de !important; color: #9a4f00 !important; border-color: #f2cf9f; }
.adm .badge.st-in_progress { background: #e3effb !important; color: #14578f !important; border-color: #b3d1ee; }
.adm .badge.st-resolved { background: #e4f3e6 !important; color: #1e6b2c !important; border-color: #b5d9ba; }
.adm .badge.st-closed { background: #ececec !important; color: #5b5f5c !important; border-color: #d3d5d3; }
.adm .pr-urgent { color: #b3261e !important; border-color: #b3261e; font-weight: 700; }
.adm .pr-high { color: #9a4f00 !important; border-color: #e0b27a; }
.adm .chip-idle { color: #6b756e !important; }
.adm .internal-chip { border-color: #c9a36b; color: #8a4b00 !important; }

/* ---------- forms ---------- */
.adm label { font-weight: 500; font-size: 14px; }
.adm input, .adm select, .adm textarea { border: 1px solid #c9d0cb; border-radius: 4px; padding: 8px 10px; font-size: 15px; background: #fff; }
.adm input:focus, .adm select:focus, .adm textarea:focus { border-color: #1d4a24; box-shadow: 0 0 0 3px rgba(29,74,36,.14); }
.adm .btn { border-radius: 4px; background: #fff; border: 1px solid #c9d0cb; color: #1f2622; font-weight: 500; padding: 7px 16px; font-size: 14px; box-shadow: none; background-image: none; transform: none; }
.adm .btn:hover { background: #f1f3f1; filter: none; }
.adm .btn-primary { background: #1d4a24; border-color: #1d4a24; color: #fff; font-weight: 700; }
.adm .btn-primary:hover { background: #163a1b; }
.adm .btn-danger { background: #fff; color: #b3261e; border-color: #b3261e; }
.adm .btn-lg { padding: 10px; font-size: 15px; }
.adm .file-btn { background: #fff; border: 1px solid #c9d0cb; border-radius: 4px; color: #1f2622; font-weight: 500; }
.adm .alert { border-radius: 4px; padding: 10px 14px; margin-bottom: 14px; }
.adm .alert.success { background: #f1f5f1; border: 1px solid #b9cdb9; }
.adm .alert.danger { background: #fdf3f2; border: 1px solid #e0b4b0; }

/* ---------- filter tabs (tickets list) ---------- */
.adm .tabs { display: flex; gap: 0; border-bottom: 1px solid #dfe3e0; margin-bottom: 14px; flex-wrap: wrap; }
.adm .tabs a { padding: 8px 14px; color: #4a544d; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.adm .tabs a:hover { text-decoration: none; color: #1f2622; }
.adm .tabs a.on { color: #1f2622; font-weight: 700; border-bottom-color: #1d4a24; }
.adm .tabs small { color: #6b756e; margin-inline-start: 4px; font-weight: 400; }
.adm .filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; }
.adm .filter-bar input[name=q] { flex: 1 1 220px; margin: 0; }
.adm .filter-bar select { width: auto; margin: 0; }
.adm .filter-bar .checkbox { margin: 0; }

/* ---------- bars: thin, single color ---------- */
.adm .bar { height: 6px; background: #e6e9e7; border-radius: 0; }
.adm .bar div { background: #4a544d; }

/* ---------- ticket page ---------- */
.adm .ticket-no { color: #6b756e; font-size: 14px; }
.adm .ticket-subject { font-size: 19px; margin: 2px 0 6px; }
.adm .meta-row span + span::before { content: "·"; margin: 0 6px; color: #9aa39c; }
.adm .meta-ok { color: #1d4a24; }
.adm .desc { background: #fafbfa; border: 1px solid #e6e9e7; border-radius: 4px; }
.adm .toolbar { background: none; border: 0; border-top: 1px solid #e6e9e7; border-radius: 0; padding: 14px 0 0; margin-top: 12px; }
.adm .reply { border-radius: 4px; max-width: 100%; background: #fff; }
.adm .reply.admin { background: #f5f8f5; border-color: #d3ddd3; }
.adm .reply.internal { background: #fffcf1; border-color: #e6d9a8; }
.adm .count-badge { background: none; color: #6b756e; font-weight: 400; }
.adm .count-badge::before { content: "("; } .adm .count-badge::after { content: ")"; }
.adm .file-link { background: none; border: 1px solid #dfe3e0; border-radius: 4px; padding: 4px 10px; }
.adm .thumb img, .adm .reply-files img { border-radius: 4px; }
.adm .check { background: none; border: 1px solid #c9d0cb; border-radius: 3px; width: 24px; height: 24px; line-height: 20px; padding: 0; cursor: pointer; font-size: 14px; }
.adm .task-list li.done .task-title { text-decoration: line-through; color: #6b756e; }

/* ---------- login ---------- */
body.adm.login-bg { background: #f5f6f5; }
.adm.login-bg .card { box-shadow: none; border: 1px solid #dfe3e0; padding: 28px 26px; }
.adm .login-logo { height: 56px; }
.adm .big-input { font-size: 16px; text-align: right; }
.adm .footer { color: #7a847d; }
.adm.login-bg .footer { color: #7a847d; }

/* ---------- report (on screen) ---------- */
.adm .rep-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; }
.adm .rep-head h1 { font-size: 21px; font-weight: 700; margin: 0; margin-inline-end: auto; }
.adm .rep-head form { margin: 0; }
.adm .rep-head input { margin: 0; width: auto; }
.adm .seg { display: inline-flex; border: 1px solid #c9d0cb; border-radius: 4px; overflow: hidden; }
.adm .seg a { padding: 6px 14px; color: #4a544d; font-size: 14px; background: #fff; }
.adm .seg a + a { border-inline-start: 1px solid #c9d0cb; }
.adm .seg a.on { background: #1d4a24; color: #fff; text-decoration: none; }
.adm .summary { margin: 4px 0 16px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 28px; color: #3b453e; }
.adm .summary b { color: #1f2622; }
.adm details.send-report { padding: 0; }
.adm details.send-report summary { padding: 12px 20px; cursor: pointer; font-weight: 700; list-style: none; }
.adm details.send-report summary::-webkit-details-marker { display: none; }
.adm details.send-report summary::after { content: " +"; color: #6b756e; font-weight: 400; }
.adm details.send-report[open] summary::after { content: " −"; }
.adm details.send-report form { padding: 4px 20px 18px; border-top: 1px solid #e6e9e7; }
.adm .sect-h { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.adm .report-signoff { border: 0; background: none; padding: 6px 0; }

@media (max-width: 760px) {
  .adm .nav-inner { flex-wrap: wrap; gap: 0; }
  .adm .nav-links { order: 3; flex: 1 1 100%; overflow-x: auto; }
  .adm .nav-user { margin-inline-start: auto; }
  .adm .stats { grid-template-columns: repeat(2, 1fr); }
  .adm .stat:nth-child(odd) { border-inline-start: 0; }
  .adm .table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media print {
  body.adm { background: #fff; }
  .adm .nav, .adm .no-print { display: none !important; }
  .adm .card { border-color: #999; }
}
.adm .dev-name, .pub .dev-name { color: inherit; font-weight: 500; }
.adm .date-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-basis: 100%; }
.adm .date-row input { width: auto; margin: 0; }
.adm .quick { display: inline-flex; gap: 4px; margin-inline-start: 6px; }
.adm .quick a, .adm .pager a { border: 1px solid #c9d0cb; border-radius: 3px; padding: 2px 10px; font-size: 14px; color: #3b453e; background: #fff; }
.adm .quick a:hover, .adm .pager a:hover { background: #f1f3f1; text-decoration: none; }
.adm .pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.adm .pager .per, .adm .pager .pg { display: flex; align-items: center; gap: 4px; }
.adm .pager a.on { background: #1d4a24; border-color: #1d4a24; color: #fff; }
.adm .hint { color: #6b756e; font-size: 14px; }
.adm .date-row input { width: 150px; flex: none; }

/* pager: segmented controls */
.adm .pager { background: #fff; border: 1px solid #dfe3e0; border-radius: 6px; padding: 10px 14px; margin-bottom: 24px; }
.adm .pager .per, .adm .pager .pg { display: inline-flex; align-items: center; gap: 0; }
.adm .pager .per .hint { margin-inline-end: 10px; }
.adm .pager .per a, .adm .pager .pg a, .adm .pager .pg span { min-width: 38px; text-align: center; padding: 4px 12px; border: 1px solid #c9d0cb; border-radius: 0; background: #fff; color: #3b453e; font-size: 14px; line-height: 1.6; }
.adm .pager .per a + a, .adm .pager .pg a + a, .adm .pager .pg a + span, .adm .pager .pg span + a { margin-inline-start: -1px; }
.adm .pager .per a:first-of-type, .adm .pager .pg > :first-child { border-start-start-radius: 4px; border-end-start-radius: 4px; }
.adm .pager .per a:last-child, .adm .pager .pg > :last-child { border-start-end-radius: 4px; border-end-end-radius: 4px; }
.adm .pager .pg span { border-color: transparent; background: none; min-width: 24px; padding: 4px 2px; }
.adm .pager a:hover { background: #f1f3f1; }
.adm .pager a.on { background: #1d4a24; border-color: #1d4a24; color: #fff; position: relative; z-index: 1; }
.adm .pager > .hint { flex: 1; text-align: center; }
