/* ============================================================
   Hostripples Client Area Theme  v1.0
   Primary #103DBE / Royal #3967E6 / Canvas #FAF6EF
   ============================================================ */

:root {
  --hr-primary:   #103DBE;
  --hr-primary-h: #0c2fa8;
  --hr-royal:     #3967E6;
  --hr-royal-h:   #2d56d4;
  --hr-canvas:    #f5f7fb;
  --hr-canvas-d:  #eaecf5;
  --hr-text:      #2A2723;
  --hr-text-m:    #6B645C;
  --hr-text-l:    #9A9287;
  --hr-accent:    #C75B39;
  --hr-amber:     #FFB800;
  --hr-white:     #FFFFFF;
  --hr-border:    #E5DDD2;
  --hr-success:   #22863A;
  --hr-danger:    #D73A49;
  --hr-warning:   #F9A825;
  --hr-shadow:    0 1px 3px rgba(42,39,35,.07), 0 4px 12px rgba(42,39,35,.05);
  --hr-shadow-m:  0 4px 20px rgba(42,39,35,.10);
  --hr-radius:    8px;
  --hr-radius-sm: 4px;
  --hr-trans:     0.14s ease;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.933rem;
  line-height: 1.6;
  color: var(--hr-text);
  background-color: var(--hr-canvas);
  -webkit-font-smoothing: antialiased;
}
.primary-bg-color { background-color: var(--hr-canvas) !important; }
a { color: var(--hr-royal); text-decoration: none; transition: color var(--hr-trans); }
a:hover { color: var(--hr-primary); text-decoration: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; color: var(--hr-text); line-height: 1.3; margin-bottom: .5rem; }
hr { border-color: var(--hr-border); }
.container { max-width: 1200px; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  background: var(--hr-white);
  border-bottom: 1px solid var(--hr-border);
  box-shadow: 0 2px 8px rgba(16,61,190,.06);
  position: sticky; top: 0; z-index: 1030;
}
.header::before {
  content: "";
  display: block; height: 3px;
  background: linear-gradient(90deg, var(--hr-primary) 0%, var(--hr-royal) 100%);
}

/* Topbar (logged-in) */
.topbar {
  background: var(--hr-primary);
  padding: .3rem 0; font-size: .8rem;
}
.topbar .btn { color: rgba(255,255,255,.85); padding: .2rem .6rem; font-size: .8rem; }
.topbar .btn:hover { color: #fff; background: rgba(255,255,255,.1) !important; }
.topbar .btn-active-client {
  background: var(--hr-royal) !important; color: #fff !important;
  border-radius: var(--hr-radius-sm);
}
.topbar .input-group-text { background: transparent; color: rgba(255,255,255,.65); border: none; }
.topbar .btn-topbar-admin {
  background: rgba(255,255,255,.18) !important; color: #fff !important;
  border-radius: var(--hr-radius-sm); font-size: .75rem;
}
.topbar .btn-topbar-admin:hover { background: rgba(255,255,255,.28) !important; }
/* Topbar: suppress notification label text — keep only the bell icon + badge */
.topbar #accountNotifications span.d-sm-inline { display: none !important; }

/* Notification client alerts */
.client-alerts { list-style: none; padding: 0; margin: 0; min-width: 260px; }
.client-alerts li a {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .6rem .875rem; color: var(--hr-text);
  border-bottom: 1px solid var(--hr-border); font-size: .8rem;
}
.client-alerts li a:hover { background: var(--hr-canvas); }
.client-alerts li.none { padding: .75rem .875rem; color: var(--hr-text-m); font-size: .8rem; }

/* ── OVH-style single unified navbar ── */
.main-navbar {
  background: var(--hr-white);
  border-bottom: 1px solid var(--hr-border);
  padding: 0;
  min-height: 52px;
}
.navbar-brand { padding: .625rem 0; margin-right: 2rem; flex-shrink: 0; }
.logo-img { height: 38px; width: auto; display: block; }
.footer-logo { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: .75; }
.logo-text { font-size: 1.1rem; font-weight: 700; color: var(--hr-primary); white-space: nowrap; }

/* OVH tab-style primary nav items */
#nav { flex-wrap: nowrap; }
#nav .nav-item > a {
  display: flex; align-items: center;
  padding: 1rem .875rem;
  color: var(--hr-text) !important;
  font-size: .867rem; font-weight: 500;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
  white-space: nowrap; line-height: 1;
  transition: color var(--hr-trans), border-color var(--hr-trans);
}
#nav .nav-item > a:hover { color: var(--hr-royal) !important; border-bottom-color: var(--hr-royal); }
#nav .nav-item.active > a { color: var(--hr-royal) !important; border-bottom-color: var(--hr-royal); font-weight: 600; }

