:root {
    --bg: #edf1f6;
    --bg-2: #f7f9fc;
    --surface: #ffffff;
    --surface-solid: #ffffff;
    --surface-muted: #f4f7fb;
    --border: #d7deea;
    --text: #1f2937;
    --text-muted: #6b7280;
    --brand: #ffc83d;
    --brand-strong: #ffb000;
    --field-bg: #ffffff;
    --field-bg-disabled: #f1f4f8;
    --field-border: #cdd6e3;
    --field-text: #1f2937;
    --field-placeholder: #98a2b3;
    --field-radius: 12px;
    --radius-card: 20px;
    --radius-pill: 999px;
    --shadow-card: 0 18px 34px -28px rgba(15, 23, 42, 0.22);
}

body {
    background:
        radial-gradient(1200px 600px at -8% -10%, rgba(15, 23, 42, 0.03), transparent 60%),
        radial-gradient(900px 500px at 110% -10%, rgba(255, 200, 61, 0.14), transparent 62%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
    color: var(--text);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Manrope', ui-sans-serif, system-ui !important;
}

h1,
h2,
h3 {
    text-transform: uppercase !important;
}

h4 {
    text-transform: none !important;
}

h1 {
    font-size: 2rem !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
}

h2 {
    font-size: 1.5rem !important;
    line-height: 1.15 !important;
    font-weight: 750 !important;
}

h3 {
    font-size: 1.2rem !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

h4 {
    font-size: 1rem !important;
    line-height: 1.25 !important;
    font-weight: 650 !important;
}

.app-shell {
    position: relative;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: clip;
    padding: 0;
}

.app-body .app-workspace {
    border: 0;
    border-radius: 0;
    overflow: hidden;
    min-height: 100vh;
    background: transparent;
}

@media (max-width: 1024px) {
    .app-body .app-workspace {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        min-height: 100vh;
    }
}

.app-shell::before {
    content: none;
}

.app-shell > * {
    position: relative;
    z-index: 1;
}

.surface-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    backdrop-filter: none;
    padding: 1.25rem;
    min-width: 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--brand);
    color: #121212;
    padding: 0.52rem 0.95rem;
    font-size: 0.875rem;
    font-weight: 650;
    box-shadow: 0 10px 24px -14px rgba(255, 200, 61, 0.64);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -18px rgba(255, 200, 61, 0.72);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #c7d1de;
    background: #ffffff;
    color: #223044;
    padding: 0.52rem 1rem;
    font-size: 0.875rem;
    font-weight: 620;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    background: #f4f7fb;
    border-color: #b7c3d4;
    color: #18212f;
}

.btn-accent-tone {
    border-color: #f1c55c;
    background: #fff1c9;
    color: #5a450f;
}

.btn-accent-tone:hover {
    background: #ffe7a8;
    border-color: #e8bc4f;
    color: #443509;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 14px;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 620;
    color: #b5c0cf;
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #47566b;
    flex: 0 0 6px;
}

.sidebar-link:hover {
    background: #131c27;
    border-color: #314054;
    color: #edf1f8;
    box-shadow: inset 2px 0 0 0 rgba(255, 200, 61, 0.5);
}

.sidebar-link:focus-visible {
    outline: none;
    background: #131c27;
    border-color: #3b4f68;
    color: #edf1f8;
    box-shadow: inset 2px 0 0 0 rgba(255, 200, 61, 0.8);
}

.sidebar-link-active {
    background: #141e2a;
    border-color: #3b4f68;
    color: #ffe39c;
    box-shadow: inset 2px 0 0 0 rgba(255, 200, 61, 0.95), inset 0 0 0 1px rgba(255, 227, 156, 0.05);
}

.sidebar-link-active::before {
    background: #ffc83d;
}

.sidebar-link--with-icon::before {
    display: none;
}

.sidebar-link-icon {
    width: 14px;
    flex: 0 0 14px;
    text-align: center;
    font-size: 0.82rem;
    color: #7f90a8;
}

.sidebar-link:hover .sidebar-link-icon,
.sidebar-link:focus-visible .sidebar-link-icon {
    color: #c3d2e7;
}

.sidebar-link-active .sidebar-link-icon {
    color: #ffc83d;
}

.sidebar-create-link {
    display: block;
    border: 1px solid #2d3948;
    border-radius: 10px;
    background: #0f161f;
    color: #e8edf4;
    font-size: 0.84rem;
    line-height: 1.2;
    font-weight: 540;
    padding: 0.54rem 0.75rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.sidebar-create-link:hover {
    border-color: #3a4d65;
    background: #141f2b;
    color: #f4f7fc;
    text-decoration: none;
}

.sidebar-global-search {
    display: grid;
    gap: 0.4rem;
}

.sidebar-global-search-form {
    margin: 0;
}

.sidebar-global-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-global-search-icon {
    position: absolute;
    left: 0.72rem;
    font-size: 0.78rem;
    color: #7e8ea4;
    pointer-events: none;
}

.app-sidebar .sidebar-global-search-input,
.app-sidebar .sidebar-global-search-input[type='search'] {
    width: 100%;
    height: 40px;
    border: 1px solid #2f3d4f;
    border-radius: var(--field-radius);
    background: #111a25;
    background-image: none !important;
    color: #edf3fb;
    font-size: 0.88rem;
    line-height: 1.2;
    font-weight: 520;
    padding: 0.52rem 2rem 0.52rem 2.05rem;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: dark;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.sidebar-global-search-input::-webkit-search-decoration,
.sidebar-global-search-input::-webkit-search-cancel-button,
.sidebar-global-search-input::-webkit-search-results-button,
.sidebar-global-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

.app-sidebar .sidebar-global-search-input::placeholder,
.app-sidebar .sidebar-global-search-input[type='search']::placeholder {
    color: #8ea0b8;
}

.app-sidebar .sidebar-global-search-input:hover,
.app-sidebar .sidebar-global-search-input[type='search']:hover {
    border-color: #3e5169;
    background: #162231;
}

.app-sidebar .sidebar-global-search-input:focus,
.app-sidebar .sidebar-global-search-input[type='search']:focus {
    outline: none;
    border-color: var(--brand) !important;
    background: #162231;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand) 72%, transparent),
        0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent) !important;
}

.sidebar-global-search-submit {
    position: absolute;
    right: 0.35rem;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #8ea1b9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.74rem;
}

.sidebar-global-search-submit:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #eef3fb;
}

.sidebar-global-search-link {
    font-size: 0.72rem;
    color: #8ea1b9;
    padding: 0 0.2rem;
}

.sidebar-global-search-link:hover {
    color: #dbe5f1;
    text-decoration: none;
}

