/* =====================================================================
   Website admin suite — shared UI kit (used by every suite page).
   Builds on the CORK admin + aries-admin.css.
   ===================================================================== */
.suite-page { --s-red: #c8102e; --s-ink: #1a1a22; --s-muted: #676b7a; --s-line: #ececf1; --s-green: #16a34a; --s-amber: #d97706; padding-top: 18px; }
.suite-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.suite-head h1 { font-size: 24px !important; font-weight: 800 !important; margin: 0; color: var(--s-ink); }
.suite-head p { margin: 4px 0 0; color: var(--s-muted); max-width: 720px; }
.suite-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.suite-card { background: #fff; border: 1px solid var(--s-line); border-radius: 18px; padding: 18px; box-shadow: 0 1px 2px rgba(26,26,34,.04), 0 10px 30px -24px rgba(26,26,34,.45); margin-bottom: 18px; }
.suite-card > h2, .suite-card > h3 { font-size: 16px !important; font-weight: 800 !important; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.suite-grid { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); }
.suite-col-12 { grid-column: span 12; } .suite-col-8 { grid-column: span 8; } .suite-col-6 { grid-column: span 6; } .suite-col-4 { grid-column: span 4; } .suite-col-3 { grid-column: span 3; }
@media (max-width: 1199px) { .suite-col-8, .suite-col-4 { grid-column: span 12; } .suite-col-3 { grid-column: span 6; } }
@media (max-width: 767px) { .suite-col-6, .suite-col-3 { grid-column: span 12; } }

/* Headline numbers */
.suite-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1199px) { .suite-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .suite-stats { grid-template-columns: repeat(2, 1fr); } }
.suite-stat { background: #fff; border: 1px solid var(--s-line); border-radius: 16px; padding: 14px 16px; }
.suite-stat span { display: block; font-size: 12px; font-weight: 800; color: var(--s-muted); text-transform: uppercase; letter-spacing: .05em; }
.suite-stat strong { display: block; font-size: 26px; font-weight: 800; color: var(--s-ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.suite-delta { font-size: 12.5px; font-weight: 700; }
.suite-delta.up { color: var(--s-green); } .suite-delta.down { color: var(--s-red); } .suite-delta.flat { color: var(--s-muted); }

/* Toolbar, filters */
.suite-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.suite-toolbar .form-control, .suite-toolbar select { width: auto; min-width: 140px; flex: 0 1 auto; }
.suite-toolbar .suite-search { flex: 1 1 220px; min-width: 180px; }
.suite-seg { display: inline-flex; border: 1.5px solid var(--s-line); border-radius: 999px; padding: 3px; background: #fff; }
.suite-seg a, .suite-seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--s-muted); text-decoration: none; }
.suite-seg a.active, .suite-seg button.active { background: var(--s-ink); color: #fff; }
.suite-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #f4f4f7; color: var(--s-ink); font-weight: 700; font-size: 12.5px; text-decoration: none !important; }
.suite-chip.active { background: var(--s-red); color: #fff; }
.suite-chip b { font-variant-numeric: tabular-nums; }

/* Bulk bar */
.suite-bulk { display: none; align-items: center; gap: 8px; flex-wrap: wrap; background: #1a1a22; color: #fff; border-radius: 14px; padding: 8px 12px; margin-bottom: 12px; }
.suite-bulk.show { display: flex; }
.suite-bulk .btn { padding: 5px 12px !important; font-size: 13px !important; }

/* Tables: on phones each row becomes a card (td[data-label]) — no sideways scroll. */
.suite-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.suite-table th { background: #faf7f5; color: var(--s-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--s-line); text-align: left; white-space: nowrap; }
.suite-table td { padding: 11px 12px; border-bottom: 1px solid var(--s-line); vertical-align: middle; font-size: 14px; word-break: break-word; }
.suite-table tr:hover td { background: #fff7f6; }
.suite-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.suite-table .muted, .suite-muted { color: var(--s-muted); font-size: 12.5px; }
.suite-table .check { width: 36px; }
.suite-table a { font-weight: 700; }
@media (max-width: 767px) {
    .suite-table thead { display: none; }
    .suite-table, .suite-table tbody, .suite-table tr, .suite-table td { display: block; width: 100%; }
    .suite-table tr { border: 1px solid var(--s-line); border-radius: 14px; margin-bottom: 10px; padding: 6px 4px; background: #fff; }
    .suite-table td { border: 0; padding: 6px 10px 6px 40%; position: relative; text-align: right; min-height: 30px; }
    .suite-table td[data-label]::before { content: attr(data-label); position: absolute; left: 10px; top: 7px; width: 36%; font-weight: 800; color: var(--s-muted); font-size: 12px; text-transform: uppercase; text-align: left; }
    .suite-table td:not([data-label]) { padding-left: 10px; text-align: left; }
    .suite-table td.check { padding-left: 10px; text-align: left; }
    .suite-table td .muted { display: block; }
    .suite-table .num { text-align: right; }
}

.suite-empty { text-align: center; padding: 36px 16px; color: var(--s-muted); }
.suite-empty i { font-size: 34px; color: #d6d7df; display: block; margin-bottom: 10px; }
.suite-empty strong { display: block; color: var(--s-ink); font-size: 16px; margin-bottom: 4px; }

.suite-badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: auto; border-radius: 999px; font-size: 11px; font-weight: 800; text-align: center; line-height: 18px; }
.suite-badge--red { background: #c8102e; color: #fff; }
.suite-badge--grey { background: #e7e7ee; color: #4b4e5c; }
.suite-tag { white-space: nowrap; display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: #f1f1f5; color: #4b4e5c; }
.suite-tag--red { background: #ffe1dc; color: #8e0b21; } .suite-tag--green { background: #dcfce7; color: #166534; } .suite-tag--amber { background: #fef3c7; color: #92400e; } .suite-tag--dark { background: #1a1a22; color: #fff; }

/* Bars (lists with %) */
.suite-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.suite-bars li { position: relative; padding: 7px 10px; border-radius: 10px; overflow: hidden; display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.suite-bars li::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: #ffe9e6; z-index: 0; border-radius: 10px; }
.suite-bars li > * { position: relative; z-index: 1; }
.suite-bars li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Column chart */
.suite-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 10px; }
.suite-chart .bar { flex: 1; min-width: 4px; background: linear-gradient(180deg, #e2453f, #c8102e); border-radius: 5px 5px 0 0; position: relative; cursor: default; }
.suite-chart .bar:hover { background: #1a1a22; }
.suite-chart .bar .tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1a1a22; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 8px; white-space: nowrap; z-index: 5; }
.suite-chart .bar:hover .tip, .suite-chart .bar:focus .tip { display: block; }

/* Top-bar pill */
.suite-online-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #eafaf0; color: #166534; font-weight: 800; font-size: 13px; text-decoration: none !important; margin-right: 10px; }
.suite-online-pill i { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: suite-pulse 1.8s infinite; }
@keyframes suite-pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.6); } 70% { box-shadow: 0 0 0 10px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

/* Live map */
.suite-map { position: relative; width: 100%; aspect-ratio: 360 / 140; background: #f6f4f2; border-radius: 16px; overflow: visible; }
.suite-map__land, .suite-map__borders { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.suite-map__land { background: var(--suite-map-land, #d9d6e0); }
.suite-map__borders { background: var(--suite-map-border, #ffffff); }
.suite-pin { position: absolute; transform: translate(-50%, -50%); width: 18px; height: 18px; border-radius: 50%; background: #c8102e; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; z-index: 2; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 800; outline: none; }
.suite-pin.app { background: #16a34a; }
.suite-pin.multi { width: 24px; height: 24px; font-size: 11px; }
.suite-pin::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid currentColor; color: inherit; opacity: 0; animation: suite-ring 2.2s infinite; }
.suite-pin::after { border-color: rgba(200,16,46,.6); } .suite-pin.app::after { border-color: rgba(22,163,74,.6); }
@keyframes suite-ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
.suite-pin-card { display: none; position: absolute; left: calc(100% + 10px); top: -6px; width: 250px; background: #16161d; color: #e9e9ef; border-radius: 12px; padding: 12px; font-size: 12.5px; text-align: left; z-index: 10; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); font-weight: 500; }
.suite-pin:hover .suite-pin-card, .suite-pin:focus .suite-pin-card, .suite-pin.is-open .suite-pin-card { display: block; }
.suite-pin.flip-x .suite-pin-card { left: auto; right: calc(100% + 10px); }
.suite-pin.flip-y .suite-pin-card { top: auto; bottom: -6px; }
.suite-pin.drop .suite-pin-card { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
.suite-pin-card strong { color: #fff; font-size: 13.5px; display: block; }
.suite-pin-card .meta { color: #a9aabb; margin: 2px 0 8px; }
.suite-pin-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.suite-pin-card li code { color: #ffd27a; font-size: 12px; }
.suite-pin-card li small { display: block; color: #a9aabb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.suite-privacy { font-size: 12.5px; color: var(--s-muted); background: #faf7f5; border-radius: 12px; padding: 10px 12px; margin-top: 18px; }
.suite-pagination { display: flex; justify-content: center; margin-top: 14px; }
details.suite-row-more > summary { cursor: pointer; color: var(--s-red); font-weight: 700; }
details.suite-row-more pre { white-space: pre-wrap; word-break: break-all; background: #faf7f5; border-radius: 10px; padding: 8px; font-size: 12px; margin: 6px 0 0; }

@media (max-width: 767px) {
    .suite-pin-card { width: 200px; }
}

/* ---- Tighter layout: cards in a row share height and fill it, less empty space ---- */
.suite-page { padding-top: 12px; }
.suite-head { margin-bottom: 12px; }
.suite-head h1 { font-size: 21px !important; }
.suite-head p { font-size: 13.5px; }
.suite-grid { gap: 14px; margin-bottom: 14px; }
.suite-grid > .suite-card { display: flex; flex-direction: column; margin-bottom: 0; min-width: 0; }
.suite-card { padding: 14px 16px; border-radius: 16px; }
.suite-card > h2, .suite-card > h3 { font-size: 14.5px !important; margin-bottom: 10px; }
.suite-stats { gap: 10px; margin-bottom: 14px; }
.suite-stat { padding: 10px 14px; border-radius: 14px; }
.suite-stat span { font-size: 11px; }
.suite-stat strong { font-size: 22px; margin-top: 2px; }
.suite-bars { gap: 6px; }
.suite-bars li { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
/* Visitors-per-day chart grows to the height of the map card beside it */
.suite-card > .suite-chart { flex: 1 1 auto; height: auto; min-height: 150px; }
/* The map no longer dominates the page */
.suite-map { aspect-ratio: 360 / 125; max-height: 300px; }

/* Page numbers under suite lists */
.suite-page .pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 16px 0 4px; }
.suite-page .pagination .page-link { border-radius: 10px !important; border: 1px solid #ececf1; color: #1a1a22; min-width: 36px; text-align: center; padding: 6px 10px; font-size: 13px; }
.suite-page .pagination .page-item.active .page-link { background: #c8102e; border-color: #c8102e; color: #fff; }
.suite-page .pagination .page-item.disabled .page-link { color: #b3b5c0; }
.suite-page nav p.small { text-align: center; color: #676b7a; font-size: 12.5px; }
/* Short values (time, IP, device) stay on one line; long page titles still wrap */
.suite-table td { word-break: normal; overflow-wrap: anywhere; padding: 9px 12px; font-size: 13.5px; }
.suite-table td:has(> a[href*="ip="]), .suite-table td.ip, .suite-table td.nowrap, .suite-table td:first-child, .suite-table td:nth-child(2):not(:has(small)) { white-space: nowrap; }
.suite-table td a[href*="ip"], .suite-table td code { white-space: nowrap; }
.suite-table td:has(> a[href*="website-visitors/"]), .suite-table td > a[href*="website-visitors/"], .suite-table td:has(> span[title]) { white-space: nowrap; overflow-wrap: normal; }
