/* =====================================================================
   WeirdHost Plus client portal theme
   Replaces modern-theme.css. Loaded after Bootstrap (all.min.css) and
   theme.min.css, so it restyles every stock page and adds the wh-*
   components used by the rewritten templates.

   Light only. Neutral cool grays, navy accent (same as the WeirdPay popup),
   1px borders instead of shadows, LINE Seed (same as the Plus panel).
   The order form (templates/orderforms/weirdhost_cart) reads the same tokens.
   ===================================================================== */

/* Fonts: same setup as the Plus panel (/pluspanel GlobalStylesheet.ts).
   LINE Seed Regular and Bold for all text; 500 renders Regular, 600 and up render Bold.
   The overrides move LINE Seed's line middle down so text no longer sits high in buttons.
   'WH Digits' supplies only 0-9 (IBM Plex Sans) so numbers line up in tables. */
@font-face {
    font-family: 'LineSeed';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_11-01@1.0/LINESeedKR-Rg.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    ascent-override: 100%; descent-override: 32%; line-gap-override: 0%;
}
@font-face {
    font-family: 'LineSeed';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_11-01@1.0/LINESeedKR-Bd.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    ascent-override: 100%; descent-override: 32%; line-gap-override: 0%;
}
@font-face {
    font-family: 'WH Digits';
    src: url('https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans@5.0.20/files/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+30-39; size-adjust: 105%;
    ascent-override: 100%; descent-override: 32%; line-gap-override: 0%;
}
@font-face {
    font-family: 'WH Digits';
    src: url('https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans@5.0.20/files/ibm-plex-sans-latin-700-normal.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+30-39; size-adjust: 105%;
    ascent-override: 100%; descent-override: 32%; line-gap-override: 0%;
}

:root {
    color-scheme: light;

    --bg:            oklch(0.996 0.001 250);
    --bg-subtle:     oklch(0.984 0.003 250);
    --bg-muted:      oklch(0.965 0.005 250);
    --border:        oklch(0.928 0.006 250);
    --border-strong: oklch(0.872 0.008 250);

    --text:   oklch(0.22 0.016 258);
    --text-2: oklch(0.42 0.02 258);
    --text-3: oklch(0.53 0.018 258);

    --accent:       #2d4b8d;
    --accent-hover: #243d72;
    --accent-soft:  #eef2f9;
    --accent-line:  #c9d5ea;
    --on-accent:    oklch(0.99 0.002 258);

    --ok-text:     oklch(0.44 0.1 155);
    --ok-bg:       oklch(0.966 0.028 155);
    --ok-line:     oklch(0.88 0.06 155);
    --warn-text:   oklch(0.47 0.1 62);
    --warn-bg:     oklch(0.975 0.035 85);
    --warn-line:   oklch(0.88 0.08 80);
    --danger-text: oklch(0.5 0.17 25);
    --danger-bg:   oklch(0.968 0.018 25);
    --danger-line: oklch(0.86 0.06 25);

    --radius:    8px;
    --radius-lg: 10px;
    --radius-sm: 5px;

    --font: 'WH Digits', 'LineSeed', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
    --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --header-h: 60px;
}

/* =====================================================================
   1. Base
   ===================================================================== */
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body,
body.primary-bg-color {
    background: var(--bg) !important;
    color: var(--text);
    font-family: var(--font) !important;
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.006em;
    word-break: keep-all;
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.card-title, .modal-title, .btn, .form-control, .custom-select, input, select, textarea, button, table, .table {
    font-family: var(--font);
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
}
h1, .h1 { font-size: 24px; }
h2, .h2 { font-size: 20px; }
h3, .h3 { font-size: 17px; }
h4, .h4, h5, .h5, h6, .h6 { font-size: 15px; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.text-muted { color: var(--text-3) !important; }
.text-primary { color: var(--accent) !important; }
.text-success { color: var(--ok-text) !important; }
.text-warning { color: var(--warn-text) !important; }
.text-danger { color: var(--danger-text) !important; }
.bg-primary { background-color: var(--accent) !important; }
small, .small { font-size: 13px; }
hr { border-top-color: var(--border); }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =====================================================================
   2. Header
   ===================================================================== */
.wh-admin-bar {
    background: var(--text); color: var(--bg); font-size: 13px;
}
.wh-admin-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.wh-admin-bar a { color: var(--bg); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.wh-header {
    position: sticky; top: 0; z-index: 1030;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.wh-header .navbar { padding: 0; min-height: var(--header-h); }
.wh-header .navbar > .container { min-height: var(--header-h); flex-wrap: nowrap; padding-left: 15px !important; padding-right: 15px !important; }

.wh-brand {
    display: inline-flex; align-items: baseline; gap: 5px; margin-right: 28px;
    color: var(--text) !important; text-decoration: none !important; flex: none;
}
.wh-brand b { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.wh-brand span { font-size: 15px; font-weight: 500; color: var(--text-3); letter-spacing: -0.01em; }
.wh-brand img { max-height: 30px; width: auto; }

.wh-header .navbar-nav > li > a {
    position: relative;
    display: flex; align-items: center; height: var(--header-h);
    padding: 0 10px !important;
    font-size: 14.5px; font-weight: 500; color: var(--text-2);
    text-decoration: none;
}
.wh-header .navbar-nav > li > a:hover { color: var(--text); }
.wh-header .navbar-nav > li > a i { display: none; }
.wh-header .navbar-nav > li.active > a,
.wh-header .navbar-nav > li > a.active { color: var(--text); font-weight: 600; }
.wh-header .navbar-nav > li.active > a::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--text);
}
.wh-header .navbar-nav .badge {
    background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 6px;
}
.wh-header .dropdown-toggle::after { border-top-width: 4px; border-left-width: 4px; border-right-width: 4px; margin-left: 6px; vertical-align: 2px; opacity: 0.7; }
.wh-nav-secondary { margin-left: auto; }

.wh-icons { display: flex; align-items: center; gap: 2px; margin-left: 8px; flex: none; }
.wh-icon-btn {
    position: relative; width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: var(--radius); background: transparent;
    color: var(--text-2) !important; font-size: 16px; cursor: pointer; text-decoration: none !important;
    padding: 0;
}
.wh-icon-btn:hover { background: var(--bg-muted); color: var(--text) !important; }
.wh-icon-btn .wh-count {
    position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px;
    display: grid; place-items: center; border-radius: 999px;
    background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 700; line-height: 1;
}
.wh-icon-btn .wh-count:empty, .wh-icon-btn .wh-count[data-count="0"] { display: none; }
.wh-toggler { display: none; }

/* notifications popover (stock JS) */
.popover { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 32px oklch(0.2 0.02 258 / 0.12); font-family: var(--font); }
.popover .client-alerts { list-style: none; margin: 0; padding: 4px; min-width: 260px; }
.popover .client-alerts li a { display: flex; gap: 10px; padding: 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: 14px; }
.popover .client-alerts li a:hover { background: var(--bg-subtle); }
.popover .client-alerts li.none { padding: 12px; color: var(--text-3); font-size: 14px; }
.popover .client-alerts .fa-exclamation-circle { color: var(--danger-text); }
.popover .client-alerts .fa-exclamation-triangle { color: var(--warn-text); }
.popover .client-alerts .fa-info-circle, .popover .client-alerts .fa-check-circle { color: var(--text-3); }

/* dropdowns */
.dropdown-menu {
    border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px;
    box-shadow: 0 10px 30px oklch(0.2 0.02 258 / 0.1); font-size: 14px; min-width: 220px;
}
.dropdown-menu li.dropdown-item { padding: 0; background: none; }
.dropdown-item, .dropdown-menu li a.dropdown-item {
    display: block; padding: 8px 10px !important; border-radius: 6px;
    color: var(--text-2); font-size: 14px; line-height: 1.4; white-space: nowrap;
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--bg-muted); color: var(--text); }
.dropdown-item.active, .dropdown-item:active { background: var(--accent-soft); color: var(--accent); }
.dropdown-item i { width: 18px; color: var(--text-3); }
.dropdown-divider { border-top-color: var(--border); margin: 4px 0; }

/* =====================================================================
   3. Breadcrumb, page frame, sidebar
   ===================================================================== */
.master-breadcrumb { background: transparent; border: 0; padding: 0; }
.master-breadcrumb .breadcrumb {
    background: transparent; margin: 0; padding: 22px 0 0;
    font-size: 13px; color: var(--text-3);
}
.master-breadcrumb .breadcrumb-item a { color: var(--text-3); text-decoration: none; }
.master-breadcrumb .breadcrumb-item a:hover { color: var(--text); }
.master-breadcrumb .breadcrumb-item.active { color: var(--text-2); }
.master-breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: "/"; color: var(--border-strong); }

#main-body { background: transparent !important; padding: 24px 0 88px; min-height: 50vh; }

.sidebar .card,
.card-sidebar {
    border: 1px solid var(--border) !important; border-radius: var(--radius-lg) !important;
    box-shadow: none !important; background: var(--bg);
    margin-bottom: 16px !important; overflow: hidden;
}
.sidebar .card-header {
    background: var(--bg) !important; border-bottom: 1px solid var(--border) !important;
    padding: 12px 16px !important;
}
.sidebar .card-header .card-title { font-size: 14px; font-weight: 650; color: var(--text); margin: 0; }
.sidebar .card-header .card-title i:first-child { display: none; }
.sidebar .card-minimise { color: var(--text-3); font-size: 12px; margin-top: 4px; cursor: pointer; }
.sidebar .list-group-item {
    border: 0 !important; border-top: 1px solid var(--border) !important; border-radius: 0 !important;
    padding: 10px 16px !important; font-size: 14px; color: var(--text-2); background: var(--bg);
}
.sidebar .list-group-flush .list-group-item:first-child { border-top: 0 !important; }
.sidebar .list-group-item-action:hover { background: var(--bg-subtle); color: var(--text); }
.sidebar .list-group-item.active,
.sidebar .list-group-item.active:hover {
    background: var(--accent-soft) !important; color: var(--accent) !important; font-weight: 600;
}
.sidebar .list-group-item .badge { background: var(--bg-muted); color: var(--text-2); font-weight: 600; border-radius: 999px; }
.sidebar .sidebar-menu-item-icon, .sidebar .list-group-item > i:first-child { color: var(--text-3); width: 18px; }
.sidebar .card-body { padding: 14px 16px; font-size: 14px; color: var(--text-2); }
.sidebar .card-footer { background: var(--bg-subtle); border-top: 1px solid var(--border); padding: 10px 16px; }

/* Balance box at the top of the sidebar (custom_credit_balance + weirdpay hooks) */
.wh-balance { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); margin-bottom: 16px; }
.wh-balance-main { padding: 16px; }
.wh-balance-label { font-size: 13px; color: var(--text-3); }
.wh-balance-amount { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); margin-top: 2px; }
.wh-balance-amount.is-zero { color: var(--text-2); }
.wh-balance-note { margin: 6px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.5; }
.wh-balance-note a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.wh-balance-link {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 16px; border-top: 1px solid var(--border);
    font-size: 14px; font-weight: 600; color: var(--text) !important; text-decoration: none !important;
}
.wh-balance-link:hover { background: var(--bg-subtle); }
.wh-balance-link i { color: var(--text-3); font-size: 12px; }

/* =====================================================================
   4. Bootstrap / WHMCS components (stock pages)
   ===================================================================== */
.card {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: none; background: var(--bg);
}
.card-header {
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 14px 20px; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}
.card-header .card-title, .card-title { font-size: 16px; font-weight: 650; color: var(--text); }
.card-header.bg-success, .card-header.bg-info, .card-header.bg-primary, .card-header.bg-danger, .card-header.bg-warning { background: var(--bg-subtle) !important; color: var(--text) !important; }
.card-body { padding: 20px; }
.card-footer { background: var(--bg-subtle); border-top: 1px solid var(--border); padding: 12px 20px; }
.card-footer:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 40px; padding: 0 16px;
    border-radius: var(--radius); border: 1px solid transparent;
    font-size: 14.5px; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em;
    box-shadow: none !important;
    transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease);
}
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 16px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 6px; }
.btn-xs { min-height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 5px; }
.btn-block { display: flex; width: 100%; }
.btn-group > .btn, .input-group > .input-group-append > .btn, .input-group > .input-group-prepend > .btn { display: inline-flex; }