.sidebar-global-search-clear {
    position: absolute;
    right: 0.4rem;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #8ea1b9;
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sidebar-global-search-clear:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #eef3fb;
}

.sidebar-global-search-hint {
    margin: 0;
    padding: 0 0.2rem;
    font-size: 0.69rem;
    color: #70839a;
}

.sidebar-global-search-results {
    display: grid;
    gap: 0.28rem;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #2d3948;
    border-radius: 10px;
    background: #0f161f;
    padding: 0.38rem;
}

.sidebar-global-search-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.42rem 0.46rem;
    color: #dbe5f1;
    text-decoration: none;
}

.sidebar-global-search-result:hover {
    border-color: #3a4d65;
    background: #141f2b;
    text-decoration: none;
}

.sidebar-global-search-result-icon {
    width: 1.05rem;
    color: #8ea1b9;
    text-align: center;
    font-size: 0.76rem;
}

.sidebar-global-search-result-body {
    display: grid;
    min-width: 0;
}

.sidebar-global-search-result-title {
    font-size: 0.79rem;
    line-height: 1.25;
    color: #edf2fa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-global-search-result-subtitle {
    font-size: 0.7rem;
    line-height: 1.2;
    color: #90a1b6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-global-search-result-type {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7f90a8;
    border: 1px solid #314054;
    border-radius: 999px;
    padding: 0.12rem 0.42rem;
}

.sidebar-global-search-empty {
    margin: 0;
    font-size: 0.76rem;
    color: #8ea1b9;
    padding: 0.25rem 0.35rem;
}

.app-sidebar-group-label {
    color: #6f7f94 !important;
}

.app-sidebar-subtitle {
    color: #90a0b5;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    padding: 0.2rem 0.56rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.status-badge.hidden {
    display: none;
}

.badge-default {
    background: #eef2f7;
    color: #334155;
    border: 1px solid #d0d7e3;
}

.badge-gray {
    background: #edf2f7;
    color: #475569;
    border: 1px solid #d4dce8;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.badge-success {
    background: #fff4d4;
    color: #7a5d16;
    border: 1px solid #f1c55c;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.badge-released {
    background: #e9f9f1;
    color: #1f7a4f;
    border: 1px solid #7ac9a5;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.badge-warning {
    background: #fff4d4;
    color: #7a5d16;
    border: 1px solid #f1c55c;
}

.badge-info {
    background: #e8f1ff;
    color: #24508c;
    border: 1px solid #b8cff2;
}

.badge-muted {
    background: #f1f4f8;
    color: #64748b;
    border: 1px solid #d6deea;
}

.badge-danger {
    background: #ffecef;
    color: #a8344f;
    border: 1px solid #e59aaa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.badge-green {
    background: #e9f9f1;
    color: #1f7a4f;
    border: 1px solid #7ac9a5;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.badge-red {
    background: #ffecef;
    color: #a8344f;
    border: 1px solid #e59aaa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.badge-yellow {
    background: #fff4d4;
    color: #7a5d16;
    border: 1px solid #f1c55c;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.badge-orange {
    background: #fff0e5;
    color: #a55d27;
    border: 1px solid #efb98f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.badge-purple {
    background: #f1ebff;
    color: #6d4da1;
    border: 1px solid #c7b1ea;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.badge-blue {
    background: #e8f1ff;
    color: #24508c;
    border: 1px solid #b8cff2;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    font-weight: 760;
}

.metric-value {
    color: #1f2937;
    font-size: 1.95rem;
    line-height: 1.04;
    font-family: 'Sora', ui-sans-serif, system-ui;
    font-weight: 650;
}

.field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.81rem;
    font-weight: 680;
    color: #475467;
}

.textfeld1,
.textfeld2,
.app-textarea {
    width: 100%;
    border-radius: var(--field-radius);
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--field-text);
    font-size: 0.92rem;
    color-scheme: light;
}

.textfeld1,
.textfeld2,
.app-textarea {
    padding: 0.63rem 0.8rem;
}

.app-textarea {
    min-height: 110px;
    padding: 0.72rem 0.82rem;
}

/* Keep all text-like form controls consistent across the app */
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='date'],
input[type='url'],
input[type='search'],
input[type='tel'],
select,
textarea {
    border-color: var(--field-border);
    background: var(--field-bg);
    color: var(--field-text);
    color-scheme: light;
}

.textfeld1::placeholder,
.textfeld2::placeholder,
.app-textarea::placeholder,
input[type='text']::placeholder,
input[type='email']::placeholder,
input[type='password']::placeholder,
input[type='number']::placeholder,
input[type='date']::placeholder,
input[type='url']::placeholder,
input[type='search']::placeholder,
input[type='tel']::placeholder,
textarea::placeholder {
    color: var(--field-placeholder);
}

.textfeld1:focus,
.textfeld2:focus,
.app-textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.22);
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='number']:focus,
input[type='date']:focus,
input[type='url']:focus,
input[type='search']:focus,
input[type='tel']:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.22);
}

.textfeld1:disabled,
.textfeld2:disabled,
.app-textarea:disabled,
input[type='text']:disabled,
input[type='email']:disabled,
input[type='password']:disabled,
input[type='number']:disabled,
input[type='date']:disabled,
input[type='url']:disabled,
input[type='search']:disabled,
input[type='tel']:disabled,
select:disabled,
textarea:disabled {
    background: var(--field-bg-disabled);
    border-color: #c4ccda;
    color: #8b95a7;
    opacity: 1;
}

