:root {
  --ink: #111111;
  --paper: #f7f7f2;
  --line: #d9d9cf;
  --muted: #66665f;
  --hot: #ff4f64;
  --mint: #10e05a;
  --gold: #ffcf33;
  --night: #202020;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e2e8f0;
  --input-bg: #f1f5f9;
  --active-blue: #1d61ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(16, 224, 90, 0.18), transparent 34%),
    linear-gradient(315deg, rgba(255, 79, 100, 0.18), transparent 38%),
    var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.app-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}

/* Top Navigation Styles */
.top-nav {
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  justify-content: center;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  width: 1280px;
  max-width: calc(100% - 96px);
  display: flex;
  align-items: center;
  padding: 12px 0;
  gap: 32px;
}

.nav-header {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid var(--sidebar-border);
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item:hover {
  background: var(--input-bg);
  color: var(--ink);
}

.nav-item.active {
  background: var(--active-blue);
  color: #ffffff;
  border-color: var(--active-blue);
}

.nav-item.active svg {
  color: #ffffff;
}

.nav-footer {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.logout-btn {
  color: #ef4444;
  border-color: #fecaca;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.05);
  color: #dc2626;
  border-color: #f87171;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.creator {
  width: 1280px;
  max-width: calc(100% - 96px);
  height: 1024px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr; /* Balanced columns */
  gap: 80px; /* Increased gap for better breathing room */
  align-items: start; /* Align to the top */
  padding: 64px 0; /* Adjusted padding for better top spacing */
}

@media (max-width: 1024px) {
  .top-nav {
    padding: 12px 16px;
    gap: 16px;
  }
  .nav-item {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

@media (max-width: 820px) {
  .top-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-header {
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
  }
  .nav-menu {
    justify-content: center;
    width: 100%;
  }
  .nav-footer {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
  .creator {
    grid-template-columns: 1fr;
    padding: 32px 0;
  }
}

.creator-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4.6rem, 4.6rem);
  line-height: 0.94;
  max-width: 9ch;
}

.creator-copy p:not(.eyebrow),
.track-copy p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.55;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px; /* Slightly more compact */
  margin: 0;
  padding: 0 20px 0 0;
  border-radius: 26px 10px 10px 26px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
}

.eyebrow .app-logo {
  height: 52px;
  width: 52px;
  margin-bottom: 0;
}

.creator-panel {
  display: grid;
  gap: 24px;
  padding: 40px;
  border: none;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.panel-header {
  margin-bottom: 8px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

form {
  display: grid;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

label {
  display: grid;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

input,
textarea {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #e5e5e5; /* Light gray background like the screenshot */
  color: var(--ink);
  padding: 16px 20px;
  outline: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #999;
}

input:focus,
textarea:focus {
  background: #ddd;
}

.file-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.file-input {
  cursor: pointer;
  border: 2px dashed #ccc;
  border-radius: 16px;
  padding: 32px 20px;
  background: #f5f5f5;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.file-input:hover {
  border-color: var(--active-blue);
  background: #f0f4ff;
}

.file-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.icon-circle.blue {
  background: #e3f2fd;
  color: #1565c0;
}

.icon-circle svg {
  width: 24px;
  height: 24px;
}

.file-input strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.file-input span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.links-section {
  display: grid;
  gap: 12px;
}

.links-section h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.link-input-group {
  display: flex;
  align-items: center;
  background: #e5e5e5;
  border-radius: 12px;
  padding: 4px 12px;
  gap: 12px;
}

.link-input-group input {
  background: transparent;
  padding: 12px 0;
}

.link-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.link-icon.spotify {
  background: #000;
  color: #1DB954;
}

.link-icon.youtube {
  background: #ff0000;
  color: #fff;
}

.link-icon svg {
  width: 20px;
  height: 20px;
}

.submit-btn {
  width: 100%;
  background: #006b33; /* Dark green like the screenshot */
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.submit-btn:hover {
  background: #005a2b;
  transform: translateY(-1px);
}

.submit-btn svg {
  width: 20px;
  height: 20px;
}

.terms {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

.preview,
.result {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.preview img {
  width: 128px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--night);
}

.preview span,
.result span {
  font-weight: 900;
}

.preview p {
  margin: 6px 0 0;
  color: var(--muted);
}

.result {
  grid-template-columns: 1fr auto;
}

.result span,
.result a {
  grid-column: 1;
}

.result a {
  color: var(--hot);
  overflow-wrap: anywhere;
}

.result button {
  grid-column: 2;
  grid-row: 1 / span 2;
  background: var(--mint);
  color: var(--ink);
}

.share-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(16, 224, 90, 0.16), transparent 30%),
    linear-gradient(330deg, rgba(255, 207, 51, 0.18), transparent 28%),
    #111111;
  color: #ffffff;
}

.player-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 0 0 34px 0;
}

.player-stage {
  display: grid;
  grid-template-columns: minmax(260px, 430px) 1fr;
  gap: 42px;
  align-items: center;
}

.primary-action {
  width: 100%;
  padding: 18px 32px;
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-action.is-green {
  background: var(--mint);
  color: var(--ink);
}

.primary-action.is-green:hover {
  background: #0dbd4b;
}

.primary-action.is-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.primary-action.is-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.rounded-btn {
  border-radius: 50px !important;
}

.action-group {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .action-group {
    flex-direction: column;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  display: none; /* Controlled by JS */
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.is-visible {
  display: flex !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #ffffff;
  color: #1a1a1a;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  padding: 40px;
  border-radius: 32px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f0f0f0;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.modal-content h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  font-weight: 800;
}

.modal-content p {
  color: #666;
  margin: 0 0 24px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-group input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: #f9f9f9;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: var(--mint);
}

.submit-confirm-btn {
  width: 100%;
  padding: 16px;
  border-radius: 50px;
  background: var(--mint);
  color: var(--ink);
  border: none;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.submit-confirm-btn:hover {
  background: #0dbd4b;
  transform: translateY(-2px);
}

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

.success-message {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
}

.hidden {
  display: none !important;
}

.cover-wrap {
  position: relative;
  cursor: pointer;
}

.cover-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transition: transform 0.3s ease;
}

.cover-wrap:hover img {
  transform: scale(1.02);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  opacity: 1;
  transition: opacity 0.3s ease, background 0.3s ease;
  border-radius: 8px;
}

.play-overlay svg {
  width: 80px;
  height: 80px;
  color: #ffffff;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease;
}

.cover-wrap:hover .play-overlay svg {
  transform: scale(1.1);
}

.play-overlay.is-playing {
  opacity: 0;
}

.cover-wrap:hover .play-overlay.is-playing {
  opacity: 1;
  background: rgba(0, 0, 0, 0.4);
}

.track-copy {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.title-wrapper {
  width: 100%;
}

.track-copy h1.scrolling-title {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 3.2rem);
  line-height: 1.1;
  color: #ffffff;
  overflow-wrap: break-word;
  word-break: break-word;
}

.track-copy p:not(.eyebrow) {
  color: #e7e7e0;
  margin: 0;
}

.partners-row {
  display: flex;
  align-items: center;
  gap: 100px;
  margin: 32px 0;
  padding-left: 16px;
}

.partner-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.partner-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a0a095;
  font-weight: 700;
  margin-bottom: 2px;
  text-align: center;
}

.partner-item img {
  height: 62px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  filter: brightness(1.05);
}

audio {
  width: min(100%, 480px);
  min-height: 42px;
}

@media (max-width: 820px) {
  .creator,
  .player-stage {
    grid-template-columns: 1fr;
  }

  .creator {
    align-items: start;
    padding-top: 28px;
  }

  .creator-copy h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .track-copy h1.scrolling-title {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    padding-right: 50px;
    white-space: nowrap;
    display: inline-block;
    animation: marquee 12s linear infinite;
  }

  @keyframes marquee {
    0% { transform: translateX(0); }
    10% { transform: translateX(0); }
    90% { transform: translateX(calc(-100% + 80vw)); }
    100% { transform: translateX(calc(-100% + 80vw)); }
  }

  .title-wrapper {
    margin-bottom: 4px;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  }

  .file-grid,
  .preview,
  .result {
    grid-template-columns: 1fr;
  }

  .result button {
    grid-column: 1;
    grid-row: auto;
  }
}

.app-header {
  display: flex;
  align-items: center;
  padding: 32px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.app-logo {
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.app-footer {
  text-align: center;
  padding: 3rem 2rem;
  color: #000000; /* Black for admin system */
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: transparent;
  border-top: 1px solid var(--line);
  margin-top: auto;
  width: 100%;
}

.share-page .app-footer {
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Companies Section Styles */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
  width: 1280px;
  max-width: calc(100% - 96px);
  margin-left: auto;
  margin-right: auto;
  padding-top: 64px;
}

.header-content h1 {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-content p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
}

.green-btn {
  background: #006b33 !important;
  width: auto !important;
  padding: 16px 32px !important;
  border-radius: 16px !important;
}

.companies-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 1280px;
  max-width: calc(100% - 96px);
  margin: 0 auto 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.companies-list-header h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
}

.view-toggles {
  display: flex;
  gap: 8px;
  align-items: center;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.view-btn svg {
  width: 24px;
  height: 24px;
}

.view-btn.active {
  background: #006b33;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 107, 51, 0.2);
}

.companies-grid {
  width: 1280px;
  max-width: calc(100% - 96px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding-bottom: 64px;
}

.company-card {
  background: white;
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.company-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: #006b33;
}

/* Professional Dashboard Styles */
#company-view-section {
  background: #f8f8f8;
  min-height: 100vh;
}

.company-view-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.company-view-header {
  background: #f8f8f8;
  padding: 64px 48px;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 40px;
}

.back-btn {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid #e0e0e0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.back-btn:hover {
  background: white;
  color: var(--ink);
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.company-profile-new {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}

.logo-box {
  width: 140px;
  height: 140px;
  background: white;
  border-radius: 36px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-info h1 {
  margin: 8px 0;
  font-size: 3.2rem;
  font-weight: 850;
  color: #1a1a1a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.corp-badge {
  background: #5dfd9b;
  color: #006b33;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.05em;
}

.verified-icon {
  width: 22px;
  height: 22px;
}

.meta-stats {
  display: flex;
  gap: 32px;
  color: var(--muted);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 12px;
}

.meta-stats span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-stats svg {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

.header-actions {
  display: flex;
  gap: 20px;
}

.share-btn {
  background: #e1e1e1;
  color: #1a1a1a;
  border: none;
  padding: 18px 32px;
  border-radius: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.share-btn:hover {
  background: #d5d5d5;
}

.new-card-btn {
  background: #006b33;
  color: white;
  border: none;
  padding: 18px 32px;
  border-radius: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 107, 51, 0.25);
  transition: all 0.2s ease;
  font-size: 1rem;
}

.new-card-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 107, 51, 0.35);
  background: #005428;
}

.new-card-btn svg {
  width: 20px;
  height: 20px;
}

/* Stats Grid */
.stats-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 0 48px 64px;
}

.stat-card-new {
  background: white;
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.02);
  border: 1px solid #f0f0f0;
}

.stat-card-new .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-card-new .label {
  color: #666;
  font-weight: 600;
  font-size: 0.9rem;
}

.stat-card-new .label-alt {
  color: #006b33;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}

.stat-card-new .badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.stat-card-new .badge.pos {
  background: #10e05a22;
  color: #006b33;
}

.stat-card-new .value {
  font-size: 3rem;
  font-weight: 800;
  color: #222;
  margin-bottom: 24px;
}

.mini-chart {
  height: 120px;
  width: 100%;
}

.retention-visual {
  margin-top: 40px;
}

.progress-bar {
  height: 12px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar .fill,
.progress-bar .retention-fill {
  height: 100%;
  background: #006b33;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
  color: #666;
  letter-spacing: 0.05em;
}

/* Content Area */
.company-view-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  padding: 0 48px 64px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.list-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
}

.view-toggles {
  display: flex;
  gap: 8px;
}

.toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
}

.toggle-btn.active {
  background: #f0f0f0;
  color: #222;
}

.musicards-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  min-height: 400px;
}

.empty-state {
  background: #f9f9f9;
  border: 2px dashed #e5e5e5;
  border-radius: 32px;
  padding: 80px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.empty-icon-box {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.empty-state p {
  color: #666;
  max-width: 320px;
  line-height: 1.5;
}

.tutorial-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #006b33;
  font-weight: 700;
  text-decoration: none;
  margin-top: 16px;
}

/* Sidebar Config */
.config-card {
  background: white;
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.config-icon {
  width: 28px;
  height: 28px;
  color: #006b33;
}

.card-title h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 850;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.input-group {
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #666;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.input-group input[type="text"],
.input-group textarea {
  width: 100%;
  background: #f0f0f0;
  border: none;
  border-radius: 16px;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
}

.cover-upload {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: #f0f0f0;
  border-radius: 24px;
  border: 2px dashed #ccc;
  cursor: pointer;
  overflow: hidden;
}

.upload-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #999;
}

.upload-placeholder span {
  font-size: 0.7rem;
  font-weight: 800;
}

.audio-upload {
  display: block;
  cursor: pointer;
}

.audio-box {
  background: #f0f0f0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-icon {
  width: 48px;
  height: 48px;
  background: #10e05a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.audio-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.audio-info strong {
  font-size: 0.95rem;
  color: #222;
}

.audio-info span {
  font-size: 0.75rem;
  color: #666;
}

.cloud-icon {
  color: #999;
}

.submit-btn-new {
  width: 100%;
  background: #006b33;
  color: white;
  border: none;
  padding: 20px;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s ease;
}

.submit-btn-new:hover {
  background: #005428;
  transform: scale(1.02);
}

.danger-zone-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ghost-btn:hover {
  background: #f0f0f0;
  color: var(--ink);
}

.header-ghost-btn {
  background: white;
  border: 1px solid #e0e0e0;
  color: #666;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.header-ghost-btn:hover {
  background: #f8f8f8;
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.header-ghost-btn.delete:hover {
  background: #fff5f5;
  color: #ef4444;
  border-color: #feb2b2;
}

.company-musicard-item-new {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 24px;
  border: 1px solid #f0f0f0;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  cursor: pointer;
  position: relative;
}

.company-musicard-item-new:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: #e0e0e0;
}

.musicard-cover-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.musicard-cover {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 16px;
  object-fit: cover;
  background: #f5f5f5;
  display: block;
}

.musicard-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--hot);
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.musicard-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.musicard-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.2;
}

.musicard-actions-footer {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.copy-link-cta {
  flex: 1;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--hot), #ff7b8a);
  color: white;
  border: none;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(255, 79, 100, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.delete-musicard-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #f8f9fa;
  border: 2px solid #eee;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.delete-musicard-btn:hover {
  background: #fff5f5;
  color: #ff4f64;
  border-color: #ff4f64;
}

.edit-musicard-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #f8f9fa;
  border: 2px solid #eee;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.edit-musicard-btn:hover {
  background: #f0f4ff;
  color: var(--active-blue);
  border-color: var(--active-blue);
}

.copy-link-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255, 79, 100, 0.35);
  filter: brightness(1.1);
}

.copy-link-cta:active {
  transform: translateY(-1px);
}

.copy-link-cta.copied {
  background: linear-gradient(135deg, #00c853, #26e678);
  box-shadow: 0 6px 20px rgba(0, 200, 83, 0.25);
}

.copy-link-cta svg {
  width: 18px;
  height: 18px;
}

.musicard-divider {
  height: 1px;
  background: #f0f0f0;
  width: 100%;
}

.musicard-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-value-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #1a1a1a;
}

.stat-icon {
  width: 18px;
  height: 18px;
}

.stat-icon.clicks {
  color: #00c853;
}

.stat-icon.listens {
  color: #2979ff;
}

.musicard-actions .view-link {
  color: #999;
  transition: color 0.2s ease;
}

.musicard-actions .view-link:hover {
  color: #006b33;
}

.company-logo-box {
  width: 80px;
  height: 80px;
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.company-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.company-card-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  color: var(--ink);
}

.company-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.company-tag {
  background: #e9ecef;
  color: #495057;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.company-stats {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.company-card-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  opacity: 1;
  z-index: 10;
}

.company-card.is-inactive {
  opacity: 0.7;
  filter: grayscale(0.5);
  border-left: 4px solid #94a3b8;
}

.inactive-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #64748b;
  color: white;
  font-size: 0.6rem;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 4px;
}

.status-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-right: 8px;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 12px;
  position: relative;
  transition: background 0.3s ease;
}

.status-toggle.on .toggle-track {
  background: #10e05a;
}

.toggle-thumb {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-toggle.on .toggle-thumb {
  transform: translateX(20px);
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.action-btn svg {
  width: 18px;
  height: 18px;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.action-btn.edit:hover {
  background: var(--mint);
  color: #006b33;
  border-color: #006b33;
}

.action-btn.delete:hover {
  background: #fff5f5;
  color: var(--hot);
  border-color: var(--hot);
}

.company-card:hover .company-card-actions {
  transform: scale(1.05);
}

/* Companies Section Styles */
.close-btn {
  background: var(--mint);
  border: none;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: all 0.2s ease;
}

.close-btn:hover {
  transform: rotate(90deg);
  background: var(--hot);
  color: white;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.confirm-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

#confirm-ok {
  background: var(--hot);
  color: white;
  border: none;
}

#confirm-cancel {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
}

.external-company-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.external-company-item:hover {
  background: white;
  border-color: #006b33;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.external-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: white;
  border: 1px solid var(--line);
}

.external-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.form-modal {
  max-width: 550px;
}

.form-modal .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.form-modal label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.form-modal input:not([type="file"]) {
  padding: 14px 20px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-modal input:focus {
  border-color: #006b33;
  outline: none;
  background: white;
}

.form-modal .file-input {
  border: 2px dashed var(--line);
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-modal .file-input:hover {
  border-color: #006b33;
  background: rgba(0, 107, 51, 0.02);
}

.form-modal .icon-circle {
  width: 48px;
  height: 48px;
  background: var(--mint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #006b33;
}

.form-modal .preview {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.form-modal .preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--mint);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.form-modal .form-actions {
  margin-top: 32px;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.loading-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--line);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.share-page .loading-overlay {
  background: #111111;
}

.share-page .loading-text {
  color: white;
}