.btn-primary, .btn-success, .btn-info,
.btn-primary:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled):active {
    background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
.btn-primary:hover, .btn-primary:focus, .btn-success:hover, .btn-success:focus, .btn-info:hover, .btn-info:focus {
    background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent);
}
.btn-default, .btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-info, .btn-outline-success {
    background: var(--bg); border-color: var(--border-strong); color: var(--text);
}
.btn-default:hover, .btn-secondary:hover, .btn-light:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-info:hover, .btn-outline-success:hover,
.btn-default:focus, .btn-secondary:focus {
    background: var(--bg-subtle); border-color: var(--text-3); color: var(--text);
}
.btn-warning { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.btn-warning:hover { background: var(--warn-line); color: var(--warn-text); }
.btn-danger, .btn-outline-danger { background: var(--bg); border-color: var(--danger-line); color: var(--danger-text); }
.btn-danger:hover, .btn-outline-danger:hover { background: var(--danger-bg); border-color: var(--danger-text); color: var(--danger-text); }
.btn-link { color: var(--accent); padding-left: 0; padding-right: 0; min-height: 0; font-weight: 600; }
.btn:disabled, .btn.disabled { opacity: 0.5; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* forms */
.form-control, .custom-select, select.form-control {
    height: 44px; padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background-color: var(--bg); color: var(--text); font-size: 15px;
    box-shadow: none;
    transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
textarea.form-control { height: auto; padding: 10px 12px; line-height: 1.55; }
.form-control:hover, .custom-select:hover { border-color: var(--text-3); }
.form-control:focus, .custom-select:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none;
}
.form-control::placeholder { color: var(--text-3); opacity: 0.75; }
.form-control:disabled, .form-control[readonly] { background: var(--bg-subtle); color: var(--text-2); }
.form-control.is-invalid, .was-validated .form-control:invalid { border-color: var(--danger-text); }
.invalid-feedback { color: var(--danger-text); font-size: 13px; }
.custom-select {
    appearance: none; -webkit-appearance: none; padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7684' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; background-size: 16px;
}
label, .form-control-label, .col-form-label { font-size: 14px; font-weight: 500; color: var(--text-2); }
.form-text, .help-block { font-size: 13px; color: var(--text-3); }
.input-group-text {
    background: var(--bg-subtle); border: 1px solid var(--border-strong); color: var(--text-3);
    border-radius: var(--radius); font-size: 14px;
}
.input-group > .form-control:not(:last-child), .input-group > .custom-select:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input-group-append > .btn, .input-group > .input-group-append > .input-group-text { border-top-left-radius: 0; border-bottom-left-radius: 0; min-height: 44px; }
.input-group > .input-group-prepend > .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-merge .input-group-prepend .input-group-text { display: none; }
.input-group-merge .form-control { border-radius: var(--radius) !important; }
.input-group-merge .input-group-append .btn { border-left: 0; }
.input-group-merge .form-control:not(:last-child) { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--accent); border-color: var(--accent); }
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 3px var(--accent-soft); }

