* { box-sizing: border-box; }

body, html {
  min-height: 100%;
}

.limiter { width: 100%; }

.container-table100 {
  width: 100%;
  min-height: 100vh;
  padding: 22px;
}

.wrap-table100 {
  width: min(1800px, 100%);
  margin: 0 auto;
  overflow: hidden;
}

.header-section {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .header-section {
  background: rgba(17, 18, 20, 0.76);
}

.header-container {
  width: min(1800px, 100%);
  margin: 0 auto;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
}

.logo-img {
  width: 250px;
  max-width: 100%;
  height: auto;
}

.title-wrapper { text-align: center; }

.main-title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.title-icon {
  font-size: 0.62em;
  display: inline-block;
  transform-origin: center;
  animation: mailBeat 1.8s ease-in-out infinite;
}

@keyframes mailBeat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.06) rotate(-3deg); }
  40% { transform: scale(0.98) rotate(2deg); }
  60% { transform: scale(1.04) rotate(-1deg); }
}

.title-underline {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.subtitle {
  margin-top: 14px;
  font-size: 15px;
}

.user-info {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-soft), var(--surface));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.user-info::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.15), transparent 55%);
  pointer-events: none;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.user-greeting {
  font-size: 14px;
  color: var(--muted);
}

.user-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}

.admin-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.btn-admin-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.table { display: table; }
.row { display: table-row; }
.cell { display: table-cell; padding: 14px 12px; vertical-align: middle; text-align: center; }

.row.header {
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
}

.row.header .cell {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.row .cell {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
}

.rowhover:hover {
  background: var(--surface-alt);
}

html[data-theme="dark"] .rowhover:hover {
  background: var(--surface-alt);
}

.action,
.action-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  margin: 0 3px;
}

.action {
  background: rgba(143, 29, 19, 0.1);
  border: 1px solid rgba(143, 29, 19, 0.2);
  color: var(--primary);
}

.action:hover {
  background: var(--primary);
  color: #fff;
}

.action-disabled {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
}

footer {
  margin-top: 16px;
  padding: 16px 12px;
  text-align: center;
  color: var(--muted);
}

.footer-content p { margin: 4px 0; }

.heart {
  display: inline-block;
  transform-origin: center;
  animation: footerHeartBeat 1.25s ease-in-out infinite;
}

@keyframes footerHeartBeat {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.2); }
  34% { transform: scale(1.02); }
  48% { transform: scale(1.22); }
  64% { transform: scale(1); }
}

@media (max-width: 1180px) {
  .header-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }

  .logo-wrapper { max-width: 420px; margin: 0 auto; }
  .user-info { justify-content: center; }
  .user-details { align-items: center; }
}

@media (max-width: 768px) {
  .container-table100 { padding: 10px; }
  .cell { padding: 10px 8px; font-size: 13px; }
  .main-title { font-size: 30px; }
}

@media (max-width: 900px) {
  .admin-actions-bar {
    justify-content: stretch;
  }

  .admin-actions-bar .btn-admin-action {
    width: 100%;
    justify-content: center;
  }

  .table {
    display: block;
  }

  .row.header {
    display: none;
  }

  .row.rowhover {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
  }

  .row.rowhover .cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 10px 12px;
    text-align: right;
  }

  .row.rowhover .cell::before {
    content: attr(data-title);
    font-weight: 700;
    color: var(--muted);
    text-align: left;
  }
}
