/* 
 * EKREDITS - Main Stylesheet v4.5
 * Structure: 1.Variables, 2.Base, 3.Components, 4.Navigation, 5.Hero, 6.Page Sections, 7.Utilities, 8.Responsive
 */

/* --- 1. Variables --- */
:root {
  --primary-color: #30408a;
  --primary-light: #4c5bb1;
  --primary-dark: #1e2a63;
  --accent-color: #fec500; /* Brand Yellow */
  --text-color: #313132;
  --bg-color: #f6f7f8;
  --white: #ffffff;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. Base Styles --- */
body {
  background-color: var(--bg-color);
  font-family: "Manrope", sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

main {
  position: relative;
  z-index: 5;
}

/* --- Wow Background Effects --- */
.wow-bg-elements {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.wow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: floatSphere 20s infinite alternate ease-in-out;
}

.wow-sphere-1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(48, 64, 138, 0.4) 0%, transparent 70%);
  top: -200px; left: -200px;
}

.wow-sphere-2 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(248, 180, 30, 0.5) 0%, transparent 70%);
  bottom: 5%; right: -100px;
  animation-duration: 25s;
}

.wow-sphere-3 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(248, 212, 71, 0.4) 0%, transparent 70%);
  top: 25%; left: 10%;
  animation-duration: 30s;
}

@keyframes floatSphere {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 40px) scale(1.05); }
}

/* --- 3. Shared Components --- */
.btn {
  border-radius: 100px !important;
  padding: 0.8rem 2rem;
  font-weight: 700 !important;
  transition: var(--transition) !important;
  letter-spacing: 1px !important;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: var(--primary-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(48, 64, 138, 0.2);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 40px;
  border: none;
  padding: 3rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.05);
}

.ekredits-section-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
}

.leading-relaxed {
  line-height: 1.6 !important;
}

/* --- Form Controls --- */
.form-control, .form-select {
  height: 3.8rem;
  border-radius: 100px !important;
  border: 1.5px solid rgba(48, 64, 138, 0.1);
  background-color: white !important;
  padding: 1.25rem 2rem 0.25rem 2rem;
  font-weight: 500;
  color: var(--primary-dark) !important;
  transition: all 0.2s ease-in-out;
}

.form-control.border-0 {
  border: none !important;
}

.form-control.bg-transparent {
  background-color: transparent !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 10px 20px rgba(48, 64, 138, 0.08) !important;
  background-color: white !important;
}

/* Perfect alignment for Floating Labels in Rounded Inputs */
.form-floating {
    position: relative;
}

.form-floating > .form-control,
.form-floating > .form-select {
    height: 3.8rem;
    padding: 1.625rem 2rem 0.625rem 2rem;
}

.form-floating > label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1.1rem 2rem !important;
  color: #64748b;
  font-weight: 500;
  transition: all 0.2s ease;
  background-color: transparent !important;
  width: auto !important;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.form-floating > label::after {
  background-color: transparent !important;
  content: none !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
  transform: scale(0.85) translateY(-0.85rem) translateX(0.5rem) !important;
  color: var(--primary-color);
  opacity: 0.8;
}

.form-control.is-invalid {
    border-color: #ffc9c9 !important;
    background-color: #fffafb !important;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(224, 49, 49, 0.1) !important;
    border-color: #fa5252 !important;
}

.error-msg {
    color: #e03131;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-control:disabled, .form-select:disabled {
  background-color: #f8f9fa !important;
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
  border-color: rgba(0,0,0,0.05) !important;
}

.form-control:disabled ~ label, .form-select:disabled ~ label {
  opacity: 0.5;
}

/* --- Modals --- */
.modal-glass {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border-radius: 40px !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.15) !important;
}

.modal-header.border-0 {
    padding: 2rem 2rem 0.5rem 2rem;
    display: flex;
    justify-content: flex-end;
}

.modal-body {
    padding: 0 2.5rem 2.5rem 2.5rem;
}

.modal-footer.border-0 {
    padding: 0 2.5rem 2rem 2.5rem;
}


.btn-close {
    background-color: #f1f3f5;
    border-radius: 50%;
    padding: 0.75rem;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background-color: #e9ecef;
    opacity: 1;
    transform: rotate(90deg);
}

