/* ============================================
   Rotary D9660 — Mobile-First Styles
   ============================================ */

:root {
    --royal-blue: #003DA5;
    --gold: #F7A81B;
    --white: #FFFFFF;
    --dark: #1a1a2e;
    --dark-surface: #16213e;
    --transition-speed: 0.3s;
}

/* ---- Reset & Base ---- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--dark);
    color: var(--white);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ---- Screen Management ---- */

.screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity var(--transition-speed) ease,
                transform var(--transition-speed) ease;
    z-index: 1;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    z-index: 10;
}

/* ============================================
   Splash Screen
   ============================================ */

#splash-screen {
    background: linear-gradient(160deg, var(--royal-blue) 0%, var(--dark) 100%);
    justify-content: center;
    align-items: center;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
}

.splash-logo {
    width: 160px;
    height: 160px;
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.9; }
}

.splash-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
}

.splash-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 260px;
    line-height: 1.4;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease,
                transform 0.15s ease,
                opacity var(--transition-speed) ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--royal-blue);
    color: var(--white);
}

.btn-primary:active {
    background: #002d7a;
}

.btn-gold {
    background: var(--gold);
    color: var(--dark);
}

.btn-gold:active {
    background: #e09815;
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: var(--white);
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
    min-height: 52px;
    padding: 14px 40px;
    font-size: 1.05rem;
    border-radius: 12px;
    margin-top: 12px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    cursor: pointer;
    transition: background-color var(--transition-speed) ease,
                transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-icon:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   Capture Screen
   ============================================ */

#capture-screen {
    background: #000;
}

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

.camera-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    padding: 32px 24px;
    text-align: center;
}

.camera-placeholder.visible {
    display: flex;
}

.camera-denied-title {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 240px;
    line-height: 1.4;
}

.camera-denied-hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    max-width: 220px;
    line-height: 1.4;
}

.capture-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.btn-capture {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background: var(--gold);
    cursor: pointer;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

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

.capture-ring {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 3px solid var(--white);
    pointer-events: none;
}

/* ============================================
   Edit Screen
   ============================================ */

#edit-screen {
    background: var(--dark);
}

.edit-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    flex-shrink: 0;
}

.ratio-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.capture-back-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.ratio-pill {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
    -webkit-tap-highlight-color: transparent;
}

.ratio-pill.active {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
}

.ratio-pill:active {
    transform: scale(0.95);
}

.btn-adjustments-toggle {
    flex-shrink: 0;
}

/* ---- Adjustments Panel ---- */

.adjustments-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease,
                padding var(--transition-speed) ease;
}

.adjustments-panel.active {
    max-height: 140px;
    padding: 8px 16px 16px;
}

.slider-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.slider-label span {
    min-width: 72px;
    flex-shrink: 0;
}

.slider-label input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.slider-label input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: 2px solid var(--white);
}

.slider-label input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: 2px solid var(--white);
}

/* ---- Canvas Container ---- */

.canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 0;
    padding: 8px;
}

#edit-canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 4px;
}

.frame-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

/* ---- Frame Strip ---- */

.frame-strip {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    height: 100px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    align-items: center;
}

.frame-thumb {
    flex-shrink: 0;
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
}

.frame-thumb:active {
    transform: scale(0.94);
}

.frame-thumb img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color var(--transition-speed) ease;
}

.frame-thumb.active img {
    border-color: var(--gold);
}

.frame-thumb.active .frame-thumb-label {
    color: var(--gold);
}

.frame-thumb-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

/* ---- Club Logo Section ---- */

.club-logo-section {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.club-logo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 0;
}

.club-logo-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-club-upload {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-club-upload:active {
    background: rgba(255, 255, 255, 0.1);
}

.club-strip {
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    height: 72px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    align-items: center;
}

.club-thumb {
    flex-shrink: 0;
    width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

.club-thumb:active {
    transform: scale(0.94);
}

.club-thumb img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color var(--transition-speed) ease;
}

.club-thumb.active img {
    border-color: var(--gold);
}

.club-thumb-none {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.4);
}

.club-thumb.active .club-thumb-none {
    border-color: var(--gold);
}

.club-thumb-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52px;
}

/* ---- Action Bar ---- */

.action-bar {
    display: flex;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    flex-shrink: 0;
}

.action-bar .btn {
    flex: 1;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 0.85rem;
}

/* ============================================
   Help Screen
   ============================================ */

.btn-help-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px;
    text-decoration: underline;
    text-underline-offset: 2px;
    -webkit-tap-highlight-color: transparent;
}

.btn-help-link:active {
    color: rgba(255, 255, 255, 0.9);
}

.help-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.help-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}

#help-screen {
    background: var(--dark);
}

.help-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 40px;
}

.help-step {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.help-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--royal-blue);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-step-text h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 3px;
}

.help-step-text p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.help-step-text strong {
    color: var(--gold);
}

.help-tip-box {
    background: rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.help-tip-box h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
}

.help-tip-box p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin-bottom: 4px;
}

.help-tip-box p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Install Banner
   ============================================ */

.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom)) 12px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.install-banner.visible {
    transform: translateY(0);
    pointer-events: all;
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--dark-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

.install-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.install-banner-text strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
}

