/* ============================================================
   Keepitcloud — Upload Page Styles
   ============================================================ */

:root {
  --accent: #6c63ff;
  --accent-hover: #574fd6;
  --bg: #f7f8fc;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Screens ---- */

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
}

.screen.active {
  display: flex;
}

/* ---- Loading ---- */

#screen-loading {
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

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

.page-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-logo {
  height: 36px;
  max-width: 160px;
  object-fit: contain;
}

.header-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.header-sep {
  color: var(--border);
  font-size: 20px;
}

.header-partner-name {
  font-size: 14px;
  color: var(--text-muted);
}

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

.main-content {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- Card ---- */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
}

.center-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.icon-lg {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 4px;
}

.success-icon {
  animation: pop 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes pop {
  0%   { transform: scale(0.5); opacity: 0; }
  80%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- Event info ---- */

.event-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.event-date {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---- Drop zone ---- */

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
}

.drop-zone-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.drop-zone-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.drop-zone-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- File list ---- */

.file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.file-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-size {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.file-item-status {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-muted);
}

.file-item-status.uploading { color: var(--accent); }
.file-item-status.done      { color: var(--success); }
.file-item-status.error     { color: var(--error); }

.file-bar-track {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.file-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.2s;
}

.file-bar-fill.done  { background: var(--success); }
.file-bar-fill.error { background: var(--error); width: 100%; }

.file-item-remove {
  grid-column: 2;
  grid-row: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.file-item-remove:hover { color: var(--error); }

/* ---- Overall progress ---- */

.overall-progress {
  margin-top: 16px;
}

.overall-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.overall-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s;
}

.overall-progress-text {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  text-align: center;
}

/* ---- Buttons ---- */

.btn-primary {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary:hover  { background: var(--accent-hover); }
.btn-primary:active { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  margin-top: 8px;
  padding: 12px 24px;
  background: none;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover { background: rgba(108, 99, 255, 0.07); }

/* ---- Form ---- */

input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 8px;
}

input[type="password"]:focus {
  border-color: var(--accent);
}

.error-msg {
  color: var(--error);
  font-size: 13px;
  margin-bottom: 8px;
}

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

.page-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.page-footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer-partner-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 6px;
}

.footer-partner-social a {
  font-size: 13px;
  font-weight: 500;
}

/* ---- Utilities ---- */

.hidden { display: none !important; }

h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- Upload card layout ---- */

.upload-card {
  display: flex;
  flex-direction: column;
}

/* ---- Responsive ---- */

@media (max-width: 360px) {
  .card { padding: 20px 16px; }
  .drop-zone { padding: 28px 12px; }
}