/* Primary nav dropdowns */
#nav .dropdown-menu {
  border: 1px solid var(--hr-border); border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow-m); padding: .35rem 0; min-width: 180px;
  background: var(--hr-white); margin-top: 0;
}
#nav .dropdown-item { padding: 0; }
#nav .dropdown-item a {
  color: var(--hr-text); padding: .5rem 1rem;
  font-size: .867rem; display: block;
  transition: background var(--hr-trans), color var(--hr-trans);
}
#nav .dropdown-item a:hover { background: var(--hr-canvas); color: var(--hr-royal); }
.collapsable-dropdown { display: none !important; }

/* Right-side controls */
.nav-right { gap: .25rem; }
.nav-right .navbar-nav .nav-item > a {
  color: var(--hr-text) !important; font-size: .867rem; font-weight: 500;
  padding: .45rem .6rem; white-space: nowrap;
}

/* Collapsible search in navbar */
.nav-search-wrap { position: relative; }
.nav-search-btn {
  color: var(--hr-text-m) !important; background: transparent !important; border: none !important;
  padding: .35rem .5rem !important; font-size: .95rem;
  border-radius: var(--hr-radius-sm) !important;
  transition: color var(--hr-trans);
}
.nav-search-btn:hover { color: var(--hr-royal) !important; background: var(--hr-canvas) !important; }
/* Desktop collapsible search */
#navSearchForm {
  display: none; align-items: center; margin-right: .25rem;
}
#navSearchForm.nav-search-visible { display: flex; }
#navSearchInput {
  height: 32px; width: 180px; font-size: .8rem;
  border: 1px solid var(--hr-border) !important;
  border-radius: var(--hr-radius-sm) !important;
  box-shadow: none !important; padding: .3rem .65rem;
}
#navSearchInput:focus {
  border-color: var(--hr-royal) !important;
  box-shadow: 0 0 0 3px rgba(57,103,230,.1) !important;
}
/* Mobile search (inside collapse, always visible) */
.nav-search-mobile { width: 100%; }
.nav-search-mobile .form-control { font-size: .867rem; }

/* Cart */
.cart-btn { position: relative; padding: .35rem .55rem !important; color: var(--hr-text) !important; border-radius: var(--hr-radius-sm) !important; }
.cart-btn:hover { background: var(--hr-canvas) !important; }
.cart-btn .badge {
  position: absolute; top: -2px; right: -2px;
  font-size: .6rem; padding: .18em .42em;
  background: var(--hr-royal) !important; color: #fff;
}

/* Page header bar — white with brand-blue text */
.page-header-bar {
  background: #fff;
  padding: .75rem 0;
  border-bottom: 2px solid var(--hr-border);
}
.page-header-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: .5rem;
}
.page-header-title {
  color: var(--hr-primary); font-size: 1rem; font-weight: 700;
  margin: 0; line-height: 1.3;
}
.page-header-bc .breadcrumb {
  background: transparent; padding: 0; margin: 0; font-size: .8rem; border-radius: 0;
}
.page-header-bc .breadcrumb-item a { color: var(--hr-text-m); }
.page-header-bc .breadcrumb-item a:hover { color: var(--hr-primary); }
.page-header-bc .breadcrumb-item.active { color: var(--hr-text); }
.page-header-bc .breadcrumb-item+.breadcrumb-item::before { color: var(--hr-border); }

/* ============================================================
   MAIN BODY
   ============================================================ */
#main-body { padding: 1.5rem 0 2.5rem; min-height: calc(100vh - 260px); }
body.has-rail #main-body .container { max-width: 100%; padding-left: 2rem; padding-right: 2rem; }

/* ============================================================
   SIDEBAR
   ============================================================ */