.amount-chip {
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.amount-chip:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.amount-chips {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-msg-centered {
    color: #e03131;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.payment-steps {
    position: relative;
    z-index: 10;
}

.payment-steps * {
    text-decoration: none !important;
}

.step-item-mini {
    position: relative;
    z-index: 2;
    text-align: center;
    background: transparent;
}

.step-dot {
    width: 32px;
    height: 32px;
    background: #f1f3f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #adb5bd;
    margin: 0 auto 10px auto;
    transition: all 0.3s ease;
    border: 2px solid white;
    position: relative;
    z-index: 3;
}

.step-item-mini.active .step-dot {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(48, 64, 138, 0.3);
}

.step-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #adb5bd;
    display: block;
    line-height: 1.2;
}

.step-item-mini.active .step-label {
    color: var(--primary-dark);
}

.step-line {
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #f1f3f5;
    z-index: 1;
}



.conditional-fields-wrapper {
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: visible;
  margin-top: 0;
}

.conditional-fields-wrapper.is-hidden {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  margin-top: -1.5rem;
  pointer-events: none;
}

/* --- 4. Navigation --- */
.nav-container-main {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1.25rem 0 !important;
  position: relative;
  z-index: 1040; /* Increased to stay above calculator (1000) but below modals (1050) */
  width: 100% !important;
}

.navigation-wrapper { 
  position: relative; 
  z-index: 1040 !important; /* Increased to stay above calculator (1000) but below modals (1050) */
  width: 100%; 
  display: block !important;
}

.nav-zone-left { 
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto; 
}

.nav-zone-center { 
  position: absolute; 
  left: 50%; 
  transform: translateX(-50%); 
  display: flex !important; 
  justify-content: center !important; 
  align-items: center !important; 
  z-index: 1002; 
}

.nav-zone-right-group { 
  display: flex !important; 
  align-items: center !important; 
  gap: 12px !important; 
  flex: 0 0 auto; 
}

.nav-product-pill, .nav-client-pill {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-radius: 100px;
  padding: 4px;
  display: flex;
  flex-direction: row;
  align-items: center;
  border: none !important;
  box-shadow: none !important;
}

.nav-product-link, .nav-client-link {
  padding: 8px 20px;
  border-radius: 100px;
  color: white !important;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
}

.nav-product-link.active, .nav-client-link.active {
  background: white;
  color: var(--primary-dark) !important;
}

.logout-circle-btn {
    width: 36px; height: 36px;
    background: #dc3545;
    color: white !important;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none !important;
    border: none !important;
}

.custom-mobile-menu {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  width: 550px;
  max-width: calc(100vw - 2rem);
  background: rgba(10, 15, 30, 0.8) !important;
  backdrop-filter: blur(50px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(50px) saturate(200%) !important;
  border-radius: 28px;
  border: none !important;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  z-index: 3000;
  display: none;
  padding: 1.75rem;
  color: white;
}

.custom-mobile-menu.show { display: block; animation: menuSpring 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }

@keyframes menuSpring {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-column-title { 
    font-size: 0.7rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    color: rgba(255, 255, 255, 0.3); 
    margin-bottom: 1.25rem;
    padding-left: 1rem;
}

.menu-link-item { 
    display: flex; 
    padding: 0.75rem 1rem; 
    color: rgba(255, 255, 255, 0.9) !important; 
    text-decoration: none !important; 
    font-weight: 600; 
    border-radius: 16px; 
    transition: all 0.2s;
    font-size: 0.95rem;
}

.menu-link-item:hover { 
    background: rgba(255, 255, 255, 0.08); 
    color: white !important;
    transform: translateX(5px); 
}

.menu-lang-bar { 
    display: flex; 
    justify-content: center;
    gap: 1.5rem; 
    margin-bottom: 2rem; 
    padding-bottom: 1.5rem; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
}

.menu-lang-btn { 
    color: rgba(255, 255, 255, 0.4); 
    text-decoration: none !important; 
    font-weight: 700; 
    font-size: 0.85rem; 
    transition: all 0.2s;
}

.menu-lang-btn.active, .menu-lang-btn:hover { color: white; }

/* Menu Profile Card & Logout */
.menu-profile-card { 
    background: rgba(255, 255, 255, 0.06); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 24px; 
    padding: 1.25rem; 
    margin-bottom: 2rem; 
}

.menu-logout-btn {
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b !important;
    background: transparent;
    transition: all 0.2s ease;
}

.menu-logout-btn:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    border-color: #ff6b6b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}


/* --- 5. Hero Sections --- */
.hero-layout-wrapper {
  position: relative;
}

.hero-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 550px;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: 0;
  pointer-events: auto !important;
}

.calculator-card, 
.calculator-card form,
.calculator-card button[type='submit'] {
  pointer-events: auto !important;
  position: relative;
  z-index: 1000;
}

.hero-section.landing-hero { 
  min-height: 680px; 
  padding-bottom: 110px !important; 
}
.hero-section.hero-compact { min-height: 350px !important; }

/* Background Gradients */
.hero-section.leasing { background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%), linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%), url("/images/hero_leasing.jpg") !important; }
.hero-section.credit, .hero-section.credit_line { background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%), linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%), url("/images/hero_credit.jpg") !important; }
.hero-section.shop { background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%), linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%), url("/images/hero_shop.jpg") !important; }
.hero-section.authorization, .hero-section.profile, .hero-section.smart_id { background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%), url("/images/hero_auth.jpg") !important; }

