* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: nunito, roboto, proxima-nova, "proxima nova", sans-serif;
  background: #f5f5f5;
  color: #333;
}
.admin-header {
  background: #893cac;
  color: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.admin-header h1 {
  margin: 0;
  font-size: 22px;
}
.admin-header .admin-nav {
  display: flex;
  gap: 5px;
  flex: 1;
  margin-left: 40px;
}
.admin-header .admin-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 5px;
  transition: all 200ms ease;
}
.admin-header .admin-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.admin-header .admin-nav a.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
.admin-header .user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}
.admin-header .logout-btn {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  transition: background 200ms ease;
}
.admin-header .logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: bold;
  background: #f0ad4e;
  color: #333;
}
.badge.badge-warning {
  background: #fff3cd;
  color: #856404;
}
.badge.badge-success {
  background: #d4edda;
  color: #155724;
}
.badge.badge-danger {
  background: #f8d7da;
  color: #721c24;
}
.pending-notice {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 25px;
}
.pending-notice strong {
  color: #856404;
  display: block;
  margin-bottom: 5px;
}
.pending-notice p {
  margin: 0;
  color: #856404;
  font-size: 14px;
}
.admin-main {
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.page-header h2 {
  margin: 0;
}
.page-header .header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.page-header .search-box {
  display: flex;
  gap: 10px;
}
.page-header .search-box input {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  min-width: 250px;
}
.btn {
  padding: 10px 20px;
  background: #893cac;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 200ms ease;
}
.btn:hover {
  background: #6b2f86;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.btn-secondary {
  background: #6c757d;
}
.btn.btn-secondary:hover {
  background: #545b62;
}
.btn.btn-small {
  padding: 6px 12px;
  font-size: 13px;
}
.btn.btn-primary {
  background: #893cac;
}
.btn.btn-primary:hover {
  background: #6b2f86;
}
.btn.btn-danger {
  background: #dc3545;
}
.btn.btn-danger:hover {
  background: #bd2130;
}
.filters {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.filters .filter-group label {
  font-size: 12px;
  text-transform: uppercase;
  opacity: 0.7;
}
.filters .filter-group select, .filters .filter-group input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  min-width: 150px;
  max-width: 250px;
}
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stats-overview .stat-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
}
.stats-overview .stat-card h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  text-transform: uppercase;
  opacity: 0.7;
}
.stats-overview .stat-card .stat-value {
  font-size: 36px;
  font-weight: bold;
  color: #893cac;
}
.charts {
  margin-bottom: 30px;
}
.charts .chart-container {
  background: white;
  padding: 25px;
  border-radius: 10px;
}
.charts .chart-container h3 {
  margin: 0 0 20px 0;
}
.charts .chart-container canvas {
  height: 300px !important;
}
.charts.charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.charts.charts-row .chart-half {
  min-width: 0;
}
.charts.charts-row .chart-half canvas {
  height: 280px !important;
}
@media (max-width: 1000px) {
  .charts.charts-row {
    grid-template-columns: 1fr;
  }
}
.data-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
}
.table-container, .resources-list {
  background: white;
  padding: 25px;
  border-radius: 10px;
  overflow-x: auto;
}
.table-container h3, .resources-list h3 {
  margin: 0 0 20px 0;
}
.table-container table, .resources-list table {
  width: 100%;
  border-collapse: collapse;
}
.table-container table th, .table-container table td, .resources-list table th, .resources-list table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.table-container table th, .resources-list table th {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.7;
}
.table-container table tbody tr:hover, .resources-list table tbody tr:hover {
  background: #f9f9f9;
}
.table-container table td.actions, .resources-list table td.actions {
  white-space: nowrap;
}
.table-container table td.actions .btn, .resources-list table td.actions .btn {
  margin-right: 5px;
}
.table-container table td.actions .btn:last-child, .resources-list table td.actions .btn:last-child {
  margin-right: 0;
}
.table-container table .row-link, .resources-list table .row-link {
  color: #333;
  text-decoration: none;
}
.table-container table .row-link:hover, .resources-list table .row-link:hover {
  color: #893cac;
  text-decoration: underline;
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #893cac 0%, #3c8cac 100%);
}
.login-page .login-card {
  background: white;
  padding: 40px;
  border-radius: 15px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.login-page .login-card h1 {
  margin: 0 0 30px 0;
  text-align: center;
  color: #893cac;
}
.login-page .login-card .subtitle {
  text-align: center;
  margin: -20px 0 30px 0;
  opacity: 0.7;
}
.login-page .login-card .form-group {
  margin-bottom: 20px;
}
.login-page .login-card .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.login-page .login-card .form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}
.login-page .login-card .form-group input:focus {
  outline: none;
  border-color: #893cac;
}
.login-page .login-card .form-group input#code {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-family: monospace;
}
.login-page .login-card button {
  width: 100%;
  padding: 15px;
  background: #893cac;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}
.login-page .login-card button:hover {
  background: #6b2f86;
}
.login-page .login-card button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.login-page .login-card .message {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}
.login-page .login-card .message.error {
  background: #fee;
  color: #c00;
}
.login-page .login-card .message.success {
  background: #efe;
  color: #060;
}
.login-page .login-card .back-link {
  text-align: center;
  margin-top: 20px;
}
.login-page .login-card .back-link a {
  color: #893cac;
}
.login-page .login-card .register-link, .login-page .login-card .login-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}
.login-page .login-card .register-link a, .login-page .login-card .login-link a {
  color: #893cac;
  font-weight: 600;
}
.login-page .register-card {
  background: white;
  padding: 40px;
  border-radius: 15px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.login-page .register-card h1 {
  margin: 0 0 10px 0;
  text-align: center;
  color: #893cac;
}
.login-page .register-card .register-intro {
  text-align: center;
  margin: 0 0 30px 0;
  opacity: 0.7;
}
.login-page .register-card .form-section {
  margin-bottom: 25px;
}
.login-page .register-card .form-section h4 {
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  color: #893cac;
  font-size: 14px;
}
.login-page .register-card .form-group {
  margin-bottom: 15px;
}
.login-page .register-card .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 13px;
}
.login-page .register-card .form-group input, .login-page .register-card .form-group textarea, .login-page .register-card .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}
.login-page .register-card .form-group input:focus, .login-page .register-card .form-group textarea:focus, .login-page .register-card .form-group select:focus {
  outline: none;
  border-color: #893cac;
}
.login-page .register-card .form-group textarea {
  resize: vertical;
}
.login-page .register-card .form-group small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  opacity: 0.6;
}
.login-page .register-card .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}
.login-page .register-card .btn-full {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  margin-top: 10px;
}
.login-page .register-card .message {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}
.login-page .register-card .message.error {
  background: #fee;
  color: #c00;
}
.login-page .register-card .message.success {
  background: #efe;
  color: #060;
}
.login-page .register-card .login-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}
.login-page .register-card .login-link a {
  color: #893cac;
  font-weight: 600;
}
.modal {
  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: 1000;
}
.modal .modal-content {
  background: white;
  border-radius: 10px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal .modal-content.modal-small {
  max-width: 450px;
}
.modal .modal-content.modal-wide {
  max-width: 900px;
}
.modal .modal-body {
  padding: 25px;
}
.modal .modal-body .warning {
  color: #856404;
  background: #fff3cd;
  padding: 10px 15px;
  border-radius: 5px;
  margin-top: 15px;
  font-size: 14px;
}
.modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #eee;
}
.modal .modal-header h3 {
  margin: 0;
}
.modal .modal-header .close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.5;
}
.modal .modal-header .close-btn:hover {
  opacity: 1;
}
.modal form {
  padding: 25px;
}
.modal .form-section {
  margin-bottom: 25px;
}
.modal .form-section h4 {
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  color: #893cac;
}
.modal .form-section h4 .section-link {
  font-size: 12px;
  font-weight: normal;
  margin-left: 10px;
  color: #666;
}
.modal .form-section h4 .section-link:hover {
  color: #893cac;
}
.modal .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}
.modal .guideline-fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 16px 4px;
  margin-bottom: 14px;
}
.modal .guideline-fieldset legend {
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.modal .guideline-fieldset .form-group label {
  font-size: 12px;
  font-weight: 500;
  color: #666;
}
.modal .form-group {
  margin-bottom: 15px;
}
.modal .form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
}
.modal .form-group input, .modal .form-group textarea, .modal .form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}
.modal .form-group input:focus, .modal .form-group textarea:focus, .modal .form-group select:focus {
  outline: none;
  border-color: #893cac;
}
.modal .form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
}
.modal .form-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  font-weight: normal;
  cursor: pointer;
}
.modal .form-group textarea {
  resize: vertical;
}
.modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.modal .checklist-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.modal .checklist-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  max-height: 180px;
  overflow-y: auto;
}
.modal .checklist-group .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
  transition: background 150ms ease;
}
.modal .checklist-group .checkbox-label:hover {
  background: #eee;
}
.modal .checklist-group .checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}
.page-description {
  margin: -20px 0 0 0;
  opacity: 0.7;
  font-size: 14px;
}
.attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.attribute-panel {
  background: white;
  border-radius: 10px;
  padding: 20px;
}
.attribute-panel h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #893cac;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}
.attribute-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 50px;
}
.attribute-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 5px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: grab;
}
.attribute-item:active {
  cursor: grabbing;
}
.attribute-item.dragging {
  opacity: 0.5;
  background: #e0e0e0;
}
.attribute-item.inactive {
  opacity: 0.5;
  background: #fafafa;
}
.attribute-item.inactive .attr-label {
  text-decoration: line-through;
}
.attribute-item .drag-handle {
  color: #999;
  font-size: 14px;
}
.attribute-item .attr-label {
  flex: 1;
  font-size: 14px;
}
.attribute-item .attr-value {
  font-size: 11px;
  color: #999;
  font-family: monospace;
}
.attribute-item .attr-actions {
  display: flex;
  gap: 5px;
}
.btn-icon {
  background: none;
  border: 1px solid #ddd;
  border-radius: 3px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
}
.btn-icon:hover {
  background: #f0f0f0;
  border-color: #ccc;
}
.btn-icon.btn-danger:hover {
  background: #fee;
  border-color: #c00;
  color: #c00;
}
.btn-icon.btn-success {
  background: #efe;
  border-color: #0a0;
  color: #0a0;
}
.btn-icon.btn-success:hover {
  background: #cfc;
}
.attribute-add {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}
.attribute-add input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
}
.attribute-add input:focus {
  outline: none;
  border-color: #893cac;
}
@media (max-width: 768px) {
  .admin-header {
    flex-wrap: wrap;
  }
  .admin-header .admin-nav {
    order: 3;
    margin-left: 0;
    width: 100%;
    margin-top: 15px;
  }
  .data-tables {
    grid-template-columns: 1fr;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .page-header .search-box {
    width: 100%;
  }
  .page-header .search-box input {
    flex: 1;
    min-width: 0;
  }
}
.approve-dialog-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: 1100;
}
.approve-dialog-overlay .approve-dialog {
  background: white;
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  padding: 25px;
  margin: 20px;
}
.approve-dialog-overlay .approve-dialog h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.approve-dialog-overlay .approve-dialog p {
  margin: 0 0 18px;
  color: #555;
}
.approve-dialog-overlay .approve-dialog-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f6f8fa;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  cursor: pointer;
}
.approve-dialog-overlay .approve-dialog-check input {
  margin-top: 2px;
  flex-shrink: 0;
}
.approve-dialog-overlay .approve-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