/* When rail is active: suppress WHMCS built-in right sidebar + full-width content */
body.has-rail .col-lg-4.col-xl-3:not(.primary-content) { display: none !important; }
body.has-rail .primary-content {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

.sidebar { margin-bottom: 1rem; }
.card-sidebar {
  border: 1px solid var(--hr-border); border-radius: var(--hr-radius);
  box-shadow: none; background: var(--hr-white); overflow: hidden; margin-bottom: 1rem;
}
.card-sidebar .card-header {
  background: var(--hr-white); border-bottom: 1px solid var(--hr-border); padding: .65rem 1rem;
}
.card-sidebar .card-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--hr-text-m); margin: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.card-minimise { cursor: pointer; color: var(--hr-text-l); font-size: .75rem; transition: transform var(--hr-trans); }
.card-sidebar .list-group { border-radius: 0; }
.card-sidebar .list-group-item {
  padding: .55rem 1rem; border-color: var(--hr-border);
  background: transparent; font-size: .867rem; border-left: none; border-right: none;
}
.card-sidebar a.list-group-item { color: var(--hr-text); transition: background var(--hr-trans), color var(--hr-trans); }
.card-sidebar a.list-group-item:hover { background: var(--hr-canvas); color: var(--hr-royal); }
.card-sidebar a.list-group-item.active { background: var(--hr-royal) !important; color: #fff; border-color: var(--hr-royal) !important; }
.sidebar-menu-item-wrapper { display: flex; align-items: center; gap: .5rem; }
.sidebar-menu-item-icon-wrapper { width: 1.25rem; text-align: center; color: var(--hr-text-l); flex-shrink: 0; }
a.list-group-item.active .sidebar-menu-item-icon-wrapper { color: rgba(255,255,255,.8); }
.sidebar-menu-item-label { flex: 1; }
.sidebar-menu-item-badge { margin-left: auto; }
.sidebar-menu-item-badge .badge { background: var(--hr-royal); color: #fff; }
.card-sidebar .card-footer { background: var(--hr-canvas); border-top: 1px solid var(--hr-border); padding: .6rem 1rem; font-size: .8rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: 1px solid var(--hr-border); border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow); background: var(--hr-white); margin-bottom: 1.25rem;
}
.card-header {
  background: var(--hr-white); border-bottom: 1px solid var(--hr-border); padding: .875rem 1.25rem;
}
.card-title { font-size: .933rem; font-weight: 600; margin: 0; color: var(--hr-text); }
.card-body { padding: 1.25rem; }
.card-footer {
  background: var(--hr-canvas); border-top: 1px solid var(--hr-border);
  padding: .7rem 1.25rem; font-size: .8rem; color: var(--hr-text-m);
}
.card-footer:empty { display: none; }
.card-accent-blue   { border-top: 3px solid var(--hr-royal); }
.card-accent-green  { border-top: 3px solid var(--hr-success); }
.card-accent-red    { border-top: 3px solid var(--hr-danger); }
.card-accent-gold   { border-top: 3px solid var(--hr-warning); }
.card-accent-orange { border-top: 3px solid var(--hr-accent); }

/* ============================================================
   DASHBOARD WELCOME
   ============================================================ */
.dashboard-welcome { padding-bottom: .75rem; border-bottom: 1px solid var(--hr-border); margin-bottom: 1.5rem !important; }
.dashboard-greeting { font-size: 1.5rem; font-weight: 700; color: var(--hr-text); margin: 0; }

/* ============================================================
   DASHBOARD TILES  (OVH-style: gradient fill + ghost icon)
   ============================================================ */
.tile {
  display: block; border: none; border-radius: var(--hr-radius);
  padding: 1.5rem 1.25rem 1.25rem; min-height: 110px;
  text-decoration: none; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--tile-from, var(--hr-primary)), var(--tile-to, var(--hr-royal)));
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  transition: box-shadow var(--hr-trans), transform var(--hr-trans);
}
.tile:hover { box-shadow: 0 8px 28px rgba(0,0,0,.22); transform: translateY(-3px); text-decoration: none; }
/* Per-tile colour pairs — brand-consistent blue family */
.tile-services { --tile-from: #103DBE; --tile-to: #3967E6; }  /* brand blue */
.tile-domains  { --tile-from: #0D6B9E; --tile-to: #1A9FD8; }  /* ocean blue */
.tile-invoices { --tile-from: #2858C5; --tile-to: #5C85E8; }  /* royal blue */
.tile-invoices.tile-alert { --tile-from: #991b1b; --tile-to: #D73A49; } /* red when unpaid */
.tile-tickets  { --tile-from: #1849A9; --tile-to: #2E77D4; }  /* deep blue */
/* Ghost icon */
.tile-icon-bg {
  position: absolute; top: .75rem; right: .875rem;
  font-size: 4.5rem; line-height: 1;
  color: rgba(255,255,255,.2); pointer-events: none;
}
.tile-stat {
  font-size: 2.75rem; font-weight: 700; color: #fff;
  line-height: 1; margin-bottom: .35rem; position: relative;
}
.tile-label {
  font-size: .75rem; color: rgba(255,255,255,.82);
  font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  position: relative;
}
.tile-accent { display: none; }
.tile-alert { border: none; }
.tile-alert .tile-icon-bg { color: rgba(255,255,255,.2); }

/* ============================================================
   PRODUCT CARDS  (OVH-style: icon container + name + badge)
   ============================================================ */
.product-card {
  display: flex; align-items: center;
  background: var(--hr-white); border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius); padding: 1rem 1.25rem;
  text-decoration: none; color: var(--hr-text); height: 100%;
  box-shadow: var(--hr-shadow);
  transition: border-color var(--hr-trans), box-shadow var(--hr-trans), transform var(--hr-trans);
}
.product-card:hover {
  border-color: var(--hr-royal);
  box-shadow: 0 4px 20px rgba(57,103,230,.16);
  transform: translateY(-2px);
  text-decoration: none; color: var(--hr-text);
}
.product-card-icon {
  width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--hr-primary), var(--hr-royal));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; margin-right: 1rem;
}
.product-card-body { flex: 1; min-width: 0; }
.product-card-name {
  font-weight: 600; font-size: .9rem; color: var(--hr-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .2rem;
}
.product-card-badge {
  display: inline-block; font-size: .7rem; font-weight: 700;
  padding: .15em .55em; border-radius: 20px;
  background: rgba(34,134,58,.12); color: var(--hr-success);
  letter-spacing: .03em;
}
.product-card-badge.badge-suspended { background: rgba(215,58,73,.1); color: var(--hr-danger); }
.product-card-arrow {
  color: var(--hr-text-l); margin-left: .75rem; font-size: .85rem;
  flex-shrink: 0; transition: transform var(--hr-trans), color var(--hr-trans);
}
.product-card:hover .product-card-arrow { transform: translateX(3px); color: var(--hr-royal); }
.product-empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 3rem 1rem; text-align: center;
  color: var(--hr-text-m); background: var(--hr-white);
  border: 1px solid var(--hr-border); border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow);
}
.product-empty-state i { color: var(--hr-border); margin-bottom: .75rem; }
.product-empty-state p { margin-bottom: 1rem; font-size: .9rem; }
/* Active Products section — hide the inner card-header since dash-section-header replaces it */
.services-section .card-panel { border-radius: var(--hr-radius); overflow: hidden; }
.services-section .card-panel .card-header { display: none; }
/* Make each service row taller and more OVH-like */
.services-section .panel-list-item {
  padding: .875rem 1.25rem; min-height: 56px; gap: .75rem;
  border-color: var(--hr-border);
}
.services-section a.panel-list-item:hover { background: rgba(57,103,230,.04); }
.services-section .panel-list-item .panel-item-label { font-size: .9rem; font-weight: 500; }
.services-section .panel-list-item .badge { border-radius: 20px; font-size: .7rem; padding: .25em .65em; }

/* Section header (above product grid and other dash sections) */
.dash-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--hr-border);
}
.dash-section-title {
  font-size: 1rem; font-weight: 700; color: var(--hr-text); margin: 0;
}
.dash-section-title i { color: var(--hr-royal); margin-right: .4rem; }