/* tables */
.table { color: var(--text); font-size: 14.5px; margin-bottom: 0; }
.table thead th, .table thead td {
    background: var(--bg-subtle); border-top: 0; border-bottom: 1px solid var(--border) !important;
    font-size: 13px; font-weight: 500; color: var(--text-3); padding: 10px 16px; white-space: nowrap;
}
.table td, .table th { border-top: 1px solid var(--border); padding: 13px 16px; vertical-align: middle; }
.table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.table-hover tbody tr:hover, .table-list tbody tr:hover td { background: var(--bg-subtle); }
.table-container, .table-responsive { border-radius: var(--radius-lg); }
.table-container { border: 1px solid var(--border); background: var(--bg); overflow: hidden; }
.table-list { border-collapse: separate; border-spacing: 0; }
.table-list > tbody > tr > td { border-top: 1px solid var(--border); background: var(--bg); }
.table-list > thead > tr > th { background: var(--bg-subtle) !important; color: var(--text-3) !important; font-weight: 500; }
.table-list .sorting::after, .table-list .sorting_asc::after, .table-list .sorting_desc::after { opacity: 0.4; }
.dataTables_wrapper .dataTables_info { color: var(--text-3); font-size: 13px; padding: 12px 16px; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { padding: 12px 16px; font-size: 13px; color: var(--text-3); }
.dataTables_wrapper .dataTables_filter input { height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0 10px; }

/* Status labels on stock list pages: plain colored text, no pills */
.label, .badge {
    font-family: var(--font); font-weight: 600; letter-spacing: 0;
}
.label.status, span.status, .label[class*="status-"] {
    display: inline; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: none !important; box-shadow: none !important;
    font-size: 14px; font-weight: 600; color: var(--text-2); text-transform: none;
}
.status-active, .status-paid, .status-completed, .status-answered, .status-accepted, .status-delivered, .status-success {
    color: var(--ok-text) !important;
}
.status-pending, .status-unpaid, .status-payment-pending, .status-customer-reply, .status-in-progress, .status-pending-transfer, .status-pending-registration, .status-onhold, .status-on-hold {
    color: var(--warn-text) !important;
}
.status-suspended, .status-overdue, .status-fraud, .status-collections, .status-delinquent, .status-dead, .status-error {
    color: var(--danger-text) !important;
}
.status-terminated, .status-cancelled, .status-closed, .status-refunded, .status-expired, .status-draft, .status-inactive, .status-transferred-away {
    color: var(--text-3) !important;
}
.status-open { color: var(--accent) !important; }
.badge {
    border-radius: var(--radius-sm); padding: 3px 7px; font-size: 12px;
    background: var(--bg-muted); color: var(--text-2);
}
.badge-info, .badge-primary { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: var(--ok-bg); color: var(--ok-text); }
.badge-warning { background: var(--warn-bg); color: var(--warn-text); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); }

