/* ─── Google Material Design 3 — Light Theme ───────────────── */
/* Primary: #6750A4 (purple)  Secondary: #625B71  Tertiary: #7D5260 */
/* Surface: #FFFBFE  On-Surface: #1C1B1F  Outline: #79747E */
/* Error: #B3261E  Container variants for elevation */

/* ─── Reset & Base ──────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F6F2FA;
    color: #1C1B1F;
    min-height: 100vh;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
    background: #6750A4;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.header h1 {
    font-size: 1.3rem;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #E8DEF8;
}

.btn-logout {
    background: transparent;
    border: 1px solid #E8DEF8;
    color: #E8DEF8;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-logout:hover { background: rgba(232,222,248,0.2); }

/* ─── Login Page ────────────────────────────────────────────── */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #F6F2FA 0%, #E8DEF8 100%);
}

.login-box {
    background: #FFFBFE;
    padding: 40px;
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(103,80,164,0.12);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    color: #6750A4;
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.login-box .subtitle {
    color: #79747E;
    margin-bottom: 30px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.login-box .login-instruction {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1C1B1F;
    margin-bottom: 6px;
}

.login-box .login-note {
    font-weight: 700;
    font-size: 1.1rem;
    color: #006D3B;
    margin-bottom: 20px;
}

.login-box .login-example {
    font-size: 0.95rem;
    color: #625B71;
    margin-top: 0;
    margin-bottom: 2px;
}

.login-box input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #CAC4D0;
    background: #FFFBFE;
    color: #1C1B1F;
    font-size: 1rem;
    margin-bottom: 0;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login-box input:focus { border-color: #6750A4; box-shadow: 0 0 0 2px rgba(103,80,164,0.15); }
.login-box input::placeholder { color: #9E99A5; }

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #6750A4;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    letter-spacing: 0.02em;
}
.btn-primary:hover { background: #7E67C1; box-shadow: 0 2px 8px rgba(103,80,164,0.25); }
.btn-primary:disabled { background: #E0DCE4; color: #9E99A5; cursor: not-allowed; }

.name-warning {
    color: #B3261E;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.error-msg {
    color: #B3261E;
    background: #FFDAD6;
    border: 3px solid #B3261E;
    border-radius: 14px;
    padding: 14px 12px;
    margin-bottom: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
/* Collapses completely when there's no message, so nothing shifts. */
.error-msg:empty {
    display: none;
}
.error-msg.pop {
    animation: errorPop 0.5s cubic-bezier(.36,.07,.19,.97);
}

@keyframes errorPop {
    0% { transform: scale(0.9); }
    30% { transform: scale(1.04) translateX(-6px); }
    45% { transform: scale(1.04) translateX(6px); }
    60% { transform: scale(1.02) translateX(-4px); }
    75% { transform: translateX(4px); }
    100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .error-msg.pop { animation: none; }
}

.welcome-back-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #6750A4;
    margin-bottom: 3px;
}

.btn-not-you {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #79747E;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px;
}

.btn-not-you:hover {
    color: #6750A4;
}

.limit-msg {
    color: #B3261E;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 3px;
    min-height: 0;
    text-align: left;
    opacity: 0;
    transition: opacity 0.2s;
}
.limit-msg.show { opacity: 1; }

/* ─── Login name-alert popups (group names, duet names) ─────── */
.name-alert-overlay { background: rgba(120,0,0,0.55); z-index: 300; }
.name-alert-overlay.active { animation: nameAlertFlash 0.45s steps(1) 4; }

.name-alert-modal {
    background: #FFFBFE;
    border: 5px solid #B3261E;
    max-width: 420px;
    animation: nameAlertShake 0.5s cubic-bezier(.36,.07,.19,.97) 2;
}

.name-alert-emoji {
    font-size: 2.4rem;
    letter-spacing: 4px;
    margin-bottom: 6px;
}

.name-alert-modal h2 {
    color: #B3261E;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 12px;
}

.name-alert-attempt {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1C1B1F;
    margin-bottom: 14px;
    word-break: break-word;
}

.name-alert-body {
    font-size: 1rem;
    color: #1C1B1F;
    line-height: 1.45;
    margin-bottom: 10px;
}

.name-alert-shout {
    color: #B3261E;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 20px;
}

.name-alert-modal .btn-primary {
    background: #B3261E;
    font-weight: 700;
}
.name-alert-modal .btn-primary:hover { background: #C93B33; }

/* Info variant: same loud box, purple instead of "you broke a rule" red. */
.name-alert-overlay.info { background: rgba(40,0,80,0.55); }
.name-alert-overlay.info.active { animation: nameAlertFlashInfo 0.45s steps(1) 3; }
.name-alert-modal.info { border-color: #6750A4; }
.name-alert-modal.info h2 { color: #6750A4; }
.name-alert-modal.info .name-alert-shout { color: #6750A4; }
.name-alert-modal.info .btn-primary { background: #6750A4; }
.name-alert-modal.info .btn-primary:hover { background: #7E67C1; }

@keyframes nameAlertFlashInfo {
    0%, 100% { background: rgba(40,0,80,0.55); }
    50% { background: rgba(103,80,164,0.85); }
}

@keyframes nameAlertFlash {
    0%, 100% { background: rgba(120,0,0,0.55); }
    50% { background: rgba(179,38,30,0.85); }
}

@keyframes nameAlertShake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
}

@media (prefers-reduced-motion: reduce) {
    .name-alert-overlay.active,
    .name-alert-modal { animation: none; }
}

/* ─── Search Bar ────────────────────────────────────────────── */
.search-container {
    padding: 16px 20px;
    background: #FFFBFE;
    position: sticky;
    top: 52px;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 28px;
    border: 1px solid #CAC4D0;
    background: #F6F2FA;
    color: #1C1B1F;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input:focus { border-color: #6750A4; box-shadow: 0 0 0 2px rgba(103,80,164,0.12); background: #FFFBFE; }
.search-box input::placeholder { color: #9E99A5; }

/* ─── Search Tabs ──────────────────────────────────────────── */
.search-tabs {
    display: flex;
    gap: 8px;
    max-width: 700px;
    margin: 10px auto 0;
}

.tab-btn {
    padding: 8px 13px;
    background: #F6F2FA;
    color: #625B71;
    border: 1px solid #CAC4D0;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.tab-btn:hover { border-color: #6750A4; color: #6750A4; background: #E8DEF8; }
/* Highlight tabs that already have content for this customer.
   Colors chosen for WCAG AA contrast (>7:1) against the dark label text. */
.tab-btn.has-content { background: #C8E6C9; color: #1B5E20; border-color: #A5D6A7; font-weight: 600; }
.tab-btn.has-content:hover { background: #B7DFB9; border-color: #81C784; color: #1B5E20; }
.tab-btn.has-queue { background: #BBDEFB; color: #0D47A1; border-color: #90CAF9; font-weight: 600; }
.tab-btn.has-queue:hover { background: #A9D3F7; border-color: #64B5F6; color: #0D47A1; }
.tab-btn.active { background: #6750A4; color: #FFFFFF; border-color: #6750A4; }

/* ─── Next-song banner ─────────────────────────────────────── */
/* #1C1B1F on #FFE066 ≈ 12.8:1 (WCAG AAA) */
.next-song-banner {
    max-width: 700px;
    margin: 10px auto 0;
    padding: 10px 16px;
    background: #FFE066;
    color: #1C1B1F;
    border: 1px solid #E8C547;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}
.next-song-banner strong { color: #B26A00; font-weight: 700; }
.next-song-banner .next-song-line + .next-song-line { margin-top: 5px; }
.next-song-banner .next-song-more { font-size: 0.85rem; opacity: 0.75; }

/* ─── More... sub-sections (customer) ──────────────────────── */
/* Stands in for the search box on tabs where searching does nothing. */
.search-pill {
    display: none;
    margin: 0 auto;
    padding: 9px 18px;
    background: #F3EDF7;
    color: #49454F;
    border: 1px solid #CAC4D0;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    min-height: 40px;
}
.search-pill:hover { background: #E8DEF8; }
body.no-search .search-box { display: none; }
body.no-search .search-pill { display: block; }

/* ─── Customer ↔ host messages ─────────────────────────────── */
/* Unread count, on the Host... tab and on the Messages sub-tab. */
.msg-count-badge {
    display: inline-block;
    min-width: 18px;
    margin-left: 6px;
    padding: 0 5px;
    background: #B3261E;
    color: #FFFFFF;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    vertical-align: middle;
}

/* Host inbox cards */
.customer-msg.unread { border-left: 5px solid #B3261E; background: #FFF4F3; }
.customer-msg-new {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    background: #B3261E;
    color: #FFFFFF;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    vertical-align: middle;
}
.customer-msg-body {
    margin: 6px 0 8px;
    white-space: pre-wrap;
    color: #1C1B1F;
    font-size: 1rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.customer-msg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.customer-msg-actions button { flex: 1; min-width: 92px; min-height: 40px; }

/* A conversation, shown on both screens: the customer's messages on the left,
   the host's replies on the right in the green of the banner they arrive in. */
.customer-thread { margin: 10px 0 4px; }
.thread-msg {
    max-width: 88%;
    margin-bottom: 8px;
    padding: 10px 14px;
    border-radius: 14px;
}
.thread-msg.from-customer {
    margin-right: auto;
    background: #FFFBFE;
    border: 1px solid #E7E0EC;
    border-bottom-left-radius: 4px;
}
.thread-msg.from-host {
    margin-left: auto;
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    border-bottom-right-radius: 4px;
}
.thread-msg-who {
    margin-bottom: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #79747E;
}
.thread-msg.from-host .thread-msg-who { color: #1B5E20; }
.thread-msg-body { color: #1C1B1F; font-size: 0.95rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-msg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 5px;
    color: #79747E;
    font-size: 0.78rem;
}
.sent-msg-state { font-weight: 600; color: #7D5800; }
.sent-msg-state.read { color: #1B5E20; }

/* ─── Pending switch-song request (customer) ───────────────── */
/* Same pink as the switch card/tag; says the host makes the swap by hand so
   the customer doesn't think it already happened.
   #FFFFFF on #C2005E ≈ 7.9:1 (WCAG AAA). */
.switch-pending-banner {
    max-width: 700px;
    margin: 10px auto 0;
    padding: 12px 16px;
    background: #C2005E;
    color: #FFFFFF;
    border: 2px solid #8E0045;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.45;
    box-shadow: 0 0 14px rgba(194, 0, 94, 0.35);
}
.switch-pending-banner strong { font-weight: 800; }
.switch-pending-banner .switch-pending-sub {
    display: block;
    margin-top: 4px;
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0.95;
}

/* Host announcement banner — displayed below the next-song banner.
   #B71C1C on #FFCDD2 ≈ 7.5:1 (WCAG AAA for bold uppercase). */
/* ─── Saved announcements (host announce modal) ─────────────── */
.announce-saved-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0 6px;
    font-weight: 600;
    color: #1C1B1F;
}

.announce-preset-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.announce-preset-empty {
    color: #625B71;
    font-size: 0.9rem;
    font-style: italic;
    padding: 8px 2px;
}

.announce-preset {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border: 1px solid #E7E0EC;
    border-radius: 10px;
    background: #FEF7FF;
}
.announce-preset.editing { flex-direction: column; align-items: stretch; }

/* Reset the button so the preset text reads as tappable copy, not a control. */
.announce-preset-text {
    flex: 1;
    min-width: 0;
    text-align: left;
    white-space: normal;
    line-height: 1.35;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1C1B1F;
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    border-radius: 6px;
}
.announce-preset-text:hover { background: #F0E7F6; }

.announce-preset-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.35;
    border: 1.5px solid #6750A4;
    border-radius: 8px;
    resize: vertical;
    background: #FFFBFE;
    color: #1C1B1F;
}

.announce-preset-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.announce-preset-actions button {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .announce-preset { flex-direction: column; align-items: stretch; }
    /* Override the global mobile rule that makes modal buttons full-width —
       these two belong side by side on their own row. */
    .announce-preset-actions button { width: auto; flex: 1; min-height: 40px; }
}

/* Host "Announce" trigger — same size as tab-btn but visually distinct
   so it doesn't read as another navigation tab. */
/* Red while an announcement is live; green when there is nothing announced. */
.tab-btn.tab-btn-announce { background: #FFCDD2; color: #B71C1C; border-color: #EF9A9A; font-weight: 700; }
.tab-btn.tab-btn-announce:hover { background: #EF9A9A; color: #7F0000; border-color: #E57373; }
.tab-btn.tab-btn-announce.announce-empty { background: #C8E6C9; color: #1B5E20; border-color: #A5D6A7; }
.tab-btn.tab-btn-announce.announce-empty:hover { background: #A5D6A7; color: #0B3D0B; border-color: #81C784; }

.announcement-banner {
    max-width: 700px;
    margin: 10px auto 0;
    padding: 12px 16px;
    background: #FFCDD2;
    color: #B71C1C;
    border: 1px solid #EF9A9A;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* ─── Time Display (Host) ──────────────────────────────────── */
.qi-times {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
    font-size: 0.8rem;
}

.qi-submitted-time {
    color: #79747E;
}

.qi-playtime-wrap {
    color: #006D3B;
    display: flex;
    align-items: center;
    gap: 4px;
}

.playtime-input {
    background: #F6F2FA;
    border: 1px solid #CAC4D0;
    border-radius: 8px;
    color: #006D3B;
    padding: 4px 8px;
    font-size: 0.8rem;
    width: 100px;
    outline: none;
}
.playtime-input:focus { border-color: #006D3B; }

.qi-playtime-display {
    color: #006D3B;
    font-weight: 600;
}

.btn-search {
    padding: 12px 28px;
    background: #6750A4;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, box-shadow 0.2s;
    letter-spacing: 0.02em;
}
.btn-search:hover { background: #7E67C1; box-shadow: 0 2px 6px rgba(103,80,164,0.2); }
.btn-search.btn-search-back { background: #625B71; }
.btn-search.btn-search-back:hover { background: #79747E; }

/* ─── Song List ─────────────────────────────────────────────── */
.content {
    padding: 16px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.results-info {
    color: #0a0a0a;
    font-size: 1rem;
    margin-bottom: 12px;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.song-item {
    background: #FFFBFE;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #E7E0EC;
}
.song-item:hover {
    border-color: #6750A4;
    background: #F3EDF7;
    box-shadow: 0 2px 6px rgba(103,80,164,0.08);
}

.song-item .song-info h3 {
    font-size: 0.96rem;
    color: #1C1B1F;
    margin-bottom: 1px;
    font-weight: 500;
}
.song-item .song-info p {
    font-size: 0.96rem;
    color: #625B71;
}
.song-item .track-num {
    color: #6750A4;
    font-weight: 800;
    font-size: 1rem;
    white-space: nowrap;
    margin-left: 12px;
}
.song-item .artist-name {
    color: #e4298e;
    font-weight: 500;
    font-size: 0.96rem;
    white-space: nowrap;
    margin-left: 12px;
    text-align: right;
}

/* Highlight search/browse results the user already knows (favorites or sung before) */
.song-item.song-known {
    background: #FFF8E1;
    border-color: #F0C24B;
    border-left: 4px solid #F4B400;
}
.song-item.song-known:hover {
    background: #FFF3CD;
    border-color: #F4B400;
}
.song-item.song-known .song-info h3::after {
    content: '★ In Your History';
    display: inline-block;
    margin-left: 8px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #8A6D0B;
    background: #FFECB3;
    padding: 1px 7px;
    border-radius: 10px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Songs sung before by any customer: floated to the top + light-green "Suggested".
   Listed after .song-known so it wins when a song is both. */
.song-item.song-suggested,
.song-item.song-suggested.song-known {
    background: #E6F4EA;
    border-color: #34A853;
    border-left: 4px solid #34A853;
}
.song-item.song-suggested:hover,
.song-item.song-suggested.song-known:hover {
    background: #D7EFDD;
    border-color: #2E8B47;
}
/* Suggested badge is rendered in the DOM (carries the live sing count) */
.song-item.song-suggested .suggested-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #1E7E34;
    background: #C8E6C9;
    padding: 1px 7px;
    border-radius: 10px;
    vertical-align: middle;
    white-space: nowrap;
}
/* When a song is both suggested and in history, show only the Suggested badge */
.song-item.song-suggested.song-known .song-info h3::after { content: none; }

/* ─── Pagination ────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin-top: 10px;
}

.btn-page {
    padding: 8px 18px;
    background: #FFFBFE;
    color: #6750A4;
    border: 1px solid #CAC4D0;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-page:hover { border-color: #6750A4; background: #F3EDF7; }
.btn-page:disabled { opacity: 0.35; cursor: not-allowed; }

.page-info { color: #79747E; font-size: 0.9rem; }

/* ─── Song Detail Modal ─────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
    background: #FFFBFE;
    border-radius: 28px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.modal h2 {
    color: #1C1B1F;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 6px;
}
.modal .modal-artist {
    color: #6750A4;
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.modal .modal-track {
    color: #79747E;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.modal-warning {
    color: #B3261E;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 16px;
    line-height: 1.4;
    text-align: center;
}

.modal-warning.over-limit {
    color: #D50000;
    font-weight: 900;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.modal-warning .over-limit-sub {
    color: #006D3B;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: normal;
    margin-top: 10px;
    line-height: 1.4;
}

/* ─── Modal Fields ─────────────────────────────────────────── */
.modal-fields {
    text-align: left;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-field label {
    display: block;
    font-size: 0.85rem;
    color: #625B71;
    margin-bottom: 4px;
    font-weight: 500;
}

.modal-field select,
.modal-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #CAC4D0;
    background: #FFFBFE;
    color: #1C1B1F;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-field select:focus,
.modal-field input:focus { border-color: #6750A4; box-shadow: 0 0 0 2px rgba(103,80,164,0.12); }

.modal-field input::placeholder { color: #9E99A5; }

/* ─── Special Request Display ──────────────────────────────── */
.qi-special {
    font-size: 0.9rem;
    font-style: italic;
    font-weight: Bold;
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
}

.qi-key { color: #E10600; }
.qi-duet { color: #0047FF; }
.qi-notes { color: #9B00C8; }
.qi-special .qi-empty { color: #6E6E6E; }

.qi-editable-field {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    cursor: default;
}

.btn-edit-field {
    background: none;
    border: none;
    cursor: pointer;
    color: #6750A4;
    font-size: 0.78rem;
    padding: 1px 3px;
    border-radius: 3px;
    line-height: 1;
    opacity: 0.45;
    transition: opacity 0.15s, background 0.15s;
    flex-shrink: 0;
}
.qi-editable-field:hover .btn-edit-field { opacity: 0.85; }
.btn-edit-field:hover { opacity: 1 !important; background: rgba(103,80,164,0.12); }

.field-edit-input {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1C1B1F;
    border: 1.5px solid #6750A4;
    border-radius: 5px;
    padding: 1px 6px;
    outline: none;
    width: 140px;
    background: #FFFBFE;
}

.btn-sing {
    padding: 14px 32px;
    background: #006D3B;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-right: 10px;
    letter-spacing: 0.02em;
}
.btn-sing:hover { background: #008A4B; box-shadow: 0 2px 8px rgba(0,109,59,0.25); }
.btn-sing:disabled,
.btn-sing[disabled] {
    background: #BDBDBD;
    color: #757575;
    cursor: not-allowed;
    box-shadow: none;
}
.btn-sing:disabled:hover,
.btn-sing[disabled]:hover { background: #BDBDBD; box-shadow: none; }

.btn-cancel {
    padding: 14px 24px;
    background: transparent;
    color: #625B71;
    border: 1px solid #CAC4D0;
    border-radius: 100px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-cancel:hover { border-color: #6750A4; color: #6750A4; background: #F3EDF7; }

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #322F35;
    color: #F4EFF4;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 500;
    z-index: 300;
    display: none;
    animation: fadeIn 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toast.error { background: #B3261E; color: #fff; }
.toast.show { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ─── Host Queue Table ──────────────────────────────────────── */
.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.queue-header h2 { color: #6750A4; font-weight: 500; }

.btn-refresh {
    padding: 8px 18px;
    background: #FFFBFE;
    color: #6750A4;
    border: 1px solid #CAC4D0;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-refresh:hover { border-color: #6750A4; background: #F3EDF7; }

.btn-clear-night {
    padding: 8px 18px;
    background: #B3261E;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-clear-night:hover { background: #CC3A32; box-shadow: 0 2px 6px rgba(179,38,30,0.25); }

.queue-count {
    color: #79747E;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.queue-item {
    background: #FFFBFE;
    padding: 16px 18px;
    border-radius: 12px;
    border-left: 4px solid #6750A4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.queue-item .qi-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.queue-item .qi-singer {
    font-weight: 500;
    font-size: 1.05rem;
    color: #1C1B1F;
}
.queue-item .qi-song {
    color: #49454F;
    font-size: 0.95rem;
}
.queue-item .qi-artist {
    color: #79747E;
    font-size: 0.85rem;
}
.queue-item .qi-track {
    color: #6750A4;
    font-size: 0.85rem;
    font-weight: 600;
}
.queue-item .qi-song-line {
    color: #060606;
    font-size: 0.9rem;
    font-weight: 500;
}
.queue-item .qi-tag {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.qi-tag.submitted { background: #FFD8E4; color: #7D5260; }
.qi-tag.in-queue { background: #D0E8FF; color: #0061A4; }
/* Customer Submitted view — scoped so host queue colors stay unchanged.
   All pairings meet WCAG AAA contrast. */
.qi-tag.mysub-submitted { background: #BBDEFB; color: #0D47A1; }
.qi-tag.mysub-inqueue   { background: #C8E6C9; color: #1B5E20; }
.qi-tag.mysub-completed { background: #FFCDD2; color: #B71C1C; }
.qi-tag.mysub-left      { background: #FFE0B2; color: #7D5800; }
/* Tinted card background matching the status; tag remains a shade darker
   than the card so the label still reads as a distinct chip. */
.mysub-card.mysub-submitted { background: #E3F2FD; border-color: #BBDEFB; }
.mysub-card.mysub-inqueue   { background: #E8F5E9; border-color: #C8E6C9; }
.mysub-card.mysub-completed { background: #FFEBEE; border-color: #FFCDD2; }
.mysub-card.mysub-left      { background: #FFF3E0; border-color: #FFE0B2; }

/* Customer delete on a still-Submitted song (Submitted tab) */
.btn-mysub-delete {
    margin-top: 6px;
    padding: 5px 14px;
    background: #fff;
    color: #B3261E;
    border: 1.5px solid #B3261E;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-mysub-delete:hover { background: #B3261E; color: #fff; }

.queue-item .qi-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-status {
    padding: 7px 16px;
    border: none;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}
.btn-status:hover { opacity: 0.88; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.btn-status.queue { background: #0061A4; color: #fff; }
.btn-status.completed { background: #006D3B; color: #fff; }
.btn-status.left { background: #7D5800; color: #fff; }
.btn-status.deleted { background: #B3261E; color: #fff; }

.empty-queue {
    text-align: center;
    padding: 60px 20px;
    color: #9E99A5;
    font-size: 1.1rem;
}

/* ─── Host Two-Column Layout ───────────────────────────────── */
.host-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 16px 20px;
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - 120px);
}

.host-col {
    min-width: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.host-search-results {
    max-width: 1400px;
    border-bottom: 1px solid #E7E0EC;
    padding-bottom: 16px;
    margin-bottom: 0;
}

/* Processed item status highlights */
.processed-item.highlight-inqueue {
    background: #E6F4EA;
    border-left-color: #006D3B;
}
.processed-item.highlight-completed,
.processed-item.highlight-completed.has-special {
    background: #FECDD2 !important;
    border-left-color: #B3261E;
}
.processed-item.highlight-left {
    background: #FFF3E0;
    border-left-color: #7D5800;
}
.processed-item.highlight-deleted {
    background: #FCE4EC;
    border-left-color: #B3261E;
}

.qi-tag.status-completed { background: #D0E8FF; color: #0061A4; }
.qi-tag.status-left { background: #FFE0B2; color: #7D5800; }
.qi-tag.status-deleted { background: #FECDD2; color: #B3261E; }

/* Requeue button */
.btn-status.requeue {
    background: #6750A4;
    color: #fff;
}

/* Add to queue button in search */
.btn-add-queue {
    white-space: nowrap;
    font-size: 0.8rem;
}

/* ─── Singer Groups (Collapsible) ──────────────────────────── */
.singer-group {
    margin-bottom: 10px;
    border: 1px solid #E7E0EC;
    border-radius: 12px;
    overflow: hidden;
}

.singer-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #F3EDF7;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.singer-group-header:hover { background: #E8DEF8; }
.singer-group-header.header-in-queue { background: #C8E6C9; }
.singer-group-header.header-in-queue:hover { background: #A5D6A7; }

/* Switch-song request somewhere in this group — same pink as the card, so a
   collapsed group still shows it. Listed last so it beats .header-in-queue. */
.singer-group-header.header-switch { background: #FF4FA3; }
.singer-group-header.header-switch:hover { background: #F02A8C; }
.singer-group-header.header-switch .group-name { color: #FFFFFF; font-weight: 700; }
.singer-group-header.header-switch .group-arrow { color: #FFFFFF; }
.singer-group-header.header-switch .group-count { color: rgba(255,255,255,0.92); font-weight: 600; }
.singer-group-header.header-switch .btn-edit-name,
.singer-group-header.header-switch .btn-msg-singer { color: #FFFFFF; opacity: 0.85; }
.singer-group-header.header-switch:hover .btn-edit-name,
.singer-group-header.header-switch:hover .btn-msg-singer { opacity: 1; }
.singer-group-header.header-switch .btn-edit-name:hover,
.singer-group-header.header-switch .btn-msg-singer:hover { background: rgba(255,255,255,0.25); }

.group-arrow {
    font-size: 0.7rem;
    color: #6750A4;
    transition: transform 0.2s;
    display: inline-block;
}
.group-arrow.collapsed { transform: rotate(-90deg); }

.group-name {
    font-weight: 500;
    color: #1C1B1F;
    font-size: 1rem;
}

.btn-edit-name {
    background: none;
    border: none;
    cursor: pointer;
    color: #6750A4;
    font-size: 0.85rem;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.15s, background 0.15s;
    flex-shrink: 0;
}
.singer-group-header:hover .btn-edit-name { opacity: 0.8; }
.btn-edit-name:hover { opacity: 1 !important; background: rgba(103,80,164,0.12); }

.name-edit-input {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: #1C1B1F;
    border: 1.5px solid #6750A4;
    border-radius: 6px;
    padding: 1px 7px;
    outline: none;
    width: 160px;
    background: #FFFBFE;
}

.group-count {
    color: #79747E;
    font-size: 0.8rem;
    margin-left: auto;
}

.singer-group-body {
    display: none;
    padding: 6px;
    background: #FFFBFE;
}
.singer-group-body.open { display: block; }

.singer-group-body .queue-item {
    margin-bottom: 4px;
}

/* ─── Special Request Highlight ────────────────────────────── */
.queue-item.has-special {
    border-left: 4px solid #7D5260;
    background: #06f722;
}

/* ─── Switch Song Request ("replace my next song") ─────────── */
/* Song Queue card goes loud; Processed cards keep their status color, only the tag shows */
.queue-item.switch-song:not(.processed-item) {
    background: #FF4FA3;
    border: 3px solid #C2005E;
    border-left-width: 8px;
    box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.35), 0 4px 14px rgba(194, 0, 94, 0.4);
}
.queue-item.switch-song:not(.processed-item) .qi-song-line { color: #1C1B1F; font-weight: 700; }

.qi-switch-tag {
    display: inline-block;
    background: #C2005E;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    padding: 2px 10px;
    border-radius: 999px;
    animation: switch-pulse 1.4s ease-in-out infinite;
}
@keyframes switch-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(194, 0, 94, 0.6); }
    50%      { box-shadow: 0 0 0 6px rgba(194, 0, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .qi-switch-tag { animation: none; }
}

.modal-field.switch-field label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #C2005E;
    cursor: pointer;
    margin: 0;
}
.modal-field.switch-field input[type="checkbox"] {
    width: 20px;
    height: 20px;
    padding: 0;
    flex-shrink: 0;
    accent-color: #C2005E;
}

/* ─── History ──────────────────────────────────────────────── */
.history-group {
    margin-bottom: 6px;
}

.history-artist {
    font-weight: 700;
    color: #e4298e;
    font-size: 1rem;
    padding: 6px 0 3px;
    border-bottom: 1px solid #E7E0EC;
    margin-bottom: 2px;
}

.history-count {
    color: #79747E;
    font-weight: 400;
    font-size: 0.8rem;
}

.history-date {
    font-weight: 700;
    color: #0061A4;
    font-size: 1.1rem;
    padding: 8px 0 4px;
    border-bottom: 1px solid #E7E0EC;
    margin-bottom: 2px;
}

.history-item {
    padding: 4px 12px;
    color: #49454F;
    font-size: 1rem;
    cursor: pointer;
}
.history-item .song-info span {
    font-size: 1.1rem;
    font-weight: 700;
}
.fav-item .song-info span,
.tonight-item .song-info span {
    font-size: 0.96rem;
    font-weight: 700;
}
.history-item:hover {
    border-color: #6750A4;
    background: #F3EDF7;
}

.fav-table-header,
.fav-table-row {
    display: grid;
    grid-template-columns: 2fr 2fr 60px 70px;
    gap: 6px;
    align-items: center;
    padding: 4px 4px;
    font-size: 0.88rem;
}

.fav-table-header {
    font-weight: 700;
    color: #79747E;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #E7E0EC;
    padding-bottom: 5px;
    margin-bottom: 2px;
}

.fav-table-row {
    border-bottom: 1px solid #F4EFF4;
    color: #1C1B1F;
}
.fav-table-row:last-child { border-bottom: none; }
.fav-table-row-clickable { cursor: pointer; }
.fav-table-row-clickable:hover { background: #F3EDF7; border-radius: 6px; }

.fav-col-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fav-col-artists {
    color: #49454F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fav-col-key {
    color: #6750A4;
    text-align: center;
    font-weight: 500;
}

.fav-col-num {
    color: #79747E;
    text-align: right;
}

.history-notes {
    display: block;
    color: #7D5260;
    font-size: 0.8rem;
    font-style: italic;
}

.archive-search-bar {
    margin-bottom: 12px;
}

.archive-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1.5px solid #CAC4D0;
    border-radius: 12px;
    outline: none;
    background: #FFFBFE;
    color: #1C1B1F;
    transition: border-color 0.15s;
}
.archive-search-input:focus { border-color: #6750A4; }

.arch-table-header,
.arch-table-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 2fr 55px 70px;
    gap: 6px;
    align-items: center;
    padding: 4px 4px;
    font-size: 0.88rem;
}

.arch-table-header {
    font-weight: 700;
    color: #79747E;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #E7E0EC;
    padding-bottom: 5px;
    margin-bottom: 2px;
}

.arch-table-row {
    border-bottom: 1px solid #F4EFF4;
    color: #1C1B1F;
}
.arch-table-row:last-child { border-bottom: none; }
.arch-table-row-clickable { cursor: pointer; }
.arch-table-row-clickable:hover { background: #F3EDF7; border-radius: 6px; }

.arch-col-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1C1B1F;
}

.arch-col-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arch-col-artists {
    color: #49454F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arch-col-key {
    color: #6750A4;
    text-align: center;
    font-weight: 500;
}

.arch-col-num {
    color: #79747E;
    text-align: right;
}

/* ─── Archive delete-record controls ───────────────────────── */
.arch-col-del { display: none; }
.arch-table-header.arch-delete-on,
.arch-table-row.arch-delete-on {
    grid-template-columns: 1.5fr 2fr 2fr 55px 70px 34px;
}
.arch-delete-on .arch-col-del {
    display: flex;
    align-items: center;
    justify-content: center;
}
.arch-del-btn,
.kf-del-btn {
    border: none;
    background: #FFDAD6;
    color: #BA1A1A;
    border-radius: 8px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}
.arch-del-btn:hover,
.kf-del-btn:hover { background: #FFB4AB; }
.kf-col-del { display: none; flex: 0 0 auto; }
.kf-row.kf-delete-on .kf-col-del { display: inline-flex; }

.archive-singer-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 4px;
    border-bottom: 1px solid #F4EFF4;
}
.archive-singer-row:last-child { border-bottom: none; }

.archive-singer-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.archive-singer-name {
    font-weight: 700;
    font-size: 0.97rem;
    color: #1C1B1F;
}

.archive-singer-song {
    font-size: 0.88rem;
    color: #49454F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-singer-meta {
    font-size: 0.78rem;
    color: #7D5260;
    font-style: italic;
}

.archive-singer-num {
    font-size: 0.82rem;
    color: #79747E;
    flex-shrink: 0;
    margin-top: 3px;
}

.history-artist-right {
    flex-shrink: 0;
    margin-left: 12px;
    text-align: right;
    color: #e4298e;
    font-size: 0.95rem;
    font-weight: 500;
    max-width: 45%;
    overflow-wrap: break-word;
}

/* ─── Favorites ────────────────────────────────────────────── */
.btn-fav {
    padding: 14px 24px;
    background: #7D5260;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-right: 10px;
    letter-spacing: 0.02em;
}
.btn-fav:hover { background: #9A6A79; box-shadow: 0 2px 8px rgba(125,82,96,0.25); }

.btn-tonight {
    padding: 14px 24px;
    background: #0061A4;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-right: 10px;
    letter-spacing: 0.02em;
}
.btn-tonight:hover { background: #0078CC; box-shadow: 0 2px 8px rgba(0,97,164,0.25); }

.btn-fav-delete {
    padding: 5px 14px;
    background: #B3261E;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-fav-delete:hover { opacity: 0.85; }

.btn-fav-edit {
    padding: 5px 16px;
    background: #6750A4;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-fav-edit:hover { opacity: 0.85; }

/* Favorite actions popup — stack the choices full-width */
.fav-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
.fav-action-buttons button {
    width: 100%;
    margin: 0;
    min-height: 46px;
}
.fav-action-remove {
    font-size: 0.9rem;
}

.fav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fav-key-select {
    padding: 4px 6px;
    border: 1px solid #CAC4D0;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #49454F;
    background: #F6F2FA;
    cursor: pointer;
}

/* ─── Play Times Badge ─────────────────────────────────────── */
.playtime-notice {
    color: #B3261E;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.45;
    padding: 8px 0 12px;
}

.playtime-tbd {
    color: #7D5800;
    font-weight: 700;
    font-size: 0.85rem;
}

.playtime-badge.pending {
    background: #7D5800;
}

.playtime-input-edit {
    background: #F3EDF7;
    border: 1px solid #CAC4D0;
    border-radius: 100px;
    color: #006D3B;
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    width: 130px;
    outline: none;
    cursor: pointer;
}
.playtime-input-edit:focus { border-color: #006D3B; }

.playtime-item {
    cursor: default;
}

.playtime-item .qi-singer {
    font-weight: 600;
    color: #006D3B;
    margin-bottom: 2px;
}

.playtime-badge {
    background: #006D3B;
    color: #fff;
    padding: 6px 14px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}
.playtime-badge.pending {
    background: #79747E;
}

/* ─── Submitted Confirmation ──────────────────────────────── */
.submitted-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.submitted-check {
    width: 60px;
    height: 60px;
    background: #006D3B;
    color: #fff;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.submitted-heading {
    font-size: 1.3rem;
    font-weight: 600;
    color: #006D3B;
    margin-bottom: 16px;
}

.submitted-note {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6750A4;
    line-height: 1.45;
    max-width: 440px;
    margin: 0 auto 20px;
    padding: 0 12px;
}
.submitted-note strong {
    color: #e4298e;
    font-weight: 800;
}

.submitted-card {
    background: #FFFBFE;
    border: 1px solid #E7E0EC;
    border-radius: 16px;
    padding: 18px;
    margin: 0 auto 16px;
    max-width: 400px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.submitted-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1C1B1F;
    margin-bottom: 4px;
}

.submitted-artist {
    font-size: 1rem;
    color: #e4298e;
    font-weight: 500;
}

.submitted-details {
    font-size: 0.88rem;
    color: #6750A4;
    font-weight: 500;
    margin-top: 8px;
    font-style: italic;
}

.submitted-msg {
    font-size: 0.9rem;
    color: #79747E;
    line-height: 1.5;
}

.my-submissions-heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: #79747E;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 20px auto 8px;
    max-width: 400px;
    text-align: left;
}

.my-submission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #FFFBFE;
    border: 1px solid #E7E0EC;
    border-radius: 12px;
    padding: 10px 14px;
    margin: 0 auto 6px;
    max-width: 400px;
    text-align: left;
}

.my-submission-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.my-submission-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1C1B1F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-submission-artist {
    font-size: 0.82rem;
    color: #49454F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-submission-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    white-space: nowrap;
}

.sub-status-submitted  { background: #E8F5E9; color: #2E7D32; }
.sub-status-inqueue    { background: #E3F2FD; color: #1565C0; }
.sub-status-completed  { background: #F3E5F5; color: #6A1B9A; }
.sub-status-left       { background: #FFF3E0; color: #E65100; }
.sub-status-deleted    { background: #FFEBEE; color: #C62828; }

/* ─── More Section ────────────────────────────────────────── */
.more-menu {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.more-menu-btn {
    flex: 1;
    min-width: 120px;
    padding: 14px 16px;
    background: #FFFBFE;
    color: #625B71;
    border: 1px solid #CAC4D0;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.more-menu-btn:hover { border-color: #6750A4; color: #6750A4; background: #F3EDF7; }
.more-menu-btn.active { background: #6750A4; color: #FFFFFF; border-color: #6750A4; }

.more-icon { font-size: 1.2rem; }

/* Schedule Card */
.schedule-card {
    background: #FFFBFE;
    border: 1px solid #E7E0EC;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.schedule-venue {
    font-size: 1.15rem;
    font-weight: 700;
    color: #6750A4;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E7E0EC;
}

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

.schedule-row {
    font-size: 0.92rem;
    color: #49454F;
    line-height: 1.4;
}

.schedule-label {
    font-weight: 600;
    color: #1C1B1F;
}

/* Song Suggestion Form */
.suggestion-form {
    background: #FFFBFE;
    border: 1px solid #E7E0EC;
    border-radius: 16px;
    padding: 20px;
}

.suggestion-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6750A4;
    margin-bottom: 4px;
}

.suggestion-subtitle {
    font-size: 0.85rem;
    color: #79747E;
    margin-bottom: 16px;
    line-height: 1.4;
}

.suggestion-form .modal-field {
    margin-bottom: 12px;
}

/* Social Media */
.social-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #FFFBFE;
    border: 1px solid #E7E0EC;
    border-radius: 16px;
    padding: 18px 20px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.social-card:hover { border-color: #6750A4; background: #F3EDF7; box-shadow: 0 2px 8px rgba(103,80,164,0.12); }

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.social-fb { background: #1877F2; }
.social-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

.social-platform {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1C1B1F;
}

.social-handle {
    font-size: 0.9rem;
    color: #6750A4;
    font-weight: 500;
}

/* ─── Clickable Artist / Browse Hint ──────────────────────── */
.clickable-artist {
    cursor: pointer;
    transition: color 0.15s, text-decoration 0.15s;
}
.clickable-artist:hover {
    color: #6750A4 !important;
    text-decoration: underline;
}

.browse-hint {
    color: #006D3B;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 2px 4px 8px;
}

.hint-artist {
    color: #e4298e;
    font-weight: 700;
    text-transform: uppercase;
}

.hint-title {
    color: #1C1B1F;
    font-weight: 700;
    text-transform: uppercase;
}

/* ─── KF Table / Admin Table ─────────────────────────────── */
.kf-table {
    border: 1px solid #E7E0EC;
    border-radius: 12px;
    overflow: hidden;
}

.kf-header {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #6750A4;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.kf-row {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #E7E0EC;
    align-items: center;
    font-size: 0.88rem;
    color: #1C1B1F;
}
.kf-row:last-child { border-bottom: none; }
.kf-row:nth-child(even) { background: #F6F2FA; }

.kf-row.kf-dupe {
    background: #FFF9C4 !important;
}

.kf-col-title { flex: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kf-col-artist { flex: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #625B71; }
.kf-col-num { flex: 1; min-width: 80px; }
.kf-col-name { flex: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: #006D3B; }
.kf-col-track { flex: 0.8; min-width: 60px; color: #6750A4; font-weight: 600; }

.kf-input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #CAC4D0;
    border-radius: 8px;
    font-size: 0.85rem !important;
    color: #1C1B1F;
    background: #FFFBFE;
    outline: none;
}
.kf-input:focus { border-color: #6750A4; box-shadow: 0 0 0 2px rgba(103,80,164,0.12); }
.kf-input[readonly] {
    background: #EEE8F4;
    color: #625B71;
    border-color: #E7E0EC;
    cursor: not-allowed;
}
.kf-input[readonly]:focus { box-shadow: none; border-color: #E7E0EC; }

/* ─── Edit Toggle ──────────────────────────────────────────── */
.edit-toggle-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.edit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.edit-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.edit-toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: #CAC4D0;
    border-radius: 22px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.edit-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #FFFBFE;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.edit-toggle input:checked + .edit-toggle-slider { background: #6750A4; }
.edit-toggle input:checked + .edit-toggle-slider::after { transform: translateX(18px); }
.edit-toggle-label {
    font-size: 0.85rem;
    color: #1C1B1F;
    font-weight: 500;
}

/* ─── Mobile Optimizations ─────────────────────────────────── */

/* Prevent iOS zoom on input focus (font must be >= 16px) */
input, select, textarea {
    font-size: 16px !important;
}

/* Smooth scrolling on iOS */
html { -webkit-overflow-scrolling: touch; }

/* Tabs wrap on mobile */
.search-tabs {
    flex-wrap: wrap;
    justify-content: center;
}
.tab-btn { flex-shrink: 0; }

/* ─── Responsive (Tablets & Small Screens) ─────────────────── */
@media (max-width: 600px) {
    .host-columns {
        grid-template-columns: 1fr;
        height: auto;
    }
    .host-col { overflow-y: visible; }
    /* Song Queue column (2nd in HTML) appears first when stacked */
    .host-col:nth-child(2) { order: -1; }
}

/* ─── Responsive (Mobile Phones) ───────────────────────────── */
@media (max-width: 600px) {
    /* Header */
    .header { padding: 10px 14px; }
    .header h1 { font-size: 1.1rem; }
    .header .user-info { gap: 8px; font-size: 0.8rem; }

    /* Search */
    .search-container { padding: 12px 14px; top: 46px; }
    .search-box { flex-direction: column; gap: 8px; }
    .search-box input { padding: 14px 16px; }
    .btn-search { width: 100%; padding: 14px; }

    /* Tabs - bigger touch targets */
    .search-tabs { gap: 5px; margin-top: 8px; padding-bottom: 4px; }
    /* 9px, not 11: at 11 the customer's seven tabs wrap to a third row. */
    .tab-btn { padding: 8px 9px; font-size: 0.8rem; min-height: 40px; }

    /* While the search field or the message box is focused (keyboard up),
       collapse non-essential chrome so what's being typed into stays visible. */
    body.searching .header,
    body.composing .header { display: none; }
    body.searching .search-container,
    body.composing .search-container { top: 0; padding-top: 8px; padding-bottom: 8px; }
    body.searching .search-box .btn-search { display: none; }
    body.searching .search-tabs,
    body.composing .search-tabs { display: none; }
    body.searching #resultsInfo,
    body.composing #resultsInfo { display: none; }
    /* Composing doesn't need the search control or the section pills — it's
       all navigation, and the Send button has to stay above the keyboard. */
    body.composing .search-box,
    body.composing .search-pill,
    body.composing .more-menu { display: none; }

    /* Content area */
    .content { padding: 12px 10px; }

    /* Song items */
    .song-item {
        padding: 8px 10px;
        gap: 6px;
    }
    .song-item .song-info h3 { font-size: 0.96rem; }
    .song-item .song-info p { font-size: 0.96rem; }
    .song-item .track-num { font-size: 0.85rem; margin-left: 8px; }

    /* Host song items with + Queue button */
    .host-song-item {
        flex-wrap: wrap;
    }
    .host-song-item > div:last-child {
        width: 100%;
        justify-content: space-between;
        margin-top: 6px;
    }

    /* Queue items */
    .queue-item { padding: 14px 12px; }
    .queue-item .qi-top { flex-direction: column; gap: 8px; }
    .queue-item .qi-tag { align-self: flex-start; }
    .queue-item .qi-actions {
        margin-top: 10px;
        gap: 8px;
    }

    /* Bigger touch targets for status buttons */
    .btn-status {
        padding: 10px 14px;
        font-size: 0.85rem;
        min-height: 44px;
    }
    .btn-add-queue {
        padding: 10px 16px;
        min-height: 44px;
    }

    /* Time inputs */
    .qi-times { flex-direction: column; gap: 6px; align-items: flex-start; }
    .playtime-input { width: 130px; padding: 6px 8px; }

    /* Modal full-screen on mobile */
    .modal-overlay { padding: 10px; align-items: flex-end; }
    .modal {
        padding: 24px 16px;
        border-radius: 28px 28px 0 0;
        max-height: 90vh;
        overflow-y: auto;
        max-width: 100%;
    }
    .modal h2 { font-size: 1.2rem; }
    .modal .modal-artist { font-size: 1rem; }
    .name-alert-overlay { align-items: center; }
    .name-alert-modal { border-radius: 24px; }
    .name-alert-modal h2 { font-size: 1.6rem; }
    .modal-field select,
    .modal-field input { padding: 12px; }

    /* Modal buttons stacked */
    .modal > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .btn-sing { margin-right: 0; width: 100%; min-height: 48px; }
    .btn-fav { margin-right: 0; width: 100%; min-height: 48px; }
    .btn-tonight { margin-right: 0; width: 100%; min-height: 48px; }
    .btn-cancel { width: 100%; min-height: 48px; }

    /* Host columns stack */
    .host-columns {
        grid-template-columns: 1fr;
        padding: 12px 10px;
        gap: 16px;
    }

    /* Queue header */
    .queue-header { flex-wrap: wrap; gap: 8px; }
    .btn-refresh, .btn-clear-night { min-height: 44px; }

    /* Singer groups */
    .singer-group-header { padding: 12px 14px; min-height: 48px; }
    .group-name { font-size: 0.95rem; }

    /* History items */
    .history-item { padding: 6px 10px; min-height: 40px; }
    .history-artist { font-size: 1rem; padding: 6px 0 3px; }

    /* Pagination bigger touch targets */
    .btn-page { padding: 12px 20px; min-height: 44px; }

    /* Toast */
    .toast { bottom: 20px; padding: 12px 20px; font-size: 0.9rem; max-width: 90vw; }

    /* Login */
    .login-box { padding: 30px 20px; border-radius: 20px; }
    .login-box h1 { font-size: 1.6rem; }
    .login-box .subtitle { font-size: 0.85rem; margin-bottom: 20px; }
    .login-box input { padding: 16px; }
    .btn-primary { padding: 16px; min-height: 50px; }
    .name-warning { font-size: 0.75rem; }

    /* Favorites delete button */
    .btn-fav-delete { padding: 8px 14px; min-height: 38px; }

    /* Play times */
    .playtime-badge { padding: 8px 14px; font-size: 0.9rem; }

    /* More section */
    .more-menu { gap: 6px; }
    .more-menu-btn { padding: 10px 10px; font-size: 0.8rem; min-height: 44px; min-width: 100px; }

    /* The customer's sub-sections: all six on screen in two rows, without
       pushing the content below the fold. The host's menu keeps full size. */
    .more-menu.compact { gap: 5px; margin-bottom: 10px; }
    .more-menu.compact .more-menu-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
        min-height: 40px;
        min-width: 88px;
        border-radius: 12px;
        line-height: 1.2;
    }
    .schedule-card { padding: 14px; }
    .suggestion-form { padding: 16px; }
    .social-card { padding: 14px 16px; }

    /* KF table on mobile — horizontal scroll */
    .kf-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .kf-header, .kf-row { min-width: 500px; }
    .kf-header { font-size: 0.8rem; }
    .kf-row { font-size: 0.82rem; }
}

/* Flash the song a customer just submitted when they land on the Submitted tab */
.mysub-card.mysub-just-added { animation: mysub-flash 2.4s ease-out; }
@keyframes mysub-flash {
    0%, 30% { box-shadow: 0 0 0 4px #6750A4; }
    100%    { box-shadow: 0 0 0 0 rgba(103, 80, 164, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .mysub-card.mysub-just-added { animation: none; outline: 3px solid #6750A4; }
}

/* ─── Host → customer private message ───────────────────────── */
.host-message-banner {
    max-width: 700px; /* lines up with the yellow next-song banner */
    margin: 10px auto 0;
    animation: host-msg-in 0.35s ease-out;
}
.host-message-line {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #39FF14; /* neon green — can't miss it */
    color: #000;
    border: 2px solid #1B8A00;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.75);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: 8px;
}
.host-message-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.host-message-ok {
    flex-shrink: 0;
    background: #000;
    color: #39FF14;
    border: none;
    border-radius: 100px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    min-height: 38px;
}
@keyframes host-msg-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .host-message-banner { animation: none; }
}

/* 📱 next to a singer's name on the host dashboard */
.btn-msg-singer {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
    flex-shrink: 0;
}
.singer-group-header:hover .btn-msg-singer { opacity: 0.9; }
.btn-msg-singer:hover { opacity: 1 !important; background: rgba(103,80,164,0.12); }
.btn-msg-singer.msg-sent,
.btn-msg-singer.msg-read { opacity: 1; }
.btn-msg-singer.msg-sent::after,
.btn-msg-singer.msg-read::after {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 12px;
    height: 12px;
    border-radius: 50%;
    font-size: 9px;
    line-height: 12px;
    text-align: center;
    color: #fff;
}
.btn-msg-singer.msg-sent::after { content: ''; background: #F57C00; }
.btn-msg-singer.msg-read::after { content: '\2713'; background: #2E7D32; font-weight: 700; }

/* ─── Customer play order / switch on Submitted songs ───────── */
.qi-order-tag {
    display: inline-block;
    background: #0D47A1;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    padding: 2px 10px;
    border-radius: 999px;
}

.mysub-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mysub-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    color: #fff;
}
.mysub-badge-order  { background: #0D47A1; }
.mysub-badge-switch { background: #C2005E; }

.mysub-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #BBDEFB;
}
.mysub-order-select {
    padding: 6px 10px;
    border-radius: 100px;
    border: 1.5px solid #0D47A1;
    background: #fff;
    color: #0D47A1;
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 36px;
}
.btn-mysub-switch {
    padding: 6px 14px;
    border-radius: 100px;
    border: 1.5px solid #C2005E;
    background: #fff;
    color: #C2005E;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
}
.btn-mysub-switch.active { background: #C2005E; color: #fff; }
/* Where a waiting song really sits — its own line under the controls */
.mysub-hint {
    flex-basis: 100%;
    color: #49454F;
    font-size: 0.8rem;
    line-height: 1.35;
}
.mysub-hint strong { color: #1C1B1F; }
.mysub-hint-sub { display: block; color: #79747E; margin-top: 2px; }

/* ─── Song pop-up buttons: big "Add Song To Queue" on top, the rest below ── */
.modal .song-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.modal .song-modal-actions button {
    margin: 0;
    width: 100%;
    min-height: 48px;
    padding-left: 12px;
    padding-right: 12px;
}
.modal .song-modal-actions .btn-sing {
    grid-column: 1 / -1;   /* full width */
    min-height: 56px;
    font-size: 1.2rem;
    font-weight: 700;
}
/* Favorites + Save For Later side by side, Cancel full width underneath */
.modal .song-modal-actions .btn-cancel { grid-column: 1 / -1; }

/* ─── "Your Song Has Been Submitted!!" banner (My Request, after submit) ─── */
.submitted-banner {
    max-width: 700px; /* lines up with the other banners */
    margin: 10px auto 0;
    background: #FF2D95; /* hot pink — different from the green host message */
    color: #fff;
    border: 2px solid #B8006A;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(255, 45, 149, 0.7);
    padding: 14px 16px;
    font-weight: 800;
    font-size: 1.25rem;
    text-align: center;
    animation: submitted-pop 0.4s ease-out;
}
@keyframes submitted-pop {
    0%   { opacity: 0; transform: scale(0.9); }
    70%  { opacity: 1; transform: scale(1.03); }
    100% { transform: none; }
}
/* Fades itself out a few seconds after the submit */
.submitted-banner.fading {
    animation: none;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .submitted-banner { animation: none; }
    .submitted-banner.fading { transition: none; }
}