/* ============================================================
   DASHBOARD PANEL CARDS  (Lagom-style list panels)
   ============================================================ */
.card-panel {
  border: 1px solid var(--hr-border); border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow); background: var(--hr-white);
  margin-bottom: 0; display: flex; flex-direction: column;
  height: 100%;
}
.card-panel .card-header {
  background: var(--hr-white); border-bottom: 1px solid var(--hr-border);
  padding: .875rem 1.25rem;
}
.card-panel .card-title { font-size: .933rem; font-weight: 600; color: var(--hr-text); }

.panel-list-item {
  padding: .65rem 1.25rem; border-color: var(--hr-border);
  font-size: .867rem; display: flex; align-items: center;
  background: var(--hr-white); color: var(--hr-text);
  transition: background var(--hr-trans), color var(--hr-trans);
}
a.panel-list-item:hover { background: var(--hr-canvas); color: var(--hr-text); text-decoration: none; }
a.panel-list-item.active { background: var(--hr-royal) !important; color: #fff; border-color: var(--hr-royal) !important; }
.panel-item-label { flex: 1; }

/* Empty state */
.panel-empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 2rem 1rem; text-align: center;
  color: var(--hr-text-m);
}

/* Dashboard alert banners */
.alert-dashboard {
  border-left-width: 4px; font-size: .867rem; display: flex;
  align-items: center; flex-wrap: wrap; gap: .5rem;
}

