/* MotoGymkhana Croatia look & feel override for subfolder app
   - Drop this file into /promo/assets/mgc-theme.css
   - Link it AFTER your existing style.css so it overrides defaults.
   - Fonts: Montserrat (headings), Inter (body) via Google Fonts.
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Montserrat:wght@600;800&display=swap');

:root {
  --mgc-red: #E10600;
  /* brand red */
  --mgc-orange: #FF4D00;
  /* cone orange accent */
  --mgc-dark: #0f1115;
  /* near-black text */
  --mgc-mid: #22252a;
  --mgc-muted: #6b7280;
  --mgc-border: #e6e8ee;
  --mgc-bg: #f5f7fb;
  --mgc-card: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 17, 21, 0.08);
}

/* Base */
html,
body {
  color: var(--mgc-dark);
  background: var(--mgc-bg);
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

h1,
h2,
h3 {
  font-family: Montserrat, Inter, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--mgc-mid);
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 22px;
  text-transform: uppercase;
}

h3 {
  font-size: 18px;
  text-transform: uppercase;
}

/* Section headline style reminiscent of "ŠKOLA. SIGURNE. VOŽNJE." */
h1 span.dot,
h2 span.dot,
.eyebrow span.dot {
  color: var(--mgc-red);
}

.eyebrow {
  font-family: Montserrat, sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--mgc-mid);
}

.eyebrow .sep {
  color: var(--mgc-red);
  padding: 0 .15em;
}

/* Containers & cards */
.container {
  max-width: 1200px;
}

.card,
.table-wrap {
  border-radius: var(--radius);
  background: var(--mgc-card);
  box-shadow: var(--shadow);
  border: 1px solid var(--mgc-border);
}

header .controls {
  gap: 10px;
}

/* Buttons & links */
button,
.btn-secondary,
.btn-small,
.admin-link {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

button,
.admin-link {
  background: var(--mgc-red);
  color: #fff;
}

button:hover,
.admin-link:hover {
  filter: brightness(0.95);
}

.btn-secondary {
  background: #30343a;
  color: #fff;
}

.btn-secondary:hover {
  filter: brightness(1.1);
}

.btn-small {
  background: var(--mgc-red);
  color: #fff;
}

.btn-small.danger {
  background: #b91c1c;
}

a.admin-link.danger {
  background: #b91c1c;
}

/* Selects & inputs */
select,
input[type="text"],
input[type="password"] {
  border-radius: 10px;
  border: 1px solid var(--mgc-border);
  background: #fff;
}

select:focus,
input:focus {
  outline: 2px solid rgba(225, 6, 0, .25);
  border-color: var(--mgc-red);
}

/* Table */
table {
  border-collapse: collapse;
}

th {
  background: #fff;
  color: var(--mgc-mid);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

thead tr {
  border-bottom: 3px solid var(--mgc-red);
}

tr:hover {
  background: #fff9f8;
}

td,
th {
  border-bottom: 1px solid var(--mgc-border);
}

/* Pills for header links */
header .admin-link {
  border-radius: 999px;
  background: var(--mgc-red);
}

header .admin-link+.admin-link {
  background: #30343a;
}

/* Alerts */
.alert.success {
  background: #edfdf4;
  color: #065f46;
  border-color: #a7f3d0;
}

.alert.error {
  background: #fff2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Modal */
.modal-card {
  border-radius: 18px;
}

.modal-header {
  border-bottom: none;
  position: relative;
  padding-top: 20px;
}

.modal-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--mgc-red), var(--mgc-orange));
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.modal-close {
  color: var(--mgc-mid);
}

.modal-actions button {
  box-shadow: 0 5px 14px rgba(225, 6, 0, .2);
}

/* Public page header */
header h1 {
  display: flex;
  gap: .25em;
  align-items: baseline;
}

header h1 .sep {
  color: var(--mgc-red);
}

/* Footer note */
footer.small p strong {
  color: var(--mgc-red);
}

/* Live accent for selected sort */
.controls select {
  font-weight: 700;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--mgc-red) 50%),
    linear-gradient(135deg, var(--mgc-red) 50%, transparent 50%);
  background-position: calc(100% - 15px) calc(1em + 2px), calc(100% - 10px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Badges for table rank (first column) */
table tr td:first-child {
  font-weight: 800;
  color: var(--mgc-mid);
}

table tr:nth-child(1) td:first-child {
  color: var(--mgc-red);
}

table tr:nth-child(2) td:first-child {
  color: var(--mgc-orange);
}

table tr:nth-child(3) td:first-child {
  color: #ff8c42;
}

/* Make forms breathe a bit more */
.grid {
  gap: 16px;
}

label {
  font-weight: 600;
  color: var(--mgc-mid);
}