:root {
  --text: #111827;
  --text-soft: #5f6b85;
  --line: #e8ebf3;
  --accent: #6d5efc;
  --accent-2: #8d82ff;
  --shadow: 0 12px 40px rgba(16, 24, 40, 0.12);
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(109, 94, 252, 0.18), transparent 28%),
    linear-gradient(180deg, #f6f8fc 0%, #eef2f8 100%);
  color: var(--text);
  min-height: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

svg {
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #0e1120 0%, #141933 100%);
  color: #fff;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(109, 94, 252, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
}

.brand p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  transition: 0.2s ease;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.main-content {
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.upload-section,
.upload-card,
.stat-card,
.toolbar,
.board-section,
.analytics-card,
.library-card,
.library-section-block {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.upload-section {
  margin-bottom: 18px;
  border-radius: var(--radius-xl);
  padding: 16px 18px;
}

.upload-card {
  border-radius: var(--radius-xl);
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 14px;
  font-weight: 800;
  color: #5f6b85;
}

.field input,
.field textarea,
.field select,
.filters select,
.comment-form select,
.comment-form textarea,
.search-wrap input,
.asset-approver,
.edit-field input,
.edit-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
}

.field textarea,
.comment-form textarea,
.edit-field textarea {
  resize: vertical;
  min-height: 72px;
}

.field input,
.edit-field input {
  min-height: 42px;
}

.field input[readonly] {
  background: #f5f7fc;
  color: #64708b;
  font-weight: 600;
}

.brand-dropdown,
.approver-dropdown {
  position: relative;
}

.brand-dropdown {
  width: fit-content;
  max-width: min(560px, 100%);
}

.brand-dropdown-toggle,
.approver-dropdown-toggle {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}

.brand-dropdown-toggle {
  width: fit-content;
  min-width: 320px;
  max-width: min(560px, 100%);
}

.approver-dropdown-toggle {
  width: 100%;
}

#brandDropdownLabel,
.approver-dropdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 18px;
  flex: 1;
}

.dropdown-chevron {
  font-size: 18px;
  color: var(--text-soft);
  flex-shrink: 0;
}

.brand-dropdown-menu,
.approver-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.brand-dropdown-menu {
  width: fit-content;
  min-width: 360px;
  max-width: min(560px, 92vw);
}

.approver-dropdown-menu {
  min-width: 220px;
  right: 0;
  left: auto;
}

.brand-checklist,
.approver-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.brand-option,
.approver-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #edf1f7;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: 0.2s ease;
  min-width: 100%;
}

.brand-option:hover,
.approver-option:hover {
  background: #f8faff;
}

.brand-option input[type="checkbox"],
.approver-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.brand-option-text,
.approver-option-text {
  font-size: 14px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.platform-badge {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.platform-icon {
  width: 20px;
  height: 20px;
}

.platform-icon.instagram {
  border-radius: 5px;
}

.platform-icon.facebook {
  border-radius: 5px;
}

.platform-icon.linkedin {
  border-radius: 4px;
}

.brand-pill,
.selection-pill,
.approver-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f8;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}

.brand-pill {
  margin: 2px 6px 2px 0;
}

.selection-pill {
  font-weight: 600;
  padding: 4px 8px;
}

.selection-pill .platform-badge {
  width: 14px;
  height: 14px;
}

.selection-pill .platform-icon {
  width: 12px;
  height: 12px;
}

.approver-pill {
  background: #eef2ff;
  border-color: #d9e0f4;
}

.brands-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 12px;
}

.brands-panel-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}

.brands-panel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-drop {
  position: relative;
  border: 1.5px dashed #cfd6e4;
  background: #f8faff;
  border-radius: 14px;
  min-height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-drop span {
  color: var(--text-soft);
  font-weight: 700;
}

.primary-btn,
.comment-btn,
.edit-asset-btn,
.delete-asset-btn,
.calendar-delete-btn {
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
}

.primary-btn {
  margin-top: 14px;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.comment-btn {
  margin-top: 10px;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.edit-asset-btn {
  background: #eef2ff;
  color: #374151;
  border: 1px solid #d9e0f4;
}

.delete-asset-btn,
.calendar-delete-btn {
  background: #fff1f2;
  color: #b42318;
  border: 1px solid #fecdd3;
}

.calendar-delete-btn {
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1;
}

.upload-preview {
  min-height: 150px;
  border: 1px dashed #cfd6e4;
  border-radius: 16px;
  background: #f8faff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.upload-preview.empty {
  color: var(--text-soft);
  font-weight: 700;
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}

.upload-preview-stack {
  width: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
}

.upload-preview-thumb {
  flex: 0 0 110px;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.upload-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 18px;
}

.search-wrap {
  flex: 1;
}

.filters {
  width: 220px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  border-radius: 20px;
  padding: 16px 18px;
}

.stat-card span {
  display: block;
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 700;
}

.stat-card strong {
  font-size: 28px;
}

.board-section {
  border-radius: 24px;
  padding: 20px;
}

.section-header {
  margin-bottom: 16px;
}

.section-header h3 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.section-header p {
  margin: 0;
  color: var(--text-soft);
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 42px;
  justify-items: center;
  width: 100%;
}

.asset-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 500px) 96px;
  gap: 18px;
  align-items: start;
  justify-content: center;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
}

.approve-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 14px;
  gap: 10px;
  min-width: 80px;
}

