:root {
  color-scheme: light;
  --bg: #f8fbff;
  --surface: #ffffff;
  --soft: #eef5ff;
  --soft-strong: #dbeafe;
  --ink: #071536;
  --muted: #64708a;
  --line: #e3e9f3;
  --blue: #0969e8;
  --blue-dark: #0755bd;
  --shadow: 0 16px 38px rgba(19, 43, 84, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(9, 105, 232, 0.13), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(234, 88, 12, 0.12), transparent 28%),
    var(--bg);
}

.login-shell {
  width: min(100% - 32px, 440px);
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-brand {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 2px solid rgba(9, 105, 232, 0.18);
  border-radius: 8px;
  background: var(--soft);
  color: var(--blue);
  font-weight: 900;
  padding: 0 14px;
}

.login-panel h1 {
  margin: 24px 0 10px;
  font-size: clamp(2rem, 8vw, 2.65rem);
}

.login-panel p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.login-error {
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c !important;
  padding: 12px 14px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.login-form input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  outline: none;
  padding: 0 14px;
}

.login-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(9, 105, 232, 0.1);
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 18px;
}

.brand {
  display: inline-flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  min-width: 172px;
  height: 48px;
  place-items: center;
  border: 2px solid rgba(9, 105, 232, 0.18);
  border-radius: 8px;
  background: var(--soft);
  color: var(--blue);
  font-size: 0.98rem;
  font-weight: 900;
  padding: 0 14px;
}

.brand-mark::before {
  content: "Digital Marketing";
}

.welcome {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.25;
}

.welcome strong {
  color: var(--blue-dark);
  font-size: 1.2rem;
}

.side-nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 14px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  padding: 0 16px;
}

.nav-item.active,
.nav-item:hover,
.nav-item:focus-visible {
  background: var(--soft);
  color: var(--blue);
  outline: none;
}

.nav-item-disabled,
.nav-item-disabled:hover,
.nav-item-disabled:focus-visible {
  background: #f3f6fa;
  color: #c4ccda;
  cursor: not-allowed;
  opacity: 0.82;
  pointer-events: none;
}

.nav-icon,
.search-icon,
.notice-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.nav-icon {
  width: 22px;
  height: 22px;
  font-size: 1.1rem;
}

.support-card {
  margin-top: auto;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff7ed, #ffedd5);
  padding: 22px;
}

.support-title {
  margin: 0 0 8px;
  color: #c2410c;
  font-weight: 900;
}

.support-card p:not(.support-title) {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.5;
}

.support-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: #ea580c;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  padding: 0 16px;
}

.support-link:hover,
.support-link:focus-visible {
  background: #c2410c;
  outline: none;
}

.main-area {
  min-width: 0;
  padding: 0 32px 28px;
}

.topbar {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(12px);
}

.search-field {
  position: relative;
  display: block;
  width: min(100%, 620px);
}

.search-field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  padding: 0 18px 0 58px;
}

.search-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(9, 105, 232, 0.1);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 22px;
  width: 20px;
  height: 20px;
  color: #9aa6bb;
  font-size: 1.2rem;
  transform: translateY(-50%);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.profile-card img {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1);
}

.profile-name {
  margin: 0 0 3px;
  font-weight: 900;
}

.profile-role {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: center;
  padding: 32px 0 22px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0;
}

.intro {
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
}

.notice-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px 22px;
}

.notice-card p {
  margin: 0;
  color: #43516f;
  font-weight: 700;
  line-height: 1.45;
}

.notice-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--blue);
  font-size: 1.45rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.file-count {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.slides-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.folder-card {
  display: grid;
  min-height: 248px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.folder-summary {
  display: grid;
  gap: 12px;
  align-content: start;
  text-align: center;
  padding: 26px 20px 16px;
}

.folder-art {
  display: inline-flex;
  width: 106px;
  height: 78px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  color: #4d96f5;
  font-size: 5.4rem;
  filter: drop-shadow(0 12px 14px rgba(32, 112, 220, 0.2));
}

.folder-title {
  margin: 2px 0 0;
  font-size: 1.2rem;
  font-weight: 900;
}

.folder-subtitle {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.folder-meta {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.folder-open {
  width: calc(100% - 40px);
  border: 0;
  margin: auto 20px 16px;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0 16px;
  transition: background 160ms ease, transform 160ms ease;
}

.folder-open:hover,
.folder-open:focus-visible {
  background: var(--blue-dark);
  outline: none;
  transform: translateY(-1px);
}

.folder-open:disabled {
  background: #dbe4f0;
  color: #6d7890;
  cursor: not-allowed;
  transform: none;
}

.file-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.file-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  padding: 9px 10px;
}

.file-link:hover,
.file-link:focus-visible {
  border-color: rgba(9, 105, 232, 0.45);
  background: var(--soft);
  outline: none;
}

.file-type {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--blue);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.file-type .fa-regular {
  font-size: 0.82rem;
}

.file-name,
.file-path {
  display: block;
  overflow-wrap: anywhere;
}

.file-name {
  font-size: 0.86rem;
  font-weight: 900;
}

.file-path {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.download-mark {
  display: none;
}

.empty-folder,
.empty-state {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
  padding: 0 18px;
}

.button-primary {
  background: var(--blue);
  color: white;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--blue-dark);
  outline: none;
}

.button-secondary {
  border: 1px solid var(--blue);
  background: white;
  color: var(--blue);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--soft);
  outline: none;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.pdf-viewer-modal {
  padding: 0;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 54, 0.48);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  display: flex;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(7, 21, 54, 0.28);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 22px 24px;
}

.modal-header h2 {
  margin-top: 4px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.modal-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
}

.modal-file-list {
  display: grid;
  gap: 10px;
  margin: 0;
  overflow: auto;
  padding: 18px 24px 24px;
  list-style: none;
}

.modal-file-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.modal-file-name {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.modal-file-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-file-download,
.modal-file-preview {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
  padding: 0 14px;
}

.modal-file-preview {
  background: var(--blue);
  color: white;
}

.modal-file-download:hover,
.modal-file-download:focus-visible,
.modal-file-preview:hover,
.modal-file-preview:focus-visible {
  background: var(--blue);
  color: white;
  outline: none;
}

.modal-file-preview:hover,
.modal-file-preview:focus-visible {
  background: var(--blue-dark);
}

.pdf-viewer-panel {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
}

.pdf-viewer-frame {
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 0;
  background: #eef2f8;
}

.review-panel {
  width: min(620px, 100%);
}

.review-content {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.review-qr {
  width: 240px;
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.review-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .slides-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }

  .side-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-item {
    justify-content: center;
    padding: 0 10px;
  }

  .support-card {
    display: none;
  }

  .main-area {
    padding: 0 18px 24px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 14px;
    padding: 18px 0;
  }

  .profile-card {
    min-width: 0;
  }

  .slides-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 620px) {
  .side-nav {
    grid-template-columns: 1fr 1fr;
  }

  .slides-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 2.6rem);
  }

  .notice-card {
    align-items: flex-start;
  }

  .modal {
    padding: 12px;
  }

  .modal-file-list li {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .modal-file-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .modal-file-download,
  .modal-file-preview {
    flex: 1;
    padding: 0 10px;
  }

  .review-content {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}
