/* Account pages: sign-in, cloud roster and the game editor.
   Builds on styles.css and pages.css; only what those two do not already give. */

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 26px; margin-bottom: 18px;
}
.panel > h2 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 14px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { font-family: var(--serif); font-size: 1.3rem; margin: 0; }
.panel-head .table-caption { margin: 0; }

/* Messages */
.msg { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.msg.good { background: #e7f6ec; color: #14532d; border: 1px solid #b7e2c6; }
.msg.bad  { background: #fdecea; color: #8a1c11; border: 1px solid #f5c3bd; }
.msg.note { background: #fff4ec; color: #7c3a12; border: 1px solid #ffd5bb; font-weight: 500; }

/* Fields */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 700; color: #475569; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 13px;
  border: 1px solid #cdd1d8; border-radius: 9px; background: #fff;
  font: inherit; font-size: 15px; color: var(--ink);
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid #b92b00; outline-offset: 2px; border-color: #b92b00;
}
.field.short input { max-width: 140px; }
.field.check { display: flex; align-items: flex-start; gap: 11px; }
.field.check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: 0 0 20px; accent-color: var(--orange); }
.field.check > span { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.field.check strong { display: block; font-size: 14px; font-weight: 700; }
.field.check small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); font-weight: 400; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 26px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 22px; }
@media (max-width: 820px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* Sign-in */
.signin { max-width: 430px; margin: 0 auto; }
.signin .button { width: 100%; margin-top: 6px; }
.signin .hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.signin-help { max-width: 430px; margin: 16px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.signin-help a { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.signin-help a:hover { color: var(--orange); }
@media (max-width: 480px) { .signin-help { flex-direction: column; align-items: center; gap: 10px; } }

/* Team tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tile { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--orange); transform: translateY(-2px); text-decoration: none; }
.tile .team-badge { width: 42px; height: 42px; font-size: 27px; flex: 0 0 42px; }
.tile-body { flex: 1; min-width: 0; }
.tile-body strong { display: block; font-size: 15px; font-weight: 700; }
.tile-body span { display: block; font-size: 12.5px; color: var(--muted); }
.tile .go { width: 17px; height: 17px; color: var(--muted); flex: 0 0 17px; }

/* Editable tables */
.stats-table.editor th, .stats-table.editor td { padding: 7px 6px; vertical-align: middle; }
.stats-table.editor input[type=text], .stats-table.editor input[type=number], .stats-table.editor input[type=date], .stats-table.editor input[type=time], .stats-table.editor select {
  width: 100%; min-height: 40px; padding: 7px 9px;
  border: 1px solid #cdd1d8; border-radius: 8px; background: #fff;
  font: inherit; font-size: 14px; color: var(--ink);
}
.stats-table.editor input:focus-visible, .stats-table.editor select:focus-visible {
  outline: 3px solid #b92b00; outline-offset: 1px; border-color: #b92b00;
}
.stats-table.editor .col-num { width: 92px; }
.stats-table.editor .col-date { width: 152px; }
.stats-table.editor .col-time { width: 118px; }
.stats-table.editor .col-loc { width: 150px; }
.stats-table.editor .col-pos { width: 140px; }
.stats-table.editor .col-team { width: 165px; }
.stats-table.editor .col-per { width: 128px; }
.stats-table.editor .col-act { width: 44px; }
.stats-table.editor tbody tr:first-child { background: transparent; }
.row-del {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 19px; line-height: 1; color: #94a3b8; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.row-del:hover { border-color: #e11d48; color: #e11d48; background: #fff5f6; }

.button.button-quiet { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.button.button-quiet:hover { border-color: var(--orange); color: var(--orange); background: #fff; }
.button.button-ghost-dark { background: var(--ink); color: #fff; box-shadow: none; }
.button.button-ghost-dark:hover { background: #000; }
.button.small { min-height: 40px; padding: 8px 16px; font-size: 13px; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 22px; }
.progress-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.progress-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.progress-list li .status-tag { vertical-align: middle; margin-left: 4px; }
.empty-note { margin: 0; color: var(--muted); font-size: 14.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.stats-table td.right { text-align: right; }

/* Row actions (the Score / Edit / View links and the Delete button): links and
   buttons share one box, so they sit on the same line at the same height. */
.link-btn, button.link-btn {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  min-height: 30px; margin: 0; padding: 0 12px;
  border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: #fff !important;
  font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  cursor: pointer; appearance: none; -webkit-appearance: none;
}
.link-btn:hover { background: #000; border-color: #000; text-decoration: none; }
.link-btn.ghost { background: #fff; color: var(--ink) !important; border-color: var(--line); margin-left: 5px; }
.link-btn.ghost:hover { border-color: var(--orange); color: var(--orange) !important; }
.inline-form { display: inline-block; vertical-align: middle; white-space: nowrap; }
.link-btn.danger { background: #fff; color: #b91c1c !important; border-color: #f5c3bd; margin-left: 5px; }
.link-btn.danger:hover { background: #fdecea; border-color: #b91c1c; color: #7f1d1d !important; }

/* Tournament details: locked until Edit */
.cloud-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.cloud-fields[disabled] input, .cloud-fields[disabled] select, .cloud-fields[disabled] textarea { background: #f6f6f3; border-color: #e6e8ec; color: #3b4453; cursor: default; }
.cloud-fields[disabled] input[type=checkbox] { opacity: .7; }
.cloud-actions { margin: 6px 0 0; }

/* Import / export controls on the team page */
.io-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.file-btn { cursor: pointer; position: relative; }
.file-btn:focus-within { outline: 3px solid #b92b00; outline-offset: 2px; }
[data-import-note] { margin-top: 0; }

/* Per-side blocks in the game editor */
.side-block { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.side-label { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.shots { border: 0; margin: 0 0 12px; padding: 0; }
.shots legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #475569; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; }
.shots legend { width: 100%; }
.shots label { flex: 1 1 60px; min-width: 60px; }
.shots label span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.shots input { width: 100%; min-height: 40px; padding: 7px 8px; border: 1px solid #cdd1d8; border-radius: 8px; font: inherit; font-size: 14px; text-align: center; }

/* Remove-team row */
.danger { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 26px; padding-top: 6px; }
.link-danger { border: 0; background: none; padding: 0; font: inherit; font-size: 13.5px; font-weight: 700; color: #b91c1c; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-danger:hover { color: #7f1d1d; }
.danger span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 740px) {
  .panel { padding: 18px 15px; }
  .stats-table.editor .col-num { width: 74px; }
  .stats-table.editor .col-pos { width: 110px; }
}

/* Text pages (info2.php): About, Privacy, Contact */
.prose { max-width: 760px; line-height: 1.6; font-size: 16px; }
.prose h2 { font-family: var(--serif); font-size: 1.25rem; margin: 26px 0 8px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 22px; }
.prose a:not(.button) { color: var(--orange); font-weight: 600; }
