/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #0b0f19;
  color: #c8cde0;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: #f56a0d;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #ff9f43;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Layout ===== */
.u-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.u-header {
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.u-header .u-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.u-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
}

.u-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.u-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.u-main {
  flex: 1;
  padding: 40px 0;
}

/* ===== Page Title ===== */
.u-page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 24px;
  padding-bottom: 12px;
  position: relative;
}

.u-page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(135deg, #f56a0d, #ff9f43);
  border-radius: 2px;
}

/* ===== Section Title (smaller) ===== */
.u-section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 16px;
}

/* ===== Card ===== */
.u-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 24px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.u-card:hover {
  border-color: rgba(245, 106, 13, 0.12);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

/* ===== Back Link ===== */
.u-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8b93a8;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.3s;
}

.u-back-link:hover {
  color: #f56a0d;
}

.u-back-link .material-icons {
  font-size: 1.1rem;
}

/* ===== Search Form ===== */
.u-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.u-search-form label {
  font-size: 0.88rem;
  color: #8b93a8;
  font-weight: 500;
}

.u-search-form input[type="text"],
.u-search-form input[type="email"] {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e0e0e0;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  min-width: 200px;
}

.u-search-form input[type="text"]:focus,
.u-search-form input[type="email"]:focus {
  border-color: rgba(245, 106, 13, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 106, 13, 0.1);
}

.u-search-form input[type="submit"],
.u-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f56a0d, #e05500);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(245, 106, 13, 0.25);
  transition: transform 0.3s, box-shadow 0.3s;
}

.u-search-form input[type="submit"]:hover,
.u-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 106, 13, 0.35);
}

.u-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  color: #c0c8e0;
}

.u-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  color: #ffffff;
}

.u-btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 3px 14px rgba(231, 76, 60, 0.25);
}

.u-btn-danger:hover {
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.35);
}

/* ===== Data Table ===== */
.u-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 24px;
}

.u-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.88rem;
}

.u-table thead th {
  background: rgba(255, 255, 255, 0.04);
  color: #c0c8e0;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.u-table tbody td {
  padding: 12px 16px;
  color: #8b93a8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: top;
}

.u-table tbody tr:last-child td {
  border-bottom: none;
}

.u-table tbody tr:hover {
  background: rgba(245, 106, 13, 0.03);
}

.u-table a {
  color: #f56a0d;
  font-weight: 500;
}

.u-table a:hover {
  color: #ff9f43;
}

/* Action links in table */
.u-table .u-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
}

.u-table .u-action:hover {
  background: rgba(245, 106, 13, 0.1);
}

.u-table .u-action-danger {
  color: #e74c3c;
}

.u-table .u-action-danger:hover {
  background: rgba(231, 76, 60, 0.1);
  color: #ff6b5a;
}

/* ===== Pagination ===== */
.u-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.u-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c0c8e0;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s;
}

.u-pagination a:hover {
  background: rgba(245, 106, 13, 0.1);
  border-color: rgba(245, 106, 13, 0.2);
  color: #ffffff;
}

.u-pagination .u-page-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f56a0d, #e05500);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
}

.u-pagination .u-page-ellipsis {
  color: #5a6278;
  font-size: 0.85rem;
  padding: 0 4px;
}

/* ===== Forms ===== */
.u-form {
  max-width: 500px;
}

.u-form-group {
  margin-bottom: 20px;
}

.u-form-group label {
  display: block;
  font-size: 0.88rem;
  color: #8b93a8;
  font-weight: 500;
  margin-bottom: 6px;
}

.u-form-group input[type="text"],
.u-form-group input[type="email"],
.u-form-group input[type="password"],
.u-form-group input[type="number"],
.u-form-group textarea,
.u-form-group select {
  width: 100%;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e0e0e0;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.u-form-group input:focus,
.u-form-group textarea:focus,
.u-form-group select:focus {
  border-color: rgba(245, 106, 13, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 106, 13, 0.1);
}

.u-form-group select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.u-form-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.u-form-inline label {
  margin-bottom: 0;
  color: #c0c8e0;
}

.u-form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.u-form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f56a0d;
  cursor: pointer;
}

.u-form-check label {
  margin-bottom: 0;
  color: #c0c8e0;
  font-size: 0.9rem;
  cursor: pointer;
}

.u-form-error {
  color: #e74c3c;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 4px;
}

/* reCAPTCHA */
.g-recaptcha {
  display: inline-table;
  margin: 12px 0;
}

/* ===== Nav Links Grid ===== */
.u-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.u-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #c0c8e0;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.3s;
}

.u-nav-link:hover {
  background: rgba(245, 106, 13, 0.06);
  border-color: rgba(245, 106, 13, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

.u-nav-link .material-icons {
  font-size: 1.2rem;
  color: #f56a0d;
}

/* ===== Empty State ===== */
.u-empty {
  text-align: center;
  padding: 60px 24px;
}

.u-empty .material-icons {
  font-size: 3rem;
  color: #3a3f52;
  margin-bottom: 16px;
}

.u-empty p {
  color: #5a6278;
  font-size: 1rem;
}

/* ===== Flash Messages ===== */
.u-flash-list {
  list-style: none;
  margin-bottom: 20px;
}

.u-flash-list li {
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(245, 106, 13, 0.08);
  border: 1px solid rgba(245, 106, 13, 0.15);
  color: #f0c090;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* ===== Divider ===== */
.u-divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 24px 0;
}

/* ===== Footer ===== */
.u-footer {
  padding: 24px 0;
  background: #080b14;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.u-footer p {
  color: #3a3f52;
  font-size: 0.8rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .u-page-title {
    font-size: 1.4rem;
  }

  .u-card {
    padding: 20px 18px;
  }

  .u-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .u-search-form input[type="text"],
  .u-search-form input[type="email"] {
    min-width: 0;
    width: 100%;
  }

  .u-nav-grid {
    grid-template-columns: 1fr;
  }

  .u-table {
    font-size: 0.82rem;
  }

  .u-table thead th,
  .u-table tbody td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .u-page-title {
    font-size: 1.2rem;
  }

  .u-main {
    padding: 24px 0;
  }
}
