/* ================= GLOBAL DESIGN VARIABLES ================= */
:root {
  /* ================= INSURE WITH LAKSHMI BRAND ================= */

  --color-primary: #1E293B;
  --color-primary-light: #2C3E50;

  --color-brand: #4FA3A8;
  --color-brand-hover: #3E8F95;
  --color-brand-light: #D9F0F2;

  --color-bg-base: #F5F7FA;
  --color-surface: #FFFFFF;

  --color-text: #334155;
  --color-text-muted: #94A3B8;

  --color-border: #E5E7EB;

  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;

  --font-family: 'Poppins', system-ui, sans-serif;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, .10);

  --radius-sm: 12px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --transition: all .25s ease;
}

/* ================= THEME BASE RESET ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-base);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 1rem 0;
}

/* ================= TYPOGRAPHY & BUTTONS ================= */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.text-secondary {
  color: var(--color-secondary);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--color-brand-hover);
}

.btn-secondary {
  background-color: #fff;
  border-color: var(--color-border);
  color: var(--color-secondary);
}

.btn-secondary:hover {
  var(--color-brand-light)
}

.btn-whatsapp {
  background-color: #25d366;
  color: #fff;
}

.btn-whatsapp svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.btn-whatsapp:hover {
  background-color: #128c7e;
}

.btn-danger {
  background-color: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.btn-danger:hover {
  background-color: #fee2e2;
}

/* ================= FORM CONTROLS ================= */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 0.875rem;
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--color-primary);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-light);
}

/* ================= INTERACTIVE LANDING PAGE ================= */
.main-header {
  background: #1E293B;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: #FFFFFF;
}

.icon-brand {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  stroke: var(--color-brand);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .80);
}

.nav-links a:hover {
  color: var(--color-brand);
}

.grid-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-section {
  padding: 100px 0;
  background:radial-gradient(circle at 80% 20%, var(--color-brand-light) 0%, rgba(255, 255, 255, 0) 50%);
}

.hero-content h1 {
  font-size: 3.25rem;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--color-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.decorative-card {
  background-color: #fff;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  max-width: 400px;
}

.decorative-card h3 {
  margin: 16px 0 8px 0;
}

.services-section {
  padding: 80px 0;
  background-color: #fff;
}

.section-title {
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 48px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.service-card {
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-brand-light);
  border-radius: var(--radius-sm);
  color: var(--color-brand);
  margin-bottom: 20px;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.why-section {
  padding: 80px 0;
}

.benefit-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.benefit-bullet {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-brand-light);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

#public-footer {
  background-color: var(--color-primary);
  color: #cbd5e1;
  padding: 40px 0;
  font-size: 0.875rem;
}

.footer-content {
  text-align: center;
}

/* ================= MODERN MODALS ================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--color-border);
}

.small-modal {
  max-width: 400px;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.25rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-secondary);
  cursor: pointer;
}

#customer-form,
#policy-form,
#login-form {
  padding: 24px;
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ================= DYNAMIC FORMS ================= */
.dynamic-fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  background-color: var(--color-bg-base);
}

.dynamic-fieldset legend {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-brand);
  padding: 0 8px;
}

/* ================= LAKSHMI'S WORKSPACE ================= */
.workspace-nav {
  background-color: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 90;
}

.nav-wrapper {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.ws-logo svg {
  stroke: #fff;
}

.ws-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
}

