* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Mono', monospace; font-weight: 400; background: #1a1a1a; color: #d1d5db; min-height: 100vh; }
a { color: #2196F3; text-decoration: none; }
a:hover { text-decoration: underline; color: #1976D2; }
h1 { color: #ffffff; margin-bottom: 16px; }
h2 { color: #ffffff; margin: 20px 0 10px; font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.container { max-width: 1240px; margin: 0 auto; padding: 20px; }
.card { background: #2d2d2d; border-radius: 12px; padding: 20px; margin-bottom: 16px; border: 3px solid #404040; box-shadow: 0 8px 32px rgba(0,0,0,0.4); min-width: 0; overflow: hidden; }
.card-sm { max-width: 450px; margin: 80px auto; }
.card-md { max-width: 700px; margin: 40px auto; }
.card-narrow { max-width: 600px; margin-left: auto; margin-right: auto; }
table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #404040; }
th { background: #2196F3; color: #ffffff; font-weight: 400; text-transform: uppercase; letter-spacing: 0.5px; font-size: 12px; border: none; }
th:first-child { border-top-left-radius: 0; }
th:last-child { border-top-right-radius: 0; }
td { color: #d1d5db; background: #1a1a1a; }
tr:nth-child(even) td { background: #222222; }
tr:hover td { background: #2a2a2a; }
input[type=text], input[type=password], select { background: #1a1a1a; color: #ffffff; border: 2px solid #404040; padding: 10px 12px; border-radius: 8px; width: 100%; margin: 4px 0; font-size: 14px; font-family: 'DM Mono', monospace; transition: all 0.2s ease; }
input:focus, select:focus { outline: none; border-color: #2196F3; background: #222222; }
button, input[type=submit], .btn { background: #2196F3; color: #ffffff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 400; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s ease; font-family: 'DM Mono', monospace; min-height: 40px; }
button:hover, input[type=submit]:hover, .btn:hover { background: #1976D2; color: #ffffff; transform: translateY(-1px); }
.btn-secondary { background: #404040; color: #ffffff; }
.btn-secondary:hover { background: #5a5a5a; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warn { background: #f39c12; color: #1a1a1a; }
.btn-warn:hover { background: #e67e22; }
.btn-success { background: #2ecc71; color: #1a1a1a; }
.btn-success:hover { background: #27ae60; }
.btn-sm { padding: 5px 12px; font-size: 12px; min-height: 32px; }
.btn-block { width: 100%; }
.btn-action { min-width: 110px; }
.status-active { color: #2ecc71; font-weight: bold; }
.status-pending { color: #f39c12; font-weight: bold; }
.status-suspended { color: #e74c3c; font-weight: bold; }
.status-ended { color: #e74c3c; }
label { font-size: 14px; color: #e0e0e0; display: block; margin: 8px 0 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.msg-ok { background: #1a3a1a; border: 2px solid #2ecc71; }
.msg-err { background: #3a1a1a; border: 2px solid #e74c3c; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; margin-bottom: 16px; border-bottom: 2px solid #404040; gap: 16px; }
.brand-link { font-size: 18px; font-weight: 400; color: #2196F3; }
.brand-link:hover { text-decoration: none; color: #7cc4ff; }
.nav-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { padding: 7px 10px; border-radius: 8px; color: #d1d5db; }
.nav-links a:hover { background: #2a2a2a; text-decoration: none; color: #fff; }
.logout-btn { background: none; border: none; color: #e74c3c; cursor: pointer; font: inherit; padding: 7px 10px; min-height: 0; letter-spacing: 0; text-transform: none; }
.logout-btn:hover { background: #2a2a2a; color: #ff8a80; transform: none; }
.nav-link-active { background: #2196F3; color: #fff !important; }
.nav-link-admin { border: 1px solid #404040; }
.page-shell { margin-bottom: 18px; min-width: 0; }
.page-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; min-width: 0; }
.page-hero > div { min-width: 0; }
.eyebrow { color: #7cc4ff; text-transform: uppercase; letter-spacing: 1.2px; font-size: 12px; margin-bottom: 6px; }
.page-copy { color: #9ca3af; max-width: 720px; line-height: 1.6; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.subnav-link { padding: 10px 14px; border-radius: 999px; background: #222222; border: 1px solid #404040; color: #d1d5db; }
.subnav-link:hover { background: #2a2a2a; text-decoration: none; color: #ffffff; }
.subnav-link-active { background: #2196F3; border-color: #2196F3; color: #ffffff; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: linear-gradient(180deg, #2b2b2b 0%, #202020 100%); border: 1px solid #404040; border-radius: 12px; padding: 16px; }
.stat-label { color: #9ca3af; text-transform: uppercase; letter-spacing: 0.8px; font-size: 11px; margin-bottom: 8px; }
.stat-value { color: #ffffff; font-size: 28px; line-height: 1; margin-bottom: 6px; }
.stat-meta { color: #9ca3af; font-size: 12px; }
.page-shell .flip-counter {
  display: inline-flex;
  align-items: flex-start;
  gap: 0;
  margin: 0 0 6px;
}
.page-shell .flip-counter-char {
  position: relative;
  display: inline-block;
}
.page-shell .flip-counter-char.is-digit {
  min-width: 0.62em;
  overflow: hidden;
}
.page-shell .flip-counter-char.is-separator {
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  white-space: pre;
}
.page-shell .flip-counter-sizer {
  display: block;
  color: transparent;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  white-space: pre;
  user-select: none;
  pointer-events: none;
}
.page-shell .flip-counter-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  white-space: pre;
  transition: transform 0.17s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
.page-shell .flip-counter-value.is-current {
  transform: translateY(0);
}
.page-shell .flip-counter-value.is-next {
  transform: translateY(-100%);
}
.page-shell .flip-counter-char.animating .flip-counter-value.is-current {
  transform: translateY(100%);
}
.page-shell .flip-counter-char.animating .flip-counter-value.is-next {
  transform: translateY(0);
}
.page-shell .flip-counter-char.no-transition .flip-counter-value {
  transition: none;
}
.section-card { margin-bottom: 18px; min-width: 0; }
.section-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.empty-state { color: #9ca3af; background: #1a1a1a; border: 1px dashed #404040; border-radius: 10px; padding: 14px; }
.user-shell .page-copy { max-width: 620px; }
.user-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.user-stat-card {
  background: linear-gradient(180deg, #2d2d2d 0%, #232323 100%);
  border: 1px solid #404040;
  box-shadow: inset 0 1px 0 rgba(124, 196, 255, 0.05);
}
.user-stat-value { font-size: 22px; }
.user-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.user-overview-card {
  background: linear-gradient(180deg, #262626 0%, #1f1f1f 100%);
  border: 1px solid #404040;
  border-radius: 10px;
  padding: 14px;
}
.user-overview-value { color: #ffffff; font-size: 14px; line-height: 1.5; }
.user-callout {
  background: #202020;
  border: 1px solid #404040;
  border-left: 3px solid #2196F3;
  color: #d1d5db;
  border-radius: 10px;
  padding: 14px;
}
.user-refresh-note { color: #9ca3af; font-size: 12px; margin: 12px 0 10px; }
.hero { text-align: center; padding: 60px 20px; }
.hero h1 { font-size: 32px; margin-bottom: 12px; color: #ffffff; }
.hero p { color: #9ca3af; font-size: 16px; margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero .btn { margin: 0 8px; padding: 12px 28px; font-size: 16px; }
.form-group { margin-bottom: 12px; }
.inline-form { display: inline; }
#verify-result { margin-top: 12px; }
.info-table th { background: #2196F3 !important; color: #ffffff !important; text-transform: uppercase; letter-spacing: 0.5px; font-size: 12px; font-weight: 400; width: 130px; white-space: nowrap; border-bottom: 1px solid #1a6fb5; border-radius: 0 !important; border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.info-table td { border-bottom: 1px solid #404040; background: #1a1a1a; }
.info-table tr:nth-child(even) td { background: #222222; }
.info-table tr:hover td { background: #2a2a2a; }
.info-table { border-radius: 8px; overflow: hidden; border: 1px solid #404040; margin: 8px 0; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
.table-wrapper, .table-wrap { display: block; width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; border-radius: 8px; border: 1px solid #404040; -webkit-overflow-scrolling: touch; }
.table-wrapper table, .table-wrap table { margin: 0; min-width: 100%; width: max-content; max-width: none; }
.table-wrapper tr:last-child td, .table-wrap tr:last-child td { border-bottom: none; }
td { vertical-align: middle; }
.table-cell-wrap { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.admin-users-table-wrapper { overflow-x: hidden; }
.admin-users-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}
.admin-users-table th,
.admin-users-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) { width: 23%; }
.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) { width: 23%; }
.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) { width: 10%; }
.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4) { width: 14%; }
.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5) { width: 30%; }
.admin-users-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.admin-users-actions .inline-form,
.admin-users-actions > a {
  display: flex;
  width: 100%;
}
.admin-users-actions .user-action-btn {
  width: 100%;
  min-width: 0;
}
.actions-cell { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.section-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-header h1, .section-header h2 { margin: 0; }
.section-header p { margin: 4px 0 0; color: #9ca3af; font-size: 13px; }
.btn-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-toolbar .inline-form { display: inline-flex; }
.btn-toolbar .btn,
.btn-toolbar button,
.btn-toolbar input[type=submit] { min-width: 140px; }
.table-actions { min-width: 260px; }
.user-actions { min-width: 260px; }
.user-actions .inline-form { display: inline-flex; }
.user-action-btn {
  min-width: 92px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #404040 !important;
  color: #ffffff !important;
}
.user-action-btn:hover {
  background: #5a5a5a !important;
}
details { margin-top: 16px; }
summary { cursor: pointer; color: #9ca3af; font-size: 13px; font-family: 'DM Mono', monospace; }
summary:hover { color: #2196F3; }
.pagination { display: flex; gap: 8px; align-items: center; margin: 16px 0; justify-content: center; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.pagination a { background: #404040; color: #fff; }
.pagination a:hover { background: #2196F3; text-decoration: none; }
.pagination .current { background: #2196F3; color: #fff; }
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; align-items: end; flex-wrap: wrap; }
.search-bar input[type=text] { max-width: 300px; }
.search-bar select { background: #1a1a1a; color: #fff; border: 2px solid #404040; padding: 10px 12px; border-radius: 8px; font-family: 'DM Mono', monospace; font-size: 14px; }
.checkbox-group { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.checkbox-group input[type=checkbox] { width: 18px; height: 18px; accent-color: #2196F3; }
.checkbox-group label { margin: 0; text-transform: none; font-size: 14px; }
.text-center { text-align: center; }
.text-muted { color: #9ca3af; }
.lead-sm { font-size: 13px; line-height: 1.6; }
.divider { border: none; border-top: 1px solid #404040; margin: 20px 0; }

/* Mobile */
@media (max-width: 600px) {
  .container { padding: 12px; }
  .card { padding: 14px; }
  .card-sm { margin-top: 40px; }
  .card-md { margin-top: 24px; }
  .hero { padding: 30px 12px; }
  .hero h1 { font-size: 22px; }
  .hero .btn { display: block; margin: 8px 0; }
  .nav { flex-wrap: wrap; gap: 8px; }
  .nav-links { gap: 8px; font-size: 13px; justify-content: flex-start; }
  .nav-links a { padding: 6px 8px; }
  .page-hero { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr; }
  .user-overview-grid { grid-template-columns: 1fr; }
  .subnav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .subnav-link { white-space: nowrap; }
  h1 { font-size: 20px; }
  th, td { padding: 8px 10px; font-size: 12px; }
  .info-table th { width: auto; white-space: normal; }
  .table-wrapper th, .table-wrapper td { white-space: nowrap; }
  .admin-users-table th,
  .admin-users-table td { white-space: normal; }
  .admin-users-table th:nth-child(1),
  .admin-users-table td:nth-child(1),
  .admin-users-table th:nth-child(2),
  .admin-users-table td:nth-child(2),
  .admin-users-table th:nth-child(3),
  .admin-users-table td:nth-child(3),
  .admin-users-table th:nth-child(4),
  .admin-users-table td:nth-child(4),
  .admin-users-table th:nth-child(5),
  .admin-users-table td:nth-child(5) { width: auto; }
  .admin-users-actions { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
  .search-bar input[type=text] { max-width: 100%; }
  .actions-cell { gap: 3px; }
  .btn-toolbar { flex-direction: column; align-items: stretch; }
  .btn-toolbar .btn,
  .btn-toolbar button,
  .btn-toolbar input[type=submit] { width: 100%; min-width: 0; }
  .table-actions { min-width: 0; }
  .user-actions { min-width: 0; }
  .user-action-btn { min-width: 84px; }
  .btn-sm { padding: 4px 8px; font-size: 11px; }
  .pagination { flex-wrap: wrap; }
}