/* Keep browser autofill aligned with app fields */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--field-text);
    -webkit-box-shadow: 0 0 0 1000px var(--field-bg) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.page-header-wrap {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.page-header-kicker {
    display: inline-flex;
    border-radius: var(--radius-pill);
    border: 1px solid #3a3a3a;
    background: rgba(20, 20, 20, 0.9);
    color: var(--brand);
    font-size: 0.66rem;
    font-weight: 760;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.22rem 0.56rem;
}

.page-header-title {
    font-family: 'Manrope', ui-sans-serif, system-ui;
    font-size: 1.78rem;
    font-weight: 640;
    letter-spacing: -0.02em;
    color: #f8f8f8;
}

.page-header-subtitle {
    margin-top: 0.42rem;
    max-width: 42rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #9f9f9f;
}

@media (min-width: 768px) {
    .page-header-wrap {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .page-header-title {
        font-size: 1.45rem;
        line-height: 1.2;
        word-break: break-word;
    }
}

.calendar-day {
    min-height: 86px;
}

.calendar-month-day {
    min-height: 150px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.calendar-month-day.is-drop-target {
    border-color: var(--brand);
    background: linear-gradient(180deg, rgba(255, 200, 61, 0.16), rgba(255, 255, 255, 0.94));
    box-shadow: inset 0 0 0 1px rgba(255, 200, 61, 0.45), 0 8px 20px -16px rgba(255, 200, 61, 0.35);
    transform: scale(1.008);
    z-index: 2;
}

.js-calendar-event.is-dragging-event {
    opacity: 0.62;
    box-shadow: 0 0 0 2px rgba(255, 200, 61, 0.95);
}

.calendar-event-drag-ghost {
    border-radius: 8px;
    border: 1px solid #ccd5e2;
    background: rgba(255, 255, 255, 0.96);
    color: #1f2937;
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 28px -16px rgba(15, 23, 42, 0.35);
}

.switch {
    position: relative;
    display: inline-flex;
    width: 46px;
    height: 28px;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: #cdd6e3;
    transition: background 0.2s ease;
    position: relative;
    cursor: pointer;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    top: 3px;
    left: 3px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s ease;
}

.switch input:checked + .switch-slider {
    background: var(--brand);
}

/* Global light utility normalization */
.bg-white,
.bg-slate-50,
.bg-slate-100,
.bg-slate-50\/30,
.bg-slate-50\/40,
.bg-slate-50\/50,
.bg-slate-50\/70,
.bg-slate-50\/80,
.bg-white\/65,
.bg-white\/70,
.bg-white\/75,
.bg-white\/80,
.bg-white\/85,
.bg-white\/90,
.bg-white\/95,
.bg-brand-50,
.bg-brand-50\/30,
.bg-brand-50\/40 {
    background-color: #ffffff !important;
}

.text-slate-950,
.text-slate-900,
.text-slate-800,
.text-slate-700 {
    color: #1f2937 !important;
}

.text-slate-600,
.text-slate-500,
.text-slate-400 {
    color: #667085 !important;
}

.text-brand-700,
.text-brand-600,
.text-brand-500 {
    color: var(--brand) !important;
}

.border-slate-100,
.border-slate-200,
.border-slate-300,
.border-slate-400,
.border-brand-100,
.border-brand-200,
.border-brand-300,
.border-brand-400 {
    border-color: #d7deea !important;
}

/* Sidebar explicitly black */
.app-sidebar {
    background: #070b11 !important;
    border-color: #1f2834 !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.app-sidebar-account {
    background: #0d131b !important;
    border-color: #2c3748 !important;
}

.app-sidebar-account .text-slate-900 {
    color: #eef3fb !important;
}

.app-sidebar-account .text-slate-500 {
    color: #9aa8ba !important;
}

.app-sidebar-account .btn-secondary {
    border-color: #405169;
    background: #15202d;
    color: #dbe5f1;
}

.app-sidebar-account .btn-secondary:hover {
    background: #1b2a3b;
    border-color: #506684;
    color: #f2f7ff;
}

/* Keep warning/success/error logic in light variants */
.bg-amber-50 { background-color: #fff9eb !important; }
.bg-amber-100 { background-color: #fff2d1 !important; }
.bg-amber-50\/70 { background-color: rgba(255, 249, 235, 0.7) !important; }
.border-amber-200 { border-color: #f1d08c !important; }
.border-amber-300 { border-color: #e7b960 !important; }
.text-amber-900 { color: #6a4a00 !important; }
.text-amber-800 { color: #8a5b02 !important; }
.text-amber-700 { color: #ffc83d !important; }

.bg-emerald-50 { background-color: #ecfdf3 !important; }
.bg-emerald-100 { background-color: #d9f9e8 !important; }
.bg-emerald-50\/60 { background-color: rgba(236, 253, 243, 0.6) !important; }
.border-emerald-200 { border-color: #8fd9b4 !important; }
.border-emerald-300 { border-color: #5bbf92 !important; }
.text-emerald-900 { color: #0f5132 !important; }
.text-emerald-800 { color: #166a45 !important; }
.text-emerald-700 { color: #2f9462 !important; }

.bg-rose-50 { background-color: #fff1f4 !important; }
.bg-rose-100 { background-color: #ffe3e8 !important; }
.bg-rose-50\/40 { background-color: rgba(255, 241, 244, 0.4) !important; }
.bg-rose-50\/70 { background-color: rgba(255, 241, 244, 0.7) !important; }
.border-rose-200 { border-color: #f2b5c2 !important; }
.border-rose-300 { border-color: #e58ea1 !important; }
.text-rose-900 { color: #7f1d35 !important; }
.text-rose-800 { color: #9f2d48 !important; }
.text-rose-700 { color: #bc3e5d !important; }
.text-rose-600 { color: #d14e70 !important; }

.hover\:bg-rose-100:hover { background-color: #ffe3e8 !important; }
.hover\:bg-emerald-100:hover { background-color: #d9f9e8 !important; }

/* Release edit page: keep form fields aligned to light theme */
.release-edit-form .textfeld1,
.release-edit-form .textfeld2,
.release-edit-form .app-textarea {
    background-color: #ffffff !important;
    border-color: #cdd6e3 !important;
    color: #1f2937 !important;
}

.release-edit-form .textfeld1::placeholder,
.release-edit-form .textfeld2::placeholder,
.release-edit-form .app-textarea::placeholder {
    color: #98a2b3 !important;
}

.release-edit-form .textfeld1:focus,
.release-edit-form .textfeld2:focus,
.release-edit-form .app-textarea:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.22) !important;
}

.release-cover-dropzone {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px dashed #4a515d;
    background: #14181e;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.release-cover-dropzone:hover {
    border-color: rgba(255, 200, 61, 0.55);
}

.release-cover-dropzone:focus-visible {
    outline: none;
    border-color: rgba(255, 200, 61, 0.75);
    box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.22);
}

.release-cover-dropzone.is-dragover {
    border-color: rgba(255, 200, 61, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.24);
    transform: translateY(-1px);
}

.release-cover-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.release-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.release-cover-overlay {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(2px);
    padding: 0.55rem 0.65rem;
}

.release-song-option-row > td {
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    vertical-align: middle;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.release-song-options-table {
    border-collapse: separate;
    border-spacing: 0 0.4rem;
}

.release-song-options-table thead th {
    border-bottom: 1px solid #4a515d;
}

.release-song-options-table thead th:first-child {
    padding-left: 0.85rem;
}

.release-song-option-row > td:first-child {
    padding-left: 0.85rem;
    border-top-left-radius: 0.65rem;
    border-bottom-left-radius: 0.65rem;
}

.release-song-option-row > td:first-child .js-release-song-checkbox {
    margin-top: 0;
}

.release-song-option-row > td:last-child {
    border-top-right-radius: 0.65rem;
    border-bottom-right-radius: 0.65rem;
}

.release-song-option-row:not(.release-song-option-selected) > td {
    background-color: rgba(20, 24, 30, 0.5);
}

.release-song-option-row.release-song-option-selected > td {
    background-color: rgba(255, 200, 61, 0.09);
    border-top-color: rgba(255, 200, 61, 0.52);
    border-bottom-color: rgba(255, 200, 61, 0.52);
}

.release-song-option-row.release-song-option-selected > td:first-child {
    border-left: 1px solid rgba(255, 200, 61, 0.52);
}

.release-song-option-row.release-song-option-selected > td:last-child {
    border-right: 1px solid rgba(255, 200, 61, 0.52);
}

.admin-template-item-toggle {
    transition: background-color 0.16s ease;
}

.admin-template-item-toggle:hover {
    background: rgba(20, 24, 30, 0.84) !important;
}

/* Weekly planning: make tasks stand out more clearly */
.release-week-board .release-week-column {
    border-color: #596171 !important;
    background: linear-gradient(180deg, rgba(21, 26, 33, 0.95) 0%, rgba(16, 20, 26, 0.95) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 34px -28px rgba(0, 0, 0, 0.9);
}

.release-week-board .release-week-column.border-rose-300 {
    border-color: #a42d45 !important;
    background: linear-gradient(180deg, rgba(52, 19, 27, 0.78) 0%, rgba(34, 14, 21, 0.72) 100%) !important;
}

.release-week-board .release-week-column > header {
    border-bottom-color: #596171 !important;
}

.release-week-task-card,
.release-week-suggestion-card {
    position: relative;
    border-color: #697385 !important;
    background: #242b34 !important;
    box-shadow: 0 12px 26px -22px rgba(0, 0, 0, 0.95);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.release-week-task-card:hover,
.release-week-suggestion-card:hover {
    transform: translateY(-1px);
    border-color: var(--brand) !important;
    box-shadow: 0 18px 32px -24px rgba(255, 200, 61, 0.34);
}

.release-week-task-card.is-done {
    border-color: #2f7b61 !important;
    background: rgba(16, 43, 33, 0.88) !important;
}

.release-week-task-card.is-overdue {
    border-color: #a42d45 !important;
    background: rgba(67, 18, 30, 0.9) !important;
}

.release-week-task-card.is-overdue:hover {
    border-color: #c63e5a !important;
    box-shadow: 0 18px 32px -24px rgba(198, 62, 90, 0.45);
}

.release-week-task-body {
    border-color: #5b6677 !important;
    background: rgba(15, 19, 25, 0.9) !important;
}

.release-week-empty {
    border-color: #5b6677 !important;
    background: rgba(15, 19, 25, 0.78) !important;
}

@media (min-width: 1024px) {
    .release-edit-form .release-edit-grid {
        grid-template-columns: minmax(260px, 380px) minmax(0, 1fr) minmax(0, 1fr);
        gap: 1.5rem;
        align-items: start;
    }

    .release-edit-form .release-edit-grid > :nth-child(1) {
        grid-column: 2 / 4 !important;
    }

    .release-edit-form .release-edit-grid > :nth-child(2) {
        grid-column: 2 !important;
    }

    .release-edit-form .release-edit-grid > :nth-child(3) {
        grid-column: 3 !important;
    }

    .release-edit-form .release-edit-grid > :nth-child(4) {
        grid-column: 2 / 4 !important;
    }

    .release-edit-form .release-edit-grid > :nth-child(5) {
        grid-column: 1 !important;
        grid-row: 1 / span 4 !important;
    }

    .release-edit-form .release-edit-grid > :nth-child(n + 6) {
        grid-column: 1 / 4 !important;
    }
}

.switch input:checked + .switch-slider::before {
    transform: translateX(18px);
}

.switch input:focus-visible + .switch-slider {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Public EPK layout */
.epk-page {
    --epk-accent: #ffc83d;
    --epk-bg-panel: rgba(14, 17, 22, 0.96);
    --epk-bg-panel-soft: rgba(20, 24, 30, 0.82);
    --epk-border: #4a515d;
    --epk-text: #f3f3f3;
    --epk-text-muted: #a3a3a3;
    --epk-badge-default-bg: rgba(148, 163, 184, 0.22);
    --epk-badge-default-text: #e2e8f0;
    --epk-badge-success-bg: rgba(34, 197, 94, 0.24);
    --epk-badge-success-text: #dcfce7;
    --epk-badge-warning-bg: rgba(245, 158, 11, 0.24);
    --epk-badge-warning-text: #fef3c7;
    --epk-badge-info-bg: rgba(59, 130, 246, 0.24);
    --epk-badge-info-text: #dbeafe;
    --epk-badge-muted-bg: rgba(100, 116, 139, 0.28);
    --epk-badge-muted-text: #e2e8f0;
    --epk-badge-danger-bg: rgba(239, 68, 68, 0.24);
    --epk-badge-danger-text: #fee2e2;
    display: grid;
    gap: 1.9rem;
    padding-bottom: 2.2rem;
    position: relative;
    isolation: isolate;
}

.epk-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--epk-hero-image, none);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.epk-page::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(1000px 580px at 15% -8%, color-mix(in srgb, var(--epk-accent) 22%, transparent), transparent 56%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.72));
}

.epk-page > * {
    position: relative;
    z-index: 1;
}

.epk-page.epk-theme-light {
    --epk-bg-panel: rgba(252, 252, 252, 0.96);
    --epk-bg-panel-soft: rgba(245, 246, 248, 0.95);
    --epk-border: #d6d9de;
    --epk-text: #0f172a;
    --epk-text-muted: #475569;
    --epk-badge-default-bg: #e2e8f0;
    --epk-badge-default-text: #0f172a;
    --epk-badge-success-bg: #dcfce7;
    --epk-badge-success-text: #14532d;
    --epk-badge-warning-bg: #fef3c7;
    --epk-badge-warning-text: #78350f;
    --epk-badge-info-bg: #dbeafe;
    --epk-badge-info-text: #1e3a8a;
    --epk-badge-muted-bg: #e5e7eb;
    --epk-badge-muted-text: #334155;
    --epk-badge-danger-bg: #fee2e2;
    --epk-badge-danger-text: #7f1d1d;
}

.epk-page.epk-theme-light::after {
    background:
        radial-gradient(1000px 580px at 15% -8%, color-mix(in srgb, var(--epk-accent) 20%, transparent), transparent 58%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.62), rgba(248, 250, 252, 0.8));
}

.epk-page .status-badge {
    border: 1px solid color-mix(in srgb, var(--epk-border) 58%, transparent);
}

.epk-page .badge-default {
    background: var(--epk-badge-default-bg);
    color: var(--epk-badge-default-text);
}

.epk-page .badge-success {
    background: var(--epk-badge-success-bg);
    color: var(--epk-badge-success-text);
}

.epk-page .badge-released {
    background: var(--epk-badge-success-bg);
    color: var(--epk-badge-success-text);
}

.epk-page .badge-warning {
    background: var(--epk-badge-warning-bg);
    color: var(--epk-badge-warning-text);
}

.epk-page .badge-info {
    background: var(--epk-badge-info-bg);
    color: var(--epk-badge-info-text);
}

.epk-page .badge-muted {
    background: var(--epk-badge-muted-bg);
    color: var(--epk-badge-muted-text);
}

.epk-page .badge-danger {
    background: var(--epk-badge-danger-bg);
    color: var(--epk-badge-danger-text);
}

.app-shell:has(.epk-page.epk-theme-light) {
    background:
        radial-gradient(1200px 720px at 0% -20%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.45) 48%, transparent 70%),
        radial-gradient(900px 520px at 100% 0%, rgba(214, 217, 222, 0.38), transparent 58%),
        linear-gradient(180deg, #f8fafc, #eef2f7 65%, #e9edf3);
}

.app-shell:has(.epk-page.epk-theme-light)::before {
    background-image: linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    mask-image: radial-gradient(1200px 700px at 50% 0%, black 58%, transparent 100%);
}

.app-shell:has(.epk-page.epk-theme-light) > .absolute {
    display: none;
}

.app-shell:has(.epk-page.epk-theme-dark) {
    background:
        radial-gradient(1100px 560px at 0% -10%, color-mix(in srgb, var(--epk-accent, #ffc83d) 20%, transparent), transparent 55%),
        radial-gradient(900px 420px at 100% -5%, color-mix(in srgb, var(--epk-accent, #ffc83d) 15%, transparent), transparent 52%),
        linear-gradient(180deg, #000, #020202);
}

.app-shell:has(.epk-page) > .relative.mx-auto {
    padding-top: 0;
}

.epk-hero,
.epk-section {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.epk-page.epk-theme-light .epk-hero {
    box-shadow: none;
}

.epk-hero {
    padding: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
}

.epk-hero-grid {
    display: grid;
    gap: 1rem;
}

.epk-hero-cover {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    border-top: 1px solid color-mix(in srgb, var(--epk-border) 58%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--epk-border) 58%, transparent);
    border-left: 0;
    border-right: 0;
    min-height: clamp(340px, 58vh, 680px);
    background: #0d0f12;
}

.epk-hero-cover-image,
.epk-hero-cover-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.epk-hero-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.58));
}

.epk-page.epk-theme-light .epk-hero-cover::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(15, 23, 42, 0.25));
}

.epk-hero-content {
    padding: 1.3rem 0.2rem 0.1rem;
}

.epk-hero-content-wrap {
    width: min(100%, 1600px);
    margin: 0 auto;
    padding: 0 1.35rem;
}

.epk-kicker {
    margin: 0;
    color: var(--epk-accent);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 760;
}

.epk-title {
    margin-top: 0.4rem;
    font-family: 'Sora', ui-sans-serif, system-ui;
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.04;
    color: var(--epk-text);
    letter-spacing: -0.025em;
}

.epk-artist {
    margin-top: 0.45rem;
    font-size: 0.95rem;
    color: var(--epk-text-muted);
}

.epk-subtitle {
    margin-top: 0.85rem;
    max-width: 62ch;
    color: color-mix(in srgb, var(--epk-text) 82%, transparent);
    line-height: 1.55;
    font-size: 0.94rem;
}

.epk-anchor-nav {
    position: fixed;
    top: max(0.85rem, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    width: min(calc(100% - 1.4rem), 1080px);
    margin-top: 0;
    padding: 0.66rem 0.9rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(6, 8, 11, 0.48);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px -20px rgba(0, 0, 0, 0.9);
}

.epk-anchor-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.1rem;
}

.epk-anchor-link {
    display: inline-block;
    color: #f8fafc;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 640;
    padding: 0.16rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.epk-anchor-link:hover {
    color: var(--epk-accent);
    border-bottom-color: var(--epk-accent);
}

.epk-anchor-link:focus-visible {
    outline: none;
    color: var(--epk-accent);
    border-bottom-color: var(--epk-accent);
}

.epk-page.epk-theme-light .epk-anchor-nav {
    border-color: rgba(15, 23, 42, 0.24);
    background: rgba(248, 250, 252, 0.72);
}

.epk-page.epk-theme-light .epk-anchor-link {
    color: #0f172a;
}

.epk-section {
    position: relative;
    margin-top: 0.15rem;
    padding: 1.62rem 0.95rem 1rem;
    border: 1px solid color-mix(in srgb, var(--epk-accent) 34%, var(--epk-border));
    border-radius: 1rem;
    background: color-mix(in srgb, var(--epk-bg-panel-soft) 24%, transparent);
    box-shadow:
        0 16px 34px -28px color-mix(in srgb, var(--epk-accent) 42%, transparent),
        inset 0 1px 0 color-mix(in srgb, var(--epk-accent) 26%, transparent),
        inset 0 -1px 0 color-mix(in srgb, var(--epk-border) 55%, transparent);
    backdrop-filter: blur(4px);
    scroll-margin-top: 6.2rem;
}

.epk-section::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.7rem;
    bottom: 0.7rem;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--epk-accent) 88%, white 12%), color-mix(in srgb, var(--epk-accent) 58%, transparent));
    opacity: 0.95;
    pointer-events: none;
}

.epk-page.epk-theme-light .epk-section {
    border-color: color-mix(in srgb, var(--epk-accent) 36%, #cbd5e1);
    background: color-mix(in srgb, #ffffff 62%, transparent);
    box-shadow:
        0 14px 26px -24px color-mix(in srgb, var(--epk-accent) 32%, transparent),
        inset 0 1px 0 color-mix(in srgb, var(--epk-accent) 22%, white),
        inset 0 -1px 0 #d7dde6;
}

.epk-page.epk-theme-light .epk-section::before {
    background: linear-gradient(180deg, color-mix(in srgb, var(--epk-accent) 72%, white 28%), color-mix(in srgb, var(--epk-accent) 52%, white 48%));
}

.epk-section + .epk-section {
    margin-top: 1.15rem;
}

.epk-section-title {
    font-family: 'Sora', ui-sans-serif, system-ui;
    font-size: 1rem;
    font-weight: 620;
    letter-spacing: 0.02em;
    color: var(--epk-text);
}

.epk-facts {
    margin-top: 0.9rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1rem;
}

.epk-release-cover-wrap {
    margin-top: 0.9rem;
}

.epk-release-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    width: min(100%, 260px);
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--epk-border) 55%, transparent);
    background: color-mix(in srgb, var(--epk-bg-panel-soft) 62%, transparent);
}

.epk-release-cover-image,
.epk-release-cover-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.epk-fact-card {
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--epk-border) 55%, transparent);
    border-radius: 0;
    background: transparent;
    padding: 0.55rem 0.1rem 0.5rem;
}

.epk-fact-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--epk-text-muted);
    font-weight: 700;
}

.epk-fact-value {
    margin-top: 0.24rem;
    font-size: 0.9rem;
    font-weight: 620;
    color: var(--epk-text);
}

.epk-story-text {
    margin-top: 0.7rem;
    color: color-mix(in srgb, var(--epk-text) 86%, transparent);
    line-height: 1.7;
    font-size: 0.94rem;
}

.epk-empty {
    margin-top: 0.7rem;
    color: var(--epk-text-muted);
    font-size: 0.9rem;
}

.epk-track-list {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.2rem;
}

.epk-track-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: center;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--epk-border) 55%, transparent);
    border-radius: 0;
    background: transparent;
    padding: 0.72rem 0.1rem;
}

.epk-track-number {
    align-self: stretch;
    min-width: 2.3rem;
    border-radius: 0.7rem;
    border: 1px solid color-mix(in srgb, var(--epk-border) 60%, transparent);
    background: color-mix(in srgb, var(--epk-bg-panel-soft) 45%, transparent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--epk-accent);
    letter-spacing: 0.14em;
    font-size: 0.68rem;
    font-weight: 760;
}

.epk-track-title {
    font-size: 0.93rem;
    line-height: 1.35;
    color: var(--epk-text);
    font-weight: 620;
}

.epk-track-meta {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.epk-track-deadline,
.epk-track-audio-missing {
    font-size: 0.76rem;
    color: var(--epk-text-muted);
}

.epk-audio-player {
    margin-top: 0.6rem;
    width: min(100%, 380px);
    height: 36px;
    accent-color: var(--epk-accent);
    border-radius: 999px;
}

.epk-social-list {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.2rem;
}

.epk-social-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--epk-border) 55%, transparent);
    border-radius: 0;
    padding: 0.55rem 0.1rem;
    background: transparent;
    color: var(--epk-text);
    font-size: 0.85rem;
    transition: border-color 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.epk-social-link:hover {
    border-color: var(--epk-accent);
    color: var(--epk-accent);
    transform: translateY(-1px);
}

.epk-social-arrow {
    font-size: 0.86rem;
}

.epk-fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: epk-fade-in 0.5s ease forwards;
    animation-delay: var(--epk-delay, 0ms);
}

@keyframes epk-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1024px) {
    .epk-page {
        gap: 2.2rem;
    }

    .epk-hero {
        padding: 0;
    }

    .epk-hero-cover {
        min-height: clamp(440px, 64vh, 760px);
    }

    .epk-hero-content {
        padding: 1.5rem 0.2rem 0.1rem;
    }

    .epk-hero-content-wrap {
        padding: 0 2.4rem;
    }

    .epk-anchor-nav {
        width: min(calc(100% - 2.2rem), 1180px);
    }

    .epk-section {
        padding: 1.75rem 1.1rem 1.05rem;
    }

    #release-info {
        display: grid;
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        grid-template-areas:
            "title title"
            "cover facts";
        column-gap: 1.5rem;
        row-gap: 0.5rem;
        align-items: start;
    }

    #release-info > .epk-section-title {
        grid-area: title;
    }

    #release-info > .epk-release-cover-wrap {
        grid-area: cover;
        margin-top: 0.4rem;
    }

    #release-info > .epk-facts {
        grid-area: facts;
        margin-top: 0.4rem;
    }
}

/* PMT compatibility layer for existing blade views */
.app-filter-grid {
    display: grid;
    gap: 0.75rem;
    align-items: end;
}

.app-filter-field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.customer-form-layout {
    display: grid;
    gap: 0.9rem;
}

.customer-form-section {
    border: 1px solid #d6deea;
    border-radius: 11px;
    background: #ffffff;
    padding: 0.8rem;
}

.customer-form-title {
    margin: 0 0 0.55rem;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 700;
}

.customer-form-grid {
    display: grid;
    gap: 0.6rem 0.7rem;
}

.customer-form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.customer-form-col-span-2 {
    grid-column: span 2;
}

.customer-form-help {
    margin: 0;
    font-size: 0.72rem;
    color: #7d8797;
}

.app-filter-label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.textfeld1,
.app-filter-select {
    width: 100%;
    height: 40px;
    border-radius: var(--field-radius);
    border: 1px solid #cdd6e3;
    background: #ffffff;
    color: var(--field-text);
    font-size: 0.88rem;
    padding: 0.52rem 0.72rem;
    color-scheme: light;
}

.textfeld2 {
    width: 100%;
    height: 40px;
    border-radius: 12px !important;
    border: 1px solid #cdd6e3;
    background: #ffffff;
    color: var(--field-text);
    font-size: 0.88rem;
    padding: 0.52rem 0.72rem;
    color-scheme: light;
}

.datumfeld1 {
    width: 100%;
    height: 40px;
    border-radius: 12px !important;
    border: 1px solid #cdd6e3;
    background: #ffffff;
    color: var(--field-text);
    font-size: 0.88rem;
    padding: 0.52rem 0.72rem;
    color-scheme: light;
}

.datumfeld1::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.72;
    cursor: pointer;
}

.datumfeld1::-webkit-datetime-edit {
    color: var(--field-text);
}

.app-filter-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem 1rem;
    padding-right: 2.2rem;
}

.textfeld1::placeholder,
.textfeld2::placeholder {
    color: #98a2b3;
}

.textfeld1:focus,
.textfeld2:focus,
.datumfeld1:focus,
.app-filter-select:focus {
    outline: none;
    border-color: var(--brand) !important;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand) 72%, transparent),
        0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent) !important;
}

.app-filter-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.4rem;
    align-items: center;
}

.app-filter-range-sep {
    color: #8f8f8f;
    font-size: 0.82rem;
    text-align: center;
}

.app-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
}

.project-card-list,
.customer-project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.7rem;
}

.project-card-list .project-card.project-card-compact,
.customer-project-list .project-card.project-card-compact {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem 0.8rem;
    border-radius: 12px;
    border-color: #d7deea;
    background: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.project-card-list .project-card.project-card-compact > :not(.project-card-bg-icon),
.customer-project-list .project-card.project-card-compact > :not(.project-card-bg-icon) {
    position: relative;
    z-index: 1;
}

.project-card-list a.project-card.project-card-compact,
.project-card-list a.project-card.project-card-compact:hover,
.customer-project-list a.project-card.project-card-compact,
.customer-project-list a.project-card.project-card-compact:hover {
    color: inherit;
    text-decoration: none;
}

.project-card-list .project-card.project-card-compact:hover,
.customer-project-list .project-card.project-card-compact:hover {
    transform: translateY(-1px);
    border-color: #b8c6da;
    box-shadow: 0 14px 24px -20px rgba(15, 23, 42, 0.24);
}

.project-card-list .project-card-head,
.customer-project-list .project-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.project-card-list .project-card-head-left,
.customer-project-list .project-card-head-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.project-card-list .project-card-type-icon:not(.project-card-bg-icon),
.customer-project-list .project-card-type-icon:not(.project-card-bg-icon) {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #d7deea;
    background: #f4f7fb;
    color: #7b8494;
    line-height: 0;
}

.project-card-list .project-card-type-icon:not(.project-card-bg-icon) i,
.customer-project-list .project-card-type-icon:not(.project-card-bg-icon) i {
    width: 16px;
    height: 16px;
    display: block;
    font-size: 16px;
    line-height: 1;
}

.project-card-list .project-card-bg-icon,
.customer-project-list .project-card-bg-icon {
    position: absolute;
    right: -14px;
    bottom: 8px;
    z-index: 0;
    transform: none;
    width: 104px;
    height: 104px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(15, 23, 42, 0.08);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.project-card-list .project-card-bg-icon i,
.customer-project-list .project-card-bg-icon i {
    width: 64px;
    height: 64px;
    display: block;
    font-size: 64px;
    line-height: 1;
}

.project-card-list .project-card-kicker,
.customer-project-list .project-card-kicker {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.project-card-list .project-card-title,
.customer-project-list .project-card-title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.2;
}

.project-card-list .project-card-value,
.customer-project-list .project-card-value {
    color: var(--text);
    font-size: 0.93rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-list .project-card-muted,
.customer-project-list .project-card-muted {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-list .project-card-chips,
.customer-project-list .project-card-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.project-card-list .project-card-chip,
.customer-project-list .project-card-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d7deea;
    background: #f4f7fb;
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1;
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-list .project-card-progress,
.customer-project-list .project-card-progress {
    margin-top: 0.1rem;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e9eef6;
    overflow: hidden;
}

.project-card-list .project-card-progress-fill,
.customer-project-list .project-card-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #519a66 0%, #67b27d 100%);
    transition: width 0.25s ease;
}

@media (max-width: 800px) {
    .customer-form-grid--3,
    .customer-form-grid--2 {
        grid-template-columns: 1fr;
    }

    .customer-form-col-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 680px) {
    .project-card-list,
    .customer-project-list {
        grid-template-columns: 1fr;
    }
}

.main-inner {
    max-width: 1700px;
    margin: 0 auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.entity-page-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.entity-title-block {
    display: grid;
    gap: 0.42rem;
    width: 100%;
    min-width: 0;
}

.entity-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 12px;
    flex-wrap: nowrap;
    width: 100%;
}

.entity-page-kicker {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 760;
}

.entity-main-heading {
    margin: 0;
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    line-height: 1.08;
    font-weight: 700;
    color: #f5f7fa;
    flex: 1 1 auto;
    min-width: 0;
}

.entity-title-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.entity-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .entity-title-row {
        flex-wrap: wrap;
    }

    .entity-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
}

.card {
    background: #ffffff;
    border: 1px solid #d6deea;
    border-radius: 16px;
    box-shadow: 0 14px 24px -22px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: none;
    padding: 1rem;
}

.muted {
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 10px;
    border: 1px solid #c7d1de;
    background: #ffffff;
    color: #223044;
    padding: 0.52rem 1rem;
    font-size: 0.875rem;
    font-weight: 620;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    background: #f4f7fb;
    border-color: #b7c3d4;
    color: #18212f;
}

button.btn[type='submit']:not(.btn-danger),
input.btn[type='submit']:not(.btn-danger) {
    background: #ffffff;
    border-color: #c7d1de;
    color: #223044;
}

button.btn[type='submit']:not(.btn-danger):hover,
input.btn[type='submit']:not(.btn-danger):hover {
    background: #f4f7fb;
    border-color: #b7c3d4;
    color: #18212f;
    transform: none;
}

button.btn[type='submit']:not(.btn-danger):focus-visible,
input.btn[type='submit']:not(.btn-danger):focus-visible {
    outline: 2px solid #b7c3d4;
    outline-offset: 2px;
}

.btn-danger {
    border-color: #e59aaa;
    background: #ffecef;
    color: #a8344f;
}

.btn-danger:hover {
    background: #ffdbe2;
    border-color: #d97f95;
    color: #8e2640;
}

/* Shared small action button style (customers table + history delete) */
.btn-customer-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e59aaa;
    background: #ffecef;
    color: #a8344f;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, filter 0.16s ease;
}

.btn-customer-action:hover {
    background: #ffdbe2;
    border-color: #d97f95;
    color: #8e2640;
    filter: none;
    text-decoration: none;
}

.btn-customer-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c2ccda;
    background: #ffffff;
    color: #344054;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.btn-customer-open:hover {
    border-color: #e0b54b;
    color: #7a5d16;
    background: #fff8e7;
    text-decoration: none;
}

