/*
 * GSM Data Hub Premium Theme V01
 * Safe visual override layer for Dhru Fusion / Smarty client area.
 * Core business logic is intentionally untouched.
 */
:root {
  --gdh-bg: #f4f7fb;
  --gdh-surface: #ffffff;
  --gdh-surface-2: #f8fafc;
  --gdh-text: #142033;
  --gdh-muted: #64748b;
  --gdh-border: #e2e8f0;
  --gdh-primary: #4f46e5;
  --gdh-primary-2: #2563eb;
  --gdh-primary-dark: #312e81;
  --gdh-success: #059669;
  --gdh-warning: #d97706;
  --gdh-danger: #dc2626;
  --gdh-info: #0284c7;
  --gdh-radius-sm: 10px;
  --gdh-radius: 16px;
  --gdh-radius-lg: 22px;
  --gdh-shadow-sm: 0 2px 10px rgba(15, 23, 42, .05);
  --gdh-shadow: 0 14px 40px rgba(15, 23, 42, .08);
  --gdh-shadow-hover: 0 18px 48px rgba(15, 23, 42, .13);
  --gdh-transition: .22s ease;
}

html { scroll-behavior: smooth; }
body.gdh-premium {
  background: var(--gdh-bg);
  color: var(--gdh-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.gdh-premium .bg-gray { background: var(--gdh-bg) !important; }
body.gdh-premium .bg-white { background: var(--gdh-surface) !important; }
body.gdh-premium .container { max-width: 1440px; }
body.gdh-premium .body-container { min-width: 0; }
body.gdh-premium .page-container { min-width: 0; }
body.gdh-premium img { height: auto; }
body.gdh-premium a { transition: color var(--gdh-transition), background var(--gdh-transition), box-shadow var(--gdh-transition), transform var(--gdh-transition); }
body.gdh-premium a:not(.btn):hover { color: var(--gdh-primary); }

/* Header / navigation */
body.gdh-premium .gdh-site-header {
  position: relative;
  z-index: 1000;
  background: rgba(255,255,255,.97);
  box-shadow: 0 1px 0 rgba(148,163,184,.18);
}
body.gdh-premium .header-top {
  background: #f8fafc;
  border-bottom: 1px solid var(--gdh-border);
}
body.gdh-premium .header-middle,
body.gdh-premium .header-bottom {
  background: var(--gdh-surface) !important;
}
body.gdh-premium .header-middle .container { min-height: 72px; }
body.gdh-premium .navbar-brand {
  margin-left: 0;
  color: var(--gdh-text) !important;
  letter-spacing: -.02em;
  font-weight: 800;
}
body.gdh-premium .navbar-brand img { max-height: 48px; width: auto; }
body.gdh-premium .navbar-mastermenu > .nav-item > .nav-link {
  color: #334155;
  font-weight: 650;
  border-radius: 10px;
  padding: .72rem .85rem;
}
body.gdh-premium .navbar-mastermenu > .nav-item > .nav-link:hover,
body.gdh-premium .navbar-mastermenu > .nav-item.active > .nav-link {
  color: var(--gdh-primary) !important;
  background: #eef2ff;
}
body.gdh-premium .navbar-expand-lg .navbar-nav .nav-item .nav-link:not(.bg-secondary)::before { display: none; }
body.gdh-premium .navbar-toggler {
  width: 44px;
  height: 44px;
  border: 1px solid var(--gdh-border);
  border-radius: 12px;
  background: #fff;
  color: var(--gdh-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.gdh-premium .dropdown-menu {
  border: 1px solid var(--gdh-border);
  border-radius: 14px;
  box-shadow: var(--gdh-shadow);
  padding: .55rem;
}
body.gdh-premium .dropdown-item { border-radius: 9px; padding: .6rem .75rem; }
body.gdh-premium .dropdown-item:hover { background: #eef2ff !important; color: var(--gdh-primary); }

/* Page heading / breadcrumb */
body.gdh-premium .page-title {
  color: var(--gdh-text);
  font-weight: 800;
  letter-spacing: -.025em;
}
body.gdh-premium .breadcrumb { color: var(--gdh-muted); }
body.gdh-premium .breadcrumb a { color: var(--gdh-muted); }
body.gdh-premium .breadcrumb a:hover { color: var(--gdh-primary); }

/* Cards */
body.gdh-premium .card {
  background: var(--gdh-surface);
  border: 1px solid var(--gdh-border);
  border-radius: var(--gdh-radius);
  box-shadow: var(--gdh-shadow-sm);
}
body.gdh-premium .card:hover { border-color: #d7deea; }
body.gdh-premium .card-header {
  background: transparent;
  border-bottom: 1px solid var(--gdh-border);
  font-weight: 700;
}
body.gdh-premium .card-body { min-width: 0; }
body.gdh-premium .themedefault {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 48%, #2563eb 100%) !important;
  border: 0 !important;
  box-shadow: 0 18px 42px rgba(79,70,229,.24);
}
body.gdh-premium .card-unpaid-balance {
  background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
  border-color: #fecaca;
}
body.gdh-premium .card-othercredit,
body.gdh-premium .card-area-status { overflow: hidden; }
body.gdh-premium .card-area-status { padding: 1.2rem; }
body.gdh-premium .card-area-status:hover {
  transform: translateY(-2px);
  box-shadow: var(--gdh-shadow-hover);
}
body.gdh-premium .card-order-success { border-top: 3px solid var(--gdh-success); }
body.gdh-premium .card-order-process { border-top: 3px solid var(--gdh-info); }
body.gdh-premium .card-order-fail { border-top: 3px solid var(--gdh-danger); }
body.gdh-premium .progressbar { min-width: 0; max-width: 100%; }

/* Buttons */
body.gdh-premium .btn {
  min-height: 42px;
  border-radius: 11px;
  font-weight: 700;
  padding: .58rem 1rem;
  line-height: 1.25;
  box-shadow: none;
}
body.gdh-premium .btn-primary,
body.gdh-premium button.btn.btn-primary,
body.gdh-premium .wizard .actions li a {
  color: #fff !important;
  background: linear-gradient(135deg, var(--gdh-primary), var(--gdh-primary-2)) !important;
  border: 1px solid transparent !important;
}
body.gdh-premium .btn-primary:hover,
body.gdh-premium button.btn.btn-primary:hover,
body.gdh-premium .wizard .actions li a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(79,70,229,.22);
}
body.gdh-premium .btn-secondary,
body.gdh-premium button.btn.btn-secondary,
body.gdh-premium .bg-secondary {
  background: #334155 !important;
  color: #fff !important;
}
body.gdh-premium .btn-light { border: 1px solid var(--gdh-border); background: #fff; color: #334155; }
body.gdh-premium .btn-danger { background: var(--gdh-danger); }
body.gdh-premium .btn-success { background: var(--gdh-success); }
body.gdh-premium .btn-sm { min-height: 34px; border-radius: 9px; padding: .38rem .7rem; }

/* Forms */
body.gdh-premium label,
body.gdh-premium .form-label { color: #334155; font-weight: 650; }
body.gdh-premium .form-control,
body.gdh-premium .custom-select,
body.gdh-premium select.form-control {
  min-height: 44px;
  color: var(--gdh-text);
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 11px;
  padding: .62rem .8rem;
  box-shadow: none;
}
body.gdh-premium textarea.form-control { min-height: 112px; resize: vertical; }
body.gdh-premium .form-control:focus,
body.gdh-premium .custom-select:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(79,70,229,.10);
}
body.gdh-premium .input-group-text {
  min-height: 44px;
  border-color: #d8e0ea !important;
  background: #f8fafc !important;
  color: #64748b;
}
body.gdh-premium .input-group-prepend .input-group-text { border-radius: 11px 0 0 11px; }
body.gdh-premium .input-group > .form-control:not(:first-child) { border-radius: 0 11px 11px 0; }
body.gdh-premium .chosen-container .chosen-single,
body.gdh-premium .chosen-container-multi .chosen-choices {
  min-height: 44px;
  border: 1px solid #d8e0ea;
  border-radius: 11px;
  background: #fff;
  box-shadow: none;
}
body.gdh-premium .custom-control-label { line-height: 1.5; }
body.gdh-premium .custom-checkbox .custom-control-input:checked~.custom-control-label::before {
  background: var(--gdh-primary) !important;
  border-color: var(--gdh-primary) !important;
}

/* Tables */
body.gdh-premium .table-responsive {
  border-radius: var(--gdh-radius);
  -webkit-overflow-scrolling: touch;
}
body.gdh-premium table,
body.gdh-premium .table {
  color: #334155;
  background: var(--gdh-surface);
}
body.gdh-premium .table thead th {
  color: #475569;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
  background: #f8fafc;
  border-top: 0;
  border-bottom: 1px solid var(--gdh-border);
  vertical-align: middle;
  white-space: nowrap;
}
body.gdh-premium .table td {
  border-top: 1px solid #edf1f6;
  vertical-align: middle;
}
body.gdh-premium .table-hover tbody tr:hover { background: #f8faff; }
body.gdh-premium table .btn { white-space: nowrap; }

/* Tabs, pills, pagination */
body.gdh-premium .nav-tabs { border-bottom: 1px solid var(--gdh-border); gap: .25rem; }
body.gdh-premium .nav-tabs .nav-link {
  border: 0;
  border-radius: 10px 10px 0 0;
  color: var(--gdh-muted);
  font-weight: 700;
}
body.gdh-premium .nav-tabs .nav-link.active { color: var(--gdh-primary); background: #eef2ff; }
body.gdh-premium .nav-pills .nav-link { border-radius: 10px; color: #475569; font-weight: 700; }
body.gdh-premium .nav-pills .nav-link.active,
body.gdh-premium .nav-pills .show>.nav-link { background: var(--gdh-primary) !important; color: #fff !important; }
body.gdh-premium .page-link {
  color: var(--gdh-primary);
  border-color: var(--gdh-border);
  min-width: 38px;
  text-align: center;
}
body.gdh-premium .page-item.active .page-link { background: var(--gdh-primary); border-color: var(--gdh-primary); }

/* Badges / alerts */
body.gdh-premium .badge { border-radius: 999px; padding: .38rem .55rem; font-weight: 750; }
body.gdh-premium .alert {
  border-radius: 12px;
  border-width: 1px;
  box-shadow: none;
}
body.gdh-premium .alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
body.gdh-premium .alert-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
body.gdh-premium .alert-info { background: #f0f9ff; color: #075985; border-color: #bae6fd; }
body.gdh-premium .alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* Modals */
body.gdh-premium .modal-content {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15,23,42,.22);
  overflow: hidden;
}
body.gdh-premium .modal-header {
  color: var(--gdh-text);
  background: #fff !important;
  border-bottom: 1px solid var(--gdh-border);
}
body.gdh-premium .modal-footer { border-top: 1px solid var(--gdh-border); }

/* Login */
body.gdh-premium .page-login {
  width: 100%;
  max-width: 440px !important;
  padding: 1.25rem;
}
body.gdh-premium .page-login .login-panel { padding: 1rem 0 2rem; }
body.gdh-premium .page-login .fieldoflogin.card,
body.gdh-premium .page-login .card.fieldoflogin {
  padding: 1.65rem;
  border-radius: 20px;
  box-shadow: 0 22px 65px rgba(15,23,42,.12);
  border: 1px solid rgba(226,232,240,.95);
}
body.gdh-premium .page-login .page-title { font-size: 1.4rem; margin-bottom: 1.25rem; }
body.gdh-premium .page-login .input-group { margin-bottom: .8rem; }
body.gdh-premium .page-login .pin input {
  width: 44px;
  height: 52px;
  border: 1px solid #d8e0ea;
  border-radius: 11px;
  background: #fff;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
}

/* Service / product / cart surfaces */
body.gdh-premium .card-product,
body.gdh-premium .servicegroup,
body.gdh-premium .service-list,
body.gdh-premium .cart-item {
  border-radius: var(--gdh-radius);
}
body.gdh-premium .card-product:hover {
  border-color: #c7d2fe;
  box-shadow: var(--gdh-shadow-hover);
}
body.gdh-premium .price,
body.gdh-premium .service-price { font-weight: 800; color: var(--gdh-primary-dark); }

/* Footer */
body.gdh-premium .gdh-footer { display: block !important; margin-top: 2rem; }
body.gdh-premium .gdh-footer .footer-top {
  color: #cbd5e1;
  background: #0f172a;
  border-top: 0 !important;
}
body.gdh-premium .gdh-footer .footer-bottom {
  color: #94a3b8;
  background: #0b1220;
  border-top: 1px solid rgba(148,163,184,.12);
}
body.gdh-premium .gdh-footer .link-heading { color: #fff !important; font-weight: 800; }
body.gdh-premium .gdh-footer .link-heading:after { background: #6366f1 !important; }
body.gdh-premium .gdh-footer a,
body.gdh-premium .gdh-footer .nav-link,
body.gdh-premium .gdh-footer .text-muted { color: #cbd5e1 !important; }
body.gdh-premium .gdh-footer a:hover { color: #fff !important; }
body.gdh-premium .gdh-footer .btn-newsletter {
  background: #1e293b;
  color: #fff;
  border: 1px solid #334155;
}
body.gdh-premium .gdh-footer .social-icons .nav-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #1e293b;
  margin-right: .4rem;
}
body.gdh-premium .gdh-footer img { max-height: 34px; width: auto; }

/* Utility compatibility */
body.gdh-premium .text-muted,
body.gdh-premium .text-muted1 { color: var(--gdh-muted) !important; opacity: 1; }
body.gdh-premium .h1, body.gdh-premium .h2, body.gdh-premium .h3,
body.gdh-premium .h4, body.gdh-premium .h5, body.gdh-premium .h6,
body.gdh-premium h1, body.gdh-premium h2, body.gdh-premium h3,
body.gdh-premium h4, body.gdh-premium h5, body.gdh-premium h6 { color: var(--gdh-text); }
body.gdh-premium .themedefault h1,
body.gdh-premium .themedefault h2,
body.gdh-premium .themedefault h3,
body.gdh-premium .themedefault h4,
body.gdh-premium .themedefault h5,
body.gdh-premium .themedefault h6,
body.gdh-premium .themedefault .h1,
body.gdh-premium .themedefault .h2,
body.gdh-premium .themedefault .h3,
body.gdh-premium .themedefault .h4,
body.gdh-premium .themedefault .h5,
body.gdh-premium .themedefault .h6 { color: #fff !important; }
body.gdh-premium .rounded { border-radius: 10px !important; }
body.gdh-premium .bg-light { background: #f8fafc !important; }
body.gdh-premium .border,
body.gdh-premium .border-top,
body.gdh-premium .border-bottom,
body.gdh-premium .border-left,
body.gdh-premium .border-right { border-color: var(--gdh-border) !important; }

/* Prevent common overflow problems */
body.gdh-premium pre,
body.gdh-premium code { max-width: 100%; overflow-wrap: anywhere; }
body.gdh-premium .row > [class*="col-"] { min-width: 0; }
body.gdh-premium .d-row { min-width: 0; }
body.gdh-premium iframe { max-width: 100%; }
body.gdh-premium .table { min-width: 100%; }

/* Laptop / smaller desktop */
@media (max-width: 1199.98px) {
  body.gdh-premium .container { max-width: 1140px; }
  body.gdh-premium .navbar-mastermenu > .nav-item > .nav-link { padding-left: .62rem; padding-right: .62rem; }
}

/* Tablet and below */
@media (max-width: 991.98px) {
  body.gdh-premium { font-size: 14.5px; }
  body.gdh-premium .container { max-width: 100%; padding-left: 18px; padding-right: 18px; }
  body.gdh-premium .header-middle .container { min-height: 64px; }
  body.gdh-premium .navbar-brand img { max-height: 42px; }
  body.gdh-premium .page-title { font-size: 1.35rem; }
  body.gdh-premium .page-container { padding-left: 0; padding-right: 0; }
  body.gdh-premium .d-row { flex-wrap: wrap; gap: .75rem; }
  body.gdh-premium .d-row > .flex-grow-1 { flex: 1 1 calc(50% - .75rem); min-width: 240px; margin-left: 0 !important; margin-right: 0 !important; }
  body.gdh-premium .card-othercredit .d-row > .d-grid { flex: 1 1 calc(50% - .75rem); min-width: 220px; }
  body.gdh-premium .modal-dialog { margin: .8rem auto; max-width: calc(100% - 32px); }
  body.gdh-premium .gdh-footer .col-lg-3,
  body.gdh-premium .gdh-footer .col-lg-6 { margin-bottom: 1rem; text-align: left !important; }
}

/* Mobile */
@media (max-width: 767.98px) {
  body.gdh-premium .container { padding-left: 14px; padding-right: 14px; }
  body.gdh-premium .header-middle .container { min-height: 60px; }
  body.gdh-premium .navbar-brand { max-width: calc(100% - 110px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.gdh-premium .navbar-brand img { max-height: 38px; max-width: 190px !important; }
  body.gdh-premium .page-title { font-size: 1.2rem; }
  body.gdh-premium .card { border-radius: 14px; }
  body.gdh-premium .card-body { padding: 1rem; }
  body.gdh-premium .btn { min-height: 44px; }
  body.gdh-premium .form-control,
  body.gdh-premium .custom-select,
  body.gdh-premium select.form-control { font-size: 16px; min-height: 46px; }
  body.gdh-premium .d-row { display: flex; flex-direction: column; gap: .7rem; }
  body.gdh-premium .d-row > *,
  body.gdh-premium .d-row > .flex-grow-1,
  body.gdh-premium .card-othercredit .d-row > .d-grid { width: 100%; flex: 1 1 100%; min-width: 0; margin: 0 !important; }
  body.gdh-premium .themedefault { padding: 1.15rem !important; }
  body.gdh-premium .big-font { font-size: 1.65rem !important; }
  body.gdh-premium .card-area-status { padding: 1rem; }
  body.gdh-premium .table-responsive { margin-left: 0; margin-right: 0; width: 100%; overflow-x: auto; }
  body.gdh-premium .table { width: max-content; min-width: 100%; }
  body.gdh-premium .table th,
  body.gdh-premium .table td { padding: .72rem .65rem; }
  body.gdh-premium .nav-tabs,
  body.gdh-premium .nav-pills.flex-nowrap { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  body.gdh-premium .nav-tabs .nav-link,
  body.gdh-premium .nav-pills.flex-nowrap .nav-link { white-space: nowrap; }
  body.gdh-premium .page-login { padding: .6rem; max-width: 100% !important; }
  body.gdh-premium .page-login .fieldoflogin.card,
  body.gdh-premium .page-login .card.fieldoflogin { padding: 1.2rem; border-radius: 16px; }
  body.gdh-premium .page-login .pin { gap: 7px; }
  body.gdh-premium .page-login .pin input { width: calc((100vw - 84px) / 6); max-width: 44px; min-width: 34px; height: 48px; }
  body.gdh-premium .modal-dialog { max-width: calc(100% - 20px); margin: .6rem auto; }
  body.gdh-premium .modal-content { border-radius: 15px; }
  body.gdh-premium .gdh-footer .footer-top,
  body.gdh-premium .gdh-footer .footer-bottom { padding: 1.25rem 0 !important; }
  body.gdh-premium .gdh-footer .row { margin-left: 0; margin-right: 0; }
  body.gdh-premium .gdh-footer [class*="col-"] { padding-left: 0; padding-right: 0; }
  body.gdh-premium .gdh-footer .footer-bottom img { margin-top: .75rem; }
}

/* Small phones */
@media (max-width: 575.98px) {
  body.gdh-premium .container { padding-left: 12px; padding-right: 12px; }
  body.gdh-premium .navbar-brand img { max-width: 155px !important; }
  body.gdh-premium .page-title { font-size: 1.1rem; }
  body.gdh-premium .card-body { padding: .9rem; }
  body.gdh-premium .btn:not(.btn-sm) { width: auto; max-width: 100%; }
  body.gdh-premium .input-group { flex-wrap: nowrap; }
  body.gdh-premium .input-group-prepend { flex: 0 0 auto; }
  body.gdh-premium .page-login .pin input { min-width: 31px; height: 44px; padding: 0; }
}

/* Landscape phones / short viewport */
@media (max-height: 520px) and (orientation: landscape) {
  body.gdh-premium .page-login .login-panel { padding-top: .35rem; padding-bottom: .35rem; }
  body.gdh-premium .page-login .fieldoflogin.card { padding: 1rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.gdh-premium *, body.gdh-premium *::before, body.gdh-premium *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Dark mode compatibility with existing theme switch */
body.gdh-premium.svg-dark,
body.gdh-premium.dark {
  --gdh-bg: #0b1220;
  --gdh-surface: #111827;
  --gdh-surface-2: #172033;
  --gdh-text: #e5e7eb;
  --gdh-muted: #94a3b8;
  --gdh-border: #263245;
}