/* Full-width client home panels */
.client-home-panels .col-12 .card-panel .list-group { max-height: 320px; overflow-y: auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  border-radius: var(--hr-radius-sm); font-weight: 500; font-size: .867rem;
  transition: background var(--hr-trans), border-color var(--hr-trans), box-shadow var(--hr-trans);
  padding: .45rem 1rem; line-height: 1.5;
}
.btn-primary  { background: var(--hr-royal)   !important; border-color: var(--hr-royal)   !important; color: #fff !important; }
.btn-primary:hover { background: var(--hr-primary)  !important; border-color: var(--hr-primary)  !important; box-shadow: 0 4px 12px rgba(57,103,230,.28); }
.btn-default, .btn-secondary { background: var(--hr-white)  !important; border-color: var(--hr-border)  !important; color: var(--hr-text)  !important; }
.btn-default:hover, .btn-secondary:hover { background: var(--hr-canvas) !important; border-color: var(--hr-text-l) !important; }
.btn-success { background: var(--hr-success) !important; border-color: var(--hr-success) !important; color: #fff !important; }
.btn-danger  { background: var(--hr-danger)  !important; border-color: var(--hr-danger)  !important; color: #fff !important; }
.btn-warning { background: var(--hr-warning) !important; border-color: var(--hr-warning) !important; color: var(--hr-text) !important; }
.btn-info    { background: var(--hr-royal)   !important; border-color: var(--hr-royal)   !important; color: #fff !important; }
.btn-link    { color: var(--hr-royal) !important; padding-left: 0; padding-right: 0; }
.btn-link:hover { color: var(--hr-primary) !important; }
.btn-xs  { font-size: .75rem !important; padding: .2rem .55rem !important; }
.btn-sm  { font-size: .8rem  !important; padding: .35rem .75rem !important; }
.btn-lg  { font-size: 1rem   !important; padding: .6rem 1.4rem  !important; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control {
  border-radius: var(--hr-radius-sm); border-color: var(--hr-border);
  color: var(--hr-text); background: var(--hr-white);
  font-size: .867rem; padding: .5rem .875rem;
  transition: border-color var(--hr-trans), box-shadow var(--hr-trans);
}
.form-control:focus { border-color: var(--hr-royal); box-shadow: 0 0 0 3px rgba(57,103,230,.12); }
.form-control::placeholder { color: var(--hr-text-l); }
.form-control-label { font-size: .8rem; font-weight: 600; color: var(--hr-text-m); margin-bottom: .3rem; }
.input-group-text {
  background: var(--hr-canvas); border-color: var(--hr-border); color: var(--hr-text-m); font-size: .867rem;
}
.input-group-merge .input-group-prepend .input-group-text { border-right: none; }
.input-group-merge .form-control { border-left: none; }
.input-group-merge .input-group-append .input-group-text,
.input-group-merge .btn-reveal-pw {
  border-left: none; background: var(--hr-white); border-color: var(--hr-border);
  color: var(--hr-text-m); border-top-left-radius: 0; border-bottom-left-radius: 0;
}
.form-group { margin-bottom: 1rem; }
select.form-control { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%236B645C' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 8px; padding-right: 2rem; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { border-radius: var(--hr-radius); font-size: .867rem; border-left-width: 4px; }
.alert-success { background: #F0FBF3; border-color: var(--hr-success); color: #1a6b2e; }
.alert-danger, .alert-error { background: #FFF0F2; border-color: var(--hr-danger); color: #a8292f; }
.alert-warning { background: #FFFBF0; border-color: var(--hr-warning); color: #946200; }
.alert-info    { background: #F0F5FF; border-color: var(--hr-royal);   color: var(--hr-primary); }
.alert .close { color: inherit; opacity: .7; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { font-size: .7rem; font-weight: 600; padding: .25em .55em; border-radius: 3px; }
.badge-primary, .badge-info    { background: var(--hr-royal)   !important; color: #fff; }
.badge-success                 { background: var(--hr-success) !important; color: #fff; }
.badge-danger                  { background: var(--hr-danger)  !important; color: #fff; }
.badge-warning                 { background: var(--hr-warning) !important; color: var(--hr-text); }
.badge-secondary, .badge-light { background: var(--hr-canvas-d) !important; color: var(--hr-text-m); }

/* ============================================================
   TABLES
   ============================================================ */
.table { font-size: .867rem; color: var(--hr-text); }
.table thead th {
  background: var(--hr-canvas); border-bottom: 2px solid var(--hr-border); border-top: none;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--hr-text-m); padding: .6rem .75rem;
}
.table td { border-top: 1px solid var(--hr-border); padding: .7rem .75rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--hr-canvas); }
.table-striped tbody tr:nth-of-type(odd) { background: rgba(250,246,239,.5); }
.table-bordered { border-color: var(--hr-border) !important; }
.table-bordered td, .table-bordered th { border-color: var(--hr-border) !important; }

/* ============================================================
   PAGINATION
   ============================================================ */
.page-link { color: var(--hr-royal); border-color: var(--hr-border); font-size: .8rem; }
.page-link:hover { background: var(--hr-canvas); border-color: var(--hr-border); color: var(--hr-primary); }
.page-item.active .page-link { background: var(--hr-royal) !important; border-color: var(--hr-royal); color: #fff; }
.page-item.disabled .page-link { color: var(--hr-text-l); background: transparent; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-content { border: 1px solid var(--hr-border); border-radius: var(--hr-radius); box-shadow: 0 10px 40px rgba(42,39,35,.14); }
.modal-header { border-bottom: 1px solid var(--hr-border); padding: .875rem 1.25rem; background: var(--hr-white); border-radius: var(--hr-radius) var(--hr-radius) 0 0; }
.modal-title { font-size: .933rem; font-weight: 600; }
.modal-footer { border-top: 1px solid var(--hr-border); background: var(--hr-canvas); padding: .7rem 1.25rem; border-radius: 0 0 var(--hr-radius) var(--hr-radius); }
.modal-localisation .modal-body { background: var(--hr-primary); color: #fff; padding: 1.5rem; }
.modal-localisation .modal-footer { background: rgba(0,0,0,.2); border-top: 1px solid rgba(255,255,255,.15); }
.modal-localisation h5 { color: #fff; }
.modal-localisation .item-selector .item { display: block; padding: .4rem .75rem; color: rgba(255,255,255,.8); border-radius: var(--hr-radius-sm); margin-bottom: .25rem; transition: background var(--hr-trans); }
.modal-localisation .item-selector .item:hover { background: rgba(255,255,255,.1); color: #fff; }
.modal-localisation .item-selector .item.active { background: var(--hr-royal); color: #fff; }

/* ============================================================
   LIST GROUPS
   ============================================================ */
.list-group-item { border-color: var(--hr-border); font-size: .867rem; padding: .6rem 1rem; color: var(--hr-text); background: var(--hr-white); }
.list-group-item-action:hover { background: var(--hr-canvas); color: var(--hr-text); }
.list-group-item.active { background: var(--hr-royal) !important; border-color: var(--hr-royal) !important; color: #fff; }

/* ============================================================
   POPOVER
   ============================================================ */
.popover { border-color: var(--hr-border); border-radius: var(--hr-radius); box-shadow: var(--hr-shadow-m); font-size: .867rem; }
.popover-body { padding: 0; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.page-login #main-body {
  background: linear-gradient(140deg, var(--hr-primary) 0%, var(--hr-royal) 60%, #5C87F5 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 56px); padding: 2rem 0;
}
.page-login .primary-content { display: flex; justify-content: center; width: 100%; }
.login-card {
  background: var(--hr-white); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  padding: 2.25rem 2rem; width: 100%; max-width: 400px;
}
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo img { height: 40px; width: auto; }
.login-title { font-size: 1.15rem; font-weight: 700; color: var(--hr-text); margin-bottom: .2rem; }
.login-subtitle { font-size: .867rem; color: var(--hr-text-m); margin-bottom: 1.25rem; }
.mw-540 { max-width: 100% !important; }
.login-form .card { border: none; box-shadow: none; margin: 0; }
.login-form .card-body { padding: 0; }
.login-form .card-footer {
  padding: 1.25rem 0 0; background: transparent; border-top: 1px solid var(--hr-border);
  margin-top: 1.25rem; text-align: center; font-size: .867rem;
}
.providerLinkingFeedback { min-height: 0; }


/* Flag icons */
.iti-flag { display: inline-block; width: 20px; height: 15px; background: url("../img/flags.png") no-repeat; vertical-align: middle; }
@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi) { .iti-flag { background-image: url("../img/flags@2x.png"); background-size: 5630px 15px; } }

/* ============================================================
   FULLPAGE OVERLAY
   ============================================================ */
#fullpage-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.88);
  z-index: 9999; align-items: center; justify-content: center;
}
#fullpage-overlay:not(.w-hidden) { display: flex; }
#fullpage-overlay.w-hidden { display: none; }
#fullpage-overlay .msg { font-size: .8rem; color: var(--hr-text-m); margin-top: .5rem; display: block; }

/* ============================================================
   MISC / UTILITIES
   ============================================================ */
.text-muted   { color: var(--hr-text-m) !important; }
.text-primary { color: var(--hr-royal)   !important; }
.text-success { color: var(--hr-success) !important; }
.text-danger  { color: var(--hr-danger)  !important; }
.text-warning { color: #946200 !important; }
.text-info    { color: var(--hr-royal)   !important; }
.border       { border-color: var(--hr-border) !important; }
.bg-light     { background: var(--hr-canvas)   !important; }
.bg-white     { background: var(--hr-white)    !important; }

.btn-return-to-admin {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 999;
  background: var(--hr-accent) !important; color: #fff !important;
  border-radius: 20px; padding: .4rem .875rem;
  font-size: .75rem; font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.progress { background: var(--hr-canvas-d); border-radius: 4px; height: .5rem; }
.progress-bar { background: var(--hr-royal); }

/* Dropdown arrow alignment */
.dropdown-toggle::after { vertical-align: .2em; }

/* Domain search area */
.domain-search-bar {
  background: var(--hr-white); border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius); padding: 1.5rem;
  margin: 0 0 1.5rem; box-shadow: var(--hr-shadow);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--hr-canvas-d); }
::-webkit-scrollbar-thumb { background: var(--hr-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--hr-text-l); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) { #nav .nav-item > a { padding: .75rem .65rem; } }
@media (max-width: 992px)  { #main-body { padding: 1rem 0 2rem; } }
@media (max-width: 768px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .header::before { height: 2px; }
  .tile { padding: .875rem .75rem; }
  .tile .stat { font-size: 1.4rem; }
  .login-card { padding: 1.75rem 1.25rem; max-width: 100%; margin: 0 .5rem; }
  .page-login #main-body { padding: 1.5rem 0; }
}
@media (max-width: 576px) { .topbar .input-group-text { display: none; } }

/* Print */
@media print {
  .header, #footer, .sidebar, .master-breadcrumb, .hr-rail, .hr-subpanel, .hr-sp-backdrop { display: none !important; }
  .col-lg-8, .col-xl-9 { width: 100% !important; max-width: 100% !important; }
  body { background: #fff !important; margin-left: 0 !important; }
}

/* ============================================================
   NAVIGATION RAIL — OVH-style dark sidebar
   ============================================================ */

/* ── Body offset (rail is always 240px) ── */
body.has-rail  { margin-left: 240px; }
body.hr-ready  { transition: margin-left .25s cubic-bezier(.4,0,.2,1); }

/* ── Hide top nav + header logo when rail is active (sidebar has the logo) ── */
body.has-rail #main-nav       { display: none !important; }
body.has-rail .navbar-toggler { display: none !important; }
body.has-rail .navbar-brand   { display: none !important; }

/* ── Domain search Register button — brand blue instead of green ── */
[menuItemName="Register a New Domain"] .btn-success {
  background: var(--hr-primary) !important; border-color: var(--hr-primary) !important;
}
[menuItemName="Register a New Domain"] .btn-success:hover {
  background: var(--hr-royal) !important; border-color: var(--hr-royal) !important;
}

/* Keep cart/search accessible when hamburger is gone on tablet */
@media (max-width: 1199px) {
  body.has-rail #mainNavbar {
    display:     flex !important;
    flex-basis:  auto;
    flex-grow:   0;
    width:       auto;
    margin-left: auto;
  }
  body.has-rail #mainNavbar .flex-grow-1 { display: none !important; }
  body.has-rail .nav-search-mobile       { display: none !important; }
}

/* ── Container: left-align to rail edge ── */
body.has-rail .container {
  margin-left:  0;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ══════════════════════════════════════
   RAIL STRUCTURE
   ══════════════════════════════════════ */
.hr-rail {
  position:      fixed;
  left: 0; top:  0;
  width:         240px;
  height:        100vh;
  background:    #103DBE;
  z-index:       1029;
  display:       flex;
  flex-direction: column;
  padding-top:   var(--hr-header-h, 91px);
  overflow-y:    auto;
  overflow-x:    hidden;
  box-shadow:    2px 0 20px rgba(0,0,0,.30);
}
.hr-rail::-webkit-scrollbar       { width: 4px; }
.hr-rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* Rail logo block */
.hr-rail-logo {
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  flex-shrink: 0;
}
.hr-logo-img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* "Service Hub" heading label */
.hr-rail-heading {
  padding:        16px 20px 8px;
  font-size:      10px;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color:          rgba(255,255,255,.30);
  flex-shrink:    0;
}

/* Section group wraps button + accordion */
.hr-rail-group { flex-shrink: 0; }

/* Section button / direct link */
.hr-rail-item {
  display:     flex;
  align-items: center;
  gap:         12px;
  width:       100%;
  padding:     11px 16px 11px 20px;
  background:  transparent;
  border:      none;
  border-left: 3px solid transparent;
  color:       rgba(255,255,255,.78);
  font-size:   13px;
  font-weight: 500;
  text-align:  left;
  cursor:      pointer;
  text-decoration: none;
  transition:  background .14s, color .14s, border-color .14s;
  line-height: 1.35;
}
.hr-rail-item .hr-icon {
  width:      18px;
  font-size:  14px;
  text-align: center;
  flex-shrink: 0;
  color:      rgba(255,255,255,.50);
  transition: color .14s;
}
.hr-rail-item .hr-label   { flex: 1; }
.hr-rail-item .hr-chevron {
  font-size:   10px;
  color:       rgba(255,255,255,.28);
  transition:  transform .18s, color .18s;
  flex-shrink: 0;
}
.hr-rail-item:hover,
.hr-rail-item:focus {
  background:      rgba(255,255,255,.07);
  color:           #fff;
  outline:         none;
  text-decoration: none;
}
.hr-rail-item:hover .hr-icon { color: rgba(255,255,255,.80); }

/* Expanded / active state */
.hr-rail-group.active   > .hr-rail-item,
.hr-rail-group.expanded > .hr-rail-item {
  background:        rgba(255,255,255,.22);
  color:             #fff;
  border-left-color: #fff;
}
.hr-rail-group.active   > .hr-rail-item .hr-icon,
.hr-rail-group.expanded > .hr-rail-item .hr-icon { color: rgba(255,255,255,.90); }
.hr-rail-group.expanded > .hr-rail-item .hr-chevron { transform: rotate(90deg); color: rgba(255,255,255,.50); }

/* ── Accordion sub-items ── */
.hr-rail-subitems {
  display:     none;
  background:  rgba(0,0,0,.15);
  border-left: 3px solid #3967E6;
  padding:     4px 0 8px;
}
.hr-rail-group.expanded .hr-rail-subitems { display: block; }

.hr-rail-subitem {
  display:         flex;
  align-items:     center;
  gap:             10px;
  padding:         9px 16px 9px 36px;
  color:           rgba(255,255,255,.58);
  font-size:       12.5px;
  text-decoration: none;
  transition:      background .12s, color .12s;
}
.hr-rail-subitem .hr-icon {
  width:      14px;
  font-size:  11px;
  text-align: center;
  flex-shrink: 0;
}
.hr-rail-subitem:hover {
  background:      rgba(255,255,255,.06);
  color:           rgba(255,255,255,.90);
  text-decoration: none;
}
.hr-rail-subitem.active {
  color:       #fff;
  background:  rgba(255,255,255,.08);
  font-weight: 600;
}

/* Thin divider line between sections */
.hr-rail-divider { height: 1px; background: rgba(255,255,255,.07); margin: 6px 20px; }

/* Pushes CTA + footer down */
.hr-rail-spacer { flex: 1; min-height: 16px; }

/* ── "Order a Service" CTA button ── */
.hr-rail-cta-wrap { padding: 14px 16px 10px; flex-shrink: 0; }
.hr-rail-cta {
  display:         flex;
  align-items:     center;
  gap:             10px;
  padding:         10px 14px;
  border:          1.5px solid rgba(255,255,255,.28);
  border-radius:   6px;
  color:           rgba(255,255,255,.85);
  font-size:       13px;
  font-weight:     500;
  text-decoration: none;
  transition:      all .14s;
  background:      transparent;
}
.hr-rail-cta:hover {
  background:      rgba(255,255,255,.10);
  border-color:    rgba(255,255,255,.55);
  color:           #fff;
  text-decoration: none;
}
.hr-rail-cta .hr-icon { font-size: 13px; }

/* ── Help links at the bottom ── */
.hr-rail-footer {
  padding:     6px 0 18px;
  border-top:  1px solid rgba(255,255,255,.07);
  margin-top:  6px;
  flex-shrink: 0;
}
.hr-rail-footer-link {
  display:         flex;
  align-items:     center;
  gap:             10px;
  padding:         8px 20px;
  color:           rgba(255,255,255,.40);
  font-size:       12px;
  text-decoration: none;
  transition:      color .14s;
}
.hr-rail-footer-link:hover {
  color:           rgba(255,255,255,.78);
  text-decoration: none;
}
.hr-rail-footer-link .hr-icon { width: 14px; font-size: 11px; text-align: center; }

/* ── Mobile: slide-in drawer (≤ 991px) ── */
.hr-mobile-trigger {
  display:         none;
  position:        fixed;
  top:             calc(var(--hr-header-h, 91px) + 10px);
  left:            10px;
  width:           34px;
  height:          34px;
  border-radius:   6px;
  background:      #103DBE;
  color:           #fff;
  border:          none;
  z-index:         1028;
  align-items:     center;
  justify-content: center;
  cursor:          pointer;
  box-shadow:      0 2px 10px rgba(0,0,0,.35);
  font-size:       14px;
}
.hr-rail-backdrop {
  display:        none;
  position:       fixed;
  inset:          0;
  background:     rgba(0,0,0,.50);
  z-index:        1040;
  opacity:        0;
  pointer-events: none;
  transition:     opacity .25s;
}
body.hr-menu-open .hr-rail-backdrop { opacity: 1; pointer-events: auto; }

@media (max-width: 991px) {
  body.has-rail { margin-left: 0 !important; }
  body.hr-ready { transition: none; }

  .hr-rail {
    transform:  translateX(-240px);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    z-index:    1041;
  }
  body.hr-menu-open .hr-rail { transform: translateX(0); }

  .hr-mobile-trigger { display: flex; }
  .hr-rail-backdrop  { display: block; }
}
