/* +live! pilot — miuticket 本体 LP 寄せ */
@import url("https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800&display=swap");

:root {
  --miu-brand-teal: #45b5ad;
  --miu-brand-ink: #1a1a1a;
  --bg-color: #f7fbfb;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --primary-color: #45b5ad;
  --primary-hover: #24827d;
  --danger-color: #ef4444;
  --border-color: #d9e8e6;
  --success-color: #10b981;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --header-bg: rgba(255, 255, 255, 0.92);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "M PLUS Rounded 1c", "Hiragino Sans", sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body > main {
  flex: 1;
}

a {
  color: var(--primary-hover);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.25rem;
}

.site-header .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 0;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 1;
}

.logo a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  line-height: 1;
}

.logo picture {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
}

.logo-text-wrap {
  display: inline-flex;
  align-items: center;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.logo-mark {
  color: var(--primary-color);
}

.logo-text {
  color: var(--miu-brand-ink);
}

.logo-plus {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -0.2rem;
  padding: 0.3rem 0.62rem 0.32rem 0.55rem;
  border: 1.5px solid var(--primary-color);
  background: transparent;
  color: var(--primary-hover);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  border-radius: 1.1rem;
}

/* しっぽの枠（左・やや上、潰れない比率） */
.logo-plus::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 52%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 4px 6px 4px 0;
  border-color: transparent var(--primary-color) transparent transparent;
}

/* しっぽの内側（ヘッダ背景色） */
.logo-plus::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 52%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 3px 4px 3px 0;
  border-color: transparent #fff transparent transparent;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: #fff;
  padding: 1.75rem 1.25rem 2rem;
}

.site-footer .footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
}

.footer-menu a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-menu a:hover {
  color: var(--primary-hover);
}

.site-footer .footer-copy {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

@media (max-width: 767px) {
  .logo-text-wrap {
    font-size: 1.25rem;
  }

  .logo img {
    height: 32px;
  }

  .logo-plus {
    margin-left: -0.12rem;
    padding: 0.24rem 0.5rem 0.26rem 0.45rem;
    font-size: 0.78rem;
    border-radius: 0.95rem;
  }

  .logo-plus::before {
    left: -5px;
    top: 52%;
    border-width: 3px 5px 3px 0;
  }

  .logo-plus::after {
    left: -3px;
    top: 52%;
    border-width: 2px 3px 2px 0;
  }
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}

.login-container {
  max-width: 420px;
  margin: 3rem auto;
}

.card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-label .miu-req {
  color: #b91c1c;
  font-weight: 600;
  text-decoration: none;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
}

.form-control:focus {
  outline: 2px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  border-color: var(--primary-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  border: 1px solid var(--border-color);
  background: #fff;
}

.btn-secondary:hover {
  background: var(--bg-color);
}

.btn-danger {
  background: #fff;
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

.btn-block {
  width: 100%;
}

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

.text-sm {
  font-size: 0.875rem;
}

.text-muted {
  color: var(--text-secondary);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

#err,
.pilot-err {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  display: none;
}

.pilot-err.is-visible,
#err.is-visible {
  display: block;
}

.pilot-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.pilot-banner code {
  font-size: 0.8em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-pill[data-status="idle"] {
  background: #f1f5f9;
  color: #475569;
}

.status-pill[data-status="live"] {
  background: #fef2f2;
  color: #b91c1c;
}

.status-pill[data-status="ended"] {
  background: #ecfdf5;
  color: #047857;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-meta {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.admin-meta li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
}

.admin-meta strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.hub-grid {
  display: grid;
  gap: 1rem;
}

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

.hub-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.hub-card-link:hover .card {
  border-color: var(--primary-color);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.switch-row label {
  font-size: 0.9rem;
  font-weight: 600;
}

.qa-admin-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.qa-admin-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  background: #f8fafc;
}

.qa-admin-item p {
  margin: 0.5rem 0 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.qa-admin-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.ticket-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.ticket-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-start;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}
.ticket-item.is-revoked {
  opacity: 0.6;
}
.admin-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.event-head {
  margin-bottom: 1rem;
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: -1px;
}

.admin-tab.is-active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

textarea.form-control {
  min-height: 4.5rem;
  resize: vertical;
}

.mb-0 {
  margin-bottom: 0;
}
