*{
box-sizing:border-box;
margin:0;
padding:0;
font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}

/* body{
height:100vh;
display: flex;
flex-direction: column;
justify-content:center;
align-items:center;
background:#f4f4f4;
} */
body {
  min-height: 100vh; /* instead of fixed height */
  display: flex;
  flex-direction: column;
  justify-content: center; /* don't center vertically */
  align-items: center;
  background: #f4f4f4;
  margin: 0;
  padding: 10px;
}

/* Dark background overlay */
#overlay {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.6); /* dark transparent */
  z-index: 9999;
 
  justify-content: center;
  align-items: center;
}

/* Spinner */
.loader {  
  width: 60px;
  height: 60px;
  border: 6px solid #ddd;
  border-top: 6px solid #3498db; /* spinner color */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.topbar{
 position: fixed;
 z-index: 9999;  
 top:20px;
 right:25px; 
}

.topbar a{ 
font-size:20px;
color:#333;
}

.card{
background:white;
padding:30px;
border-radius:8px;
width:340px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

form{
display:flex;
flex-direction:column;
gap:10px;
}

label{
font-size:14px;
color:#444;
}

input,select{
padding:8px;
border:1px solid #ddd;
border-radius:5px;
font-size:14px;
width:100%;
}

.dropzone{
border:2px dashed #ccc;
border-radius:6px;
padding:30px;
text-align:center;
cursor:pointer;
color:#777;
}

.dropzone i{
font-size:28px;
margin-bottom:8px;
color:#d9534f;
} 

.dropzone.drag{
border-color:#333;
background:#fafafa;
}
 

button{
margin-top:10px;
padding:10px;
border:none;
background:#333;
color:white;
border-radius:5px;
cursor:pointer;
}

button:hover{
background:#111;
}


/* File List Table CSS */

/* 
#docTable{ 
  border-collapse: collapse;
  background-color: white;
  margin: auto;
}

#docTable th, #docTable td{
  padding:10px 8px;
  border-bottom:1px solid #eee;
  text-align:center;  
  width: max-content;
}

#docTable th{
  background:#f7f7f7;
  background:#eeeeee;
  font-weight:600;
  border-bottom:1px solid #dfdfdf;
  border-top:1px solid #dfdfdf;
}
 

#docTable a{
  color:#333;
  text-decoration:none;
}

#docTable a:hover{
  text-decoration:underline;
}

#docTable td i{
  font-size:16px;
}
  */
  
  .container {
  display: flex;
  justify-content: center; /* key change */
  align-items: flex-start;
  gap: 30px;

  width: 100%; 
}  

.scrollable-div { 
  max-height: 50vh; 
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
}

.scrollable-div2 {  
  border-radius: 10px; 
  overflow-y: auto; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); 

}


.familyTable {   
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  background: #fff;
  width: 200px;   /* fixed width so it doesn’t “float” */

}

.familyTable thead {
  position: sticky;
  top: 0;
  background: #2c3e50;
  color: white;
  z-index: 1;
  text-align: center;

}

.familyTable th, .familyTable td {
  padding: 12px 14px;
  text-align: center;
  font-size: 15px;
}



.familyTable th {
  font-weight: 600;
  letter-spacing: 0.5px;
}
 
.familyTable td {
  min-width: max-content;
  text-wrap: nowrap;
  }

.familyTable tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
}

.familyTable tbody tr:hover {
  background: #f5f8fc;
}

.docTable {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  background: #fff;
}

.docTable thead {
  position: sticky;
  top: 0;
  background: #2c3e50;
  color: white;
  z-index: 1;
  text-align: center;

}

.docTable th, .docTable td {
  padding: 12px 14px;
  text-align: center;
  font-size: 15px;
}



.docTable th {
  font-weight: 600;
  letter-spacing: 0.5px;
}
 
.docTable td {
  min-width: max-content;
  text-wrap: nowrap;
  }

.docTable tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
}

.docTable tbody tr:hover {
  background: #f5f8fc;
}

.openLink i {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.openLink:hover i {
  transform: scale(1.2);
}

/* Pagination */
.pagination { 
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 10px; 
  display: flex;
  justify-content: center;  /* THIS centers it under right table */
  align-items: center;
  margin-top: 15px;
}

.pagination button {
  padding: 6px 12px;
  border: none;
  background: #2c3e50;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  width: 150px;
}

.pagination button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.search-box { 
  flex-direction: column;   
  margin-bottom: 10px; 
}

.search-box input {
  width: 60vw;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#message {
  height: 20px;
  padding: 5px;
  color: black; 
}

.button {
  cursor: pointer;
}


#list {
  width: 50vw;
  max-width: 800px;   /* keeps it nice on desktop */
  height: 80vh;   /* responsive height */
  overflow-y: auto;
  margin: 0 auto;     /* center on large screens */
  display: flex;
}

/* Modal Container & Content */
/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 30%; /* Could be more or less, depending on screen size */
  max-width: 300px;
  border-radius: 10px;
  text-align: center;
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Style for Yes/No buttons */
#yesBtn, #noBtn {
  padding: 10px 20px;
  margin-top: 20px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
}

#yesBtn {
  background-color: #f44336; /* Red */
  color: white;
}

#noBtn {
  background-color: #4CAF50; /* Green */
  color: white;
}




/* mobile version list up */

/* Mobile responsiveness */
@media (max-width: 768px) {

  body {
    padding: 8px;
    align-items: stretch; /* full width on mobile */
  }

  .scrollable-div {
    min-height: 50vh; /* more flexible than px */
    display: flex; 
  }

  #list {
    width: 100%;
    height: auto;
    max-height: 80vh;
  }

  .search-box input {
    width: 100%;
    height: 50px;
  }

  .docTable th{
    padding: 10px 5px;
    font-size: 10px;
  }
  .docTable td {
    padding: 10px;
    font-size: 14px; 
    word-wrap: break-word;     /* Legacy and modern support */ 
  }
 
  .docTable {
    min-width: 90vw; /* prevents squishing */
  }

  /* Pagination stack */
  .pagination { 
    gap: 35px;
    display: flex;
    justify-content: center; /* Aligns horizontally */
    align-items: center; 
  }

  .pagination button {
    width: 30%;
    max-width: 60px;
    padding: 10px;
  } 
}


#familyList {
  cursor: pointer;
}
 