/* Container */
.aid-system-container {
  max-width: 1400px;
  margin: 0 auto;
  /* padding: 20px; */
}

/* Main */
.aid-system-main {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  backdrop-filter: blur(15px);
}

.aid-system-main .header {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  padding: 30px;
  text-align: center;
  height: auto;
  display: block;
  z-index: 0;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.aid-system-main .header h1 {
  font-size: 2.2em;
  margin-bottom: 10px;
}

.aid-system-main .header p {
  font-size: 1.1em;
  opacity: 0.9;
}

/* Form */
.aid-application-form {
  max-width: 900px;
  margin: 0 auto;
}

.aid-form-section {
  margin-bottom: 35px;
  padding: 30px;
  background: rgba(71, 163, 75, 0.05);
  border-radius: 15px;
  border: 2px solid rgba(71, 163, 75, 0.1);
}

.aid-section-title {
  color: #333;
  margin-bottom: 25px;
  font-size: 1.6rem;
  font-weight: 700;
  border-bottom: 3px solid #47a34b;
  padding-bottom: 12px;
}

.aid-subsection-title {
  color: #555;
  margin-bottom: 18px;
  font-size: 1.3rem;
  font-weight: 600;
}

.aid-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 25px;
}

.aid-form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.aid-form-label {
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.aid-form-input,
.aid-form-textarea,
.aid-form-select {
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.aid-form-select {
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.aid-form-select:focus {
  outline: none;
  border-color: #47a34b;
  box-shadow: 0 0 0 4px rgba(71, 163, 75, 0.1);
  transform: translateY(-1px);
}

.aid-form-select.aid-input-error {
  border-color: #dc3545;
  background-color: #fff5f5;
}

.aid-form-input:focus,
.aid-form-textarea:focus,
.aid-form-select:focus {
  outline: none;
  border-color: #47a34b;
  box-shadow: 0 0 0 4px rgba(71, 163, 75, 0.1);
  transform: translateY(-1px);
}

.aid-form-input.aid-input-error {
  border-color: #dc3545;
  background-color: #fff5f5;
}

.aid-error-message {
  color: #dc3545;
  font-size: 13px;
  margin-top: 5px;
  font-weight: 500;
  display: block;
  min-height: 18px;
}

/* Radio Group */
.aid-radio-group {
  display: flex;
  gap: 25px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.aid-radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.aid-radio-input {
  display: none;
}

.aid-radio-custom {
  width: 22px;
  height: 22px;
  border: 3px solid #47a34b;
  border-radius: 50%;
  margin-left: 12px;
  position: relative;
  transition: all 0.3s ease;
}

.aid-radio-input:checked + .aid-radio-custom {
  background: #47a34b;
  transform: scale(1.1);
}

.aid-radio-input:checked + .aid-radio-custom::after {
  content: "";
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.aid-conditional-section {
  margin-top: 25px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  border: 2px solid rgba(71, 163, 75, 0.2);
}

/* Buttons */
.aid-form-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.aid-btn {
  padding: 18px 35px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 140px;
  gap: 8px;
}

.aid-btn-primary {
  background: linear-gradient(135deg, #47a34b 0%, #2d5a2f 100%);
  color: white;
}

.aid-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(71, 163, 75, 0.4);
}

.aid-btn-secondary {
  background: #6c757d;
  color: white;
}

.aid-btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.aid-btn-success {
  background: #28a745;
  color: white;
  padding: 10px 15px;
  font-size: 14px;
  min-width: auto;
}

.aid-btn-success:hover {
  background: #218838;
  transform: translateY(-2px);
}

.aid-btn-danger {
  background: #dc3545;
  color: white;
  padding: 10px 15px;
  font-size: 14px;
  min-width: auto;
}

.aid-btn-danger:hover {
  background: #c82333;
  transform: translateY(-2px);
}

.aid-btn-warning {
  background: #ffc107;
  color: #212529;
  padding: 10px 15px;
  font-size: 14px;
  min-width: auto;
}

.aid-btn-warning:hover {
  background: #e0a800;
  transform: translateY(-2px);
}

/* Admin Dashboard */
.aid-admin-main {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(15px);
}
.dashboard-content {
  padding: 15px;
}
.aid-admin-section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.aid-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 25px;
}

.aid-admin-title {
  color: #333;
  font-size: 2rem;
  font-weight: 700;
  border-bottom: 4px solid #47a34b;
  padding-bottom: 12px;
}

.aid-filter-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.aid-filter-btn {
  padding: 12px 25px;
  border: 2px solid #47a34b;
  background: white;
  color: #47a34b;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
}

.aid-filter-btn:hover,
.aid-filter-active {
  background: #47a34b;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(71, 163, 75, 0.3);
}

/* Search Section */
.aid-search-section {
  background: rgba(71, 163, 75, 0.05);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  border: 2px solid rgba(71, 163, 75, 0.1);
}

.aid-search-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 20px;
  align-items: end;
}

.aid-search-group {
  display: flex;
  flex-direction: column;
}

.aid-search-label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.aid-search-input-wrapper {
  position: relative;
}

.aid-search-input {
  width: 100%;
  padding: 12px 15px;
  padding-right: 45px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.aid-search-input:focus {
  outline: none;
  border-color: #47a34b;
  box-shadow: 0 0 0 3px rgba(71, 163, 75, 0.1);
}

.aid-search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 16px;
}

.aid-clear-btn {
  padding: 12px 20px;
  font-size: 14px;
  min-width: auto;
  white-space: nowrap;
}

/* Statistics */
.aid-stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 35px;
}

.aid-stat-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(247, 250, 252, 0.9) 100%
  );
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(71, 163, 75, 0.1);
  transition: all 0.3s ease;
}