.hero-container {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
}

/* Compact hero for inner pages like forms */
.hero-section.hero-compact {
  min-height: 180px !important;
  height: 180px !important;
}

/* Background Gradients for Heroes */
.hero-section.leasing {
  background-image: 
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%),
    url("/images/hero_leasing.jpg") !important;
}

.hero-section.credit, .hero-section.credit_line {
  background-image: 
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%),
    url("/images/hero_credit.jpg") !important;
}

.hero-section.shop {
  background-image: 
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%),
    url("/images/hero_shop.jpg") !important;
}

.hero-section.authorization, .hero-section.profile, .hero-section.smart_id {
  background-image: 
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%),
    url("/images/hero_auth.jpg") !important;
}

.hero-title-unified {
  color: white;
  font-weight: 700;
  font-size: 3.5rem;
  letter-spacing: -2px;
  line-height: 1.1;
  text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.display-3 {
  font-weight: 700 !important;
}

/* --- 6. Page Sections --- */
.ek-split-slider {
  background: white;
  border-radius: 40px;
  overflow: hidden;
  margin: 4rem 0;
}

.slider-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.slider-content {
  padding: 4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.slider-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
}

.slider-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.slider-desc {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 3rem;
  max-width: 450px;
}

.ek-indicators-inner {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.ek-indicator-bar {
  width: 40px;
  height: 4px;
  background: rgba(48, 64, 138, 0.1);
  border: none;
  border-radius: 2px;
  padding: 0;
  transition: all 0.3s ease;
}

.ek-indicator-bar.active {
  background: var(--primary-color);
  width: 80px;
}

@media (max-width: 991.98px) {
  .ek-split-slider {
    border-radius: 32px;
    margin: 2rem 0;
  }
  .slider-img {
    height: 300px;
  }
  .slider-content {
    padding: 2.5rem 2rem;
  }
  .slider-title {
    font-size: 1.8rem;
  }
  .ek-indicator-bar {
    width: 30px;
  }
  .ek-indicator-bar.active {
    width: 60px;
  }
}

/* --- 6. Content Areas --- */
.main-content-area {
  margin-top: 0; /* Default: content starts below hero */
  position: relative;
  z-index: 500;
  min-height: 400px;
  padding-bottom: 100px;
  transition: margin-top 0.3s ease;
}

/* Pull content up ONLY on large landing pages */
.landing-hero + .main-content-area,
.landing-hero + main .main-content-area,
.hero-section.landing-hero ~ .main-content-area {
    margin-top: -20px !important;
}

/* Standard overlap for compact hero pages (login, profile, cabinet, leasing start) */
.hero-compact ~ .main-content-area,
.hero-compact ~ main .main-content-area,
.hero-section.hero-compact ~ .main-content-area,
section:has(.hero-compact) + .main-content-area,
section + .main-content-area,
#authorization + .main-content-area,
#profile + .main-content-area,
.cabinet-wrapper .main-content-area,
.cabinet-wrapper main.main-content-area {
    margin-top: -85px !important; /* Adjusted from -100px to move content 15px lower */
    padding-top: 0;
}


.calculator-card {
  max-width: 580px;
  margin-left: auto !important; margin-right: 0 !important;
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(50px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(50px) saturate(200%) !important;
  border-radius: 40px !important;
  padding: 3rem !important;
  border: none !important;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.15) !important;
  position: relative;
  overflow: hidden;
}

.calculator-card h3 {
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -1.5px;
  margin-bottom: 2.5rem;
}

.glass-inset {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.amount-input {
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  color: var(--primary-dark) !important;
  background: white !important;
  border: 1px solid rgba(48, 64, 138, 0.1) !important;
  border-radius: 100px !important;
  padding: 0.5rem 2rem !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
  height: auto !important;
  line-height: 1.2 !important;
  transition: var(--transition);
}

.calc-btn-img {
  width: 44px;
  height: 44px;
  transition: transform 0.2s ease;
}

.calc-btn-img:hover {
  transform: scale(1.1);
}


.cabinet-card { background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(25px); border-radius: 32px; border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: 0 30px 60px rgba(0,0,0,0.05); padding: 3rem; margin-bottom: 24px; position: relative; overflow: hidden; }
.cabinet-card-title { font-size: 1.75rem; font-weight: 900; color: var(--primary-dark); letter-spacing: -1px; margin-bottom: 2.5rem; display: flex; align-items: center; gap: 12px; }

/* --- 7. Utility & Common --- */
.fw-700 { font-weight: 700 !important; }

.container-app { 
  max-width: 1320px; 
  margin: 0 auto !important; 
  width: 100%; 
  padding: 0 2rem; 
}
.tracking-tighter-2 { letter-spacing: -2px !important; }
.leading-tight { line-height: 1.1 !important; }
.object-cover { object-fit: cover !important; }
.rounded-5 { border-radius: 32px !important; }
.pt-100 { padding-top: 100px !important; }
.pb-100 { padding-bottom: 100px !important; }

/* --- Custom Checkbox Styling --- */
.form-check-input {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.1rem;
  border: 2px solid rgba(48, 64, 138, 0.2);
  border-radius: 6px !important; /* Slightly rounded but distinct from inputs */
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 4px 10px rgba(48, 64, 138, 0.2);
}

.form-check-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(48, 64, 138, 0.1);
}

.form-check-label {
  padding-left: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #64748b;
}

/* Glass Inset Wrapper for Checkbox */
.glass-inset .form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

/* Desktop Refinements */
@media (min-width: 992px) {
  /* No more padding-top: 0, allowing the 2rem padding to work */
}

/* Mobile Overrides */
@media (max-width: 991.98px) {
  .hero-section {
    min-height: 160px;
    padding: 1rem 0;
  }
  
  .hero-section.landing-hero {
    min-height: 380px; /* Reduced from 500px for a more compact mobile feel */
    padding-bottom: 1rem !important;
  }

  .hero-container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  /* 1. RESTORE TRANSPARENCY FOR CARDS AND CALCULATORS ON MOBILE */
  .glass-card, .calculator-card, .cabinet-card {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    border-radius: 0 !important;
  }

  .calculator-card {
    padding: 3rem 1.5rem 1.5rem 1.5rem !important; /* Increased top padding to 3rem */
  }

  .calculator-card h3 {
    font-size: 1.75rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* 2. COMPACT HERO FIXES */
  .hero-section.hero-compact {
    min-height: 80px !important;
    height: 80px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
  }

  .hero-section.hero-compact .hero-container,
  .hero-section.hero-compact .hero-title-unified,
  .hero-section.hero-compact .hero-text-col {
    display: none !important;
    visibility: hidden !important;
  }

  /* Reset overlap and push content down for all compact hero structures */
  .hero-section.hero-compact ~ .main-content-area,
  .hero-section.hero-compact ~ main.main-content-area,
  section:has(.hero-compact) ~ .main-content-area,
  section:has(.hero-compact) ~ main.main-content-area,
  .hero-compact + .main-content-area {
    margin-top: 0 !important;
    padding-top: 30px !important;
    z-index: 10 !important;
  }

  /* Target the container-app and glass-card inside the main-content-area following a hero-compact */
  .hero-section.hero-compact ~ .main-content-area .container-app,
  section:has(.hero-compact) ~ .main-content-area .container-app,
  .hero-section.hero-compact ~ main.main-content-area .container-app,
  .hero-section.hero-compact + .main-content-area .container-app {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .hero-section.hero-compact ~ .main-content-area .glass-card,
  section:has(.hero-compact) ~ .main-content-area .glass-card,
  .hero-section.hero-compact ~ main.main-content-area .glass-card,
  .hero-section.hero-compact + .main-content-area .glass-card,
  .hero-section.hero-compact ~ .main-content-area .cabinet-card,
  section:has(.hero-compact) ~ .main-content-area .cabinet-card {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    padding-left: 0 !important; /* Reset padding since container already has 1rem */
    padding-right: 0 !important;
    padding-top: 0.5rem !important; /* Even more compact */
    border-radius: 0 !important;
  }

  /* Reduce large margins around cabinet titles on mobile */
  .cabinet-card .mb-5 {
    margin-bottom: 0.75rem !important;
  }

  .cabinet-card div[style*="min-height: 44px"] {
    min-height: 0 !important;
  }

  .cabinet-card-title {
    margin-bottom: 0.5rem !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
  }

  .cabinet-card .mb-4 {
    margin-bottom: 1rem !important;
  }

  .cabinet-card .gap-3, .cabinet-card .gap-4 {
    gap: 0.5rem !important;
  }

  .hero-section.hero-compact .navigation-wrapper {
    margin-bottom: 0 !important;
    width: 100% !important;
  }

  .menu-logout-btn {
    border: 1px solid rgba(255, 107, 107, 0.3) !important;
    background: rgba(255, 107, 107, 0.1) !important;
    color: #ff6b6b !important;
  }

  .w-100-mobile {
    width: 100% !important;
    margin-top: 0.5rem;
  }

  /* Modern Floating PWA Banner */
  .pwa-install-wrapper {
    position: fixed !important;
    bottom: 90px !important; /* Above the bottom navigation */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92% !important;
    max-width: 400px !important;
    z-index: 1050 !important;
    display: none;
  }

  .pwa-banner-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-radius: 24px !important;
    padding: 1rem 1.25rem !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(19, 34, 108, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .pwa-icon-box {
    width: 48px;
    height: 48px;
    background: #13226C;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
  }

  .pwa-icon-box img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  .pwa-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #f1f3f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  /* Island Navigation - Ultra Stable Version */
  .mobile-bottom-nav-custom {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92% !important;
    max-width: 480px !important;
    height: 72px !important;
    background: #0D122D !important; /* Solid dark color for stability */
    background: rgba(13, 18, 45, 0.9) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* Critical: stay in one line */
    justify-content: space-evenly !important;
    align-items: center !important;
    z-index: 1000 !important; /* Lowered from 9999 to stay below modals */
    border-radius: 36px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
    padding: 0 10px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .bottom-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: none !important;
    flex: 1 1 0 !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: 100px !important;
    gap: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
  }

  .bottom-nav-item svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2.2 !important;
    flex-shrink: 0 !important;
  }

  .bottom-nav-item span {
    font-size: 9px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 2px !important;
  }

  .bottom-nav-item.active {
    color: white !important;
  }

  .bottom-nav-item.active svg {
    color: #F8D447 !important;
  }

  /* Bottom Sheet - Truly hidden state */
  .premium-bottom-sheet {
    position: fixed !important;
    bottom: -100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #0D122D !important;
    background: rgba(13, 18, 45, 0.98) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border-radius: 32px 32px 0 0 !important;
    padding: 2rem 1.5rem 3rem 1.5rem !important;
    z-index: 1001 !important; /* Lowered from 100002 to stay below modals */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    visibility: hidden !important;
    opacity: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .premium-bottom-sheet.show { 
    bottom: 0 !important; 
    visibility: visible !important;
    opacity: 1 !important;
  }

  .premium-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: white !important;
    font-weight: 700;
    
    margin-bottom: 0.5rem;
  }

  .premium-menu-item svg { 
    color: var(--accent-color); 
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }
}

/* Force calculator button styling */
.calculator-card .btn-primary,
#leasing_calculator button[type='submit'],
#credit_calculator button[type='submit'] {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    width: 100% !important;
}

/* --- 9. Layout Guidelines & Debug (Phase 4) --- */
/* Standardized Breakpoints Documentation & Adjustments */
@media (max-width: 575.98px) {
  /* Phone specific tweaks */
  .hero-title-unified { font-size: 2.5rem !important; }
}

@media (min-width: 1200px) {
  /* Ensure large desktop content doesn't feel lost */
  .container-app { padding: 0 2rem !important; }
}

/* --- Footer Refinements --- */
.main-footer {
  background-color: white;
  padding: 5rem 0 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.fs-footer-about {
  font-size: 0.95rem;
  line-height: 1.7 !important;
}

.footer-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  color: #64748b;
  font-size: 0.95rem;
}

.footer-info-item svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.footer-link {
  color: #64748b !important;
  text-decoration: none !important;
  transition: var(--transition);
  font-size: 0.95rem;
}

.footer-link:hover {
  color: var(--primary-color) !important;
  transform: translateX(5px);
}

/* --- Brand Color Overrides --- */
.text-primary {
  color: var(--primary-color) !important;
}

.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.footer-bottom {
  background-color: #f8f9fa;
  padding: 3rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 991.98px) {
  .main-footer { padding-top: 3rem; }
  .footer-bottom { padding: 2rem 0; }
  .footer-info-item { margin-bottom: 1rem; }
}
.profile-sidebar {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
    height: fit-content;
    position: sticky;
    top: 24px;
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(48, 64, 138, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 24px 0 12px 16px;
}

.profile-nav-link {
    padding: 14px 20px;
    border-radius: 16px;
    color: #4b5563;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

.profile-nav-link:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary-color);
    transform: translateX(5px);
}

.profile-nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: var(--white) !important;
    box-shadow: 0 10px 20px rgba(48, 64, 138, 0.2);
}

.profile-nav-link svg { 
    width: 20px; 
    height: 20px; 
    opacity: 0.7;
    transition: opacity 0.3s;
}

.profile-nav-link.active svg {
    opacity: 1;
}

/* Unified Glass Containers for Cabinet */
.cabinet-card, .glass-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
    padding: 3rem;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.cabinet-card-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -1px;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-hero-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.contact-method-card {
    padding: 2rem;
    border-radius: 20px;
    background: var(--bg-color);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    height: 100%;
    text-decoration: none !important;
    display: block;
}
.contact-method-card:hover {
    background: var(--white);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.contact-icon-circle {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.shop-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 16px;
    overflow: hidden;
}
.shop-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

/* --- Glassmorphism Dashboard --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    padding: 3rem;
    overflow: hidden;
    position: relative;
}

.glass-stat-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.glass-stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -1px;
}

.glass-stat-value.danger {
    background: linear-gradient(135deg, #e03131 0%, #c92a2a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
    margin: 2rem 0;
}

.status-badge-glow {
    padding: 8px 20px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(224, 49, 49, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* --- Navigation & Menus --- */

/* Header Navigation */
.nav-switcher-container { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; }
.nav-product-pill, .nav-client-pill, .nav-lang-dropdown { 
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    border-radius: 100px; 
    padding: 4px; 
    display: inline-flex; 
    border: none !important; 
    position: relative; 
}
.nav-product-link, .nav-client-link, .nav-lang-toggle { padding: 6px 20px; border-radius: 100px; text-decoration: none !important; font-weight: 600; font-size: 0.9rem; color: white; display: flex; align-items: center; gap: 8px; transition: all 0.2s ease; cursor: pointer; border: none; background: transparent; }
.nav-product-link:hover, .nav-client-link:hover, .nav-lang-toggle:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav-product-link.active, .nav-client-link.active { background: #fff; color: var(--primary-color) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* Language Dropdown */
.nav-lang-menu { 
    position: absolute; top: 100%; right: 0; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(15px); border-radius: 16px; padding: 8px; min-width: 160px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 1px solid rgba(255, 255, 255, 0.5); display: none; flex-direction: column; z-index: 1000; margin-top: 5px;
}
.nav-lang-dropdown::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 15px; display: block; }
.nav-lang-dropdown:hover .nav-lang-menu { display: flex; }
.nav-lang-item { padding: 10px 16px; border-radius: 10px; color: var(--primary-color); text-decoration: none !important; font-weight: 500; font-size: 0.9rem; transition: all 0.2s ease; display: flex; justify-content: space-between; align-items: center; white-space: nowrap; }
.nav-lang-item:hover { background: rgba(48, 64, 138, 0.05); }
.nav-lang-item.active { background: var(--primary-color); color: white !important; font-weight: 700; }
.nav-lang-toggle::after { content: ''; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid white; margin-left: 6px; transition: transform 0.2s ease; display: inline-block; }
.nav-lang-dropdown:hover .nav-lang-toggle::after { transform: rotate(180deg); }

/* In-Page Product Navigation */
.product-nav-pill {
    background: var(--white);
    padding: 0.5rem;
    border-radius: 100px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: inline-flex;
    gap: 0.5rem;
    border: 1px solid #eee;
}
.product-nav-link {
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.product-nav-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}
.product-nav-link.active {
    background: var(--primary-color);
    color: var(--white) !important;
    box-shadow: 0 4px 10px rgba(48, 64, 138, 0.2);
}

/* Login Button */
.nav-btn-login { display: flex; align-items: center; padding: 0 24px; height: 44px; border-radius: 100px; background-color: var(--primary-color); color: #fff !important; font-weight: 700; text-decoration: none; transition: all 0.2s ease; box-shadow: 0 4px 12px rgba(48, 64, 138, 0.2); }
.nav-btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(48, 64, 138, 0.3); background-color: var(--primary-dark); color: #fff !important; }

/* --- Special Content --- */

/* Offer Banner */
.offer-banner {
    background: linear-gradient(135deg, #0ca678 0%, #2f9e44 100%);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    color: var(--white);
    text-align: center;
    box-shadow: 0 15px 30px rgba(12, 166, 120, 0.2);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}
.offer-banner::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%); transform: rotate(30deg);
}
.offer-amount-large { font-size: 4rem; font-weight: 800; line-height: 1; margin: 1rem 0; letter-spacing: -2px; }

/* File Upload */
.file-upload-box {
    border: 2px dashed #dee2e6;
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    cursor: pointer;
}
.file-upload-box:hover {
    border-color: var(--primary-color);
    background: var(--white);
}

/* Branch List */
.branch-card { border-bottom: 1px solid #eee; padding: 2rem 0; transition: background 0.2s ease; }
.branch-card:last-child { border-bottom: none; }

/* Status Badges */
.working-hours-pill, .category-badge {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 600;
}
.category-badge { background: var(--primary-light); color: var(--white); }
.bg-open { background-color: var(--success-bg); color: var(--success-text); }
.bg-closed { background-color: var(--error-bg); color: var(--error-text); }
.bg-standard { background-color: var(--info-bg); color: var(--info-text); }

/* --- Footer --- */
.main-footer {
    background-color: var(--white);
    padding: 3rem 0 0 0;
    border-top: 1px solid #eee;
    width: 100%;
}
.footer-link {
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.footer-link:hover { color: var(--primary-color); }
.footer-info-item {
    display: flex; align-items: center; gap: 12px; color: #666; margin-bottom: 1rem; font-size: 0.95rem;
}
.footer-info-item svg { color: var(--primary-color); }
.footer-bottom {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #888;
    width: 100%;
}

/* --- Utilities & Miscellaneous --- */
.fs-sm-custom { font-size: 0.75rem; }
.animate-fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

ul.list-group li { background: transparent; }
ul.list-group li.list-group-item { display: list-item; margin-left: 19px; }

#plus_amo, #minus_amo,#plus_term, #minus_term, #minus_chart, #plus_chart { cursor: pointer; }

.amounts:after{ content: ' \0020ac'; font-family: Arial, Helvetica, sans-serif; }
.percents:after{ content: ' %'; font-family: Arial, Helvetica, sans-serif; }
.amounts-offer:before{ content: '\0020ac '; font-family: Arial, Helvetica, sans-serif; }

.progress { height:4px; }
.progress-bar { background-color: var(--primary-color); }

div.customImgBlock {
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
}
div.customImgBlock img { transition: transform var(--transition-speed) ease; }
div.customImgBlock:hover img { transform: scale(1.05); }

.step-item {
    position: relative;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    height: 100%;
}
.step-item:hover { transform: translateY(-5px); }
.step-number {
    width: 40px; height: 40px; background: var(--primary-color); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; margin-bottom: 1.5rem;
}
.icon-box {
    width: 64px; height: 64px; background: var(--bg-color); border-radius: var(--border-radius); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}

.benefit-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}
.benefit-card:hover { border-color: var(--primary-color); box-shadow: var(--box-shadow-lg); }

a, .nav-link { color: var(--primary-color); text-decoration: none; transition: color var(--transition-speed) ease; }
a:hover, .nav-link:hover { color: var(--primary-light); }

.apexcharts-legend-marker { height: 14px; width: 14px; border-radius: 50%; }
.apexcharts-legend-marker.gray { background: var(--bg-alt-color) !important; }
.apexcharts-legend-marker.blue { background: var(--primary-color) !important; }
.apexcharts-legend-marker.yellow { background: var(--accent-color) !important; }

/* --- WOW Background Effects --- */
.wow-bg-elements {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.wow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4; /* Koši un pamanāmi */
    animation: floatSphere 20s infinite alternate ease-in-out;
}

.wow-sphere-1 {
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(48, 64, 138, 0.6) 0%, transparent 70%);
    top: -200px; left: -200px;
}

.wow-sphere-2 {
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(248, 180, 30, 0.7) 0%, transparent 70%); /* Zeltīti oranžs */
    bottom: 5%; right: -100px;
    animation-duration: 25s;
}

.wow-sphere-3 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(248, 212, 71, 0.6) 0%, transparent 70%); /* Spilgti dzeltens */
    top: 25%; left: 10%;
    animation-duration: 30s;
}

