/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2233;
  --muted: #667085;
  --border: #e4e7ec;
  --primary: #e5484d;
  --primary-hover: #cf3a3f;
  --primary-soft: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5rem; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.page-narrow { max-width: 720px; padding-top: 40px; padding-bottom: 40px; display: grid; grid-gap: 20px; gap: 20px; }

/* Header */
.header { background: var(--surface); border-bottom: 1px solid var(--border); position: -webkit-sticky; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; }
.logo-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; }
.nav { display: flex; gap: 20px; flex: 1 1; }
.nav a:hover { color: var(--primary); }
.nav-muted { color: var(--muted); cursor: default; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.account-link { display: flex; align-items: center; gap: 8px; }
.account-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.skeleton { display: inline-block; width: 160px; height: 36px; border-radius: 8px; background: linear-gradient(90deg, #eef0f4, #f7f8fa, #eef0f4); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; border: 1px solid transparent; background: none; color: var(--text); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--border); background: var(--surface); }
.btn-outline:hover { border-color: #cdd2da; }
.btn-ghost:hover { background: #f0f2f5; }

/* Hero + dropzone */
.hero { padding: 56px 0 48px; text-align: center; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero-sub { color: var(--muted); margin: 0 0 32px; }
.dropzone { max-width: 760px; margin: 0 auto; padding: 48px 24px; border: 2px dashed #f3b4b6; border-radius: 16px; background: var(--primary-soft); }
.dropzone-icon { width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.5rem; }
.dropzone-title { font-weight: 600; font-size: 1.1rem; }
.dropzone-hint { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

/* Tools */
.section { padding: 40px 0 64px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); grid-gap: 16px; gap: 16px; margin-top: 16px; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tool-card h3 { font-size: 1.05rem; margin-top: 12px; }
.tool-card p { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }
.tool-formats { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.fmt { padding: 2px 8px; border-radius: 6px; background: #eef1f6; font-weight: 600; color: var(--text); }
.fmt-to { background: var(--primary-soft); color: var(--primary); }
.badge { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }

/* Cards / account */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card-muted { background: transparent; box-shadow: none; color: var(--muted); }
.card h1 { font-size: 1.5rem; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; padding: 10px 12px; border-radius: 8px; }
.diag { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }
.diag pre { background: #f2f4f7; padding: 10px 12px; border-radius: 8px; overflow-x: auto; color: var(--text); }
.profile { display: grid; grid-template-columns: 160px 1fr; grid-gap: 10px 16px; gap: 10px 16px; margin: 20px 0 0; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.chip-muted { background: #eef1f6; color: var(--text); }

/* Uploader */
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 1rem; }
.dropzone { transition: border-color 0.15s, background 0.15s; }
.dropzone .btn-lg { margin: 4px 0 8px; }
.dropzone-active { border-color: var(--primary); background: #fbdcdd; }
.dropzone-disabled { border-color: var(--border); background: #f2f4f7; }
.dropzone .error { max-width: 560px; margin: 16px auto 0; }
.upload-progress { max-width: 420px; margin: 0 auto; }
.bar { height: 8px; margin-top: 12px; border-radius: 999px; background: #f6c9cb; overflow: hidden; }
.bar > div { height: 100%; background: var(--primary); transition: width 0.2s; }
.hero-note { color: var(--muted); font-size: 0.9rem; margin: 14px 0 0; }
a.tool-card:hover { border-color: #f3b4b6; }
.tool-formats-hero { justify-content: center; margin-bottom: 12px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-gap: 16px; gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step p { color: var(--muted); margin: 0; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; margin-bottom: 8px; }

/* Trang job */
.muted { color: var(--muted); }
.job-page { padding-top: 32px; padding-bottom: 56px; display: grid; grid-gap: 20px; gap: 20px; }
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.job-title { font-size: 1.4rem; word-break: break-all; margin: 0; }
.status { font-size: 0.85rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: #eef1f6; white-space: nowrap; }
.status-preview_ready, .status-awaiting_payment { background: #fff4e5; color: #b54708; }
.status-completed { background: #e7f6ec; color: #067647; }
.status-failed, .status-expired { background: #fef3f2; color: #b42318; }
.progress-card { display: flex; align-items: center; gap: 16px; }
.progress-card p { margin: 2px 0 0; }
.spinner { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 3px solid var(--primary-soft); border-top-color: var(--primary); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-gap: 20px; gap: 20px; align-items: start; }
.preview-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 12px; }
.preview-image { margin: 0; }
.preview-image img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; display: block; }
.preview-text { max-height: 900px; overflow: auto; }
.markdown { font-size: 0.95rem; overflow-wrap: anywhere; }
.markdown table { border-collapse: collapse; width: 100%; margin: 12px 0; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.markdown th { background: #f2f4f7; }
.markdown img { max-width: 100%; }
.watermarked { position: relative; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.watermarked::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='170'><text x='20' y='95' transform='rotate(-25 140 85)' fill='rgba(229,72,77,0.13)' font-size='20' font-family='sans-serif' font-weight='700'>CONVERTFILE PREVIEW</text></svg>");
}
.checkout { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.checkout h2 { font-size: 1.2rem; }
.checkout p { margin: 0; }
.checkout .row { margin-top: 0; }

/* Tính năng chưa bật (thanh toán, credit) */
.soon { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 0.68rem; font-weight: 600; line-height: 1.5; vertical-align: middle; background: #eef1f6; color: var(--muted); }
.nav-muted { display: inline-flex; align-items: center; }
.checkout-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.checkout-error { flex-basis: 100%; margin: 0; }

/* File của tôi */
.card h2 { font-size: 1.15rem; }
.job-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-gap: 8px; gap: 8px; }
.job-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "meta status"; grid-gap: 2px 12px; gap: 2px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.job-row:hover { border-color: #f3b4b6; background: #fffafa; }
.job-row-name { grid-area: name; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-row-meta { grid-area: meta; font-size: 0.85rem; }
.job-row .status { grid-area: status; }

.preview-grid-single { grid-template-columns: 1fr; }

/* Uploader: file đã chọn + định dạng đích (kiểu Convertio) */
.staged { max-width: 640px; margin: 0 auto; text-align: left; }
.staged-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.staged-file { display: flex; align-items: center; gap: 10px; flex: 1 1; min-width: 0; }
.staged-meta { min-width: 0; }
.staged-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staged-meta .muted { font-size: 0.85rem; }
.staged-target { display: flex; align-items: center; gap: 8px; }
.staged-target select { height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 600; background: var(--surface); color: var(--text); cursor: pointer; }
.staged-target select:focus { outline: 2px solid #f3b4b6; outline-offset: 1px; }
.staged-target select:disabled { cursor: default; opacity: 1; background: #f9fafb; }
.staged .checkbox { margin-top: 12px; }
.staged-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 520px) {
  .staged-target { width: 100%; }
  .staged-target select { flex: 1 1; }
  .staged-actions .btn { flex: 1 1; }
}
.checkbox { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.92rem; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }

/* Dung lượng & xoá file */
.storage { margin: 12px 0 4px; }
.storage-text { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; font-size: 0.92rem; }
.storage .bar { background: #eef1f6; }
.bar-warn > div { background: #d92d20; }
.job-item { display: flex; align-items: center; gap: 6px; }
.job-item .job-row { flex: 1 1; min-width: 0; }
.btn-icon { width: 36px; padding: 0; flex: none; color: var(--muted); }
.btn-icon:not(:disabled):hover { color: #b42318; background: #fef3f2; }

@media (max-width: 860px) {
  .preview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .nav .soon { display: none; }
}

@media (max-width: 420px) {
  .logo-text { display: none; }
  .container { padding: 0 14px; }
}

.footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 640px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; gap: 12px; }
  .header-actions { gap: 4px; }
  .header-actions .btn { height: 34px; padding: 0 10px; font-size: 0.9rem; }
  .skeleton { width: 110px; }
  .account-name { display: none; }
  .profile { grid-template-columns: 1fr; }
}