.comments-side {
  width: 100%;
}

.comments-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
}

.media-card {
  background: #fff;
  border: 1px solid #edf0f7;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
  width: 100%;
  max-width: 476px;
}

.library-section-block + .library-section-block {
  margin-top: 28px;
}

.library-section-header {
  margin-bottom: 14px;
}

.library-section-header h4 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}

.library-section-header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.archive-block {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 18px;
  justify-content: center;
}

.media-schedule-banner {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.banner-scheduled {
  text-align: right;
  white-space: nowrap;
}

.media-preview-shell {
  padding: 14px 14px 0;
  background: #fff;
}

.media-top-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.asset-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.approver-block {
  flex: 1;
  min-width: 0;
}

.media-preview {
  background: #f6f7fb;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  max-width: 345px;
  position: relative;
}

.library-preview {
  width: 100%;
  margin: 0;
  max-width: none;
  position: relative;
  background: #f6f7fb;
}

.media-preview-inner,
.library-preview-inner {
  background: #f6f7fb;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid var(--line);
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;
}

.library-preview-inner {
  border-radius: 0;
  border: none;
  aspect-ratio: unset;
  height: auto;
  min-height: unset;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  display: block;
  background: #f6f7fb;
}

.library-preview img,
.library-preview video {
  width: 100%;
  height: auto;
  display: block;
  background: #f6f7fb;
}

.preview-placeholder {
  color: var(--text-soft);
  font-size: 14px;
  padding: 20px;
  text-align: center;
  font-weight: 700;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 345px;
  margin: 0 auto;
  padding: 0 34px;
}

.library-preview .carousel {
  max-width: none;
  padding: 0 42px;
}

.library-preview .carousel-slide {
  position: relative;
  inset: unset;
  display: none;
  width: 100%;
}

.library-preview .carousel-slide.active {
  display: block;
}

.library-preview .carousel-slide img,
.library-preview .carousel-slide video {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #f6f7fb;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.library-preview .carousel-track {
  border-radius: 0;
  border: none;
  height: auto;
  min-height: unset;
  aspect-ratio: unset;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: #f6f7fb;
}

.carousel-slide.active {
  display: flex;
}

.carousel-slide img,
.carousel-slide video {
  width: 100%;
  height: 100%;
  display: block;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.carousel-arrow.prev {
  left: -4px;
}

.carousel-arrow.next {
  right: -4px;
}

.library-preview .carousel-arrow.prev {
  left: 8px;
}

.library-preview .carousel-arrow.next {
  right: 8px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cfd6e4;
  padding: 0;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.15);
}



.approve-icon-btn {
  width: 72px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 2px solid #dc2626;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.15);
}

.tick-icon {
  font-size: 24px;
  line-height: 1;
  color: #dc2626;
}

.approve-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #dc2626;
  line-height: 1;
  text-align: center;
}

.approve-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25);
}

.approve-icon-btn.approved {
  background: #fff;
  border-color: #18b26b;
  box-shadow: 0 2px 10px rgba(24, 178, 107, 0.15);
}

.approve-icon-btn.approved .tick-icon {
  color: #18b26b;
}

.approve-icon-btn.approved .approve-label {
  color: #18b26b;
}

.approve-icon-btn.approved:hover {
  box-shadow: 0 4px 16px rgba(24, 178, 107, 0.25);
}

.approve-icon-btn.inactive {
  background: #fff;
  border-color: #e5e7eb;
  box-shadow: none;
  opacity: 0.45;
}

.approve-icon-btn.inactive .tick-icon,
.approve-icon-btn.inactive .approve-label {
  color: #9ca3af;
}

