* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
}

body {
    background: #f0f2f5;
    padding: 10px;
    margin: 0;
}

.page {
    max-width: 850px;
    margin: 20px auto;
    background: #ffffff;
    padding: 30px 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.error-msg {
    color: red;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.swal2-popup {
    font-family: 'Segoe UI', sans-serif;
    border-radius: 12px !important;
}
.swal2-title {
    color: #4a148c !important;
    font-size: 28px !important;
}
.swal2-content {
    font-size: 18px !important;
}

.section-text { 
    margin-bottom: 15px; 
    line-height: 1.6; 
    color: #333; 
}

.logo {
    text-align: center;
    margin-bottom: 10px;
}

.logo img {
    max-width: 300px;
}

h1 {
    text-align: center;
    font-size: 24px;
    color: #4a148c; 
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

h2 {
    margin-top: 30px;
    font-size: 18px;
    color: #4a148c;
    border-left: 4px solid #4a148c;
    padding-left: 10px;
    margin-bottom: 20px;
}

/* Date Section - Inline inputs */
.date-section {
    margin-bottom: 25px;
}

.date-text {
    line-height: 2.2;
    margin-bottom: 5px;
    font-size: 15px;
}

.date-input {
    display: inline-block;
    border: none;
    border-bottom: 1px solid #333;
    background: transparent;
    text-align: center;
    font-weight: bold;
    color: #000000;
    padding: 0 5px;
    margin: 0 3px;
    vertical-align: middle;
    font-family: inherit;
    font-size: 15px;
    border-radius: 0;
}

.day-field { 
    width: 45px;
    height: 25px;
      background: #f9f9f9;
   
   
    border: 1px solid #000000;
    line-height: 1.6;
    border-radius: 4px;
}
.month-field { 
    width: 80px;
    height: 25px;
      background: #f9f9f9;
   
   
    border: 1px solid #000000;
    line-height: 1.6;
    border-radius: 4px;
}
.year-field { 
    width: 55px;
    height: 25px;
      background: #f9f9f9;
   
   
    border: 1px solid #000000;
    line-height: 1.6;
    border-radius: 4px;
}

.date-errors {
    margin-left: 20px;
    margin-top: 5px;
}

/* Facility Section - Inline rows */
.facility-row {
    min-height: 0;


    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.facility-row:last-of-type {
    border-bottom: none;
}

.facility-row label {
    margin: 0;
    min-width: 180px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.facility-row input {
    flex: 1;
    width: 100%;
    max-width: 350px;
    margin: 0;
    padding: 5px 10px;
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fafafa;
}

.facility-row input:focus {
    border-color: #4a148c;
    background: #fff;
    outline: none;
    box-shadow: 0 0 5px rgba(74, 20, 140, 0.2);
}

.facility-row .error-msg {
    width: 100%;
    margin-left: 195px;
    margin-top: -5px;
    margin-bottom: 5px;
    font-size: 12px;
}

.static-box {
    background: #f9f9f9;
    padding: 20px;
    margin-top: 25px;
    border: 1px dashed #4a148c;
    line-height: 1.6;
    border-radius: 4px;
}

.grid-2, .grid-3 {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.signature-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.signature-card {
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    background: #fdfdfd;
}

.signature-card label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    font-size: 14px;
}

.signature-card input {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.submit-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 40px auto 20px;   
    padding: 14px 30px;
    background: #4a148c;    
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 20, 140, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkbox-notice {
    margin-top: 20px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #92400e;
    border-radius: 4px;
}

.checkbox-wrapper {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* mobile ke liye stack */
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-wrapper .terms-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  flex: 1;
}

.checkbox-wrapper .terms-label .label-text {
  margin-left: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.checkbox-wrapper .checkbox-svg {
  width: 30px;
  height: 30px;
  min-width: 30px;
}

.checkbox-wrapper .checkbox-box {
  fill: rgba(207, 205, 205, 0.425);
  stroke: #8c00ff;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  transition: stroke-dashoffset 0.6s ease-in;
}

.checkbox-wrapper .checkbox-tick {
  stroke: #8c00ff;
  stroke-dasharray: 172;
  stroke-dashoffset: 172;
  transition: stroke-dashoffset 0.6s ease-in;
}

.checkbox-wrapper input[type="checkbox"]:checked + .terms-label .checkbox-box,
.checkbox-wrapper input[type="checkbox"]:checked + .terms-label .checkbox-tick {
  stroke-dashoffset: 0;
}

/* Error Message Styling */
.checkbox-error {
  display: none;
  color: red;
  font-size: 13px;
  width: 100%;
  margin-top: 5px;
}

.submit-btn:hover {
    background: #6a1b9a;     
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 20, 140, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .page { 
        padding: 15px; /* Padding thodi kam taake screen space bache */
        margin: 10px;
    }

    .facility-row {
        height: auto !important; /* Fixed height khatam */
        flex-direction: column;
        align-items: stretch; /* Input ko poori width tak kheenchne ke liye */
        gap: 5px;
    }

    .facility-row input {
        width: 100% !important;
        min-width: 0 !important; /* Mobile par min-width ko zero karna zaroori hai */
        max-width: 100% !important;
        box-sizing: border-box;
        margin-left: 0 !important;
    }

    .facility-row label {
        min-width: 100% !important; /* Label poori line le le */
        white-space: normal; /* Lambay labels wrap ho sakein */
    }

    .facility-row .error-msg {
        margin-left: 0 !important;
        margin-top: 2px;
    }

    .signature-wrapper {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .signature-card {
        width: 100% !important;
        padding: 10px;
        border: 1px solid #eee; /* Optional: Separating boxes visually */
    }

    /* Canvas ko mobile par handle karne ke liye */
    #facilityCanvas {
        width: 100% !important;
        height: 200px !important; /* Mobile par thoda bada box signature ke liye behtar rehta hai */
    }
   
    
    .day-field { width: 45px; font-size: 14px; }
    .month-field { width: 100px; font-size: 14px; }
    .year-field { width: 50px; font-size: 14px; }
    
    .date-text {
        font-size: 14px;
        line-height: 2;
    }
}

@media (max-width: 480px) {
    .facility-row label {
        min-width: auto;
        font-size: 13px;
    }
}