﻿* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 40px;
  background: #f4f6f8;
  color: #333;
}

h1, h2, h3 {
  color: #2c3e50;
}

.top-bar {
position: sticky;
top: 0;
z-index: 100;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(4px);
padding: 0 16px; /* remove vertical padding */
border-bottom: 1px solid #ddd;
height: 72px; /*  ensure the full height fits the 60px logo + breathing room */
}

.top-bar-inner {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1400px;
margin: 0 auto;
height: 100%; /*  match parent height */
gap: 20px;
}

.logo {
height: 150px;
max-height: 150px;
vertical-align: left;
}

.datetime-display {
flex-shrink: 0;
font-size: 14px;
background: #ecf0f1;
padding: 6px 12px;
border-radius: 8px;
color: #2c3e50;
}

.ticker-container {
flex: 1;
overflow: hidden;
white-space: nowrap;
background: none;
border: none;
padding: 0;
font-size: 14px;
color: #2c3e50;
position: relative;
}

.ticker-wrapper {
overflow: hidden;
width: 100%;
}

.ticker-text {
display: inline-block;
padding-left: 100%;
animation: ticker-scroll 25s linear infinite;
vertical-align: middle;
line-height: 1.2;
white-space: nowrap;
}

@keyframes ticker-scroll {
from { transform: translateX(0); }
to { transform: translateX(-100%); }
}
.ticker-text:hover {
animation-play-state: paused;
}


.tabs {
margin-top: 20px;
}

.tab-buttons {
display: flex;
gap: 10px;
margin-bottom: 20px;
}

.tab-btn {
background: #e0e0e0;
border: none;
padding: 10px 20px;
font-weight: 600;
border-radius: 6px;
cursor: pointer;
transition: background 0.2s ease;
}

.tab-btn.active {
background: #3498db;
color: white;
}

.tab-btn:hover {
background: #2980b9;
color: white;
}

.tab-content {
display: block;
}

#summaryDisplay {
font-size: 16px;
line-height: 1.6;
}

#summaryDisplay .success {
color: #2ecc71;
font-weight: bold;
}

#summaryDisplay .warning {
color: #f39c12;
}

#summaryDisplay .error {
color: #e74c3c;
}

#toggleRawJsonBtn {
background-color: #eee;
color: #333;
border: 1px solid #ccc;
margin-top: 15px;
padding: 6px 12px;
font-size: 14px;
border-radius: 4px;
cursor: pointer;
}

#toggleRawJsonBtn:hover {
background-color: #ddd;
}

.hidden {
display: none;
}


.section {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 30px;
  transition: all 0.3s ease-in-out;
}

label {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}

select, input[type="file"], textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

button {
  background-color: #3498db;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.2s ease;
}

button:hover {
  background-color: #2980b9;
}

input[type="radio"] {
  margin-right: 8px;
}

.mapping-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

.mapping-row label {
  flex: 1;
  margin-right: 15px;
}

.map-button {
background-color: #3498db;
color: white;
padding: 6px 12px;
text-decoration: none;
border-radius: 6px;
font-size: 14px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}



.section {
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
padding: 20px;
margin-bottom: 30px;
transition: all 0.3s ease-in-out;
}

.section-toggle {
overflow: hidden;
max-height: 0;
opacity: 0;
transition: max-height 0.5s ease, opacity 0.3s ease;
pointer-events: none;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
}

.section-toggle.active {
max-height: 3000px;
opacity: 1;
pointer-events: auto;
margin-bottom: 30px;
padding-top: 20px;
padding-bottom: 20px;
}
.table-container {
overflow-x: auto;
margin-top: 20px;
}

table {
width: 100%;
border-collapse: collapse;
font-family: 'Inter', sans-serif;
}

th, td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e0e0e0;
}

.status {
padding: 4px 10px;
border-radius: 20px;
font-weight: 600;
display: inline-block;
}

.status.Live {
color: #2e7d32;
background-color: #d0f0d3;
}

.status.Upcoming {
color: #b36b00;
background-color: #ffe0b3;
}

.status.Closed {
color: #a94442;
background-color: #f2dede;
}

.mapping-row select {
  flex: 2;
}

#progressContainer {
  margin-top: 15px;
}

progress {
  width: 100%;
  height: 20px;
}

pre {
  background-color: #eef1f5;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
}

@media (max-width: 600px) {
  .mapping-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .mapping-row label, .mapping-row select {
    width: 100%;
  }
}

/* ───────── Shortcuts tab tweaks ───────── */
.shortcut-card {
background: #fff;
border: 1px solid #d9dee4;
border-radius: 12px;
padding: 18px 22px;
margin-top: 14px;
box-shadow: 0 2px 6px rgba(0,0,0,.04);
}

/* nice two‑column grid for lots of params */
.shortcut-card form,
#shortcutForm {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 14px 20px;
}

/* form labels & inputs */
.shortcut-card label {
display: block;
font-weight: 600;
margin-bottom: 4px;
}

.shortcut-card input {
width: 100%;
padding: 6px 8px;
border: 1px solid #ccd2d8;
border-radius: 6px;
font-size: 14px;
}

/* buttons */
.shortcut-card button {
background: #0073e6;
color: #fff;
border: none;
padding: 8px 16px;
border-radius: 6px;
font-size: 14px;
cursor: pointer;
transition: background .15s;
margin-right: 8px;
}

.shortcut-card button[disabled] {
background: #9ab3cc;
cursor: not-allowed;
}

.shortcut-card button:hover:not([disabled]) {
background: #0059b8;
}

/* SQL preview */
#sqlPreview {
background: #f7f8fa;
border: 1px solid #e3e6ea;
border-radius: 8px;
padding: 12px;
font-size: 13px;
overflow-x: auto;
margin-top: 10px;
}

/* result line */
#shortcutResult {
font-weight: 600;
margin-top: 10px;
}
#shortcutResult.success { color: #2a9d57; }
#shortcutResult.error   { color: #d43c3c; }

/* ───────── Create Project form tidy layout ───────── */
#tab-create .section > div {
display: grid;
grid-template-columns: 220px 1fr; /* fixed label column + flexible input column */
align-items: center;
gap: 8px 16px;
margin-bottom: 12px;
}

#tab-create .section > div > label {
margin: 0; /* grid handles spacing */
}

#tab-create .section input[type="text"],
#tab-create .section input[type="url"],
#tab-create .section input[type="number"],
#tab-create .section input[type="file"],
#tab-create .section textarea,
#tab-create .section select {
width: 100%;
margin: 0;
}

#tab-create .section textarea {
min-height: 120px; /* comfortable notes box */
}

/* align the primary action button with the inputs */
#tab-create .section button {
margin-left: 1px; /* same as label column width */
}

/* Responsive: stack labels above inputs on narrow screens */
@media (max-width: 700px) {
#tab-create .section > div {
grid-template-columns: 1fr;
}
#tab-create .section button {
margin-left: 0;
width: 100%;
}
}