.aid-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.aid-stat-number {
  font-size: 3rem;
  color: #47a34b;
  margin-bottom: 12px;
  font-weight: 800;
}

.aid-stat-label {
  color: #666;
  font-weight: 600;
  font-size: 15px;
}

/* Table */
.aid-table-wrapper {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: scale(0.98);
}

.aid-table-container {
  overflow-x: auto;
}

.aid-data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.aid-table-head {
  background: linear-gradient(135deg, #47a34b 0%, #2d5a2f 100%);
}

.aid-table-header {
  color: white;
  padding: 20px 15px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 3px solid #2d5a2f;
}

.aid-table-body tr {
  transition: all 0.3s ease;
}

.aid-table-body tr:nth-child(even) {
  background: rgba(71, 163, 75, 0.03);
}

.aid-table-body tr:hover {
  background: rgba(71, 163, 75, 0.1);
}

.aid-table-body td {
  padding: 15px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 500;
}

/* Status Badge */
.aid-status-badge {
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  display: inline-block;
  min-width: 80px;
  transform: scale(0.9);
}

.aid-status-pending {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  border: 2px solid #ffeaa7;
}

.aid-status-completed {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 2px solid #c3e6cb;
}

/* No Data */
.aid-no-data {
  text-align: center;
  padding: 60px;
  color: #6c757d;
  font-size: 18px;
  background: white;
  border-radius: 15px;
}

.aid-no-data-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* Loading */
.aid-loading-spinner {
  text-align: center;
  padding: 60px;
  background: white;
  border-radius: 15px;
}

.aid-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #47a34b;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: aid-spin 1s linear infinite;
  margin: 0 auto 25px;
}

@keyframes aid-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Modal */
.aid-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

#errorModal {
  z-index: 100000;
}

.aid-modal-content {
  background-color: white;
  margin: 3% auto;
  padding: 20px;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: aid-modal-appear 0.3s ease-out;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.aid-scrollable-modal {
  max-height: 90vh;
}

.aid-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px;
  max-height: calc(90vh - 160px);
}

.aid-modal-content > h2.aid-modal-title {
  padding: 30px 40px 10px;
  margin: 0;
  flex-shrink: 0;
}

.aid-modal-content > .aid-modal-actions {
  padding: 20px 40px 30px;
  margin: 0;
  flex-shrink: 0;
  border-top: 1px solid #eee;
}

