/* One Bridge Technologies — administration dashboard */
.admin-body { background: var(--obt-surface); font-size: 1rem; min-height: 100vh; }
.admin-container { max-width: 1440px; padding-inline: clamp(1rem, 3vw, 2rem); }
.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }

.admin-topbar { background: var(--obt-midnight); padding: .8rem 0; position: sticky; top: 0; z-index: 1020; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }
.admin-topbar .container-fluid { flex-wrap: wrap; }
.admin-logo { height: 32px; width: auto; }
.admin-badge { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--obt-cyan-soft); border: 1px solid rgba(143, 234, 255, .35); padding: .15rem .5rem; border-radius: 999px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.admin-nav a { color: rgba(255, 255, 255, .75); text-decoration: none; font-weight: 600; font-size: .92rem; padding: .5rem .85rem; border-radius: .6rem; transition: background-color .2s, color .2s; }
.admin-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.admin-nav a.active { color: #fff; background: rgba(31, 91, 255, .35); }
.admin-user { color: rgba(255, 255, 255, .7); font-size: .9rem; }
.admin-topbar :focus-visible { outline-color: var(--obt-cyan); }
@media (max-width: 991.98px) { .admin-nav { order: 3; width: 100%; } }
/* Nine menu items: tighten them on laptop widths so the menu, name and Log out stay on one line. */
@media (min-width: 992px) and (max-width: 1699.98px) {
    .admin-nav { flex-wrap: nowrap; gap: .1rem; }
    .admin-nav a { padding: .45rem .55rem; font-size: .86rem; white-space: nowrap; }
    .admin-user { display: none !important; }
}
@media (min-width: 992px) and (max-width: 1299.98px) { .admin-nav a i { display: none; } }

.admin-main { padding: 2rem 0 4rem; }
.admin-alert { border-radius: .8rem; display: flex; gap: .5rem; align-items: center; }
.admin-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; }
.admin-title { font-size: clamp(1.6rem, 2.5vw, 2rem); font-weight: 800; margin-bottom: .25rem; }
.admin-sub { color: var(--obt-muted); }
.admin-card { background: #fff; border: 1px solid var(--obt-line); border-radius: var(--obt-radius); padding: 1.5rem; box-shadow: var(--obt-shadow-sm); }
.admin-card-title { font-size: 1.08rem; font-weight: 700; margin-bottom: 1rem; }

.stat-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 1199.98px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479.98px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card { position: relative; background: #fff; border: 1px solid var(--obt-line); border-radius: var(--obt-radius); padding: 1.35rem 1.4rem; box-shadow: var(--obt-shadow-sm); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1rem; align-items: center; transition: box-shadow .25s, transform .25s var(--obt-ease); }
.stat-card:hover { box-shadow: var(--obt-shadow); transform: translateY(-2px); }
.stat-icon { grid-row: span 2; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; }
.stat-total { background: var(--obt-cobalt-050); color: var(--obt-cobalt-600); }
.stat-new { background: #e6f6fd; color: #0a6c8f; }
.stat-progress { background: #fff4e0; color: #9a5800; }
.stat-completed { background: #e7f7ee; color: #146c3b; }
.stat-archived { background: #eef0f4; color: #4a5468; }

/* Email centre */
.audience-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.audience-option { position: relative; display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--obt-line); border-radius: .85rem; cursor: pointer; background: #fff; transition: border-color .2s, box-shadow .2s; }
.audience-option:hover { border-color: var(--obt-cobalt-100); }
.audience-option input { margin-top: .2rem; }
.audience-option:has(input:checked) { border-color: var(--obt-cobalt); box-shadow: 0 0 0 3px rgba(242, 169, 59, .18); }
.audience-option strong { display: block; color: var(--obt-ink); font-size: .95rem; }
.audience-option span { font-size: .82rem; color: var(--obt-muted); }
.customer-pick { max-height: 320px; overflow-y: auto; border: 1px solid var(--obt-line); border-radius: .75rem; }
.customer-pick label { display: flex; gap: .75rem; align-items: center; padding: .55rem .9rem; border-bottom: 1px solid var(--obt-line); cursor: pointer; }
.customer-pick label:last-child { border-bottom: 0; }
.customer-pick label:hover { background: var(--obt-surface); }
.email-preview { border: 1px solid var(--obt-line); border-radius: .85rem; overflow: hidden; background: #f4f1ea; }
.email-preview-head { background: #0b0e13; color: #f6b94a; font-weight: 700; padding: .9rem 1.25rem; }
.email-preview-body { background: #fff; margin: 0 1rem; padding: 1.4rem 1.25rem .4rem; color: #1f2430; }
.email-preview-foot { margin: 0 1rem 1rem; padding: .9rem 1.25rem; background: #fff; border-top: 1px solid #ece7dc; font-size: .78rem; color: #6b7280; border-radius: 0 0 .6rem .6rem; }
.problem-list { max-height: 180px; overflow-y: auto; font-size: .85rem; }
.stat-label { font-size: .85rem; font-weight: 600; color: var(--obt-muted); }
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--obt-ink); line-height: 1.1; }
.stat-link { position: absolute; inset: 0; border-radius: inherit; font-size: 0; }
.stat-link:focus-visible { outline-offset: 2px; }

.status-pill { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 700; padding: .28rem .65rem; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.status-pill-lg { font-size: .9rem; padding: .45rem .95rem; }
.status-new { background: #e6f6fd; color: #075a78; border-color: #b6e3f5; }
.status-contacted { background: var(--obt-cobalt-050); color: var(--obt-cobalt-700); border-color: var(--obt-cobalt-100); }
.status-progress { background: #fff4e0; color: #7e4800; border-color: #ffdca3; }
.status-completed { background: #e7f7ee; color: #115c32; border-color: #b4e4c8; }
.status-archived { background: #eef0f4; color: #4a5468; border-color: #d8dce5; }

.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li + li { border-top: 1px solid var(--obt-line); }
.recent-item { display: flex; align-items: center; gap: 1rem; padding: .9rem .5rem; text-decoration: none; color: inherit; border-radius: .6rem; transition: background-color .2s; }
.recent-item:hover { background: var(--obt-surface); }
.recent-avatar { flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--obt-gradient); }
.recent-main { flex: 1; min-width: 0; }
.recent-name { display: block; font-weight: 650; color: var(--obt-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta { display: block; font-size: .85rem; color: var(--obt-muted); }

.bar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.bar-list a { color: var(--obt-ink); }
.bar-track { height: 8px; border-radius: 999px; background: var(--obt-surface); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--obt-gradient); }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mini-stats dt { font-size: .82rem; color: var(--obt-muted); font-weight: 600; }
.mini-stats dd { font-size: 1.4rem; font-weight: 800; color: var(--obt-ink); margin: 0; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--obt-muted); border: 1px dashed var(--obt-line); border-radius: var(--obt-radius); }
.empty-state i { font-size: 2rem; color: var(--obt-cobalt); display: block; margin-bottom: .5rem; }

.filter-form .form-label { font-size: .82rem; }
.filter-form .form-control, .filter-form .form-select { padding: .6rem .8rem; font-size: .93rem; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--obt-muted); }
.input-icon .form-control { padding-left: 2.3rem; }

.admin-table thead th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--obt-muted); background: var(--obt-surface); border-bottom: 1px solid var(--obt-line); padding: .8rem 1rem; font-weight: 700; }
.admin-table td { padding: .9rem 1rem; border-color: var(--obt-line); }
.admin-table tbody tr:hover { background: #fafbff; }
.pagination-obt .page-link { color: var(--obt-ink); border-color: var(--obt-line); font-weight: 600; font-size: .9rem; }
.pagination-obt .page-item.active .page-link { background: var(--obt-cobalt); border-color: var(--obt-cobalt); color: #fff; }

.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 2rem; margin-bottom: 1.5rem; }
@media (max-width: 575.98px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-grid dt, .detail-label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--obt-muted); margin-bottom: .2rem; }
.detail-grid dd { margin: 0; color: var(--obt-ink); font-weight: 550; word-break: break-word; }
.description-box { white-space: pre-wrap; word-break: break-word; background: var(--obt-surface); border: 1px solid var(--obt-line); border-radius: .8rem; padding: 1.1rem 1.25rem; color: var(--obt-ink); }

.status-option { display: flex; align-items: center; gap: .7rem; padding: .5rem .65rem; border-radius: .6rem; }
.status-option:hover { background: var(--obt-surface); }
.status-option .form-check-input { margin: 0; width: 1.15em; height: 1.15em; }
.status-option .form-check-input:checked { background-color: var(--obt-cobalt); border-color: var(--obt-cobalt); }

.note-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.note { border: 1px solid var(--obt-line); border-radius: .8rem; padding: .9rem 1.1rem; background: #fff; }
.note-system { background: var(--obt-surface); border-style: dashed; }
.note-meta { font-size: .82rem; color: var(--obt-muted); display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .35rem; }
.note-meta strong { color: var(--obt-ink); }
.note-body { white-space: pre-wrap; word-break: break-word; color: var(--obt-ink); }

/* Sign-in */
.auth-wrap { min-height: calc(100vh - 6rem); display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: var(--obt-radius-lg); border: 1px solid var(--obt-line); box-shadow: var(--obt-shadow-lg); padding: clamp(1.75rem, 5vw, 2.75rem); }
.auth-logo { display: block; width: 150px; height: auto; margin: 0 auto 1.25rem; }
.auth-title { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: .35rem; }
.auth-sub { text-align: center; color: var(--obt-muted); font-size: .9rem; margin-bottom: 1.5rem; }
.auth-foot { text-align: center; margin: 1.5rem 0 0; font-size: .9rem; }
.auth-foot a { text-decoration: none; }
.auth-error ul { list-style: none; padding: 0; }

/* Licences */
.licence-code { font-size: .82rem; color: var(--obt-navy); background: var(--obt-cobalt-050); padding: .2rem .45rem; border-radius: .4rem; white-space: nowrap; }
.licence-key-display code { display: inline-block; font-size: 1.25rem; font-weight: 700; letter-spacing: .06em; color: var(--obt-navy); background: var(--obt-cobalt-050); border: 1px dashed var(--obt-cobalt-100); padding: .6rem 1rem; border-radius: .7rem; }