.approve-icon-btn.inactive:hover {
  opacity: 0.7;
  box-shadow: none;
  transform: none;
}

.approve-placeholder {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  padding: 8px 4px;
}

.approve-icon-btn.inactive-DISABLED {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.4);
}

.media-body {
  padding: 16px;
}

.asset-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  min-width: 0;
}

.asset-title-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.asset-title-icons .platform-badge {
  width: 16px;
  height: 16px;
}

.asset-title-icons .platform-icon {
  width: 14px;
  height: 14px;
}

.asset-name:empty {
  display: none;
}

.asset-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  word-break: break-word;
  font-weight: 800;
  min-width: 0;
  flex: 1;
}

.asset-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.asset-details-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
  align-items: center;
}

.asset-detail-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 12px;
  background: #f4f6fb;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.asset-detail-label {
  color: #344054;
  font-weight: 800;
}

.caption-block {
  margin: 10px 0 12px;
}

.caption-title {
  font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
}

.asset-notes {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.comments-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comments-top h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.comment-count {
  margin-left: auto;
  text-align: right;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 700;
}

.comments-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-item {
  background: #f8faff;
  border: 1px solid #edf1f7;
  border-radius: 16px;
  padding: 10px 12px;
}

.comment-item-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.comment-author {
  font-size: 13px;
  font-weight: 800;
}

.comment-date {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 700;
}

.comment-text-body {
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.comment-form {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}

.comment-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.created-under-comments {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f6fb;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.created-label {
  color: #344054;
  font-weight: 800;
}

.edit-panel {
  margin-top: 14px;
  border: 1px solid #e5eaf5;
  border-radius: 18px;
  background: #f8faff;
  padding: 14px;
}

.edit-panel-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
}

.edit-grid {
  display: grid;
  gap: 10px;
}

.edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.edit-field label {
  font-size: 13px;
  font-weight: 800;
  color: #5f6b85;
}

.edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.edit-save-btn,
.edit-cancel-btn {
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
}

.edit-save-btn {
  background: #eef2ff;
  color: #374151;
  border: 1px solid #d9e0f4;
}

.edit-cancel-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.empty-state {
  text-align: center;
  padding: 54px 20px 34px;
  background: #f9fbff;
  border: 1px dashed #d7dfef;
  border-radius: 22px;
}

.empty-state h4 {
  margin: 12px 0 8px;
  font-size: 22px;
  font-weight: 800;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
}

.empty-icon {
  font-size: 40px;
}

.hidden {
  display: none !important;
}

/* Calendar */
.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-view-toggle {
  display: inline-flex;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.calendar-view-btn {
  padding: 8px 14px;
  background: transparent;
  color: #475467;
  font-weight: 700;
}

.calendar-view-btn.active {
  background: #fff;
  color: var(--text);
}

.calendar-view-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.calendar-nav {
  display: inline-flex;
  gap: 6px;
}

.calendar-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.calendar-month-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.calendar-weekday {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #667085;
  text-align: center;
}

.calendar-day-cell {
  min-height: 210px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-day-cell:nth-child(7n) {
  border-right: none;
}

.calendar-day-number {
  display: flex;
  justify-content: flex-end;
  font-size: 13px;
  color: #475467;
  font-weight: 700;
}

.calendar-day-cell.muted {
  background: #fafafa;
}

.calendar-day-cell.today .calendar-day-number {
  color: var(--accent);
}

.calendar-asset-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
  cursor: pointer;
  transition: 0.2s ease;
}

.calendar-asset-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.10);
}

/* Header bar */
.calendar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  background: #0f172a;
  min-width: 0;
}

.calendar-card-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.calendar-card-header-icons {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.calendar-card-header-icons .platform-badge {
  width: 18px;
  height: 18px;
}

.calendar-card-header-icons .platform-icon {
  width: 16px;
  height: 16px;
}

.calendar-card-brand-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-card-time {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  flex-shrink: 0;
}

/* Thumbnail + Caption row */
.calendar-asset-body {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
}

/* Thumbnail */
.calendar-asset-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: #f6f7fb;
  overflow: hidden;
  border-radius: 6px;
  position: relative;
}

.calendar-asset-thumb img,
.calendar-asset-thumb video {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: cover;
  object-position: center top;
}

/* Caption */
.calendar-asset-caption {
  font-size: 11px;
  color: #475467;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

/* Footer */
.calendar-asset-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 7px;
}

.calendar-card-comment-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #667085;
  flex: 1;
}

