/* HostGuard shared styles — used across integration sub-pages */

.hg-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #e0e0e0;
}

.hg-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.hg-page-header-text {
    flex: 1 1 240px;
    min-width: 0;
}

.hg-page-subtitle {
    margin: 0.35rem 0 0;
    color: #727272;
    font-size: 0.82rem;
    max-width: 52rem;
    line-height: 1.45;
}

.hg-page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.hg-back-link {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #888;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}

.hg-back-link:hover {
    border-color: #555;
    color: #b3b3b3;
}

.hg-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #aaa;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.15s, color 0.15s;
}

.hg-export-btn:hover:not(:disabled) {
    border-color: #1DB954;
    color: #1DB954;
}

.hg-export-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.hg-check-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1DB954;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
    transition: background 0.15s, transform 0.15s;
}

.hg-check-all-btn:hover:not(:disabled) {
    background: #1ed760;
    transform: translateY(-1px);
}

.hg-check-all-btn:disabled {
    opacity: 0.5;
    cursor: wait;
    transform: none;
}

.hg-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #b3b3b3;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.hg-btn-secondary:hover:not(:disabled) {
    border-color: #555;
    color: #e0e0e0;
}

.hg-btn-secondary:disabled {
    opacity: 0.5;
    cursor: wait;
}

.hg-filter-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hg-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.75rem;
    border: 1px solid #333;
    border-radius: 8px;
    background: #141414;
}

.hg-bulk-paste {
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background: #111;
    color: #b3b3b3;
    font-size: 0.82rem;
}

.hg-bulk-paste summary {
    cursor: pointer;
    color: #1DB954;
    font-weight: 600;
    user-select: none;
}

.hg-bulk-textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.5rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    padding: 0.5rem 0.65rem;
    resize: vertical;
}

.hg-brand-select {
    min-width: 9rem;
    max-width: 14rem;
    font-size: 0.78rem;
    padding: 0.25rem 1.75rem 0.25rem 0.45rem;
}

.hg-chip {
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #aaa;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.hg-chip-active {
    background: #1DB954;
    color: #000;
    border-color: #1DB954;
}

.hg-search,
.hg-select,
.admin-input {
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    color: #e0e0e0;
    font-size: 0.82rem;
    font-family: inherit;
    line-height: 1.4;
}

.hg-search {
    flex: 1;
    max-width: 300px;
}

.hg-search:focus,
.hg-select:focus,
.admin-input:focus {
    outline: none;
    border-color: #1DB954;
}

.hg-select,
.admin-input,
select.hg-select,
select.admin-input {
    color-scheme: dark;
    min-height: 2.1rem;
}

select.hg-select,
select.admin-input {
    appearance: none;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    cursor: pointer;
}

select.hg-select option,
select.admin-input option {
    background: #1a1a1a;
    color: #e0e0e0;
}

input[type="date"].hg-select,
input[type="date"].admin-input {
    color-scheme: dark;
}

input[type="date"].hg-select::-webkit-calendar-picker-indicator,
input[type="date"].admin-input::-webkit-calendar-picker-indicator {
    filter: invert(0.75);
    cursor: pointer;
}

.hg-table-wrap {
    overflow-x: auto;
}

.hg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.hg-table th {
    text-align: left;
    padding: 0.55rem 0.5rem;
    color: #888;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #2a2a2a;
}

.hg-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #1e1e1e;
    color: #e0e0e0;
}

.hg-row-click {
    cursor: pointer;
}

.hg-row-click:hover {
    background: rgba(29, 185, 84, 0.06);
}

.hg-row-major {
    background: rgba(231, 76, 60, 0.04);
}

.hg-row-minor {
    background: rgba(243, 156, 18, 0.03);
}

.hg-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.hg-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.hg-card-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #777;
}

.hg-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #e0e0e0;
}

.hg-card-ok .hg-card-value {
    color: #1DB954;
}

