/* Alibaba Cloud Korea — Light Theme */
:root {
  --orange: #FF6A00;
  --orange-600: #E55F00;
  --orange-50: #FFF3EA;
  --ink: #0B1426;
  --ink-2: #2A3447;
  --muted: #5B6B85;
  --line: #E6EAF2;
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;
  --bg-grad: linear-gradient(180deg, #FFF8F1 0%, #FFFFFF 100%);
  --shadow-sm: 0 1px 2px rgba(11,20,38,0.06), 0 1px 1px rgba(11,20,38,0.04);
  --shadow-md: 0 8px 24px rgba(11,20,38,0.08);
  --shadow-lg: 0 20px 50px rgba(255,106,0,0.15);
  --radius: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-logo {
  height: 18px !important;
  width: auto !important;
  max-width: 130px;
  max-height: 18px;
  display: block;
  object-fit: contain;
}
.brand-tag {
  display: inline-flex; align-items: center;
  padding: 2px 6px; border-radius: 5px;
  background: var(--orange-50); color: var(--orange);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 14px; }
.nav-links a:hover { color: var(--orange); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  cursor: pointer; border: 1px solid transparent; transition: all .15s ease;
  font-family: inherit;
}
.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-600); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: white; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-dark { background: var(--ink); color: white; }
.btn-dark:hover { background: var(--ink-2); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: white; color: #C8102E; border-color: #F4C8D0; }
.btn-danger:hover { background: #FEF1F3; }

/* Page sections */
.section { max-width: 1240px; margin: 0 auto; padding: 80px 24px; }
.section-title {
  font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px;
}
.section-lead { font-size: 17px; color: var(--muted); max-width: 720px; margin: 0 0 40px; }

/* Hero */
.hero { background: var(--bg-grad); border-bottom: 1px solid var(--line); }
.hero-inner {
  max-width: 1240px; margin: 0 auto; padding: 80px 24px 100px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
}
.hero h1 {
  font-size: 56px; line-height: 1.05; font-weight: 800; letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.hero h1 .accent { color: var(--orange); }
.hero p.lead { font-size: 19px; color: var(--ink-2); margin: 0 0 32px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; }
.hero-badges { display: flex; gap: 18px; margin-top: 36px; }
.hero-badge { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.hero-badge::before { content: ''; width: 6px; height: 6px; background: var(--orange); border-radius: 50%; }

.hero-art {
  position: relative; height: 460px; border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,106,0,0.18), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,180,90,0.15), transparent 50%),
    linear-gradient(135deg, #FFFFFF 0%, #FFF3EA 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid #FFE0C6;
}
.hero-art .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,106,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,106,0,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 85%);
}
.hero-art .chip {
  position: absolute; padding: 14px 16px; border-radius: 14px; background: white;
  box-shadow: var(--shadow-md); display: flex; gap: 12px; align-items: flex-start;
  font-size: 13px; font-weight: 600;
  max-width: 280px;
}
.hero-art .chip .badge {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-50); color: var(--orange);
  font-size: 10px; font-weight: 800; letter-spacing: 0.02em;
  text-align: center; line-height: 1.15;
}
.hero-art .chip .chip-body { display: flex; flex-direction: column; gap: 2px; }
.hero-art .chip .chip-title { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.hero-art .chip .chip-sub { font-size: 11.5px; font-weight: 500; color: var(--muted); line-height: 1.3; }
.hero-art .chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip-1 { top: 40px; left: 24px; }
.chip-2 { top: 190px; right: 24px; }
.chip-3 { bottom: 44px; left: 60px; }
.chip-badge-leader { background: #FFE9D6; color: #C4520A; }
.chip-badge-apac { background: #EAF2FF; color: #2876F9; }
.chip-badge-forrester { background: #E7F7EE; color: #00854A; }

/* Features grid */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  padding: 28px; border-radius: var(--radius); background: white;
  border: 1px solid var(--line);
  transition: all .15s ease;
}
.feature:hover { border-color: #FFB987; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature .icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--orange-50);
  color: var(--orange); display: grid; place-items: center; font-size: 22px; font-weight: 800;
  margin-bottom: 16px;
}
.feature h4 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* About stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.stat { text-align: center; padding: 32px 16px; border-radius: var(--radius); background: var(--bg-soft); }
.stat .num { font-size: 38px; font-weight: 800; color: var(--orange); letter-spacing: -0.02em; }
.stat .label { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* CTA strip */
.cta-strip {
  margin: 60px auto; max-width: 1240px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--ink) 0%, #1A2745 100%);
  color: white; padding: 48px 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.cta-strip h3 { font-size: 28px; font-weight: 700; margin: 0 0 8px; }
.cta-strip p { color: rgba(255,255,255,0.7); margin: 0; }

/* Dashboard */
.dash {
  max-width: 1240px; margin: 0 auto; padding: 40px 24px 80px;
}
.dash-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.dash-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.tag {
  display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--orange-50); color: var(--orange);
}
.tag.tag-user { background: #EAF2FF; color: #2876F9; }
.search-row { display: flex; gap: 10px; }
.input {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  font-size: 14px; font-family: inherit; background: white; min-width: 240px;
}
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-50); }

.file-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.file-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  transition: all .15s ease; cursor: pointer;
}
.file-card:hover { border-color: #FFB987; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.file-thumb {
  height: 120px; border-radius: 8px; background: var(--bg-soft);
  display: grid; place-items: center; color: var(--muted); font-weight: 700;
  font-size: 13px; letter-spacing: 0.05em;
  overflow: hidden; position: relative;
}
.file-thumb.image, .file-thumb.video { background: #0B1426; color: white; }
.file-thumb.pdf { background: #FEF1F3; color: #C8102E; }
.file-thumb.audio { background: #EAF2FF; color: #2876F9; }
.file-thumb.office { background: var(--orange-50); color: var(--orange); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-name {
  font-weight: 600; font-size: 14px; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.file-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted);
}
.file-actions { display: flex; gap: 8px; }
.file-actions .btn { flex: 1; }

.empty {
  text-align: center; padding: 80px 24px; color: var(--muted);
  background: var(--bg-soft); border-radius: var(--radius); border: 1px dashed var(--line);
}
.empty h3 { color: var(--ink); margin: 8px 0; }

/* Admin uploader */
.upload-target {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
}
.upload-target .input { min-width: 280px; padding: 8px 12px; font-size: 13px; }

/* Category tabs */
.cat-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 8px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cat-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: white; border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.cat-tab:hover { border-color: var(--orange); color: var(--orange); }
.cat-tab.active {
  background: var(--orange); color: white; border-color: var(--orange);
}
.cat-tab.cat-add {
  background: var(--bg-soft); color: var(--muted);
  border-style: dashed;
}
.cat-tab.cat-add:hover { color: var(--orange); border-color: var(--orange); }
.cat-tab.cat-share {
  background: white; color: var(--ink-2);
  border-style: solid;
  margin-left: auto;
}
.cat-tab.cat-share:hover { color: var(--orange); border-color: var(--orange); background: var(--orange-50); }
.cat-tab .cat-del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.3); color: inherit;
  border: none; cursor: pointer; font-size: 14px; line-height: 1;
  padding: 0; margin-left: 2px;
}
.cat-tab:not(.active) .cat-del { background: var(--bg-soft); color: var(--muted); }
.cat-tab .cat-del:hover { background: rgba(200,16,46,0.15); color: #C8102E; }

/* Category badge on file card */
.file-cat {
  display: inline-flex; align-self: flex-start;
  padding: 2px 8px; border-radius: 999px;
  background: var(--orange-50); color: var(--orange);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
}

/* Admin uploader */
.uploader {
  background: white; border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 32px; text-align: center; margin-bottom: 24px;
  transition: all .15s ease; cursor: pointer;
}
.uploader.drag { border-color: var(--orange); background: var(--orange-50); }
.uploader h3 { margin: 0 0 6px; }
.uploader p { margin: 0; color: var(--muted); font-size: 14px; }
.uploader input { display: none; }

.upload-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.upload-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg-soft); border-radius: 8px;
  font-size: 13px;
}
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.bar > div { height: 100%; background: var(--orange); transition: width .2s; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 24px;
}
.modal[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(11,20,38,0.55);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative; background: white; border-radius: var(--radius-lg);
  padding: 32px; max-width: 420px; width: 100%; box-shadow: 0 30px 60px rgba(11,20,38,0.25);
  animation: modalIn .2s ease;
}
.modal-wide .modal-card { max-width: 1100px; padding: 0; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal-header h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.modal-header p { margin: 0 0 20px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: white;
}
.field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-50); }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.alert-error { background: #FEF1F3; color: #C8102E; border: 1px solid #F4C8D0; }
.alert-info { background: var(--orange-50); color: var(--orange-600); border: 1px solid #FFD4B0; }

/* Preview */
.preview-card { max-height: 90vh; display: flex; flex-direction: column; }
.preview-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.preview-header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.preview-body {
  flex: 1; overflow: auto; background: var(--bg-soft); padding: 0;
  min-height: 400px; display: grid; place-items: center;
}
.preview-body img { max-width: 100%; max-height: 80vh; object-fit: contain; }
.preview-body iframe, .preview-body video, .preview-body audio { width: 100%; }
.preview-body iframe { height: 80vh; border: none; }
.preview-body video { max-height: 80vh; background: black; }
.preview-body .no-preview {
  text-align: center; padding: 60px; color: var(--muted);
}
.preview-body .no-preview .ico {
  width: 80px; height: 80px; border-radius: 20px; background: var(--orange-50);
  color: var(--orange); display: grid; place-items: center; font-size: 32px;
  margin: 0 auto 16px; font-weight: 800;
}

/* Users table (admin) */
.users-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.users-table th, .users-table td {
  padding: 12px 20px; text-align: left; border-bottom: 1px solid var(--line);
}
.users-table thead { background: var(--bg-soft); position: sticky; top: 0; z-index: 1; }
.users-table th { font-weight: 700; color: var(--ink-2); font-size: 13px; }
.users-table tbody tr:hover { background: var(--bg-soft); }
.users-table td:first-child { font-weight: 600; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: white; padding: 12px 20px; border-radius: 10px;
  box-shadow: var(--shadow-md); z-index: 200; font-size: 14px; font-weight: 500;
  animation: toastIn .2s ease;
}
.toast.error { background: #C8102E; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 80px; }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 48px 24px;
  display: grid; grid-template-columns: 1fr 2fr; gap: 48px;
}
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer h5 { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: 0.05em; text-transform: uppercase; }
.footer a { display: block; padding: 4px 0; color: var(--muted); font-size: 14px; }
.footer a:hover { color: var(--orange); }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 60px 24px; }
  .hero h1 { font-size: 40px; }
  .hero-art { height: 300px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .cta-strip { flex-direction: column; align-items: flex-start; padding: 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
