/* Search Form Container */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Increased gap for better spacing */
    padding: 15px; /* Increased padding for more breathing room */
    border: 1px solid #ddd;
    border-radius: 8px; /* Slightly rounded corners */
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Input Fields */
.search-input, .search-select, .search-date {
    padding: 10px; /* Increased padding for a better touch target */
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 200px; /* Adjust width as needed */
    box-sizing: border-box; /* Ensure padding and border are included in width */
}

/* Date Input Fields */
.search-date {
    width: 160px; /* Adjust width for better alignment */
}

/* Submit Button */
.search-button {
    padding: 12px 20px; /* Increased padding for a larger button */
    font-size: 16px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* Smooth transition effect */
}

.search-button:hover {
    background-color: #0056b3;
}

/* Table Styles */
.table-container {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 8px; /* Rounded corners for table container */
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px; /* Increased padding for table cells */
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f4f4f4;
    font-weight: bold;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Button Styles */
.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px; /* Larger padding for a more prominent button */
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* Smooth transition effect */
}

.btn-primary:hover {
    background-color: #0056b3;
}


/* Modal Styles */
.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* Adjusted margin for better centering */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Increased width for a wider modal */
    max-width: 700px; /* Increased max-width for larger screens */
    border-radius: 8px; /* Rounded corners for the modal */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
}

.close {
    color: #aaa;
    float: right;
    font-size: 30px; /* Larger font size for better visibility */
    font-weight: bold;
}

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

/* Form Group Styles */
.form-group {
    margin-bottom: 20px; /* Increased margin for better spacing */
}

.form-group label {
    display: block;
    margin-bottom: 8px; /* Increased margin for better spacing */
    font-weight: bold;
}
.main-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 20px;
    height: 100vh;
  }

  .sidebar {
    width: 250px;
    padding: 20px;
    background-color: #f8f9fa;
    box-shadow: 2px 0px 5px rgba(0, 0, 0, 0.1);
  }

  .sidebar .nav-item {
    margin-bottom: 15px;
  }

  .sidebar .nav-link {
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
  }

  .sidebar .nav-link:hover {
    text-decoration: underline;
  }

  .custom-form-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 60px;
  }

  .custom-form {
    width: 600px;
    border: 2px solid #007bff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  }

  .form-header {
    text-align: center;
    margin-bottom: 20px;
  }

  .modal-footer {
    display: flex;
    justify-content: flex-end;
  }

  .alert-message {
    display: none;
    position: relative;
    width: 600px; /* Match the form width */
    margin: 0;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    background-color: #f8d7da; /* Default background color */
    color: #721c24; /* Default text color */
    border-color: #f5c6cb; /* Default border color */
    margin-bottom: 20px; /* Space between the alert and the form */
  }

  .alert-message.show {
    display: block; /* Show if it has content */
  }

  .alert-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
  }

  .alert-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
  }

  .alert-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
  }

  .alert-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
  }

  .alert-message .close {
    cursor: pointer;
    float: right;
    font-size: 1.5em;
    line-height: 1;
  }
.form-group input,
.form-group select {
    width: 100%;
    padding: 10px; /* Increased padding for better touch target */
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensure padding and border are included in width */
}

/* Style for category items */
.category-item {
    padding: 10px;
    margin: 10px 17%;  /* Added margin-left to move it right */
    border: 1px solid #fffdfd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between; /* To align edit/delete buttons to the right */
    align-items: center; /* Vertically center align items */
}

/* Style for clickable categories */
.category-item.clickable {
    background-color: #d3d3d3;
}

/* Style for the back button */
#backButton {
    margin: 10px 20px;  /* Ensure it aligns with category items */
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#backButton:hover {
    background-color: #0056b3;
}

.table-container {
  overflow-x: auto; /* Хүснэгт нь өргөний асуудалтай бол гүйлгэх боломжтой */
  
}

.table {
    width: 100%;
   
    border-collapse: collapse;
    margin: 20px 0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f2f2f2;
}

.table th, .table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.table th {
    background-color: #f4f4f4;
}

.btn {
    margin: 0 5px;
    padding: 5px 10px;
    font-size: 14px;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.pagination {
    margin-top: 10px;
}

.pagination button {
    margin: 0 2px;
}

/* Table responsive */
.container-fluid .table-responsive{
  transform:translatex(389px) translatey(-36px);
  width:83% !important;
 }

/* Sortable table headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

th.sortable:hover {
    background-color: #f5f5f5;
}

.sort-arrow {
    margin-left: 5px;
    font-size: 12px;
    color: #666;
}

th.sortable .sort-arrow {
    opacity: 0.7;
}

th.sortable:hover .sort-arrow {
    opacity: 1;
}

