* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #1a1a1a;
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}
header{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 30px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: static;
}
.main-content {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
  position: relative;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo {
  width: 150px;
  height: auto;
  position: relative;
  left: 50px;
  top: 10px;
}
.logout{
  padding: 5px;
  margin-right: 50px;

}
/* Card container and card styles with animations */
.card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  width: 100%;
  max-width: 900px;
}
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 30px;
  width: 280px;
  height: 220px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index:10;
}
.card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}
.card img {
  height: auto;
  width: 100px;
}

.card-icon {
  font-size: 80px;
  line-height: 1;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  width: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  transition: all 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}
.card h3 {
  font-size: 22px;
  color: #2c3e50;
  font-weight: 600;
  text-align: center;
  margin: 0;
  z-index: 1;
  position: relative;
}

/* Modal styling with fade and slide animations */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.5s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  margin: 5% auto;
  padding: 30px;
  border-radius: 20px;
  width: 95%;
  max-width: 650px;
  position: relative;
  animation: slideIn 0.5s;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Wider modal specifically for Create NFA Document form */
.nfa-create-modal {
  max-width: 1000px; /* increase available width */
}
@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.close {
  color: #666;
  float: right;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
}
.close:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  transform: rotate(90deg);
}

/* Form wrapper for clearer separation */
.form-wrapper {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 20px 0px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced form styling */
.styled-form {
  display: flex;
  flex-direction: column;
}
.styled-form label {
  font-weight: 500;
  margin-bottom: 5px;
  color: #333;
}
.styled-form input,
.styled-form select {
  width: 100%;
  padding: 15px 20px;
  margin-bottom: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  font-family: inherit;
}

/* Password field with eye toggle */
.password-group {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px; /* take over spacing from input */
}

.password-group input[type="password"],
.password-group input[type="text"] {
  padding-right: 44px; /* space for eye button */
  margin-bottom: 0; /* avoid extra height that mis-centers the eye */
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #555;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.password-toggle:focus {
  outline: none;
}

/* Ensure generic styled-form button rules don't affect the eye toggle */
.styled-form .password-toggle,
.styled-form .password-toggle:hover,
.styled-form .password-toggle:active {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
.styled-form input:focus,
.styled-form select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 1);
}
.styled-form button {
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.styled-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.styled-form button:disabled {
  background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  opacity: 0.7;
}

.styled-form button:disabled:hover {
  transform: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
}

/* NFA display styling */
.nfa-display {
  margin-top: 20px;
  padding: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #27ae60;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
  border: 2px solid rgba(39, 174, 96, 0.3);
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
  animation: pulse 2s infinite;
}

.nfa-result-container {
  margin-top: 20px;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.nfa-result-container.active {
  display: flex;
}

.nfa-result-container .nfa-display {
  margin-top: 0;
  flex: 1 1 auto;
}

.nfa-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.nfa-result-actions .btn {
  width: 100%;
}

@media (max-width: 480px) {
  .nfa-result-actions {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}
.nfa-result-actions button {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 150px;
}

.nfa-result-actions button.active {
  display: inline-flex;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Generic button baseline for inline action buttons */
.btn {
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Primary button styling to match app theme */
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}
.btn-primary:disabled {
  background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  opacity: 0.8;
}

/* Updated styling for the Copy button */
#copy-button {
  display: block;
  margin: 15px auto;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#copy-button:hover {
  background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.6);
}

/* Footer styling */
footer {
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  color: #fff;
  width: 100%;
  position: fixed;
  bottom: 0px;
  z-index: 50;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#department_results {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 25px;
  margin-top: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  font-family: 'Roboto', sans-serif;
  color: #333333;
  line-height: 1.6;
}
#department_results .nfa-record {
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}
#department_results .nfa-record:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
#department_results .nfa-record:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.form-wrapper-retrieve {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 20px 0px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
#department_select {
  padding: 5px 10px;
}
.btn-secondary {
  font-size: 14px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Enhanced mobile responsiveness */
@media (max-width: 1024px) {
  .cards-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
      max-width: 700px;
  }
}

@media (max-width: 768px) {
  .main-content {
      padding: 40px 10px;
      min-height: calc(100vh - 150px);
  }
  .card-container {
      gap: 40px;
  }
  .cards-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
      max-width: 600px;
  }
  .card {
      width: 100%;
      height: auto;
      padding: 30px 20px;
  }
  .card-container h1 {
      font-size: 2.2rem;
      margin-bottom: 20px;
  }
  .modal-content {
      width: 95%;
      margin: 5% auto;
      padding: 20px;
      border-radius: 15px;
  }
  .form-wrapper, .form-wrapper-retrieve {
      padding: 20px;
  }
  body, .styled-form input, .styled-form select, .styled-form button {
      font-size: 16px;
  }
  header {
      padding: 10px 15px;
  }
  .logo {
      width: 120px;
      left: 0;
  }
  .nfa-display {
      font-size: 20px;
      padding: 15px;
  }
}

@media (max-width: 480px) {
  .cards-grid {
      grid-template-columns: 1fr;
      gap: 15px;
      max-width: 350px;
  }
  .card {
      padding: 25px 15px;
  }
  .modal-content {
      margin: 2% auto;
      padding: 15px;
  }
  .styled-form button {
      padding: 12px 20px;
      font-size: 14px;
  }
}