.ws-links a:hover,
.ws-links a.active {
  color: #fff;
  background-color: var(--color-brand);
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-menu span {
  width: 20px;
  height: 2px;
  background-color: #fff;
}

.main-workspace-container {
  padding-top: 32px;
  padding-bottom: 64px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* SPLIT CUSTOMERS VIEW (Apple/Google Contacts Inspired) */
.split-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  height: calc(100vh - 140px);
  min-height: 500px;
}

.split-sidebar {
  background-color: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.action-bar {
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scrollable-list {
  flex: 1;
  overflow-y: auto;
}

.split-detail {
  background-color: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow-y: auto;
  padding: 32px;
}

/* CUSTOMER LIST ITEMS */
.customer-item {
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: var(--transition);
}

.customer-item:hover,
.customer-item.active {
  background-color: var(--color-brand-light);
  border-left:4px solid var(--color-brand);
}

.customer-item h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.customer-item p {
  font-size: 0.8125rem;
  color: var(--color-secondary);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-neutral {
  background-color: #f1f5f9;
  color: var(--color-secondary);
}

.badge-success {
  background-color: #ecfdf5;
  color: var(--color-success);
}

.badge-alert {
  background-color: #fffbeb;
  color: #b45309;
}

/* PROFILE DETAIL STYLING */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.profile-actions {
  display: flex;
  gap: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  background-color: var(--color-bg-base);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 32px;
}

.info-block span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.info-block p {
  font-size: 0.9375rem;
  font-weight: 500;
}

.policies-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.policy-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
  background-color: #fff;
  transition: var(--transition);
}

.policy-card:hover {
  box-shadow: var(--shadow-sm);
}

.policy-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-secondary);
  text-align: center;
  padding: 48px;
}

.empty-state svg {
  margin-bottom: 16px;
  color: #cbd5e1;
}

/* ================= DASHBOARD STYLING ================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.metric-card {
  background-color: #fff;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.metric-card h4 {
  font-size: 0.75rem;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.metric-card .value {
  font-size: 1.875rem;
  font-weight: 700;
}

.metric-card.alert {
  border-left: 4px solid #f59e0b;
}

.metric-card.primary {
  border-left: 4px solid var(--color-brand);
}

.metric-card.success {
  border-left: 4px solid var(--color-success);
}

.metric-card.premium {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
}

.metric-card.premium h4 {
  color: #94a3b8;
}

.dash-list-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

/* ================= RENEWALS PANEL ================= */
.renewals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.filter-bar {
  display: flex;
  gap: 8px;
}

.filter-pill {
  padding: 6px 16px;
  border-radius: 20px;
  background-color: #fff;
  border: 1px solid var(--color-border);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill.active {
  background-color: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  font-weight: 600;
  color: var(--color-secondary);
  background-color: var(--color-bg-base);
}

/* ================= UTILITY CLASSES ================= */
.card {
  background-color: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 24px;
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

.grid-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.margin-top {
  margin-top: 24px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--color-brand);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  z-index: 1010;
  transition: var(--transition);
}

/* ================= COMPREHENSIVE RESPONSIVENESS ================= */
@media (max-width: 1024px) {
  .split-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .split-sidebar,
  .split-detail {
    height: auto;
  }

  .split-detail {
    display: none;
  }

  .split-detail.active {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    border-radius: 0;
  }
}

@media (max-width: 768px) {

  .grid-two-col,
  .grid-three-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .nav-links {
    display: none;
  }

  .hamburger-menu {
    display: flex;
  }

  .ws-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background-color: var(--color-primary);
    padding: 16px;
    border-top: 1px solid var(--color-primary-light);
  }

  .ws-links.open {
    display: flex;
  }

  .renewals-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    background-color: var(--color-bg-base);
  }

  .data-table td {
    border-bottom: none;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-secondary);
  }
}

/* ================= LOGOUT ICON ================= */

.logout-icon-btn {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 1px solid rgba(255,255,255,.15);

    color: rgba(255,255,255,.75);

    border-radius: 50%;

    cursor: pointer;

    transition: all .25s ease;
}

.logout-icon-btn:hover {

    background: rgba(79,163,168,.12);

    border-color: var(--color-brand);

    color: var(--color-brand);

    transform: translateY(-1px);
}

.logout-icon-btn:active {

    transform: scale(.96);

}

.logout-icon-btn svg {

    width:20px;
    height:20px;

}

/* ================= BRAND LOGO ================= */

.brand-logo{
    width:40px;
    height:40px;
    display:block;
    flex-shrink:0;
}

.logo,
.ws-logo{

    display:flex;
    align-items:center;
    gap:12px;

    font-weight:700;
    font-size:1.2rem;

}

.logo{

    color:var(--color-primary);

}

.ws-logo{

    color:#fff;

}

@media (max-width:768px){

    .brand-logo{

        width:34px;
        height:34px;

    }

    .logo,
    .ws-logo{

        font-size:1rem;

    }

}

.logo-wrapper{
    display:inline-flex;
    padding:2px;
    background:#fff;
    border-radius:8px;
}

.brand-logo{
    width:45px;
    height:45px;
}