/* Apexia Cloud portal: signed-in app shell (account + admin) and the order flow. Loads after the Hostick theme CSS. */
:root { --apx: #7523e7; --apx-dark: #5b16bd; --apx-soft: #f3effc; --apx-soft-2: #e9dffb; --ink: #1f2430; --ink-2: #5b6474; --ink-3: #8a93a5; --line: #e6e9f0; --line-2: #f0f2f7; --bg: #f5f6fa; --card: #fff; --radius: 14px; --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 4px 16px rgba(20, 24, 40, .04); }

.portal-body { background: var(--bg); color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased; }
.portal-body a { color: var(--apx); }
.portal-body a:hover { color: var(--apx-dark); }
.portal-body h1, .portal-body h2, .portal-body h3, .portal-body h4, .portal-body h5 { color: var(--ink); letter-spacing: -.01em; }
.portal-body .btn { border-radius: 10px; font-weight: 600; letter-spacing: 0; }
.portal-body .btn-sm { padding: .38rem .7rem; font-size: 13px; }
.portal-body .btn-primary { background: var(--apx); border-color: var(--apx); }
.portal-body .btn-primary:hover { background: var(--apx-dark); border-color: var(--apx-dark); }
.portal-body .btn-soft-primary { background: var(--apx-soft); color: var(--apx); border-color: transparent; }
.portal-body .btn-soft-primary:hover { background: var(--apx-soft-2); color: var(--apx-dark); }
.portal-body .btn-soft-secondary { background: #eef0f4; color: var(--ink-2); border-color: transparent; }
.portal-body .btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.portal-body .btn-light:hover { background: #f7f8fb; border-color: #d9dde6; }
.portal-body .btn-outline-light { border-color: var(--line); color: var(--ink-2); background: #fff; }
.portal-body .btn-outline-light:hover { background: #f7f8fb; color: var(--ink); }
.portal-body .form-control, .portal-body .form-select { border-radius: 10px; border-color: #dfe3ec; color: var(--ink); font-size: 14px; }
.portal-body .form-control:focus, .portal-body .form-select:focus { border-color: var(--apx); box-shadow: 0 0 0 3px rgba(117, 35, 231, .12); }
.portal-body .form-control-sm, .portal-body .form-select-sm { font-size: 13px; border-radius: 8px; }
.portal-body .form-label { color: var(--ink-2); font-weight: 600; }
.portal-body code { color: var(--apx-dark); background: var(--apx-soft); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.portal-body .alert { border-radius: 12px; border: 0; font-size: 14px; }
.portal-body .dropdown-menu { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; }
.portal-body .dropdown-item { padding: 8px 14px; }
.portal-body .progress { background: var(--line-2); border-radius: 999px; }
.portal-body .progress-bar { background: var(--apx); border-radius: 999px; }
.portal-body .text-muted { color: var(--ink-3) !important; }
.portal-body .badge { font-weight: 600; padding: .38em .6em; border-radius: 6px; font-size: 11.5px; letter-spacing: .01em; }
.bg-soft-success { background: #e4f6ec; } .bg-soft-warning { background: #fff2d9; } .bg-soft-danger { background: #fde8e8; } .bg-soft-info { background: #e4f0fc; } .bg-soft-secondary { background: #edf0f5; }
.portal-body .text-success { color: #1a7f4b !important; } .portal-body .text-warning { color: #a86a00 !important; } .portal-body .text-danger { color: #c62828 !important; }

/* ---- App shell ---- */
.portal-topbar { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--line); height: 60px; }
.portal-topbar-inner { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 20px; }
.portal-brand img { display: block; }
.portal-menu-btn { border: 0; background: none; padding: 6px; color: var(--ink); display: inline-flex; border-radius: 8px; }
.portal-menu-btn:hover { background: var(--line-2); }
.portal-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.portal-topbar-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; text-decoration: none; }
.portal-topbar-link:hover { background: var(--line-2); color: var(--ink); }
.portal-topbar-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink-2); }
.portal-topbar-icon:hover { background: var(--line-2); color: var(--ink); }
.portal-topbar-icon .count { position: absolute; top: 3px; right: 3px; background: #ff5d5d; color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 5px; line-height: 1.3; }
.portal-avatar { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 6px 4px 4px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 14px; }
.portal-avatar:hover { background: var(--line-2); }
.portal-avatar::after { display: none; }
.portal-avatar-circle { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #7523e7, #b06bff); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; object-fit: cover; flex-shrink: 0; vertical-align: middle; }
img.portal-avatar-circle { background: var(--line-2); }
.portal-dropdown { min-width: 200px; }
.portal-dropdown form { margin: 0; } .portal-dropdown button.dropdown-item { background: none; border: 0; width: 100%; text-align: left; }

.portal-shell { display: flex; min-height: calc(100vh - 60px); }
.portal-sidebar { width: 250px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line); position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 14px 12px 24px; }
.portal-offcanvas.offcanvas-start { width: min(300px, 86vw); }
.portal-offcanvas .offcanvas-header { border-bottom: 1px solid var(--line); }
.portal-offcanvas .offcanvas-body { padding: 10px 12px; }
.portal-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2) !important; font-weight: 600; font-size: 14px; text-decoration: none; margin-bottom: 2px; }
.portal-nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.portal-nav a:hover { background: var(--line-2); color: var(--ink) !important; }
.portal-nav a.active { background: var(--apx-soft); color: var(--apx) !important; }
.portal-nav a.active svg { opacity: 1; }
.portal-nav .portal-nav-secondary { font-weight: 500; color: var(--ink-3) !important; }
.portal-nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 14px 12px 6px; font-weight: 700; }
.portal-nav-footer { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.portal-nav-footer a { font-size: 13px; font-weight: 500; color: var(--ink-3) !important; }

.portal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.portal-page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 22px 32px; }
.portal-page-head-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; max-width: 1180px; }
.portal-page-title h1 { font-size: 24px; font-weight: 700; margin: 0; line-height: 1.25; }
.portal-subtitle { color: var(--ink-3); margin: 4px 0 0; font-size: 14px; }
.portal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.portal-actions .btn { margin: 0; }
.portal-actions form { margin: 0; display: inline; }
.portal-content { padding: 26px 32px 40px; max-width: 1180px; width: 100%; }
.portal-footer { margin-top: auto; padding: 18px 32px; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); }
.portal-footer a { color: var(--ink-3); }
.portal-flash { margin-bottom: 18px; }
.portal-impersonating { background: #1f2430; color: #fff; margin-bottom: 18px; }

/* Plain layout (marketing chrome + order flow) */
.portal-plain .portal-main-plain { padding: 96px 0 60px; }
.portal-plain .portal-page-head { background: none; border: 0; padding: 18px 0 8px; }
.portal-plain .portal-page-head-inner { max-width: none; }
.portal-plain .portal-content { padding: 18px 0 0; max-width: none; }

/* ---- Building blocks ---- */
.portal-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.portal-card h5 { font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.portal-card > .table-responsive { margin: 0 -8px; }
.portal-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; height: 100%; box-shadow: var(--shadow); }
.portal-stat .value { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.portal-stat .label { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.portal-table { width: 100%; margin: 0; font-size: 14px; }
.portal-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); border-bottom: 1px solid var(--line); padding: 8px 8px; font-weight: 700; white-space: nowrap; }
.portal-table td { padding: 12px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.portal-table tr:last-child td { border-bottom: 0; }
.portal-table tbody tr:hover td { background: #fafbfd; }
.portal-empty { text-align: center; color: var(--ink-3); padding: 34px 12px; }
.portal-empty p { margin-bottom: 10px; }
.portal-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.portal-filter .form-select, .portal-filter .form-control { width: auto; max-width: 260px; display: inline-block; }
.order-summary dt { font-weight: 500; color: var(--ink-3); } .order-summary dd { margin-bottom: 8px; color: var(--ink); }
.ticket-message { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.ticket-message.staff { background: var(--apx-soft); border-color: var(--apx-soft-2); }
.ticket-message .meta { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.ticket-message .body { white-space: normal; }

/* Order flow */
.order-steps { list-style: none; display: flex; gap: 22px; margin: 14px 0 0; padding: 0; flex-wrap: wrap; }
.order-steps li { color: var(--ink-3); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.order-steps li span { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #cfd4df; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.order-steps li.current { color: var(--apx); } .order-steps li.current span { background: var(--apx); color: #fff; border-color: var(--apx); }
.order-steps li.done { color: var(--ink-2); } .order-steps li.done span { background: var(--apx-soft-2); border-color: transparent; color: var(--apx); }
.basket-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.basket-item:last-child { border-bottom: 0; }
.basket-item-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--apx-soft); color: var(--apx); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.basket-item-body { flex: 1; min-width: 0; } .basket-item-name { font-weight: 700; font-size: 16px; }
.basket-item-price { text-align: right; font-weight: 700; white-space: nowrap; }
.basket-summary { position: sticky; top: 90px; }
.plan-hero { display: flex; gap: 18px; align-items: center; }
.plan-hero img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; }
.choice { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; background: #fff; transition: border-color .12s, background .12s; }
.choice:hover { border-color: #cfc3ee; }
.choice:has(input:checked) { border-color: var(--apx); background: #fbf9ff; box-shadow: 0 0 0 3px rgba(117, 35, 231, .08); }
.choice input { margin-right: 10px; accent-color: var(--apx); }
.choice .choice-title { font-weight: 700; } .choice .choice-sub { font-size: 13px; color: var(--ink-3); }
.term-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.term-grid .choice { margin: 0; text-align: center; padding: 14px 10px; }
.term-grid .choice input { display: none; }
.term-grid .price { font-size: 20px; font-weight: 700; color: var(--ink); } .term-grid .per { font-size: 12px; color: var(--ink-3); }
.save-badge { display: inline-block; background: #e4f6ec; color: #1a7f4b; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-top: 4px; }
.domain-result { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; gap: 10px; flex-wrap: wrap; }
.domain-result .name { font-weight: 700; }
.domain-result.taken { opacity: .6; }
.domain-result .price { font-weight: 700; }
.domain-result .added { color: #1a7f4b; font-weight: 700; font-size: 13px; }
.basket-pill { position: relative; }
.basket-pill .count { position: absolute; top: -6px; right: -6px; background: #ff5d5d; color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 6px; }
.checkout-section { margin-bottom: 18px; }
.checkout-section h5 { display: flex; align-items: center; gap: 10px; }
.checkout-section h5 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--apx); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }

.renew-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.renew-switch input { display: none; }
.renew-switch .slider { width: 38px; height: 22px; border-radius: 999px; background: #d5d9e2; position: relative; transition: background .15s; }
.renew-switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.renew-switch input:checked + .slider { background: #1a7f4b; }
.renew-switch input:checked + .slider::after { left: 19px; }
.renew-switch .renew-label { font-size: 13px; font-weight: 700; min-width: 26px; }

/* ---- Responsive ---- */
@media (max-width: 1199px) { .portal-page-head, .portal-content { padding-left: 22px; padding-right: 22px; } }
@media (max-width: 767px) {
    .portal-body { font-size: 14px; }
    .portal-topbar-inner { padding: 0 12px; gap: 8px; }
    .portal-page-head { padding: 16px 16px; }
    .portal-page-title h1 { font-size: 20px; }
    .portal-actions { width: 100%; }
    .portal-actions .btn { flex: 1 1 auto; text-align: center; }
    .portal-content { padding: 16px 12px 32px; }
    .portal-card { padding: 16px; border-radius: 12px; margin-bottom: 14px; }
    .portal-stat { padding: 12px 14px; } .portal-stat .value { font-size: 20px; }
    .portal-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .portal-table thead, .portal-table tbody, .portal-table tr { display: table; width: 100%; table-layout: auto; }
    .portal-table td, .portal-table th { padding: 10px 6px; }
    .portal-filter .form-select, .portal-filter .form-control { max-width: 100%; width: 100%; }
    .portal-footer { padding: 16px 12px; }
    .basket-summary { position: static; }
    .portal-plain .portal-main-plain { padding-top: 84px; }
}

/* Marketing navbar on light portal pages (basket, checkout, sign-in): always the "sticky" light look */
.portal-plain #topnav { background: #fff; box-shadow: 0 0 3px rgba(53, 64, 78, .15); }
.portal-plain #topnav .navigation-menu.nav-light > li > a { color: #35404e !important; }
.portal-plain #topnav .navigation-menu.nav-light > li:hover > a, .portal-plain #topnav .navigation-menu.nav-light > li.active > a { color: var(--apx) !important; }
.portal-plain #topnav .navigation-menu.nav-light .has-submenu .menu-arrow { border-color: #35404e; }
.portal-plain #topnav .logo .l-dark { display: inline-block; }
.portal-plain #topnav .logo .l-light { display: none; }

/* Account menu in the marketing navbar (shared with the order flow pages) */
.apx-account { line-height: 1; }
.apx-account-toggle { border: 0; background: none; padding: 0; border-radius: 50%; display: inline-flex; vertical-align: middle; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.apx-account-toggle::after { display: none; }
#topnav.nav-sticky .apx-account-toggle, .portal-plain .apx-account-toggle { box-shadow: 0 0 0 2px var(--line); }
.apx-account-toggle .portal-avatar-circle { width: 38px; height: 38px; font-size: 14px; }
.apx-account-menu { width: 260px; padding: 6px; margin: 0 !important; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 24, 40, .12); background: #fff; font-family: inherit; }
.apx-account-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.apx-account-who { min-width: 0; line-height: 1.3; } .apx-account-who strong { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .apx-account-who span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apx-account-menu .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink) !important; background: none; border: 0; width: 100%; text-align: left; }
.apx-account-menu .dropdown-item svg { width: 17px; height: 17px; color: var(--ink-3); flex-shrink: 0; }
.apx-account-menu .dropdown-item:hover { background: var(--apx-soft); color: var(--apx) !important; } .apx-account-menu .dropdown-item:hover svg { color: var(--apx); }
.apx-account-menu .dropdown-divider { margin: 6px 4px; border-color: var(--line); opacity: 1; }
