/* public/css/styles.css */

/* ----------------------------------------------------------
   GENERIC / GLOBAL
---------------------------------------------------------- */

html,
body {
  height: 100%;
}

/* Generic */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050616;
  color: #ffffff;
}

a {
  color: #66ccff;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.container-narrow {
  max-width: 480px;
}

.header,
.admin-header {
  background: #0b1024;
  padding: 16px 20px;
  border-bottom: 1px solid #222;
}

.header h1,
.admin-header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: #ccc;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.admin-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Forms (generic/admin) */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #333;
  background: #06091a;
  color: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-actions {
  margin-top: 16px;
}

.checkbox-group label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 3px;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: #e46b3e;
  color: #fff;
}

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

/* Alerts */
.alert {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-error {
  background: #4a1111;
  border: 1px solid #ff6666;
}

/* Stats */
.stats {
  display: flex;
  gap: 16px;
  margin: 20px 0;
}

.stat-card {
  background: #0b1024;
  border-radius: 6px;
  padding: 12px 16px;
}

.stat-value {
  font-size: 1.6rem;
  margin: 4px 0 0;
}

/* Table */
.table-section {
  margin-top: 20px;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.table-controls input {
  max-width: 260px;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid #222;
}

th {
  background: #0b1024;
  cursor: pointer;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: #050818;
}

tbody tr:hover {
  background: #101531;
}


/* ----------------------------------------------------------
   SUBMISSION PAGE
---------------------------------------------------------- */

.page-submission {
  /* remove flex layout */
  /* display: flex;
  flex-direction: column; */

  min-height: 100vh;
  margin: 0;
  font-family: "Lekton", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f6f6f9;
  background:
    radial-gradient(circle at top right, rgba(227, 115, 213, 0.35), transparent 55%),
    radial-gradient(circle at top left, rgba(88, 131, 255, 0.35), transparent 55%),
    linear-gradient(180deg, #06051c 0%, #020213 60%, #02010b 100%);
  position: relative;
  overflow-x: hidden;
}


.aa-background-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url('/img/bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  mix-blend-mode: screen;
  z-index: -1;
}

/* Header -------------------------------------------------- */

.aa-header {
  padding: 16px 40px;
}

.aa-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aa-logo {
  height: 26px;
  width: auto;
  display: block;
}

.aa-header-pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(6, 6, 22, 0.6);
  backdrop-filter: blur(10px);
}

/* Main panel --------------------------------------------- */

.aa-main {
  /* flex: 1 0 auto;  <-- remove this */
  display: flex;
  justify-content: center;
  padding: 16px 20px 24px; /* slightly smaller bottom padding */
}

.aa-submission-panel {
  width: 100%;
  max-width: 960px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 55%),
    rgba(5, 5, 18, 0.9);
  border-radius: 10px;
  padding: 32px 40px 32px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
  .aa-submission-panel {
    padding: 24px 18px 28px;
  }
}

/* Back link ---------------------------------------------- */

.aa-back-link {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 18px;
  text-decoration: none;
}

.aa-back-link:hover {
  color: #ffffff;
}

/* Typography --------------------------------------------- */

.aa-title {
  font-size: 28px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 14px;
}

.aa-intro {
  font-size: 14px;
  color: rgba(243, 243, 248, 0.8);
  margin: 0 0 20px;
}

/* Download button ---------------------------------------- */

.aa-download-btn {
  display: inline-block;
  border-radius: 3px;
  background: #2875ff;
  border: none;
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 24px;
  cursor: pointer;
  margin-top: 8px;
}

.aa-download-btn:hover {
  background: #3c86ff;
}

.aa-download-caption {
  font-size: 12px;
  color: rgba(230, 230, 245, 0.7);
  margin-top: 8px;
}

/* File section ------------------------------------------- */

.aa-file-row {
  margin-top: 30px;
}

/* Field labels ------------------------------------------- */

.aa-field-label,
.aa-label-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.aa-label-sub {
  font-size: 11px;
  color: rgba(220, 220, 240, 0.7);
  margin-bottom: 8px;
}

.aa-required {
  color: #ff5c5c;
}

/* Let Bootstrap style inputs, we just tint background */
.submission-form .form-control,
.submission-form .form-select {
  background-color: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f5f5ff;
  font-size: 13px;
}

.submission-form .form-control::placeholder {
  color: rgba(200, 200, 230, 0.6);
}

/* Checkboxes --------------------------------------------- */

.aa-checkbox .form-check-input {
  margin-top: 4px;
  margin-right: 8px;
  border-radius: 3px;
}

.aa-checkbox .form-check-label {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(233, 233, 248, 0.95);
}

.aa-checkbox a {
  color: #ffffff;
  text-decoration: underline;
}

/* Submit button ------------------------------------------ */

.aa-form-actions {
  text-align: right;
}

.aa-submit-btn {
  border: 1px solid #ffffff;
  background: transparent;
  color: #ffffff;
  padding: 10px 30px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
}

.aa-submit-btn:hover {
  background: #ffffff;
  color: #050515;
}


.aa-submit-again-btn {
  display: inline-block;
  border: 1px solid #ffffff;
  background: transparent;
  color: #ffffff;
  padding: 10px 30px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
}

.aa-submit-again-btn:hover {
  background: #ffffff;
  color: #050515;
}




/* Footer ------------------------------------------------- */

.aa-footer {
  /* flex-shrink: 0;  <-- remove this */
  padding: 10px 20px 18px;
  font-size: 11px;
  color: rgba(230, 230, 245, 0.7);
}

.aa-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.aa-footer-links a {
  margin-left: 18px;
  color: rgba(230, 230, 245, 0.8);
  text-decoration: none;
}

.aa-footer-links a:hover {
  text-decoration: underline;
}

/* Reserve space for reCAPTCHA so footer doesn't jump */
.recaptcha-wrapper {
  min-height: 90px;        /* enough for the recaptcha box */
  display: flex;
  align-items: center;     /* vertically center the widget inside that space */
}

/* Optional: keep widget left-aligned */
.recaptcha-wrapper .g-recaptcha {
  transform: scale(1);     /* you can tweak if you want it slightly smaller */
  transform-origin: left top;
}



.aa-file-preview {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.aa-file-preview-remove {
  position: absolute;
  top: 4px;
  right: 6px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.aa-file-preview-remove:hover {
  color: #ffffff;
}

.aa-file-preview-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.aa-file-preview-icon {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.aa-file-preview-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.aa-file-preview-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.aa-file-preview-size {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}


.aa-file-error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #ff6b6b;
}

.aa-file-error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #ff6b6b;
}

.aa-input-error {
  border-color: #ff6b6b !important;
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.4);
}

.alert.alert-error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.7);
  color: #ff6b6b;
  border-radius: 6px;
  font-size: 0.9rem;
}