:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #162032;
  --muted: #667085;
  --line: #dce3ec;
  --blue: #0a84ff;
  --blue-dark: #0065d0;
  --green: #168a4a;
  --red: #c63b3b;
  --shadow: 0 20px 60px rgba(32, 44, 70, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #ffffff 0, rgba(255, 255, 255, 0) 280px),
    var(--bg);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.logos-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 20px;
}

.partner-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 400px) {
  .logos-bar {
    gap: 20px;
  }
  .partner-logo {
    height: 21px;
  }
}


.upload-panel,
.admin-panel,
.login-panel {
  background: var(--panel);
  border: 1px solid rgba(220, 227, 236, 0.8);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.brand-row,
.admin-header,
.progress-label,
.table-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef6ff;
  color: #075fb8;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}

.upload-form,
.login-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #344054;
  font-size: 15px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--text);
  padding: 14px 15px;
  font-size: 17px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14);
}

.field input.is-invalid {
  border-color: var(--red);
  background: #fff8f8;
}

.field input.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(198, 59, 59, 0.18);
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  border: 1px dashed #b8c5d8;
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.file-picker strong,
.file-picker small {
  display: block;
}

.file-picker strong {
  font-size: 17px;
}

.file-picker small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.file-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.file-meta {
  color: var(--muted);
  font-size: 13px;
}

.file-exif-warning {
  margin-top: 2px;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.file-item.has-exif-warning {
  border-color: rgba(198, 59, 59, 0.35);
  background: #fff8f8;
}

.exif-global-warning {
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(198, 59, 59, 0.24);
  background: #fff1f1;
  color: var(--red);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}

.progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(32, 44, 70, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.progress-modal {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  width: min(100%, 420px);
  padding: 24px;
  display: grid;
  gap: 16px;
  animation: scaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.progress-warning {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
  background: rgba(10, 132, 255, 0.05);
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(10, 132, 255, 0.1);
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.spinning-gear {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  align-self: center;
  animation: spin 2.5s linear infinite;
  display: block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.1s linear;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.message {
  display: none;
  border-radius: 8px;
  padding: 13px 14px;
  line-height: 1.4;
}

.message-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-icon {
  flex: 0 0 20px;
}

.message-text {
  font-weight: 700;
}

.message.is-visible {
  display: block;
}

.message.success {
  border: 1px solid rgba(22, 138, 74, 0.28);
  background: #effaf3;
  color: var(--green);
}

.message.error {
  border: 1px solid rgba(198, 59, 59, 0.24);
  background: #fff1f1;
  color: var(--red);
}

.primary-button,
.secondary-button,
.danger-button,
.link-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  background: var(--blue);
  color: #fff;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.secondary-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef3f9;
  color: #25364d;
}

.danger-button {
  background: #fff1f1;
  color: #b42318;
}

.admin-shell {
  width: min(100%, 1120px);
}

.admin-panel {
  padding: 18px;
}

.admin-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: #f7f9fc;
  color: #475467;
  font-size: 13px;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

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

.notice {
  margin-top: 16px;
  border-radius: 8px;
  background: #eef6ff;
  color: #075fb8;
  padding: 12px 14px;
}

@media (max-width: 560px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .upload-panel,
  .admin-panel,
  .login-panel {
    padding: 18px;
  }

  h1 {
    font-size: 30px;
  }

  .brand-row,
  .admin-header {
    align-items: flex-start;
  }
}

#closeProgressButton {
  background: #ffffff;
  border: 1px solid #d0d5dd;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  color: #344054;
  font-weight: 700;
  transition: all 0.15s ease;
}

#closeProgressButton:hover {
  background: #f9fafb;
  border-color: #b2bbc8;
  color: #1d2939;
}
