.ef-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.ef-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.ef-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  overflow: hidden;
  margin-bottom: 20px;
}

.ef-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .ef-grid {
    grid-template-columns: 1fr;
  }
}

.ef-field label {
  font-size: 13px;
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.ef-field input,
.ef-field select,
.ef-field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}

.ef-btn {
  background: #111827;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}

.ef-btn:hover {
  opacity: 0.9;
}

.ef-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ef-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.ef-table th,
.ef-table td {
  padding: 14px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.ef-table th {
  background: #f9fafb;
  font-size: 12px;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 700;
}

.ef-empty {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  background: #fdfdfd;
  border-radius: 10px;
}

.ef-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Responsive Table Wrapper */
.ef-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

/* Responsive Grid System */
.ef-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.ef-col {
  flex: 1 0 0%;
  padding-right: 15px;
  padding-left: 15px;
}

@media (max-width: 768px) {
  .ef-col {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 15px;
  }
}

/* Modal Responsiveness & Scrolling */
.ef-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.ef-modal-container {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ef-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.ef-modal-body {
  padding: 24px;
  overflow-y: auto !important;
  max-height: calc(90vh - 140px);
  flex-grow: 1;
  -webkit-overflow-scrolling: touch;
}

/* Force scroll on any tab pane or inner content */
.ef-modal-pane, 
.ef-modal-content {
  overflow-y: auto !important;
  max-height: 100%;
}

/* Make scrollbars visible and styled */
.ef-modal-body::-webkit-scrollbar {
  width: 6px;
}
.ef-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.ef-modal-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.ef-modal-body::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.ef-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* Modal Tabs Horizontal Scroll */
.ef-modal-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #eee;
  padding: 0 24px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  -webkit-overflow-scrolling: touch;
}

.ef-modal-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.ef-modal-tab {
  padding: 14px 4px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.ef-modal-tab.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

@media (max-width: 768px) {
  .ef-modal-overlay {
    padding: 10px;
  }
  
  .ef-modal-container {
    max-height: 95vh;
    border-radius: 8px;
  }

  .ef-modal-header {
    padding: 16px;
  }

  .ef-modal-body {
    padding: 16px;
  }

  .ef-modal-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
  }

  .ef-modal-footer .ef-btn {
    width: 100%;
  }

  .ef-page-head {
    flex-direction: column;
    align-items: flex-start !important;
  }
}

/* Form Responsiveness */
@media (max-width: 640px) {
  .ef-form-row {
    flex-direction: column;
  }
  .ef-form-group {
    width: 100% !important;
  }
}
