/* Apple iOS & Desktop Studio Design System for Groupie */

:root {
  --ios-bg: #f2f2f7;
  --ios-card: #ffffff;
  --ios-card-secondary: #f8f9fa;
  --ios-separator: rgba(0, 0, 0, 0.08);
  --ios-blue: #007aff;
  --ios-blue-deep: #0062cc;
  --ios-orange: #ff9500;
  --ios-orange-deep: #e08300;
  --ios-green: #34c759;
  --ios-red: #ff3b30;
  --ios-purple: #af52de;
  --ios-text-primary: #111827;
  --ios-text-secondary: #6b7280;
  --ios-text-tertiary: #9ca3af;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #f2f2f7;
  color: var(--ios-text-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* Keep native controls on the same type system as the app. */
button,
input,
select,
textarea {
  font-family: inherit;
}

.nav-desktop-btn,
#btn-open-help,
#btn-header-logout,
.btn-apple-blue,
.btn-apple-orange {
  white-space: nowrap;
}

/* Apple Premium Action Buttons */
.btn-apple-blue {
  background: linear-gradient(180deg, #007aff 0%, #0062cc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(0, 122, 255, 0.3);
  border: 1px solid rgba(0, 98, 204, 0.8);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-apple-blue:hover {
  filter: brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 18px rgba(0, 122, 255, 0.38);
}

.btn-apple-blue:active {
  transform: scale(0.98);
  filter: brightness(0.95);
}

.btn-apple-orange {
  background: linear-gradient(180deg, #ff9500 0%, #e08300 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(255, 149, 0, 0.3);
  border: 1px solid rgba(224, 131, 0, 0.8);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-apple-orange:hover {
  filter: brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 18px rgba(255, 149, 0, 0.38);
}

.btn-apple-orange:active {
  transform: scale(0.98);
  filter: brightness(0.95);
}

/* Apple White Squircle Cards */
.ios-white-card {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.ios-white-card:hover {
  border-color: rgba(0, 122, 255, 0.3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* Compact Quick Action buttons */
.quick-action-card {
  min-width: 0;
  min-height: 66px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: var(--ios-text-primary);
  text-align: left;
  cursor: pointer;
}

.quick-action-card__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-width: 1px;
  border-style: solid;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quick-action-card__label {
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 359px) {
  .quick-action-card {
    padding-inline: 9px;
    gap: 7px;
  }

  .quick-action-card__icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .quick-action-card__label {
    font-size: 13px;
  }
}

/* Hard CSS Hide for Mobile Nav on Desktop */
@media (min-width: 1024px) {
  nav.mobile-bottom-nav,
  .lg\:hidden {
    display: none !important;
  }
}

/* Frosted Bottom Navigation Bar */
.ios-nav-bar {
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Creative Pulse — layered blue mobile studio */
body.groupie-theme {
  background:
    radial-gradient(circle at 50% -20%, rgba(47, 130, 230, 0.22), transparent 42%),
    #07111d;
  color: #edf5ff;
}

.creative-pulse-shell {
  width: 100%;
  min-width: 0;
  background: #111c29;
  border-color: #33465c;
  box-shadow: 0 24px 70px rgba(1, 8, 18, 0.46);
  color: #edf5ff;
}

.creative-header {
  background: rgba(15, 31, 48, 0.92);
  border-bottom: 1px solid rgba(120, 184, 255, 0.16);
  box-shadow: 0 8px 28px rgba(1, 8, 18, 0.2);
}

.creative-header-logo {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 5px 10px rgba(2, 10, 20, 0.35));
}

.creative-desktop-nav {
  background: #192838;
  border: 1px solid #354a61;
}

.creative-desktop-nav .nav-desktop-btn {
  color: #92a7bc;
}

.creative-desktop-nav .nav-desktop-btn.active {
  color: #ffffff;
  background: linear-gradient(145deg, #2f82e6, #1456a5);
  box-shadow: 0 6px 16px rgba(22, 103, 194, 0.34);
}

.creative-header-action {
  color: #d9edff;
  background: #213b55;
  border: 1px solid #42617f;
}

.creative-header-action:hover {
  background: #2a4968;
}

.creative-header-logout {
  color: #ffb4b8;
  background: rgba(170, 49, 60, 0.18);
  border: 1px solid rgba(255, 126, 136, 0.34);
}

.creative-main {
  background: #111c29;
}

.creative-pulse-shell .ios-white-card {
  color: #edf5ff;
  background: #1c2b3b;
  border-color: #30465d;
  box-shadow: 0 5px 16px rgba(1, 8, 18, 0.22);
}

.creative-pulse-shell .ios-white-card:hover {
  border-color: #4874a2;
  box-shadow: 0 8px 24px rgba(1, 8, 18, 0.3);
}

.creative-pulse-shell .text-gray-900,
.creative-pulse-shell .text-gray-800,
.creative-pulse-shell .text-gray-700 {
  color: #edf5ff !important;
}

.creative-pulse-shell .text-gray-600,
.creative-pulse-shell .text-gray-500,
.creative-pulse-shell .text-gray-400 {
  color: #a7b7c8 !important;
}

.creative-pulse-shell .bg-white,
.creative-pulse-shell .bg-gray-50,
.creative-pulse-shell .bg-gray-100 {
  background-color: #172637 !important;
}

.creative-pulse-shell .border-gray-100,
.creative-pulse-shell .border-gray-200,
.creative-pulse-shell .border-gray-300 {
  border-color: #34495f !important;
}

.creative-pulse-shell input,
.creative-pulse-shell textarea,
.creative-pulse-shell select {
  color: #edf5ff !important;
  background: #152536 !important;
  border-color: #3b536d !important;
  color-scheme: dark;
}

.creative-pulse-shell input::placeholder,
.creative-pulse-shell textarea::placeholder {
  color: #8295a8;
}

.creative-pulse-shell .btn-apple-blue {
  background: linear-gradient(145deg, #3492f4, #1765bd);
  border-color: #2f82e6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 7px 18px rgba(22, 103, 194, 0.36);
}

.creative-pulse-shell .btn-apple-orange {
  background: linear-gradient(145deg, #2c6fae, #184d7c);
  border-color: #3f78a9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 7px 18px rgba(15, 65, 111, 0.34);
}

/* Creative Pulse home screen */
.creative-home {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.creative-home-hero {
  padding: 24px;
  color: #f4f8fc;
  background:
    radial-gradient(circle at 87% 5%, rgba(76, 154, 255, 0.2), transparent 34%),
    linear-gradient(155deg, #17395b, #0c2239);
  border: 1px solid #36536e;
  border-radius: 28px;
  box-shadow: 0 16px 34px rgba(1, 8, 18, 0.28);
}

.creative-home-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.creative-home-hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.creative-home-hero p {
  margin: 7px 0 0;
  color: #b5c8da;
  font-size: 0.84rem;
  font-weight: 600;
}

.creative-live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #bde7cc;
  background: rgba(38, 127, 79, 0.17);
  border: 1px solid rgba(92, 207, 139, 0.28);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.creative-live-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #47d181;
  box-shadow: 0 0 0 4px rgba(71, 209, 129, 0.1);
}

.creative-capture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.creative-capture-btn {
  min-height: 78px;
  padding: 14px;
  border: 1px solid #42617f;
  border-radius: 18px;
  color: #f5f9ff;
  background: #25425f;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: left;
  transition: transform 0.16s ease, background 0.16s ease;
}

.creative-capture-btn:last-child {
  background: #1d3650;
}

.creative-capture-btn:hover {
  background: #2b4b6b;
}

.creative-capture-btn:active {
  transform: scale(0.98);
}

.creative-capture-btn svg {
  width: 25px;
  height: 25px;
}

.creative-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.creative-stat {
  min-height: 76px;
  padding: 12px 8px;
  border: 1px solid #2f4358;
  border-radius: 17px;
  background: #1c2b3b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 14px rgba(1, 8, 18, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.creative-stat:hover {
  border-color: #4b78a8;
  background: #223447;
}

.creative-stat:active {
  transform: scale(0.96);
}


.creative-stat strong {
  color: #68aaff;
  font-size: 1.08rem;
  font-weight: 800;
}

.creative-stat span {
  margin-top: 3px;
  color: #aab9c9;
  font-size: 0.72rem;
  font-weight: 700;
}

.creative-actions {
  margin-top: 20px;
}

.creative-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 10px;
}

.creative-section-heading h2 {
  margin: 0;
  color: #eef5fc;
  font-size: 0.9rem;
  font-weight: 800;
}

.creative-section-heading button {
  color: #72b2ff;
  font-size: 0.72rem;
  font-weight: 800;
}

.creative-action-list {
  display: grid;
  gap: 9px;
}

.creative-action-row {
  width: 100%;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #30465d;
  border-radius: 17px;
  color: #edf5ff;
  background: #1c2b3b;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(1, 8, 18, 0.16);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.creative-action-row:hover {
  background: #223548;
  border-color: #47719c;
}

.creative-action-row:active {
  transform: scale(0.985);
}

.creative-action-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  color: #78b8ff;
  background: #263f59;
  display: grid;
  place-items: center;
}

.creative-action-icon svg {
  width: 23px;
  height: 23px;
}

.creative-action-copy {
  flex: 1;
  min-width: 0;
}

.creative-action-copy strong,
.creative-action-copy span {
  display: block;
}

.creative-action-copy strong {
  color: #f0f5fb;
  font-size: 0.88rem;
  font-weight: 800;
}

.creative-action-copy span {
  margin-top: 3px;
  color: #aab7c6;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creative-action-arrow {
  color: #72b2ff;
  font-size: 1.35rem;
}

/* Highlighted mobile navigation */
.mobile-bottom-nav {
  padding: 0 12px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.creative-mobile-nav {
  min-height: 76px;
  padding: 7px;
  border: 1px solid #354a61;
  border-radius: 25px;
  background: rgba(25, 40, 56, 0.97);
  box-shadow: 0 12px 34px rgba(1, 8, 18, 0.46);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  pointer-events: auto;
}

.creative-mobile-nav .nav-btn {
  min-width: 0;
  height: 58px;
  padding: 6px 3px;
  border: 0;
  border-radius: 18px;
  color: #8fa2b5;
  background: transparent;
  justify-content: center;
  transition: transform 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.creative-mobile-nav .nav-btn:not(.nav-create):active {
  transform: scale(0.97);
}

.creative-mobile-nav .nav-btn.active:not(.nav-create) {
  color: #ffffff !important;
  background: linear-gradient(145deg, #2f82e6, #1456a5);
  box-shadow: 0 6px 16px rgba(22, 103, 194, 0.38);
}

.creative-mobile-nav .nav-btn.active:not(.nav-create) svg {
  stroke-width: 2.4;
}

.nav-create {
  transform: translateY(-14px);
}

.nav-create-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(145deg, #3492f4, #1765bd);
  box-shadow: 0 7px 18px rgba(22, 103, 194, 0.42);
}

.nav-create.active .nav-create-icon {
  background: linear-gradient(145deg, #53a7ff, #1e72ca);
  box-shadow: 0 0 0 4px rgba(120, 184, 255, 0.18), 0 8px 20px rgba(22, 103, 194, 0.48);
}

.creative-draft-badge {
  color: #ffffff;
  background: #2f82e6;
}

@media (max-width: 639px) {
  .creative-main {
    padding-top: 0.75rem !important;
  }

  .creative-home-hero {
    padding: 20px 18px;
  }

  .creative-live-status {
    padding: 6px 8px;
  }

  .creative-mobile-nav .nav-btn span.text-xs {
    font-size: 0.65rem;
  }
}

/* Keep the phone/tablet shell aligned to the same width as its bottom menu. */
@media (max-width: 1023px) {
  body.groupie-theme {
    align-items: center;
  }

  .creative-pulse-shell {
    max-width: 28rem !important;
  }

  .creative-main,
  .creative-home,
  .creative-home-hero,
  .creative-action-row {
    min-width: 0;
  }
}