.btn-customer-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f3c65a;
    background: #ffe7a8;
    color: #4f3c09;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.btn-customer-accent:hover {
    border-color: #e8bc4f;
    color: #3f3009;
    background: #ffdc89;
    text-decoration: none;
}

.app-toggle-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.52rem 1rem;
    border: 1px solid #f3c65a;
    border-radius: 10px;
    background: #fff4d4;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    line-height: 1.2;
}

.app-toggle-box.is-on {
    border-color: #7ac9a5;
    background: #e9f9f1;
}

.app-toggle-box-label {
    font-size: 0.875rem;
    letter-spacing: 0;
    text-transform: none;
    color: #9a7a2e;
    font-weight: 620;
    white-space: nowrap;
    line-height: 1.2;
}

.app-toggle-box.is-on .app-toggle-box-label {
    color: #1f7a4f;
}

.app-toggle-box.is-on .switch input:checked + .switch-slider {
    background: #4daf7c;
}

.app-toggle-box .switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex: 0 0 auto;
    width: 38px;
    height: 22px;
}

.app-toggle-box .switch-slider {
    display: block;
    width: 38px;
    height: 22px;
}

.app-toggle-box .switch-slider::before {
    width: 16px;
    height: 16px;
    top: 3px;
    left: 3px;
}

