/* PDP - Photo Delivery Platform */
/* Matching AC Review / portal.acmedia.cloud design language */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f9fafb;
  --bg-hover: #f9fafb;
  --border: #e5e7eb;
  --border-subtle: rgba(0,0,0,0.08);
  --text: #000000;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #000000;
  --accent-hover: #1f2937;
  --green: #15803d;
  --green-bg: #f0fdf4;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --yellow: #b45309;
  --yellow-bg: #fffbeb;
  --blue: #1d4ed8;
  --blue-bg: #eff6ff;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

html, body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #1e40af; }

/* Layout */
.container { max-width: 768px; margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 1024px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) {
  .container, .container-wide { padding: 0 24px; }
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.header h1 {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.header-right { display: flex; align-items: center; gap: 16px; }
.header .user-info { color: var(--text-secondary); font-size: 14px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  height: 36px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger { background: var(--red); color: #ffffff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 4px 12px; height: 32px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
input[type="text"], input[type="password"], input[type="email"],
input[type="number"], textarea, select {
  width: 100%;
  padding: 0 12px;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea {
  resize: vertical;
  min-height: 80px;
  height: auto;
  padding: 10px 12px;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 32px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
}
.card-clickable { cursor: pointer; transition: background-color 0.15s; }
.card-clickable:hover { background: var(--bg-hover); }

/* Login */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 384px;
}
.login-box h1 {
  text-align: center;
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.login-box .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}
.login-box .btn { width: 100%; justify-content: center; height: 44px; font-size: 14px; }
.login-error {
  background: var(--red-bg);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge-assigned { background: var(--blue-bg); color: var(--blue); }
.badge-uploading { background: var(--yellow-bg); color: var(--yellow); }
.badge-delivered { background: var(--green-bg); color: var(--green); }
.badge-verified { background: var(--green-bg); color: var(--green); }
.badge-failed { background: var(--red-bg); color: var(--red); }
.badge-pending { background: var(--yellow-bg); color: var(--yellow); }

/* Job list */
.job-card { display: flex; align-items: center; justify-content: space-between; }
.job-card-left h3 { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.job-card-left .job-meta { font-size: 13px; color: var(--text-secondary); }
.job-card-right { text-align: right; }
.job-card-right .file-count { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Job detail */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }
.job-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.job-header h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.job-description { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.section-title { font-size: 14px; font-weight: 500; margin-bottom: 12px; color: var(--text); }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 600px) { .notes-grid { grid-template-columns: 1fr; } }
.notes-actions { display: flex; justify-content: flex-end; margin-bottom: 24px; }

/* Drop zone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  margin-bottom: 24px;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--bg-input);
}
.dropzone-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.4; }
.dropzone h3 { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.dropzone p { font-size: 13px; color: var(--text-secondary); }
.dropzone.disabled { opacity: 0.4; pointer-events: none; }

/* File list */
.file-list { margin-bottom: 24px; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.file-item:last-child { border-bottom: none; }
.file-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-path { color: var(--text-muted); margin-right: 12px; font-size: 12px; }
.file-item-size { color: var(--text-muted); margin-left: 12px; white-space: nowrap; }
.file-item-status { margin-left: 12px; white-space: nowrap; }

/* Progress - fixed at top of page */
.progress-wrap-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.progress-fixed-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) { .progress-fixed-inner { padding: 0 24px; } }
.progress-wrap-fixed ~ .container { padding-top: 56px; }
.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s;
  width: 0%;
}
.progress-bar-fill.complete { background: var(--green); }
.progress-text { font-size: 12px; color: var(--text-secondary); display: flex; justify-content: space-between; }

/* Verification panel */
.verify-panel {
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.verify-panel.success { background: var(--green-bg); border: 1px solid #bbf7d0; }
.verify-panel.error { background: var(--red-bg); border: 1px solid #fecaca; }
.verify-panel.pending { background: var(--yellow-bg); border: 1px solid #fde68a; }
.verify-panel h3 { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.verify-panel p { font-size: 14px; }
.verify-panel.success h3 { color: var(--green); }
.verify-panel.error h3 { color: var(--red); }
.verify-panel.pending h3 { color: var(--yellow); }
.verify-icon { font-size: 28px; margin-bottom: 8px; }

/* Admin tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:hover td { background: var(--bg-hover); }
td .actions { display: flex; gap: 8px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 480px;
}
.modal h2 { font-size: 18px; font-weight: 600; margin-bottom: 20px; letter-spacing: -0.01em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Utility */
.hidden { display: none !important; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-secondary); }
.empty-state p { font-size: 14px; }

/* Scrollbar - matching AC Review */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }
