/* Reset and Base Styles */
:root {
  --primary-color: #005B96;
  --primary-light: #e0e7ff;
  --secondary-color: #004080;
  --text-color: #2b2d42;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --dark-gray: #6c757d;
  --success-color: #28a745;
  --success-light: #d4edda;
  --danger-color: #dc3545;
  --danger-light: #f8d7da;
  --warning-color: #ffcc00;
  --error-color: #ff3333;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--medium-gray);
    color: #212529;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: block;
    height: 100vh;
    
}

a {
  text-decoration: none;
  color: white;
}

.center-text {
    text-align: center;
}
.btn {
  padding: 12px 25px;
  border-radius: var(--border-radius);
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-size: 16px;
}
.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}
.btn-outline:hover {
  background-color: var(--primary-light);
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.page-title {
  font-size: 1.8rem;
  color: var(--primary-color);
}
.page-content {
  max-width: 800px;
  margin: 2rem auto;
  background-color: var(--white);
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
}
.action-buttons {
  display: flex;
  gap: 10px;
}

/* Form Elements */
fieldset {
    background-color: var(--);
    border: none;
    margin-bottom: 20px;
}
#login-fieldset{
    width: 90%;
    max-width: 600px;
    margin: auto;
    margin-top: 4%;
    margin-bottom: 3%;
    bottom: 20;
    background-color: var(--light-gray);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#login-fieldset input{
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: var(--light-gray);
    font-size: 1rem;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

label i {
  color: var(--dark-gray);
  font-weight: normal;
  font-size: 0.9em;
}

select,
input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #ffffff;
    font-size: 1rem;
}
input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #ffffff;
    font-size: 1rem;
}
input[type="tel"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #ffffff;
    font-size: 1rem;
}

.radio-group {
    margin-top: 1rem;
    display: block;
    padding: 2px;
    font-weight: 300;
    text-align: center;
    justify-content: center;
}

.radio-group label {
    background-color: #bbbbbb;
    width: auto;
    margin: auto;
    border-radius: 5px;
    padding: 9px;
    margin-bottom: 9px;
    display: flex;
    margin-right: 10px;
}
.radio-group label input{
    margin-right: 0px;
    font-size: 4px;
    max-width: 17px;
    margin: 2px;
}
select:focus,
input[type="text"]:focus {
    border-color: #005B96;
    outline: none;
}

/* Buttons */
button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #005B96;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #004080;
}

/* Dues Section */
.hidden {
    display: none;
}

/* Dues Table */
  .dues-table-container {
    display: block;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
  }
  
  .table-responsive {
    overflow-x: auto;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
  }
  
  th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
  }
  
  th {
    background-color: var(--light-gray);
    font-weight: 700;
    color: var(--text-color);
    position: sticky;
    top: 0;
  }
  
  tr:hover {
    background-color: var(--light-gray);
  }
  
  .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
  }
  
  .status-active {
    background-color: #e3f7e8;
    color: var(--success-color);
  }
  
  .status-inactive {
    background-color: #ffebeb;
    color: var(--error-color);
  }
  
  .status-pending {
    background-color: #fff8e1;
    color: var(--warning-color);
  }
  
  .actions-cell {
    display: flex;
    gap: 8px;
  }
  
  .action-icon {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
  }
  
  .action-icon:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
  }
  
  .edit-icon {
    color: var(--primary-color);
  }
  
  .delete-icon {
    color: var(--error-color);
  }
  
  .view-icon {
    color: var(--dark-gray);
  }
  
  /* Withdrawal Page Specific Styles */
.withdrawal-form {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
}

.withdrawal-form h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-family: 'Quicksand', sans-serif;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.withdrawal-history {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--box-shadow);
}

.withdrawal-history h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}
#toggleBtn {
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  color: var(--secondary-color);
}
#toggleBtn:hover {
  color: var(--primary-color);
}

/*#duesContainer {
    margin-top: 20px;
}

.due-item {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f1f1f1;
}

.due-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.due-details {
    margin-top: 10px;
    display: none;
}

.due-details p {
    margin: 5px 0;
}*/
.total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #005B96;
    color: #ffffff;
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
}

input[type="checkbox"] {
    transform: scale(1.2);
    margin-right: 10px;
}
/* Admin Container */
.admin-container {
  display: flex;
  min-height: 100vh;
}