.hg-card-warn .hg-card-value {
    color: #f39c12;
}

.hg-card-warn {
    border-color: rgba(243, 156, 18, 0.35);
}

/* Google Analytics — Cognitio-style portfolio UI (dark theme) */
.hg-ga-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.hg-ga-metric-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
}

.hg-ga-metric-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.hg-ga-metric-icon {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(231, 76, 60, 0.12);
    border-radius: 8px;
    font-size: 0.85rem;
}

.hg-ga-metric-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.hg-ga-metric-value-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hg-ga-metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.hg-ga-trend {
    font-size: 1.25rem;
    font-weight: 700;
}

.hg-ga-trend-down { color: #e74c3c; }
.hg-ga-trend-up { color: #1DB954; }

.hg-ga-metric-sub {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    color: #888;
    line-height: 1.35;
}

.hg-ga-sub-down { color: #e74c3c; }
.hg-ga-sub-up { color: #1DB954; }

.hg-ga-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.hg-period-toggle {
    display: inline-flex;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

.hg-period-btn {
    border: none;
    background: transparent;
    color: #888;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

.hg-period-btn + .hg-period-btn {
    border-left: 1px solid #333;
}

.hg-period-active {
    background: rgba(29, 185, 84, 0.15);
    color: #1DB954;
}

.hg-ga-metric-select {
    min-width: 8.5rem;
}

.hg-ga-table-wrap {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
}

.hg-ga-table th {
    padding: 0.85rem 0.75rem;
}

.hg-ga-table td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
}

.hg-ga-site-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.hg-ga-alert-star {
    color: #f1c40f;
    font-size: 0.9rem;
    margin-top: 0.15rem;
    filter: drop-shadow(0 0 4px rgba(241, 196, 15, 0.35));
}

.hg-ga-alert-cone {
    color: #f39c12;
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.hg-ga-legend {
    font-size: 0.72rem;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.hg-ga-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hg-ga-site-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.92rem;
}

.hg-ga-site-domain {
    font-size: 0.78rem;
    color: #666;
    margin-top: 0.15rem;
}

.hg-ga-health {
    font-weight: 700;
    font-size: 0.9rem;
}

.hg-ga-health-good { color: #1DB954; }
.hg-ga-health-warn { color: #f39c12; }
.hg-ga-health-bad { color: #e74c3c; }

.hg-ga-metric-cell {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0e0;
}

.hg-ga-action-cell {
    text-align: right;
    white-space: nowrap;
}

.hg-ga-dashboard-btn {
    background: #1DB954;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.hg-ga-dashboard-btn:hover {
    background: #1ed760;
}

.hg-ga-chart-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-top: 0.5rem;
}

.hg-ga-chart-title {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.hg-ga-chart-sub {
    margin: 0.35rem 0 1rem;
    color: #727272;
    font-size: 0.82rem;
}

.hg-ga-chart {
    width: 100%;
    height: 220px;
    display: block;
}

.hg-ga-chart-shell {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1.25rem;
}

.hg-ga-chart-yaxis {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 1.25rem;
    width: 1.75rem;
}

.hg-ga-chart-yaxis span {
    position: absolute;
    right: 0;
    transform: translateY(-50%);
    font-size: 0.68rem;
    color: #666;
}

.hg-ga-chart-labels {
    position: relative;
    height: 1.1rem;
    margin-top: 0.25rem;
}

.hg-ga-chart-labels span {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.68rem;
    color: #666;
    white-space: nowrap;
}

/* Connected Assets stat cards */
.ca-card-neutral .ca-card-value {
    color: #e0e0e0;
}

.ca-card-ok .ca-card-value {
    color: #1DB954;
}

.ca-card-warn .ca-card-value {
    color: #f39c12;
}

.ca-card-warn {
    border-color: rgba(243, 156, 18, 0.35);
}

.ca-card-ok {
    border-color: rgba(29, 185, 84, 0.25);
}