/* Additional styling for responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Additional modern touches */
.card-container h1 {
  text-align: center;
  color: white;
  font-size: 3rem;
  margin-bottom: 30px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  letter-spacing: 1px;
}

/* Cards grid layout */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  width: 100%;
  max-width: 1000px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading animation for buttons */
.styled-form button:active {
  transform: scale(0.98);
}

/* Enhanced focus states */
.styled-form input:focus,
.styled-form select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 1);
}

/* Success animation for notifications */
@keyframes slideInFromTop {
  0% {
    transform: translateY(-100px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal.show {
  animation: slideInFromTop 0.5s ease-out;
}

/* Alert modal specific styling with highest z-index */
#alert-modal {
  z-index: 10000;
}

#alert-modal .modal-content {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid #e74c3c;
  box-shadow: 0 10px 40px rgba(231, 76, 60, 0.3);
  animation: alertSlideIn 0.3s ease-out;
  position: relative;
  z-index: 10001;
}

@keyframes alertSlideIn {
  0% {
    transform: translateY(-100px) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Ensure alert modal appears above everything including header */
#alert-modal {
  z-index: 10000 !important;
}

#alert-modal .modal-content {
  z-index: 10001 !important;
}

/* Override any potential conflicts */
body #alert-modal {
  z-index: 10000 !important;
}

body #alert-modal .modal-content {
  z-index: 10001 !important;
}

/* Admin Login Button */
.admin-login-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-login-btn:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
}

/* Admin Card Styling */
.admin-card {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%);
  border: 2px solid rgba(231, 76, 60, 0.3);
}

.admin-card:hover {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.2) 100%);
  border-color: rgba(231, 76, 60, 0.5);
}

/* Admin Modal Content */
.admin-modal-content {
  max-width: 90%;
  width: 1200px;
}

.admin-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.admin-tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  transition: all 0.3s ease;
}

.admin-tab-btn:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.admin-tab-btn.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* Position Mappings Styles */
.position-mappings-form {
  max-height: 600px;
  overflow-y: auto;
  padding: 10px;
}

.mapping-section {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.mapping-section h4 {
  margin-bottom: 15px;
  color: #1a1a1a;
  font-size: 1.1rem;
  font-weight: 700;
}

.position-list {
  margin-bottom: 15px;
}

.position-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.position-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 0.95rem;
}

.btn-remove-position {
  background: #ef4444;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 35px;
}

.btn-remove-position:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.name-mappings-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.name-mapping-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(248, 250, 252, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.name-mapping-item label {
  min-width: 250px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  padding-top: 8px;
}

.names-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.names-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.name-item-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.name-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 0.95rem;
}

.btn-add-name {
  align-self: flex-start;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.btn-remove-name {
  background: #ef4444;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-name:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.mapping-help-text {
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  color: #1e40af;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Admin Data Table */
.admin-data-table {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.admin-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-table tr:hover {
  background: rgba(102, 126, 234, 0.1);
}

.admin-table .action-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.admin-table .btn-edit,
.admin-table .btn-delete {
  padding: 5px 10px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-table .btn-edit {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.admin-table .btn-edit:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
  transform: translateY(-1px);
}

.admin-table .btn-delete {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.admin-table .btn-delete:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-1px);
}

/* Edit Modal */
.edit-modal-content {
  max-width: 700px;
  width: 90%;
}

.edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.edit-form .form-group {
  display: flex;
  flex-direction: column;
}

.edit-form .form-group.full-width {
  grid-column: 1 / -1;
}

.edit-form .form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.edit-form textarea {
  width: 100%;
  padding: 15px 20px;
  margin-bottom: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.edit-form textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 1);
}

.edit-form input[readonly] {
  background: rgba(0, 0, 0, 0.05);
  cursor: not-allowed;
  color: #666;
}

.edit-form input[readonly]:focus {
  transform: none;
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness for admin elements */
@media (max-width: 768px) {
  .admin-login-btn {
    padding: 8px 15px;
    font-size: 14px;
  }
  
  .admin-modal-content {
    max-width: 95%;
    width: 100%;
  }
  
  .admin-controls {
    flex-direction: column;
  }
  
  .admin-table {
    font-size: 12px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 8px 4px;
  }
  
  .edit-form {
    grid-template-columns: 1fr;
  }
}

/* Budget Table Container */
#budget_table_container {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Budget Items Table */
#budget_items_table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  margin-bottom: 15px;
}

#budget_items_table th, #budget_items_table td {
  padding: 10px;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

#budget_items_table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
}

/* Inputs inside budget table */
#budget_items_table input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

#budget_items_table input[type="text"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
  outline: none;
}

/* Delete Row Button */
.btn-delete-row {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-delete-row:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: scale(1.1);
}

/* Ensure textareas in styled forms are consistent */
.styled-form textarea {
  width: 100%;
  padding: 15px 20px;
  margin-bottom: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  font-family: inherit;
  resize: vertical;
}

.styled-form textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 1);
}

/* Responsive adjustments for budget table */
@media (max-width: 768px) {
  #budget_items_table th, #budget_items_table td {
    padding: 8px;
  }
  #budget_items_table input[type="text"] {
    font-size: 13px;
    padding: 6px;
  }
  #budget_table_container {
    padding: 15px;
  }
}