.top-bar {
  background: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: auto;
}


/* Status indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 20px;
  background-color: var(--primary-light);
  color: var(--primary-color);
}
.top-bar i {
  font-size: 20px;
  cursor: pointer;
  color: var(--primary-color);
}

.top-bar p {
  margin: 0;
  font-weight: 600;
  color: var(--text-color);
}

#avatar{
    background-image: url("profile.jpeg.jpeg");
    background-color: rgba(0, 0, 0, 1);
    color: #fff;
    width: 100%;
    height: fit-content;
    text-align: center;
    justify-content: start;
    padding: 2px;
    border: black double 2px;
  }
  .sidebar {
    width: 250px;
    background-color: #2d2d2d;
    color: #fff;
    padding: 20px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    z-index: 800;
    overflow-y: auto;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  #shade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,50,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    z-index: 9;
  }
    
  .sidebar h3 {
    margin-bottom: 5px;
  }
  
  .sidebar p {
    font-weight: bold;
    margin-top: 20px;
  }
  
  .menu-section span {
    display: block;
    background-color:  #005B96;
    border-radius: 5px;
    padding: 3px;
    margin: 8px 0;
    cursor: pointer;
    font-size: 0.80rem;
    transition: color 0.2s;
  }
  
  .menu-section span:hover {
    color: #fbc02d;
  }
  .menu-section span:active{
    background-color:  #005B96;
    border-radius: 10%;
  }
  #shade.visible {
    opacity: 1;
    visibility: visible;
  }
    /* Main Content */
  #main-content {
    flex: 1;
    padding: 20px;
    margin-left: 0;
    transition: margin-left 0.3s ease;
  }
  #toggleSidebar{
    display: flex;
    float: left;
  }
  
  .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  #toggleSidebar {
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333;
  }
  
  #balances {
    background-color:  #005B96;
    width: 97%;
    margin: auto;
    color: #f1f1f1;
    font-size: 24px;
    font-size: 17px;
    padding: 5%;
    border-radius: 10px;
    border: white 3px;
    margin-right: 7%;
  }
  #balances #total-balance{
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-style: initial;
    font-size: 31px;
    font-weight: 600;
  }
  .logo-top{
    width: 100%;
    display: flex;
    flex-direction: row;
  }
  .logo-top img{
    width:80%;
    max-width: 70px;
    margin: auto;
  }
  #transactions-container{
      display: flex;
      flex-grow: 1;
      flex-direction: column;
  }
  #dues-container{
      display: flex;
      flex-grow: 1;
      flex-direction: column;
  }
  .due-item {
      padding: 8px;
      background-color: var(--white);
      border-radius: var(--border-radius);
      box-shadow: var(--box-shadow);
      width: 100%;
      overflow: hidden;
      border: 1px solid var(--medium-gray);
      margin-bottom: 10px;
      margin-top: 10px;
  }

  .due-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px;
      background-color: var(--light-gray);
      cursor: pointer;
  }

  .due-header i{
      display: inline;
      margin: 2px;
      color: var(--text-color);
      cursor: pointer;
  }

  .due-code {
      font-weight: 700;
      color: var(--primary-color);
      font-size: 18px;
  }

  .due-name {
      display: inline; 
      flex-grow: 1;
      color: var(--text-color);
      margin-left: 20px;
  }
  .due-amount {
      font-weight: 700;
      color: var(--text-color);
  }

  .due-details {
      padding: 8px;
      border-top: 1px solid var(--medium-gray);
      display: none;
  }

  .due-details p {

      margin-bottom: 10px;
      display: flex;
      justify-content: space-between;
  }

  .due-details p:last-child {
      margin-bottom: 0;
  }

  .due-details strong {
      color: var(--text-color);
  }
  .toggle-container{
    background-color: var(--medium-gray);
    border-radius: var(--border-radius);
    color: black;
  }
  .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--dark-gray);
  }
  .notice {
    position: fixed;
    top: 20px;
    right: 10px;
    min-width: 150px;
    padding: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    border-radius: 5px;
    font-weight: 300;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.5s ease;
    overflow: hidden;
  }
  
  .notice.success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.notice.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.notice.info {
    background-color: #fff3cd;
    color: #66500b; 
    border: 2px solid #ffeeba;
}

  .notice .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: #2c639b; /* default success */
    width: 100%;
    transition: width 4.7s linear;
  }
  
  .notice.error .progress {
    background-color: #a1352d;
  }
  
  .notice.success .progress {
    background-color: #2c639b;
  }
  notice.info .progress {
    background-color: #fbc02d;
  }
    /* Overlay background that shades the page */
  .window-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0%;
    background-color: rgba(0, 0, 50, 0.5);
    z-index: 950;
    opacity: 0;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    transition: opacity 0.5s ease;
  }

  /* Actual modal window */
  .window {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 200px;
    min-height: 200px;
    width: auto;
    padding: 10px 15px 10px 15px;
    font-weight: 300;
    font-size: 1.0rem;
    background-color: rgba(250, 250, 250, 1);
    color: rgba(0, 0, 0, 1);
    border: 2px solid rgb(255, 255, 255);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
  }
  .modal-close-btn {
    position: fixed;
    top: 2px;
    right: 2px;
    font-size: 1.5rem;
    padding: 0.6rem;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
  }  
  .loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #333;
  }
  .loading-content i {
    font-size: 30px;
    margin-bottom: 10px;
    color: #007bff;
  }  
  /* Use this to show the modal window and overlay */
  .visible {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .table-meta-title{
    font-weight: 600;
    padding: 3px;
  }
  .report-actions {
    display: flex;
    flex-direction: row;
    padding: 20px;
    justify-content: center;

  }
  .report-action {
    display: inline;
    padding: 10px;
    text-align: center;
    width: 100%;
    min-width: 40px;
    padding: 9px 12px;
    border: rgba(0, 0, 50, 0.5) double 3px;
    border-radius: 4px;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    margin: 10px;
  }
  /* Search Section Styles */
.search-section {
  margin: 20px 0;
}

.search-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-container input {
  flex: 1;
  min-width: 200px;
  padding: 10px 15px;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Make buttons same height as input */
.search-container .btn {
  height: 40px;
  display: flex;
  /*align-items: center;*/
  justify-content: center;
  margin: 5px;
}
.search-actions{
  background-color: var(--primary-light);
  display: flex;
  padding: 15px;
}
@media only screen and (min-width: 850px) {
  #toggle-icon{
    display: block;
  }
  .sidebar {
    transform: translateX(0%);
    max-width: 17%;
    padding: 20px;
    z-index: 1;
    overflow-y: auto;
  }
  #main-content {
    width: 83%;
    float: inline-end;
    z-index: 1;
    margin-left: 280px;
  }
  #toggleSidebar{
    display: none;
  }
  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .page-title {
    font-size: 1.8rem;
    color: var(--primary-color);
  }
  
  .action-buttons {
    display: flex;
    gap: 10px;
  }
  
  .btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    color: white;
  }
  
  .btn-primary:hover {
    background-color: var(--secondary-color);
  }
  
  .btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
  }
  
  .btn-outline:hover {
    background-color: var(--primary-light);
  }
  
  .btn-danger {
    background-color: var(--error-color);
    color: white;
  }
  
  .btn-danger:hover {
    opacity: 0.9;
  }
  /* Modal Styles */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 50, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
  }
  
  .modal-content {
    background: var(--dark-gray);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px; /* Increased width for create due form */
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
  }
  
  @keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .modal-header h4 {
    margin: 0;
    font-size: 1.3rem;
  }
  .modal-title {
    font-size: 1.3rem;
    font-weight: 600;
  }
  
  .modal-close {
    font-size: 1.5rem;
    justify-self: end;
    cursor: pointer;
    color: var(--dark-gray);
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  .notice {
    font-size: 1rem;
    right: 20px;
    min-width: 200px;
    padding: 10px;
    margin-top: 30px;
  }
 .due-item {
  padding: 8px;
  border: 1px solid var(--medium-gray);
  color: var(--light-gray);
  border-radius: 5px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.due-item:hover {
  background-color: var(--light-gray);
}

.due-item h3 {
  margin: 0 0 5px 0;
  color: var(--primary-color);
  font-size: 1.0rem;
}

.due-item p {
  margin: 0;
  color: var(--dark-gray);
  font-size: 0.8rem;
 }
 
.toggle-container{
  background-color: var(--medium-gray);
  border-radius: var(--border-radius);
  color: black;
}
.form-actions {
  flex-direction: column;
}

.form-actions button {
  width: 100%;
}
}