.calendar-card-view-btn {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #d9e0f4;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.15s ease;
}

.calendar-card-view-btn:hover {
  background: #e0e7ff;
}

.calendar-more {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  padding: 2px 4px;
}

.library-card {
  border-radius: 20px;
  overflow: hidden;
}

.library-body {
  padding: 16px;
}

.library-body h4 {
  margin: 0 0 8px;
  font-weight: 800;
}

.library-meta {
  color: var(--text-soft);
  font-size: 13px;
  margin: 0 0 10px;
  font-weight: 700;
}

.library-meta.library-meta-no-gap {
  margin-bottom: 0;
}

.library-meta-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 2px;
}

.library-detail-block {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.library-detail-label {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

.library-detail-value {
  font-size: 13px;
  font-weight: 500;
  color: #475467;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.analytics-card {
  border-radius: 20px;
  padding: 18px;
}

.analytics-card h4 {
  margin: 0 0 14px;
  font-weight: 800;
}

.analytics-list {
  display: grid;
  gap: 10px;
}

.analytics-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.analytics-row span,
.analytics-row strong {
  font-weight: 700;
}

/* Modal */
.asset-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.asset-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

.asset-modal-dialog {
  position: relative;
  width: min(1000px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  z-index: 1;
}

.asset-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
}

.asset-modal-content {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 22px;
  padding: 22px;
}

.asset-modal-preview {
  background: #f6f7fb;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.asset-modal-preview .media-preview,
.asset-modal-preview .carousel {
  max-width: 100%;
  width: 100%;
}

.asset-modal-preview .media-preview-inner,
.asset-modal-preview .carousel-track {
  aspect-ratio: 4 / 5;
}

.asset-modal-info {
  min-width: 0;
}

.asset-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.asset-modal-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.asset-modal-title-row h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  min-width: 0;
  word-break: break-word;
}

.asset-modal-meta {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.asset-modal-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.asset-modal-detail-item {
  background: #f8faff;
  border: 1px solid #e8edf8;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.asset-modal-detail-label {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.asset-modal-caption-block,
.asset-modal-brands {
  margin-top: 16px;
}

.asset-modal-caption-title {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}

#calendarAssetModalCaption {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text);
}

#calendarAssetModalBrands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — single-column stack on all mobile sizes
   ══════════════════════════════════════════════════════ */

/* ── TABLET (≤1180px) ───────────────────────────────── */
@media (max-width: 1180px) {
  .app-shell            { grid-template-columns: 1fr; }
  .sidebar              { display: none; }

  /* Tablet: comments full width on top, card + approve buttons below */
  .asset-row {
    grid-template-columns: 1fr 96px !important;
    grid-template-rows: auto auto;
    justify-items: stretch;
    max-width: 680px;
    margin: 0 auto;
  }

  .comments-side {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }

  .media-card           { width: 100%; max-width: 100%; grid-column: 1; }

  .approve-col {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    padding-top: 14px;
  }

  .asset-modal-content  { grid-template-columns: 1fr; }
  .stats-grid,
  .analytics-grid,
  .upload-grid          { grid-template-columns: repeat(2, 1fr); }
}

/* ── MOBILE (≤768px) ────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Layout ── */
  body { overflow-x: hidden; }

  .app-shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }

  /* Hide sidebar entirely on mobile — nav is in topbar */
  .sidebar { display: none !important; }

  .main-content {
    padding: 16px 14px 32px;
    overflow-x: hidden;
  }

  /* ── Topbar ── */
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
  }

  .topbar h2 { font-size: 20px; }

  .topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .topbar-user-label {
    font-size: 12px;
    color: var(--text-soft);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-logout-btn {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
  }

  .topbar-logout-btn:hover { background: #f3f4f6; }

  /* ── Upload form ── */
  .upload-grid            { grid-template-columns: 1fr; }
  .field-full             { grid-column: 1; }

  /* ── Stats ── */
  .stats-grid             { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* ── Asset cards ── */
  .media-grid             { grid-template-columns: 1fr; }

  /* Mobile order: 1. image/video  2. approve buttons  3. brands + comments */
  .asset-row {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }

  .media-card             { order: 1; width: 100%; max-width: 100%; }
  .approve-col            { order: 2; }
  .comments-side          { order: 3; width: 100%; max-width: 100%; }

  /* Approve buttons stack horizontally */
  .approve-col {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    padding-top: 0;
    width: 100%;
  }

  .approve-icon-btn {
    width: auto;
    min-width: 72px;
    flex-direction: row;
    padding: 8px 14px;
    gap: 8px;
    border-radius: 10px;
  }

  .approve-icon-btn .tick-icon { font-size: 18px; }
  .approve-icon-btn .approve-label { font-size: 11px; }

  /* ── Toolbar ── */
  .toolbar                { flex-direction: column; gap: 10px; }
  .filters,
  .search-wrap            { width: 100%; }

  /* ── Banner ── */
  .banner-scheduled       { white-space: normal; font-size: 11px; }

  /* ── Media top actions ── */
  .media-top-actions      { flex-wrap: wrap; gap: 8px; }
  .asset-action-buttons   { flex-wrap: wrap; }

  /* ── Calendar ── */
  .calendar-toolbar       { flex-direction: column; gap: 10px; }
  .calendar-month-grid    { font-size: 11px; }
  .calendar-day-number    { font-size: 11px; }
  .calendar-asset-card    { font-size: 10px; }

  /* ── Library ── */
  .library-grid           { grid-template-columns: 1fr; }

  /* ── Analytics ── */
  .analytics-grid         { grid-template-columns: 1fr; }

  /* ── Modal ── */
  .asset-modal            { padding: 8px; align-items: flex-end; }
  .asset-modal-dialog     { max-height: 92dvh; border-radius: 20px 20px 0 0; width: 100%; max-width: 100%; }
  .asset-modal-content    { grid-template-columns: 1fr; padding: 16px; }
  .asset-modal-detail-list{ grid-template-columns: 1fr 1fr; }

  /* ── Edit / delete actions ── */
  .edit-actions           { flex-direction: column; align-items: stretch; }
  .calendar-asset-footer  { flex-direction: column; align-items: stretch; }

  /* ── Login ── */
  .login-card             { padding: 32px 22px; margin: 16px; border-radius: 16px; }
}

/* ── SMALL PHONE (≤400px) ──────────────────────────── */
@media (max-width: 400px) {
  .stats-grid             { grid-template-columns: repeat(2, 1fr); }
  .approve-col            { gap: 6px; }
  .approve-icon-btn       { min-width: 64px; padding: 7px 10px; }
}

/* ── LOGIN SCREEN ──────────────────────────────────── */

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(109, 94, 252, 0.22), transparent 30%),
    linear-gradient(180deg, #f0f2f8 0%, #e8edf6 100%);
}

.login-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.14);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.login-logo h1 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: #111827;
}