@keyframes aid-modal-appear {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aid-modal-large {
  max-width: 800px;
}

.aid-modal-small {
  max-width: 450px;
}

.aid-modal-close {
  color: #aaa;
  float: left;
  font-size: 32px;
  font-weight: bold;
  position: absolute;
  top: 20px;
  left: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1;
}

.aid-modal-close:hover {
  color: #000;
  transform: scale(1.1);
}

.aid-modal-title {
  color: #333;
  margin-bottom: 25px;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
}

.aid-modal-message {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 25px;
}

.aid-modal-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

/* Modal Types */
.aid-error-modal {
  border-left: 6px solid #dc3545;
}

.aid-success-modal {
  border-left: 6px solid #47a34b;
}

.aid-error-icon,
.aid-success-icon,
.aid-warning-icon {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 20px;
}

/* Complete Form */
.aid-complete-form {
  margin-top: 25px;
}

.aid-completion-section {
  margin-bottom: 25px;
}

/* Details Content */
.aid-details-content {
  padding: 0;
}

.aid-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.aid-detail-row:last-child {
  border-bottom: none;
}

.aid-detail-label {
  font-weight: 600;
  color: #333;
  min-width: 150px;
}

.aid-detail-value {
  color: #666;
  flex: 1;
  text-align: left;
}

/* Edit Form */
.aid-edit-form {
  margin: 0;
}

.aid-edit-form .aid-form-section {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(71, 163, 75, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(71, 163, 75, 0.1);
}

.aid-edit-form .aid-subsection-title {
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: #47a34b;
  font-weight: 600;
}

/* Action Icons */
.aid-action-icon {
  width: 16px;
  height: 16px;
  margin-left: 5px;
}

.aid-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.aid-action-buttons .aid-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 8px;
}

.aid-action-buttons .aid-btn i {
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .aid-search-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .aid-search-group {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .aid-system-container {
    padding: 15px;
  }

  .aid-system-title {
    font-size: 2rem;
  }

  .aid-form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .aid-radio-group {
    flex-direction: column;
    gap: 15px;
  }

  .aid-system-nav {
    flex-direction: column;
    gap: 15px;
  }

  .aid-form-actions,
  .aid-modal-actions {
    flex-direction: column;
  }

  .aid-admin-header {
    flex-direction: column;
    text-align: center;
  }

  .aid-stats-container {
    grid-template-columns: 1fr;
  }

  .aid-data-table {
    font-size: 12px;
  }

  .aid-table-header,
  .aid-table-body td {
    padding: 12px 8px;
  }

  .aid-modal-content {
    margin: 5% auto;
    width: 95%;
  }

  .aid-modal-body {
    padding: 15px 20px;
  }

  .aid-modal-content > h2.aid-modal-title {
    padding: 20px 20px 10px;
  }

  .aid-modal-content > .aid-modal-actions {
    padding: 15px 20px 20px;
  }

  .aid-action-buttons {
    flex-direction: column;
    gap: 5px;
  }

  .aid-action-buttons .aid-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .aid-btn {
    padding: 15px 25px;
    font-size: 14px;
  }

  .aid-system-title {
    font-size: 1.8rem;
  }

  .aid-modal-content {
    padding: 0;
  }
}

/* Search Results Highlight */
.aid-search-highlight {
  background-color: #fff3cd;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: bold;
}

/* No Results */
.aid-no-results {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-size: 16px;
  background: white;
  border-radius: 15px;
}

.aid-no-results i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}
/* /////////////////////// */

.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.alert-overlay.active {
  opacity: 1;
  visibility: visible;
}

.alert-box {
  background-color: white;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.alert-overlay.active .alert-box {
  transform: translateY(0);
}

.alert-header {
  background-color: #ff4757;
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.alert-icon {
  font-size: 24px;
}

.alert-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.alert-content {
  padding: 25px;
  color: #555;
  line-height: 1.5;
}

.alert-actions {
  display: flex;
  justify-content: flex-end;
  padding: 15px 25px;
  border-top: 1px solid #eee;
}

.alert-button {
  background-color: #ff4757;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.alert-button:hover {
  background-color: #ff6b81;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