/* alerts */
.alert {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-subtle); color: var(--text); font-size: 14.5px; padding: 12px 16px;
}
.alert-success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--text); }
.alert-info, .alert-primary { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.alert-warning { background: var(--warn-bg); border-color: var(--warn-line); color: var(--text); }
.alert-danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--text); }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* tabs, pills, pagination, list groups */
.nav-tabs { border-bottom: 1px solid var(--border); gap: 20px; }
.nav-tabs .nav-link {
    border: 0 !important; border-radius: 0; padding: 0 0 10px; margin-bottom: -1px;
    color: var(--text-3); font-size: 14.5px; font-weight: 500; background: none !important;
}
.nav-tabs .nav-link:hover { color: var(--text); }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--text); }
.nav-pills .nav-link { border-radius: var(--radius); color: var(--text-2); }
.nav-pills .nav-link.active { background: var(--accent-soft); color: var(--accent); }
.pagination .page-link { border-color: var(--border); color: var(--text-2); font-size: 14px; }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.list-group-item { border-color: var(--border); color: var(--text-2); }
.list-group-item.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* modal */
.modal-content { border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 24px 60px oklch(0.2 0.02 258 / 0.2); }
.modal-header { border-bottom: 1px solid var(--border); padding: 16px 20px; }
.modal-header .modal-title { font-size: 17px; font-weight: 700; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--border); padding: 12px 20px; }
.modal-backdrop.show { opacity: 0.35; }