.login-logo p {
  font-size: 12px;
  color: #6b7280;
  margin: 4px 0 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-error {
  color: #dc2626;
  font-size: 13px;
  margin: 0;
  min-height: 18px;
}

.login-submit-btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
}

.login-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── SIDEBAR FOOTER ────────────────────────────────── */

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.sidebar-user-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s;
}

.logout-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ── GOOGLE SIGN IN BUTTON ─────────────────────── */

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 10px;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.login-note {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin: 12px 0 0;
}

/* ── INLINE APPROVER CHECKLIST ─────────────────── */

.approver-block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.approver-checklist-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.approver-option-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s;
}

.approver-option-inline:hover {
  background: #f1f3f9;
}

.approver-option-inline input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── APPROVER SECTION IN SIDE PANEL ────────────── */
.approver-section-panel {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 12px;
}

/* ── MOBILE TAB BAR ─────────────────────────────────── */
.mobile-tab-bar {
  display: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 6px;
  padding: 0 0 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.mobile-tab-bar::-webkit-scrollbar { display: none; }

.mobile-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.mobile-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 768px) {
  .mobile-tab-bar {
    display: flex;
  }
  /* Hide topbar user on desktop */
  .topbar-user { display: flex; }
}

@media (min-width: 769px) {
  .mobile-tab-bar { display: none !important; }
  .topbar-user    { display: none; }
}

/* ── FILE SIZE WARNING ──────────────────────────────── */
.file-size-warning {
  margin-top: 7px;
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 7px 12px;
  line-height: 1.5;
}

.file-size-warning a {
  color: #b45309;
  font-weight: 700;
  text-decoration: underline;
}

/* ── NOTIFY BUTTON & TOPBAR ACTIONS ─────────────── */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.notify-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(99, 91, 255, 0.3);
}

.notify-btn:hover {
  background: #5048e5;
  box-shadow: 0 4px 16px rgba(99, 91, 255, 0.4);
  transform: translateY(-1px);
}

.notify-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .notify-btn {
    flex: 1;
    justify-content: center;
  }
}