@keyframes floatSphere {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}
/* Ensure content is above effects */
section, main, footer {
    position: relative;
}
/* --- Dynamic Name Shortening --- */
.nav-client-name {
    display: inline-block;
    vertical-align: middle;
    max-width: 90px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
@media (min-width: 1200px) { .nav-client-name { max-width: 110px; } }
@media (max-width: 767.98px) { .nav-client-name { max-width: 70px; } }

/* --- Cabinet & Product Pages (Restored) --- */

.contract-id-pill {
    background: rgba(48, 64, 138, 0.05);
    border: 1px solid rgba(48, 64, 138, 0.1);
    border-radius: 100px;
    padding: 6px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.contract-id-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
}
.contract-id-value {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.late-status-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #dc3545;
    font-weight: 700;
    font-size: 0.9rem;
}

.late-status-divider {
    opacity: 0.2;
    font-weight: 300;
}

@media (max-width: 768px) {
    .late-status-container {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1.5rem !important;
    }
    .late-status-item {
        background: rgba(220, 53, 69, 0.05);
        padding: 8px 16px;
        border-radius: 100px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
}

.premium-payment-card {
    background: white;
    border-radius: 32px;
    padding: 2.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.hero-amount-label { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary-color); opacity: 0.6; margin-bottom: 0.5rem; }
.hero-amount-value { font-size: 3.5rem; font-weight: 900; letter-spacing: -2px; color: var(--primary-dark); line-height: 1; }

.action-btn-main {
    height: 56px;
    padding: 0 2rem;
    border-radius: 100px !important;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-pay-now {
    background: var(--primary-color);
    color: white !important;
    box-shadow: 0 8px 20px rgba(48, 64, 138, 0.2);
}
.btn-pay-now:hover { background: var(--primary-dark); transform: translateY(-2px); }

.btn-bank-info {
    background: #f8f9fa;
    color: var(--primary-dark) !important;
    border: 1px solid #dee2e6 !important;
}
.btn-bank-info:hover { background: #e9ecef; border-color: var(--primary-color) !important; }

.dashboard-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.premium-stat-card { 
    background: white; 
    border-radius: 24px; 
    padding: 1.75rem; 
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    height: 100%;
}

.stat-icon-box { 
    width: 32px; height: 32px; 
    display: flex; align-items: center; 
    justify-content: center; color: var(--primary-color); 
    margin-bottom: 1rem; background: none !important; border: none !important;
}

.stat-icon-box svg { width: 32px; height: 32px; stroke-width: 2; }

.progress-thin { height: 8px; background: #e9ecef; border-radius: 100px; overflow: hidden; margin: 15px 0; }
.progress-thin .progress-bar { background: var(--primary-color) !important; height: 100%; border-radius: 100px; }

.copy-btn-minimal { border: none; background: #f1f3f5; color: var(--primary-color); padding: 6px 14px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; border: none; cursor: pointer; }
.copy-btn-minimal:hover { background: var(--primary-color); color: white; }

/* Terms Page Specific */
.terms-hero-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 32px;
    padding: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.terms-hero-card::after {
    content: ''; position: absolute; top: -50%; right: -10%; width: 300px; height: 300px;
    background: rgba(255,255,255,0.05); border-radius: 50%;
}

.terms-stat-box {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    height: 100%;
}

.doc-item {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}
.doc-item:hover { background: white; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }

/* Schedule Page Specific */
.schedule-progress-card {
    background: white;
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    margin-bottom: 2rem;
}
.progress-giant { height: 12px; background: #f1f3f5; border-radius: 100px; overflow: hidden; margin: 20px 0; }
.progress-giant .progress-bar { 
    background: var(--primary-color) !important; 
    height: 100%; 
    border-radius: 100px;
}

.status-pill {
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-paid { background: rgba(12, 166, 120, 0.1); color: #0ca678; }
.status-overdue { background: rgba(240, 62, 62, 0.1); color: #f03e3e; }
.status-next { background: var(--primary-color); color: white; box-shadow: 0 4px 12px rgba(48, 64, 138, 0.3); }
.status-scheduled { background: #f1f3f5; color: #adb5bd; }

.schedule-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.schedule-row:hover { background: rgba(48, 64, 138, 0.02); }
.schedule-row.next-payment { background: rgba(48, 64, 138, 0.04); border-left: 4px solid var(--primary-color); }
.schedule-row.overdue-payment { background: rgba(240, 62, 62, 0.03); border-left: 4px solid #f03e3e; }

/* Credit Line Specific */
.premium-credit-card {
    background: white;
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    margin-bottom: 2rem;
}
.credit-action-btn {
    height: 54px;
    border-radius: 100px;
    border: none;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    width: 100%;
}
.btn-withdraw { background: var(--primary-color); color: white; box-shadow: 0 10px 20px rgba(48, 64, 138, 0.2); }
.btn-withdraw:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-repay { background: white; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-repay:hover { background: rgba(48, 64, 138, 0.05); }

.stat-card-mini {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    height: 100%;
}

@media (max-width: 768px) {
    .premium-payment-card, .premium-credit-card, .terms-hero-card, .schedule-progress-card { 
        padding: 2rem; 
        text-align: center;
        justify-content: center !important;
    }
    .premium-payment-card .d-flex { justify-content: center !important; }
    .hero-amount-value { font-size: 2.8rem; }
    .action-btn-main { width: 100%; justify-content: center; }
}

/* --- History Page Specific --- */
.transaction-group-label {
    background: #f8f9fa;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 2rem 0 1rem 0;
}
.transaction-item {
    background: white;
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
    display: flex;
}
.transaction-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(48, 64, 138, 0.08);
    border-color: rgba(48, 64, 138, 0.2);
}

.t-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.t-icon.withdrawal { background: #fff5f5; color: #fa5252; }
.t-icon.repayment { background: #ebfbee; color: #40c057; }
.t-icon.interest { background: #fff9db; color: #fab005; }

.t-amount { font-size: 1.15rem; font-weight: 900; }
.t-amount.minus { color: #212529; }
.t-amount.plus { color: #40c057; }

.t-status-pill {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    text-transform: uppercase;
}
.status-success { background: #ebfbee; color: #40c057; }
.status-pending { background: #e7f5ff; color: #228be6; }

#payment_confirm_step .summary-card {
    background: #f8f9fa !important;
    border-radius: 28px !important;
    padding: 2rem !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 2rem !important;
}

#payment_confirm_step .summary-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.25rem 0 !important;
    border-bottom: 1px dashed rgba(0,0,0,0.1) !important;
    gap: 15px !important;
    width: 100% !important;
}

#payment_confirm_step .summary-row:last-child {
    border-bottom: none !important;
}

#payment_confirm_step .summary-label {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

#payment_confirm_step .summary-value {
    font-weight: 800 !important;
    color: var(--primary-dark) !important;
    font-size: 1.1rem !important;
    text-align: right !important;
}

#payment_confirm_step .summary-value.amount-highlight {
    color: var(--primary-color) !important;
    font-size: 1.85rem !important;
    letter-spacing: -1px !important;
    white-space: nowrap !important;
}





.modal-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.modal-detail-label { color: #6c757d; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.modal-detail-value { color: #212529; font-weight: 800; }
