.native-mobile-heading,
.native-mobile-drawer-notifications,
.native-mobile-dashboard-greeting,
.native-mobile-task-count {
  display: none;
}

@font-face {
  font-family: "Crew Ionicons";
  src: url("/fonts/Ionicons.ttf") format("truetype");
  font-display: block;
  font-style: normal;
  font-weight: normal;
}

@media (max-width: 900px), (display-mode: standalone) and (pointer: coarse) {
  :root {
    --native-bg: #f3f3f5;
    --native-surface: #ffffff;
    --native-surface-soft: #f0f1f3;
    --native-text: #111111;
    --native-muted: #62666d;
    --native-line: #d7d9dd;
    --native-accent: #2563b8;
    --native-shadow: rgba(0, 0, 0, 0.2);
    --native-mobile-nav-height: 68px;
    --native-mobile-nav-bottom: clamp(8px, env(safe-area-inset-bottom), 28px);
    --native-mobile-nav-space: calc(var(--native-mobile-nav-height) + var(--native-mobile-nav-bottom) + 12px);
  }

  [data-bs-theme="dark"] {
    --native-bg: #050505;
    --native-surface: #171717;
    --native-surface-soft: #242424;
    --native-text: #ffffff;
    --native-muted: #a7a7a7;
    --native-line: #303030;
    --native-accent: #ef9b5c;
    --native-shadow: rgba(0, 0, 0, 0.34);
  }

  html,
  body {
    min-height: 100%;
    background: var(--native-bg);
    color: var(--native-text);
  }

  body {
    overscroll-behavior-y: none;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    padding-top: calc(68px + env(safe-area-inset-top));
    padding-bottom: var(--native-mobile-nav-space);
    background: var(--native-bg);
  }

  .app-shell.chat-shell {
    display: block;
    height: 100dvh;
    min-height: 100dvh;
    padding-bottom: calc(var(--native-mobile-nav-height) + var(--native-mobile-nav-bottom) + 3px);
    background: var(--native-surface);
  }

  .chat-shell .chat-content {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    background: var(--native-surface);
  }

  .chat-shell .chat-panel {
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-shell .chat-conversation-header {
    min-height: 58px;
    padding: 6px 12px;
  }

  body:has(.chat-shell .chat-compose textarea:focus) .mobile-bottom-nav {
    display: none;
  }

  body:has(.chat-shell .chat-compose textarea:focus) .app-shell.chat-shell {
    padding-bottom: 3px;
  }

  @media (display-mode: standalone) {
    html,
    body,
    .app-shell {
      min-height: 100vh;
    }

    .app-shell.chat-shell {
      height: 100vh;
      min-height: 100vh;
    }
  }

  .mobile-header.native-mobile-header {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    z-index: 1040;
    display: flex !important;
    height: calc(68px + env(safe-area-inset-top));
    min-height: 68px;
    align-items: center;
    padding: env(safe-area-inset-top) 16px 0;
    background: var(--native-bg);
    border-bottom: 1px solid var(--native-line);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: none;
  }

  .native-mobile-heading {
    display: grid;
    min-width: 0;
    flex: 1;
  }

  .native-mobile-heading strong {
    overflow: hidden;
    color: var(--native-text);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .native-mobile-heading span {
    overflow: hidden;
    margin-top: 2px;
    color: var(--native-muted);
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-toggle.native-mobile-menu-toggle {
    position: relative;
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    padding: 0;
    color: var(--native-text);
    border-radius: 50%;
  }

  .native-mobile-menu-toggle .mobile-menu-icon {
    display: none;
  }

  .native-mobile-menu-toggle::before {
    font-family: "Crew Ionicons";
    font-size: 27px;
    content: "\f452";
  }

  .native-mobile-menu-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 11px;
    height: 11px;
    background: #e23d45;
    border: 1.5px solid var(--native-bg);
    border-radius: 50%;
  }

  .sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1050;
    display: flex !important;
    width: min(84vw, 380px);
    height: 100dvh;
    padding: calc(env(safe-area-inset-top) + 16px) 20px calc(env(safe-area-inset-bottom) + 16px);
    background: var(--native-surface);
    border: 0;
    border-radius: 22px 0 0 22px;
    box-shadow: -18px 0 46px rgba(0, 0, 0, 0.2);
    transform: translateX(102%);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    z-index: 1045;
    display: block !important;
    background: rgba(0, 0, 0, 0.58);
  }

  .sidebar-header {
    min-height: 48px;
    margin-bottom: 14px;
  }

  .sidebar-brand {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.035em;
  }

  .sidebar-brand .sidebar-logo {
    display: none;
  }

  .sidebar-close {
    display: grid;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--native-text);
    font-size: 32px;
  }

  .sidebar-nav {
    display: none;
  }

  .native-mobile-drawer-notifications {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    color: var(--native-text);
    border-bottom: 1px solid var(--native-line);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
  }

  .native-mobile-drawer-notifications strong {
    display: grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    padding: 0 7px;
    background: #e23d45;
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
  }

  .sidebar-user {
    margin-top: auto;
    padding-top: 16px;
    background: transparent;
    border-color: var(--native-line);
  }

  .sidebar-user > div:first-child {
    display: none;
  }

  .sidebar-actions {
    display: grid;
    gap: 0;
  }

  .sidebar-actions .sidebar-theme-section,
  .sidebar-actions form,
  .sidebar-actions form button {
    width: 100%;
  }

  .sidebar-actions .native-mobile-theme-section {
    display: block;
  }

  .sidebar-theme-section summary {
    min-height: 54px;
    padding: 16px 0;
    color: var(--native-text);
    border-bottom: 1px solid var(--native-line);
    font-size: 16px;
    font-weight: 700;
  }

  .sidebar-theme-options {
    gap: 7px;
    margin: 10px 0;
  }

  .sidebar-theme-options button {
    min-height: 50px;
    padding: 9px 12px;
    background: var(--native-surface-soft);
    color: var(--native-text);
    border-color: var(--native-line);
    border-radius: 12px;
    font-size: 14px;
  }

  .sidebar-actions .btn-link-clean {
    min-height: 54px;
    padding: 0;
    color: var(--native-text);
    border-bottom: 1px solid var(--native-line);
    font-size: 16px;
    font-weight: 700;
    text-align: left;
  }

  .sidebar-actions form button {
    color: #e66;
    border-bottom: 0;
  }

  .content-area,
  .events-content,
  .event-center-content,
  .workflow-content {
    width: 100%;
    padding: 16px;
    padding-bottom: 24px;
    background: var(--native-bg);
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1040;
    top: auto;
    right: 10px;
    bottom: var(--native-mobile-nav-bottom);
    left: 10px;
    display: grid;
    width: auto;
    height: var(--native-mobile-nav-height);
    min-height: var(--native-mobile-nav-height);
    grid-template-columns: repeat(var(--mobile-nav-items), minmax(0, 1fr));
    padding: 0;
    overflow: hidden;
    background: var(--native-surface);
    border: 1px solid var(--native-line);
    border-radius: 24px;
    box-shadow: 0 7px 14px var(--native-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .mobile-bottom-nav-item,
  .mobile-bottom-nav-item.is-compact {
    min-width: 0;
    min-height: 64px;
    gap: 3px;
    padding: 2px;
    color: var(--native-muted);
    border-radius: 0;
    font-size: 9.5px;
    font-weight: 700;
  }

  .mobile-bottom-nav-item.active,
  .mobile-bottom-nav-item:active,
  .mobile-bottom-nav-item.is-pressed,
  .mobile-bottom-nav-item.is-loading-target {
    background: transparent;
    color: var(--native-text);
  }

  .mobile-bottom-nav-icon {
    width: 26px;
    height: 26px;
  }

  .mobile-bottom-nav-icon svg {
    display: none;
  }

  .mobile-bottom-nav-icon::before,
  .native-module-icon::before {
    font-family: "Crew Ionicons";
    font-style: normal;
    font-weight: normal;
    line-height: 1;
  }

  .mobile-bottom-nav-icon::before {
    font-size: 23px;
  }

  .mobile-bottom-nav-icon[data-ionicon="home"]::before { content: "\f383"; }
  .mobile-bottom-nav-icon[data-ionicon="calendar"]::before { content: "\f1d6"; }
  .mobile-bottom-nav-icon[data-ionicon="chat"]::before { content: "\f213"; }
  .mobile-bottom-nav-icon[data-ionicon="crew"]::before { content: "\f4a3"; }
  .mobile-bottom-nav-icon[data-ionicon="folder"]::before { content: "\f329"; }

  .native-module-icon {
    display: block;
    width: 24px;
    height: 24px;
    color: var(--native-accent);
  }

  .native-module-icon::before { font-size: 23px; }
  .native-module-icon.icon-workflow::before { content: "\f33b"; }
  .native-module-icon.icon-people::before { content: "\f4a3"; }
  .native-module-icon.icon-chat::before { content: "\f213"; }
  .native-module-icon.icon-time::before { content: "\f5de"; }
  .native-module-icon.icon-artists::before { content: "\f46a"; }
  .native-module-icon.icon-folder::before { content: "\f329"; }
  .native-module-icon.icon-ticket::before { content: "\f5db"; }
  svg.native-module-icon.icon-budget {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-bottom-nav-badge {
    border-color: var(--native-surface);
  }

  .content-header {
    gap: 14px;
  }

  .content-header h1 {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.04em;
  }

  .content-header p:last-child {
    color: var(--native-muted);
  }

  .eyebrow {
    color: var(--native-accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.2px;
  }

  .content-card,
  .stat-card,
  .event-card,
  .event-hero,
  .event-module-card {
    background: var(--native-surface);
    border-color: var(--native-line);
  }

  .native-mobile-dashboard-greeting {
    display: block;
    margin: 18px 0 24px;
    color: var(--native-text);
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -0.045em;
  }

  .mobile-dashboard-events,
  .stats-grid {
    display: none;
  }

  .dashboard-main-header {
    display: none;
  }

  .dashboard-grid {
    display: grid;
    gap: 14px;
    margin-top: 0 !important;
  }

  .dashboard-panel {
    overflow: hidden;
    padding: 0;
    background: var(--native-surface);
    border: 1px solid var(--native-line);
    border-radius: 18px;
  }

  .dashboard-panel-heading {
    align-items: center;
    padding: 18px;
    border-color: var(--native-line);
  }

  .dashboard-panel-heading h2 {
    color: var(--native-text);
    font-size: 18px;
    font-weight: 800;
  }

  .dashboard-panel-heading > a {
    display: none;
  }

  .native-mobile-task-count {
    display: grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    padding: 0 9px;
    background: var(--native-surface-soft);
    color: var(--native-text);
    border-radius: 16px;
    font-weight: 900;
  }

  .dashboard-task,
  .dashboard-activity {
    min-height: 58px;
    gap: 10px;
    padding: 12px 18px;
    color: var(--native-text);
    border-color: var(--native-line);
  }

  .dashboard-task {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-left: 38px;
  }

  .dashboard-activity {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-task .priority-dot {
    left: 18px;
    width: 10px;
    height: 10px;
  }

  .dashboard-task strong,
  .dashboard-activity {
    font-size: 14px;
    line-height: 19px;
  }

  .dashboard-task small,
  .dashboard-task time,
  .dashboard-activity small,
  .dashboard-activity time {
    color: var(--native-muted);
    font-size: 11px;
  }

  .dashboard-empty {
    padding: 24px 18px;
    color: var(--native-muted);
  }

  .events-header,
  .events-toolbar {
    display: none;
  }

  .event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .event-card {
    min-height: 0;
    gap: 7px;
    padding: 18px;
    overflow: visible;
    border-radius: 20px;
  }

  .event-card-top {
    min-height: 25px;
  }

  .event-status {
    min-height: 0;
    padding: 5px 9px;
    background: #315f9e;
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 900;
  }

  .event-status.status-active { background: #277549; color: #fff; }
  .event-status.status-completed,
  .event-status.status-archived { background: #555b65; color: #fff; opacity: 1; }
  .event-status.status-draft { background: #6b4b82; color: #fff; }
  .event-published { display: none; }

  .event-card-body {
    margin: 0;
    padding: 0;
  }

  .event-short-name {
    margin: 5px 0 2px;
    color: var(--native-accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
  }

  .event-card h2 {
    color: var(--native-text);
    font-size: 22px;
    font-weight: 900;
  }

  .event-location {
    margin: 7px 0 0;
    color: var(--native-muted);
    font-size: 14px;
  }

  .event-meta {
    display: block;
    padding: 0;
    border: 0;
  }

  .event-meta div {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
  }

  .event-meta div:nth-child(2),
  .event-meta span {
    display: none;
  }

  .event-meta strong {
    color: var(--native-muted);
    font-size: 14px;
    font-weight: 400;
  }

  .event-card-open {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    color: transparent;
    border-radius: 20px;
    text-indent: -999px;
  }

  .event-card-open::after {
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--native-muted);
    content: "›";
    font-size: 28px;
    line-height: 1;
    text-indent: 0;
  }

  .event-card-action {
    display: none;
  }

  .event-center-content {
    padding-top: 16px;
  }

  .event-context-nav {
    display: none;
  }

  html.is-ios-device .event-mobile-back {
    --event-back-opacity: 1;
    --event-back-scale: 1;
    --event-back-shift: 0px;
    position: fixed;
    z-index: 1034;
    top: calc(68px + env(safe-area-inset-top) + 10px);
    left: 12px;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--native-text);
    overflow: hidden;
    isolation: isolate;
    background:
      radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .72), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .14));
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 50%;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .82),
      inset 0 -1px 0 rgba(255, 255, 255, .18),
      0 8px 24px rgba(26, 31, 40, .18),
      0 1px 4px rgba(26, 31, 40, .12);
    text-decoration: none;
    opacity: var(--event-back-opacity);
    transform: translateY(var(--event-back-shift)) scale(var(--event-back-scale));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform-origin: center;
    will-change: opacity, transform;
    transition: opacity 110ms linear, transform 140ms cubic-bezier(.22, .61, .36, 1);
  }

  html.is-ios-device[data-bs-theme="dark"] .event-mobile-back {
    background:
      radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .24), transparent 40%),
      linear-gradient(145deg, rgba(68, 68, 72, .62), rgba(16, 16, 18, .38));
    border-color: rgba(255, 255, 255, .24);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .3),
      inset 0 -1px 0 rgba(255, 255, 255, .06),
      0 8px 24px rgba(0, 0, 0, .34),
      0 1px 4px rgba(0, 0, 0, .28);
  }

  html.is-ios-device .event-mobile-back svg {
    position: relative;
    z-index: 1;
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  html.is-ios-device .event-mobile-back.is-scroll-hidden {
    pointer-events: none;
  }

  html.is-ios-device .event-mobile-back-space {
    display: block;
    height: 58px;
    overflow: hidden;
    transition: height 240ms cubic-bezier(.22, .61, .36, 1);
  }

  html.is-ios-device .event-mobile-back-space.is-consumed {
    height: 0;
  }

  @media (prefers-reduced-motion: reduce) {
    html.is-ios-device .event-mobile-back-space {
      transition: none;
    }
  }

  .event-hero {
    display: block;
    padding: 20px;
    border-radius: 22px;
  }

  .event-hero h1 {
    color: var(--native-text);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.04em;
  }

  .event-hero > div > p:last-child {
    color: var(--native-muted);
    font-size: 14px;
  }

  .event-hero-meta {
    display: grid;
    gap: 9px;
    margin-top: 16px;
  }

  .event-hero-meta div {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .event-hero-meta div:nth-child(3) {
    display: none;
  }

  .event-hero-meta span {
    display: none;
  }

  .event-hero-meta div::before {
    width: 20px;
    flex: 0 0 20px;
    color: var(--native-muted);
    font-family: "Crew Ionicons";
    font-size: 19px;
    line-height: 1;
    text-align: center;
  }

  .event-hero-meta div:nth-child(1)::before { content: "\f1d6"; }
  .event-hero-meta div:nth-child(2)::before { content: "\f3c5"; }
  .event-hero-meta div:nth-child(4)::before { content: "\f5db"; }

  .event-hero-meta strong {
    color: var(--native-muted);
    font-size: 14px;
    font-weight: 500;
  }

  .event-hero-meta div:nth-child(4) strong::after {
    content: " billetter solgt";
  }

  .event-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
  }

  .event-module-card {
    min-height: 132px;
    padding: 15px;
    border-radius: 17px;
  }

  .event-module-card.event-module-mobile-hidden {
    display: none;
  }

  .event-module-card span {
    display: none;
  }

  .event-module-card h2 {
    margin: 10px 0 4px;
    color: var(--native-text);
    font-size: 16px;
    font-weight: 800;
  }

  .event-module-card p {
    margin: 0;
    color: var(--native-muted);
    font-size: 13px;
    line-height: 18px;
  }

  .event-module-card > strong {
    display: none;
  }

  .modal-content,
  .clean-modal {
    background: var(--native-surface);
    color: var(--native-text);
    border-color: var(--native-line);
    border-radius: 20px;
  }

  .form-control,
  .form-select,
  textarea.form-control {
    min-height: 48px;
    background: var(--native-surface);
    color: var(--native-text);
    border-color: var(--native-line);
    border-radius: 12px;
  }

  .btn {
    min-height: 44px;
    border-radius: 12px;
    font-weight: 700;
  }
}

@media (max-width: 360px) {
  .event-module-grid {
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav-label {
    font-size: 8.5px;
  }
}