.progress { height: 6px; background: var(--bg-muted); border-radius: 999px; }
.progress-bar { background: var(--accent); }

/* stock "header-lined" page titles */
.header-lined h1, .header-lined .h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.header-lined { border: 0; margin-bottom: 20px; padding: 0; }
.header-lined .breadcrumb { display: none; }

/* overlay spinner */
#fullpage-overlay { background: oklch(0.996 0.001 250 / 0.85); }
#fullpage-overlay .msg { color: var(--text); font-family: var(--font); }

/* =====================================================================
   5. Footer
   ===================================================================== */
.wh-footer {
    border-top: 1px solid var(--border); background: var(--bg-subtle);
    padding: 28px 0 40px; font-size: 13px; color: var(--text-3);
}
.wh-footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.wh-footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; }
.wh-footer-links a { color: var(--text-2); text-decoration: none; }
.wh-footer-links a:hover { color: var(--text); }
.wh-footer-links a.em { font-weight: 700; color: var(--text); }
.wh-footer-social { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wh-footer-social a { color: var(--text-3); }
.wh-footer-social a:hover { color: var(--text); }
.wh-footer-biz { display: flex; flex-wrap: wrap; gap: 2px 20px; line-height: 1.8; }
.wh-footer-copy { margin: 6px 0 0; }

/* =====================================================================
   6. wh-* components (rewritten templates)
   ===================================================================== */
.wh-h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; color: var(--text); }
.wh-h2 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.45; letter-spacing: -0.01em; color: var(--text); }
.wh-sub { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }
.wh-meta { color: var(--text-3); font-size: 13px; font-weight: 400; }
.wh-strong { font-weight: 650; color: var(--text); }
.wh-num { font-variant-numeric: tabular-nums; }
.wh-link { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 14px; }
.wh-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.wh-page-head { margin: 4px 0 24px; }