.install-banner-text span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.btn-install {
    min-height: 36px;
    padding: 8px 18px;
    font-size: 0.82rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.btn-install-dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.btn-install-dismiss:active {
    background: rgba(255, 255, 255, 0.1);
}

.btn-pic-inline {
    flex: 0;
    min-width: 48px;
    padding: 10px 14px;
    border-color: var(--royal-blue);
    position: relative;
}

.btn-pic-inline svg {
    color: var(--gold);
}

.btn-pic-inline .pic-queue-badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

/* ============================================
   PIC Contact Sheet (bottom sheet overlay)
   ============================================ */

.pic-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.pic-sheet-overlay.visible {
    opacity: 1;
}

.pic-sheet {
    width: 100%;
    max-width: 420px;
    background: var(--dark-surface);
    border-radius: 16px 16px 0 0;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pic-sheet-overlay.visible .pic-sheet {
    transform: translateY(0);
}

.pic-sheet-header {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.pic-sheet-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: var(--white);
    transition: background-color 0.2s ease;
}

.pic-sheet-option:active {
    background: rgba(255, 255, 255, 0.12);
}

.pic-sheet-option svg {
    flex-shrink: 0;
    color: var(--gold);
}

.pic-sheet-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pic-sheet-option-text strong {
    font-size: 0.9rem;
    font-weight: 700;
}

.pic-sheet-option-text span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

.pic-sheet-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.pic-sheet-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pic-sheet-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
    resize: none;
}

.pic-sheet-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.pic-sheet-input:focus {
    border-color: var(--gold);
}

.pic-sheet-input-error {
    border-color: #e74c3c;
}

.pic-sheet-send {
    width: 100%;
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--gold);
    color: var(--dark);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pic-sheet-send:active {
    background: #e09815;
}

.pic-sheet-cancel {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pic-sheet-cancel:active {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   PIC Nudge Toast (post-save/share prompt)
   ============================================ */

.pic-nudge {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: var(--dark-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pic-nudge.visible {
    transform: translateY(0);
}

.pic-nudge-text {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--white);
}

.pic-nudge-yes {
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    background: var(--gold);
    color: var(--dark);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.pic-nudge-yes:active {
    background: #e09815;
}

.pic-nudge-send-now {
    padding: 9px 14px;
    border: 1.5px solid var(--gold);
    border-radius: 8px;
    background: transparent;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.pic-nudge-send-now:active {
    background: rgba(247, 168, 27, 0.15);
}

.pic-nudge-no {
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.pic-nudge-no:active {
    color: rgba(255, 255, 255, 0.8);
}

/* ---- PIC Queue Badge ---- */

.pic-queue-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--gold);
    color: var(--dark);
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ---- PIC Queue Thumbnail Strip ---- */

.pic-queue-strip {
    display: flex;
    gap: 8px;
    padding: 0 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pic-queue-thumb {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.pic-queue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pic-queue-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    font-size: 0.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pic-queue-remove:active {
    background: rgba(231, 76, 60, 0.8);
}

/* ---------------------------------------------------------------------------
   Auth / Login Screen
   --------------------------------------------------------------------------- */

#login-screen,
#reset-password-screen {
    background: linear-gradient(160deg, var(--royal-blue) 0%, var(--dark) 100%);
}

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

.login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 32px 24px;
    text-align: center;
    animation: fadeUp 0.5s ease both;
}

.auth-form {
    width: 100%;
    max-width: 320px;
    margin: 24px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-input:focus {
    border-color: #F7A81B;
}

.auth-submit {
    margin-top: 4px;
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-submit:disabled::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

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

.auth-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 8px;
    padding: 10px 14px;
    color: #ff6b7a;
    font-size: 0.85rem;
    text-align: left;
}

.auth-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.4);
    border-radius: 8px;
    padding: 10px 14px;
    color: #5bdf7a;
    font-size: 0.85rem;
    text-align: left;
}

/* ---- Admin Screen ---- */

.admin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--dark-surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.admin-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
}

.admin-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-card {
    background: var(--dark-surface);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 14px;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.admin-user-list {
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.admin-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    text-align: center;
    padding: 16px;
}

.admin-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.admin-skeleton-row {
    height: 40px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.admin-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
}

.admin-user-row:last-child {
    border-bottom: none;
}

.admin-user-email {
    color: var(--white);
    font-weight: 500;
}

.admin-user-meta {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.admin-msg-success {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.4);
    color: #5bdf7a;
}

/* ---- Analytics ---- */

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.analytics-stat {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
}

.analytics-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold);
}

.analytics-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.analytics-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 90px;
    padding: 8px 0;
    margin-bottom: 14px;
}

.analytics-bar {
    flex: 1;
    background: var(--royal-blue);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: height 0.3s ease;
}

.analytics-bar:hover {
    background: var(--gold);
}

.analytics-table-wrap {
    margin-bottom: 14px;
}

.analytics-table-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.analytics-table th {
    text-align: left;
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.analytics-table td {
    padding: 8px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.analytics-table tr:last-child td {
    border-bottom: none;
}
