/*
 * Portal tokens lifted from sales-website/skin.css.
 * Keeps the admin portal visually aligned with the marketing site
 * without pulling in the full themekit (jQuery + ~11k LOC of CSS).
 */

@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,600,700');

:root {
    --hc-text: #283c4a;
    --hc-text-muted: #566069;
    --hc-primary: #049cff;
    --hc-primary-hover: #279cff;
    --hc-surface: #ffffff;
    --hc-surface-tint: #e4f1fa;
    --hc-border: #d3d7df;
    --hc-bg: #f7f9fb;
    --hc-radius: 6px;
    --hc-shadow-sm: 0 3px 6px rgba(0, 0, 0, .08);
    --hc-shadow-md: 0 3px 20px -2px rgba(20, 45, 100, .1);
    --hc-font: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--hc-font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--hc-text-muted);
    background: var(--hc-bg);
    margin: 0;
}

h1, h2, h3 {
    color: var(--hc-text);
    font-weight: 600;
    margin: 0;
}

a {
    color: var(--hc-primary);
    text-decoration: none;
}

a:hover {
    color: var(--hc-primary-hover);
}

.hc-shell {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
}

.hc-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.hc-actions .hc-spacer {
    margin-left: auto;
}

.hc-session {
    color: var(--hc-text-muted);
    font-size: 13px;
}

.hc-card {
    background: var(--hc-surface);
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow-md);
    padding: 24px;
}

.hc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hc-table th,
.hc-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--hc-border);
}

.hc-table thead th {
    background: var(--hc-surface-tint);
    color: var(--hc-text);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: inset 0 -1px 0 var(--hc-border);
}

.hc-table thead th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.hc-table thead th[data-sort]:hover {
    background: #d5e8f5;
}

.hc-sort-icon {
    display: inline-block;
    width: 10px;
    color: var(--hc-primary);
    opacity: .9;
}

.hc-table tbody tr:hover td {
    background: rgba(4, 156, 255, .03);
}

.hc-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.hc-search {
    max-width: 320px;
}

.hc-env-toggle {
    margin-left: auto;
    display: inline-flex;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    overflow: hidden;
    background: var(--hc-surface);
}

.hc-env-opt {
    background: transparent;
    border: 0;
    padding: 7px 14px;
    font-family: var(--hc-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--hc-text-muted);
    cursor: pointer;
}

.hc-env-opt + .hc-env-opt {
    border-left: 1px solid var(--hc-border);
}

.hc-env-opt.is-on {
    background: var(--hc-primary);
    color: #fff;
}

.hc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--hc-radius);
    color: var(--hc-primary);
    transition: background .15s, color .15s;
}

.hc-icon-btn:hover {
    background: var(--hc-surface-tint);
    color: var(--hc-primary-hover);
}

.hc-icon-btn svg {
    width: 18px;
    height: 18px;
}

.hc-section {
    margin-bottom: 24px;
}

.hc-section-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--hc-text-muted);
    margin: 0 0 12px;
}

.hc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.hc-cust-card {
    position: relative;
    background: var(--hc-surface);
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow-sm);
    padding: 16px 16px 14px;
    transition: box-shadow .15s, transform .15s;
    overflow: hidden;
}

.hc-cust-card:hover {
    box-shadow: 0 6px 20px rgba(20, 60, 77, .12);
    transform: translateY(-1px);
}

