    .card {
        width: 100%;
        background: white;
        border-radius: 28px;
        box-shadow: 0 20px 40px rgba(0, 20, 20, 0.12);
        padding: 32px 36px;
        transition: 0.2s;
    }

    /* header */
    .form-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid #d4e2e2;
        padding-bottom: 16px;
        margin-bottom: 28px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .form-header h1 {
        font-size: 26px;
        font-weight: 700;
        color: #0a2e2e;
        letter-spacing: -0.3px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .form-header h1 i {
        color: #2f7a7a;
        font-size: 28px;
    }

    .lang-badge {
        background: #d4e8e8;
        padding: 8px 16px;
        border-radius: 40px;
        font-weight: 600;
        font-size: 14px;
        color: #0a3d3d;
        letter-spacing: 0.3px;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .lang-badge i {
        margin-right: 2px;
    }

    .lang-badge span {
        background: white;
        padding: 2px 12px;
        border-radius: 40px;
        font-size: 13px;
        color: #0d4a4a;
    }

    /* grid form */
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px 30px;
    }

    .field-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .field-group.full-width {
        grid-column: 1 / -1;
    }

    .field-group label {
        font-size: 14px;
        font-weight: 600;
        color: #1a4a4a;
        letter-spacing: 0.2px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .field-group label .required-star {
        color: #c73b3b;
        font-weight: 700;
        margin-left: 2px;
    }

    .field-group input,
    .field-group select {
        background: #f5fbfb;
        border: 1.5px solid #dae8e8;
        border-radius: 14px;
        padding: 12px 16px;
        font-size: 15px;
        color: #0e2e2e;
        transition: 0.15s ease;
        width: 100%;
        outline: none;
    }

    .field-group input:focus,
    .field-group select:focus {
        border-color: #2d7a7a;
        box-shadow: 0 0 0 3px rgba(45, 122, 122, 0.15);
        background: #ffffff;
    }

    .field-group input::placeholder {
        color: #8aadad;
        font-weight: 400;
        font-size: 14px;
    }

    .field-group select {
        appearance: none;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%233d6b6b" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>');
        background-repeat: no-repeat;
        background-position: right 16px center;
        background-size: 14px;
        cursor: pointer;
    }

    .radio-group {
        display: flex;
        align-items: center;
        gap: 24px;
        background: #f5fbfb;
        padding: 6px 16px;
        border-radius: 40px;
        border: 1.5px solid #dae8e8;
        height: 50px;
    }

    .radio-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 500;
        color: #1a3d3d;
        font-size: 15px;
        cursor: pointer;
    }

    .radio-group input[type="radio"] {
        width: 18px;
        height: 18px;
        accent-color: #1f6e6e;
        margin: 0;
        cursor: pointer;
    }

    .inline-gender {
        display: flex;
        align-items: center;
        background: #f5fbfb;
        border: 1.5px solid #dae8e8;
        border-radius: 40px;
        padding: 0 16px;
        height: 50px;
    }

    .inline-gender label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 500;
        color: #1a3d3d;
        font-size: 15px;
        cursor: pointer;
        margin-right: 28px;
    }

    .inline-gender input[type="radio"] {
        width: 18px;
        height: 18px;
        accent-color: #1f6e6e;
        margin: 0;
        cursor: pointer;
    }

    /* button */
    .apply-btn {
        grid-column: 1 / -1;
        margin-top: 16px;
        background: #1f5e5e;
        border: none;
        border-radius: 60px;
        padding: 16px 10px;
        font-size: 20px;
        font-weight: 700;
        color: white;
        letter-spacing: 1px;
        cursor: pointer;
        transition: 0.2s;
        box-shadow: 0 6px 12px rgba(26, 80, 80, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .apply-btn i {
        font-size: 22px;
    }

    .apply-btn:hover {
        background: #134a4a;
        transform: scale(1.01);
        box-shadow: 0 10px 18px rgba(20, 70, 70, 0.25);
    }

    .apply-btn:active {
        transform: scale(0.97);
    }

    /* footer meta */
    .meta-footer {
        margin-top: 28px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #3b6b6b;
        font-size: 14px;
        border-top: 1px solid #dae8e8;
        padding-top: 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .meta-footer .weather {
        display: flex;
        align-items: center;
        gap: 14px;
        background: #ecf5f5;
        padding: 6px 18px 6px 14px;
        border-radius: 40px;
    }

    .meta-footer .weather i {
        font-size: 18px;
        color: #e68a2e;
    }

    .meta-footer .country {
        background: #ecf5f5;
        padding: 6px 18px;
        border-radius: 40px;
        font-weight: 500;
    }

    .meta-footer .date {
        background: #ecf5f5;
        padding: 6px 18px;
        border-radius: 40px;
        font-weight: 500;
    }

    /* responsiveness */
    @media (max-width: 680px) {
        .card {
            padding: 24px 18px;
        }

        .form-grid {
            grid-template-columns: 1fr;
            gap: 18px;
        }

        .field-group.full-width {
            grid-column: 1;
        }

        .form-header {
            flex-direction: column;
            align-items: flex-start;
        }

        .radio-group {
            flex-wrap: wrap;
            height: auto;
            padding: 10px 16px;
            border-radius: 20px;
        }

        .inline-gender {
            flex-wrap: wrap;
            height: auto;
            padding: 10px 16px;
            border-radius: 20px;
        }

        .inline-gender label {
            margin-right: 18px;
        }

        .meta-footer {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
        }
    }

    @media (max-width: 400px) {
        .form-header h1 {
            font-size: 20px;
        }
    }

    
   
    /* card grid */
    .card-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem;
      margin-bottom: 2.5rem;
    }

    .stat-card {
      background: white;
      border-radius: 28px;
      padding: 1.4rem 1.8rem 1.4rem 1.8rem;
      box-shadow: 0 8px 24px rgba(0, 20, 50, 0.06);
      transition: all 0.25s ease;
      border: 1px solid rgba(255, 255, 255, 0.6);
      backdrop-filter: blur(2px);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
    }

    .stat-card:hover {
      transform: translateY(-6px);
      box-shadow: 0 18px 36px rgba(18, 52, 106, 0.10);
      border-color: #cbddee;
    }

    .stat-card:active {
      transform: scale(0.98);
    }

    /* left side: count & label */
    .card-left {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.25rem;
    }

    .card-label {
      font-size: 0.8rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #5b6f87;
    }

    .card-count {
      font-size: 2.5rem;
      font-weight: 700;
      color: #0b1b33;
      line-height: 1.1;
    }

    .card-sub {
      font-size: 0.7rem;
      color: #6f85a2;
      display: flex;
      align-items: center;
      gap: 0.3rem;
      margin-top: 0.1rem;
    }

    .card-sub i {
      font-size: 0.55rem;
      color: #2a7de1;
    }

    /* right side: icon */
    .card-icon {
      width: 52px;
      height: 52px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      color: white;
      flex-shrink: 0;
      margin-left: 0.5rem;
    }

    /* color themes per card */
    .card-block .card-icon { background: #1d4ed8; }
    .card-panchayat .card-icon { background: #0b8f5e; }
    .card-village .card-icon { background: #b45309; }
    .card-tola .card-icon { background: #7c3aed; }

    /* active card highlight */
    .stat-card.active-card {
      border: 2px solid #1d4ed8;
      background: #f8fbff;
      box-shadow: 0 12px 28px rgba(29, 78, 216, 0.12);
    }

    /* ---------- POPUP / MODAL ---------- */
    .popup-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.4);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 999;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .popup-overlay.open {
      opacity: 1;
      visibility: visible;
    }

    .popup-card {
      background: white;
      max-width: 600px;
      width: 92%;
      border-radius: 36px;
      box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
      padding: 1.8rem 2rem 2rem;
      transform: scale(0.92) translateY(12px);
      transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
      opacity: 0;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
    }

    .popup-overlay.open .popup-card {
      transform: scale(1) translateY(0);
      opacity: 1;
    }

    .popup-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #eef2f8;
      padding-bottom: 0.9rem;
      margin-bottom: 1.4rem;
      flex-shrink: 0;
    }

    .popup-header h2 {
      font-size: 1.4rem;
      font-weight: 600;
      color: #0b1b33;
      display: flex;
      align-items: center;
      gap: 0.6rem;
    }

    .popup-header h2 i {
      color: #2a7de1;
    }

    .popup-header .close-btn {
      background: #f1f5f9;
      border: none;
      width: 38px;
      height: 38px;
      border-radius: 60px;
      font-size: 1.2rem;
      color: #2b405c;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: 0.15s ease;
    }

    .popup-header .close-btn:hover {
      background: #e2e8f0;
      color: #0b1b33;
    }

    .popup-body {
      overflow-y: auto;
      padding-right: 0.25rem;
      flex: 1;
    }

    .popup-body .list-item {
      display: flex;
      align-items: center;
      padding: 0.7rem 0.8rem;
      background: #fafcff;
      border-radius: 16px;
      transition: background 0.1s ease;
      border-left: 4px solid transparent;
      font-weight: 500;
      color: #1a2d47;
      margin-bottom: 0.35rem;
    }

    .popup-body .list-item:hover {
      background: #f0f5fe;
      border-left-color: #2a7de1;
    }

    .popup-body .list-item i {
      width: 28px;
      color: #4f6e93;
      font-size: 0.9rem;
      margin-right: 0.8rem;
      text-align: center;
    }

    .popup-body .list-item .item-name {
      flex: 1;
    }

    .popup-body .list-item .item-meta {
      font-size: 0.75rem;
      color: #6f85a2;
      font-weight: 400;
      background: #eef2f8;
      padding: 0.2rem 0.8rem;
      border-radius: 40px;
    }

    .popup-footer {
      border-top: 1px solid #eef2f8;
      padding-top: 0.9rem;
      margin-top: 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
      font-size: 0.9rem;
      color: #3d5775;
    }

    .popup-footer .total-badge {
      background: #eaf0f9;
      padding: 0.3rem 1.1rem;
      border-radius: 40px;
      font-weight: 500;
    }

    .empty-state {
      text-align: center;
      padding: 2.8rem 1rem;
      color: #6b7f9b;
    }

    .empty-state i {
      font-size: 2.4rem;
      color: #cbd5e1;
      margin-bottom: 0.6rem;
    }

    /* responsive */
    @media (max-width: 1024px) {
      .card-grid {
        gap: 1rem;
      }
      .card-count {
        font-size: 2.2rem;
      }
      .card-icon {
        width: 46px;
        height: 46px;
        font-size: 1.5rem;
      }
    }

    @media (max-width: 768px) {
      body { padding: 1.2rem 0.8rem; }
      .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
      }
      .dashboard-header h1 {
        font-size: 1.5rem;
      }
      .stat-card {
        padding: 1rem 1.2rem;
      }
      .card-count {
        font-size: 1.9rem;
      }
      .popup-card {
        padding: 1.2rem 1rem;
        max-width: 96%;
      }
    }

    @media (max-width: 480px) {
      .card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
      }
      .card-count {
        font-size: 1.6rem;
      }
      .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
      }
      .dashboard-header {
        flex-direction: column;
        align-items: start;
        gap: 0.5rem;
      }
    }

    /* Mobile view - cards full width */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr; /* Single column, full width */
    gap: 1rem;
  }
  
  .stat-card {
    width: 100%;
    padding: 1.2rem 1.5rem;
  }
  
  .card-count {
    font-size: 2rem;
  }
  
  .card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .stat-card {
    padding: 1rem 1.2rem;
  }
  
  .card-count {
    font-size: 1.8rem;
  }
  
  .card-icon {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }
  
  .card-label {
    font-size: 0.75rem;
  }
  
  .card-sub {
    font-size: 0.65rem;
  }
}