.app-toggle-box .switch input:checked + .switch-slider::before {
    transform: translateX(16px);
}

/* Global history/timeline block (used in customer + project tabs) */
.app-history-pane {
    display: grid;
    gap: 12px;
}

.app-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.app-history-head-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1f2937;
}

.app-note-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
    align-items: stretch;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.app-note-form .app-note-input {
    border: 1px solid #cfd8e6;
    background: #ffffff;
    color: #1f2937;
}

.app-note-input {
    min-height: 88px;
    resize: vertical;
}

.app-note-actions {
    display: grid;
    gap: 0.35rem;
    justify-items: start;
}

.app-note-error {
    color: #ef6b73;
    font-size: 0.8rem;
}

.app-history-list {
    position: relative;
    display: grid;
    gap: 0.56rem;
    max-height: none;
    overflow: visible;
    padding: 0.45rem 0 0.45rem 1.62rem;
    border: none;
    border-radius: 0;
    background: transparent;
    align-content: start;
}

.app-history-list::before {
    content: '';
    position: absolute;
    top: 0.8rem;
    bottom: 0.8rem;
    left: 0.9rem;
    width: 2px;
    border-radius: 999px;
    background: #d6deea;
}

.app-history-item {
    position: relative;
    border: 1px solid #d6deea;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.62rem 0.72rem;
    display: grid;
    gap: 0.4rem;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.app-history-item::before {
    content: '';
    position: absolute;
    left: -1.05rem;
    top: 0.86rem;
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 3px #ffffff;
}

.app-history-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.app-history-meta-main {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.app-history-time {
    color: #7d8797;
    font-size: 0.73rem;
    letter-spacing: 0.02em;
}

.app-history-author-badge {
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.app-history-text {
    margin: 0;
    color: #1f2937;
    font-size: 0.87rem;
    line-height: 1.42;
    white-space: pre-wrap;
}

.app-history-delete-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #d6deea;
    background: #ffffff;
    color: #667085;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.app-history-delete-btn:hover {
    border-color: #f0b8c1;
    background: #fff4f6;
    color: #b4233c;
}

.app-history-delete-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, #cf5f6f 45%, transparent);
    outline-offset: 2px;
}

.app-history-delete-btn i {
    width: 13px;
    height: 13px;
    display: block;
    font-size: 13px;
    line-height: 1;
}

.app-history-pagination {
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.app-history-pagination-link,
.app-history-pagination-current,
.app-history-pagination-disabled {
    min-width: 32px;
    height: 32px;
    padding: 0 0.55rem;
    border-radius: 999px;
    border: 1px solid #d6deea;
    background: #ffffff;
    color: #667085;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.79rem;
    font-weight: 620;
    line-height: 1;
}

.app-history-pagination-link:hover {
    border-color: #c8d3e2;
    background: #f7f9fc;
}

.app-history-pagination-current {
    border-color: color-mix(in srgb, var(--brand) 45%, #d6deea);
    background: color-mix(in srgb, var(--brand) 14%, #ffffff);
    color: #1f2937;
}

.app-history-pagination-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Global pagination styling (Laravel links()) */
.app-pagination nav p.text-sm {
    color: var(--text-muted);
}

.app-pagination nav a.inline-flex.items-center,
.app-pagination nav span.inline-flex.items-center,
.app-pagination nav span[aria-current='page'] > span.inline-flex.items-center,
.app-pagination nav span[aria-disabled='true'] > span.inline-flex.items-center {
    border-color: #cdd6e3 !important;
}

.app-pagination nav a.inline-flex.items-center,
.app-pagination nav span.inline-flex.items-center {
    color: #344054 !important;
    background: #ffffff !important;
}

.app-pagination nav span[aria-current='page'] > span.inline-flex.items-center {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #141414 !important;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.zahlungen-table-wrap {
    overflow-x: auto;
}

.revenue-split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.revenue-year-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    max-width: 320px;
}

.revenue-year-filter .app-filter-select {
    flex: 1 1 auto;
}

.revenue-table-wrap {
    overflow-x: auto;
}

.revenue-table {
    min-width: 100%;
}

.revenue-table .amount {
    text-align: right;
    white-space: nowrap;
}

.zahlungen-grid {
    min-width: 1200px;
    border-collapse: collapse;
}

.zahlungen-grid th,
.zahlungen-grid td {
    border: 1px solid #d6deea;
}

.zahlungen-grid .amount {
    text-align: right;
    white-space: nowrap;
}

.zahlungen-grid .customer {
    min-width: 220px;
    background: #f4f7fb;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 1;
}

.zahlungen-grid thead th {
    position: sticky;
    top: 0;
    background: #f8fafd;
    z-index: 2;
}

.zahlungen-grid thead .customer {
    z-index: 3;
}

.zahlungen-grid tr.sum-row td {
    font-weight: 700;
    background: #ffffff;
}

.zahlungen-grid td.status-green {
    background: #e9f9f1;
    color: #1f7a4f;
}

.zahlungen-grid td.status-yellow {
    background: #fff4d4;
    color: #7a5d16;
}

.zahlungen-grid td.status-red {
    background: #ffecef;
    color: #a8344f;
}

.app-table-frame {
    border: 1px solid #d6deea;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.app-table {
    width: 100%;
    border-collapse: collapse;
}

.app-table thead th {
    background: #f8fafd;
}

.app-table tbody tr:last-child td {
    border-bottom: 0;
}

th,
td {
    border-bottom: 1px solid #e4e9f0;
    text-align: left;
    padding: 0.72rem 0.62rem;
    vertical-align: top;
    font-size: 0.94rem;
}

th {
    color: #667085;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 760;
}

tbody tr:hover {
    background: #f6f8fb;
}

input,
select,
textarea {
    width: 100%;
    border-radius: var(--field-radius);
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--field-text);
    color-scheme: light;
}

input,
select {
    padding: 0.63rem 0.8rem;
}

textarea {
    min-height: 110px;
    padding: 0.72rem 0.82rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.22);
}

label {
    display: block;
    margin-bottom: 0.55rem;
}

input[type='checkbox'],
input[type='radio'] {
    width: auto;
    padding: 0 !important;
    border: initial !important;
    border-radius: initial !important;
    background: initial !important;
    box-shadow: none !important;
    appearance: auto !important;
}

input[type='checkbox'] {
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    background-image: none !important;
}

input[type='checkbox']:checked,
input[type='checkbox']:indeterminate {
    background-image: none !important;
}

input[type='radio'] {
    -webkit-appearance: radio !important;
    -moz-appearance: radio !important;
    background-image: none !important;
}

.auth-wrap {
    max-width: 480px;
    margin: 10vh auto;
}

form[style*='display:grid'] {
    gap: 0.75rem !important;
}