.wh-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.wh-stack > * + * { margin-top: 16px; }
.wh-stack-lg > * + * { margin-top: 24px; }

.wh-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.wh-box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; min-height: 52px; border-bottom: 1px solid var(--border); }
.wh-box-body { padding: 18px 20px; }
.wh-box-sec { padding: 22px 20px; }
.wh-box-sec + .wh-box-sec { border-top: 1px solid var(--border); }

.wh-alert {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; margin-bottom: 24px;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-subtle);
    font-size: 14.5px; color: var(--text);
}
.wh-alert > i { color: var(--text-2); font-size: 16px; }
.wh-alert-body { flex: 1; min-width: 0; }
.wh-alert-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.wh-alert-warn > i { color: var(--warn-text); }

.wh-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.wh-tbl th {
    text-align: left; font-size: 13px; font-weight: 500; color: var(--text-3);
    padding: 10px 16px; background: var(--bg-subtle); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.wh-tbl td { padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
.wh-tbl tbody tr:first-child td { border-top: 0; }
.wh-tbl tbody tr:hover td { background: var(--bg-subtle); }
.wh-tbl .r { text-align: right; }
.wh-tbl .c-min { width: 1%; white-space: nowrap; }
.wh-t-name { font-weight: 600; color: var(--text) !important; text-decoration: none !important; }
a.wh-t-name:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.wh-t-sub { display: block; font-size: 13px; color: var(--text-3); margin-top: 1px; }

/* State as a phrase, not a badge. Only attention states get color. */
.wh-state { display: block; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.wh-state.tone-warn { color: var(--warn-text); font-weight: 600; }
.wh-state.tone-danger { color: var(--danger-text); font-weight: 600; }
.wh-state.tone-ok { color: var(--ok-text); }
.wh-state.tone-muted { color: var(--text-3); }
/* How far into the current billing period the service is */
.wh-period { display: block; width: 96px; height: 3px; margin-top: 6px; border-radius: 999px; background: var(--bg-muted); overflow: hidden; }
.wh-period > span { display: block; height: 100%; background: var(--border-strong); border-radius: 999px; }
.wh-period.is-late > span { background: var(--warn-line); }

.wh-side-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 14.5px; color: inherit; text-decoration: none !important; }
.wh-side-row + .wh-side-row { border-top: 1px solid var(--border); }
a.wh-side-row:hover .wh-strong { text-decoration: underline; text-underline-offset: 3px; }
.wh-side-row .wh-meta { display: block; }
.wh-amount { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }

.wh-empty { padding: 44px 24px; text-align: center; }
.wh-empty .wh-h2 { margin-bottom: 6px; }
.wh-empty p { margin: 0 auto 18px; max-width: 30em; color: var(--text-2); font-size: 14.5px; }

/* 요금제 (plans.php) */
.wh-plans-page { max-width: 920px; margin: 0 auto; }
.wh-plan-line {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px; color: inherit !important; text-decoration: none !important;
}
.wh-plan-line + .wh-plan-line { border-top: 1px solid var(--border); }
.wh-plan-line:hover { background: var(--bg-subtle); }
.wh-plan-line:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.wh-plan-line:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.wh-plan-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wh-plan-line-main .wh-strong { font-size: 15.5px; }
.wh-plan-line-price { flex: none; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.wh-plan-line-price b { color: var(--text); font-weight: 700; }
@media (max-width: 575.98px) {
    .wh-plan-line { flex-wrap: wrap; padding: 16px; }
    .wh-plan-line-price { order: 3; flex-basis: 100%; }
    .wh-plan-line > .fa-chevron-right { display: none; }
}

/* Login */
.wh-auth { max-width: 420px; margin: 32px auto 0; }
.wh-auth .wh-box { padding: 28px 24px; }
.wh-auth .form-group { margin-bottom: 18px; }
.wh-auth-foot { margin-top: 18px; text-align: center; font-size: 14px; color: var(--text-3); }
.wh-auth-foot + .wh-auth-foot { margin-top: 6px; font-size: 13px; }

/* =====================================================================
   7. Responsive
   ===================================================================== */
@media (max-width: 991.98px) {
    .wh-toggler { display: inline-flex; }
    .wh-header .navbar > .container { flex-wrap: wrap; }
    .wh-header .navbar-collapse {
        order: 3; flex-basis: 100%;
        border-top: 1px solid var(--border); margin: 0 -15px; padding: 6px 15px 12px;
    }
    .wh-header .navbar-nav > li > a { height: auto; padding: 12px 4px !important; font-size: 16px; }
    .wh-header .navbar-nav > li.active > a::after { display: none; }
    .wh-header .navbar-nav > li.active > a { font-weight: 700; }
    .wh-nav-secondary { margin-left: 0; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
    .wh-icons { margin-left: auto; }
    .wh-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    :root { --header-h: 56px; }
    #main-body { padding: 16px 0 72px; }
    .wh-h1, h1, .h1 { font-size: 22px; }
    .wh-box-sec, .wh-box-body { padding: 18px 16px; }
    .wh-box-head { padding: 12px 16px; }
    .wh-alert { flex-wrap: wrap; }
    .wh-alert .btn { width: 100%; }

    .wh-tbl-stack thead { display: none; }
    .wh-tbl-stack, .wh-tbl-stack tbody { display: block; }
    .wh-tbl-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-top: 1px solid var(--border); }
    .wh-tbl-stack tbody tr:first-child { border-top: 0; }
    .wh-tbl-stack td { display: block; padding: 0; border: 0 !important; background: none !important; }
    .wh-tbl-stack td.s-full { grid-column: 1 / -1; }
    .wh-tbl-stack td.s-right { text-align: right; }
    .wh-tbl-stack .c-min { width: auto; }

    .table-container { overflow-x: auto; }
}

/* =====================================================================
   8. WeirdPay button: the gateway prints teal inline styles; match the theme
   ===================================================================== */
button[data-weirdpay-url] {
    background: var(--accent) !important; border-color: var(--accent) !important; color: var(--on-accent) !important;
    font-weight: 600 !important; font-family: var(--font) !important;
}
button[data-weirdpay-url]:hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
    .wh-header, .wh-footer, .wh-admin-bar, .sidebar, .master-breadcrumb { display: none !important; }
}