/* Card Status Section */
.stat-card {
    display: flex;
    align-items: stretch;
    padding: 18px 20px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid #e8ecf1;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.10);
}

.stat-card .card-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card .card-status {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px;
    min-width: 100px;
}

.status-item {
    font-size: 11px;
    color: #666;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-item strong {
    color: #2d3436;
    font-size: 13px;
}

.active-status {
    color: #00b894;
}

.inactive-status {
    color: #ff6b6b;
}

.stat-card .card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    font-size: 24px;
    color: #667eea;
    opacity: 0.7;
}

/* Active Card State */
.stat-card.active-card {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.20);
}

.stat-card.active-card .card-icon {
    opacity: 1;
    color: #667eea;
}

/* Card Colors */
.card-block .card-icon { color: #4a90d9; }
.card-panchayat .card-icon { color: #27ae60; }
.card-village .card-icon { color: #f39c12; }
.card-tola .card-icon { color: #8e44ad; }

/* Responsive */
@media (max-width: 768px) {
    .stat-card {
        flex-wrap: wrap;
        min-height: auto;
        padding: 15px;
    }

    .stat-card .card-status {
        width: 100%;
        flex-direction: row;
        gap: 15px;
        padding: 10px 0 0 0;
        border-top: 1px solid #f1f3f5;
        margin-top: 10px;
    }

    .status-item {
        font-size: 10px;
    }

    .stat-card .card-icon {
        width: 35px;
        font-size: 20px;
    }

    .card-count {
        font-size: 22px !important;
    }
}