.hc-cust-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.hc-cust-name {
    position: relative;
    z-index: 0;
    font-weight: 600;
    color: var(--hc-text);
    padding-right: 28px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.hc-cust-star {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: transparent;
    border: 0;
    font-size: 18px;
    line-height: 1;
    color: #c4ccd6;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.hc-cust-star.is-on {
    color: #f5b400;
}

.hc-cust-star:hover {
    background: rgba(0, 0, 0, .04);
}

.hc-tag {
    position: relative;
    z-index: 0;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 8px;
    border-radius: 3px;
    background: var(--hc-surface-tint);
    color: var(--hc-primary);
}

.hc-row-star {
    background: transparent;
    border: 0;
    font-size: 18px;
    line-height: 1;
    color: #c4ccd6;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

.hc-row-star.is-on {
    color: #f5b400;
}

.hc-row-star:hover {
    background: rgba(0, 0, 0, .04);
}

.hc-input {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--hc-font);
    font-size: 15px;
    color: var(--hc-text);
    background: #fff;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    box-sizing: border-box;
}

.hc-input:focus {
    outline: none;
    border-color: var(--hc-primary);
}

.hc-btn {
    display: inline-block;
    background: var(--hc-primary);
    color: #fff;
    border: 0;
    border-radius: var(--hc-radius);
    padding: 10px 18px;
    font-family: var(--hc-font);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}

.hc-btn:hover {
    background: var(--hc-primary-hover);
    color: #fff;
}

.hc-error {
    background: #fef0f0;
    color: #b03030;
    padding: 10px 14px;
    border-radius: var(--hc-radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.hc-login {
    max-width: 560px;
    margin: 60px auto;
    padding: 0 16px;
}

.hc-login-card {
    padding: 36px 40px 32px;
    border: 1px solid var(--hc-border);
    box-shadow: 0 2px 10px rgba(20, 60, 77, .06);
}

.hc-login-logo {
    display: block;
    height: 56px;
    width: auto;
    margin: 0 0 28px;
}

.hc-login-heading {
    color: var(--hc-text);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.hc-login-subtitle {
    color: var(--hc-text-muted);
    font-size: 15px;
    margin: 0 0 24px;
}

.hc-form-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.hc-form-label {
    color: var(--hc-text);
    font-size: 14px;
    font-weight: 500;
}

.hc-form-actions {
    margin-top: 24px;
    padding-left: 146px;
}

.hc-btn-outline {
    background: #fff;
    color: var(--hc-text);
    border: 1px solid var(--hc-border);
    font-weight: 500;
    padding: 9px 22px;
}

.hc-btn-outline:hover {
    background: var(--hc-surface-tint);
    color: var(--hc-text);
    border-color: var(--hc-primary);
}

.hc-footer {
    text-align: center;
    margin: 20px 0 0;
    font-size: 13px;
    color: var(--hc-text-muted);
}

@media (max-width: 480px) {
    .hc-form-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .hc-form-actions {
        padding-left: 0;
    }
}

body.hc-dark {
    --hc-text: #e6edf3;
    --hc-text-muted: #9aa4ad;
    --hc-primary: #1ea7ff;
    --hc-primary-hover: #4ab8ff;
    --hc-surface: #1b2530;
    --hc-surface-tint: #243140;
    --hc-border: #2c3a4a;
    --hc-bg: #0f1620;
    --hc-shadow-sm: 0 3px 6px rgba(0, 0, 0, .35);
    --hc-shadow-md: 0 3px 20px -2px rgba(0, 0, 0, .45);
}

body.hc-dark .hc-table thead th[data-sort]:hover {
    background: #2d3d4f;
}

body.hc-dark .hc-table tbody tr:hover td {
    background: rgba(30, 167, 255, .06);
}

body.hc-dark .hc-input {
    background: var(--hc-surface);
    color: var(--hc-text);
}

body.hc-dark .hc-cust-star:hover,
body.hc-dark .hc-row-star:hover {
    background: rgba(255, 255, 255, .06);
}

body.hc-dark .hc-env-opt:not(.is-on):hover {
    background: var(--hc-surface-tint);
    color: var(--hc-text);
}

body.hc-dark .hc-btn-outline {
    background: var(--hc-surface);
    color: var(--hc-text);
}

body.hc-dark .hc-btn-outline:hover {
    background: var(--hc-surface-tint);
    color: var(--hc-text);
}

body.hc-dark .hc-error {
    background: #3a1a1a;
    color: #ffb3b3;
}
