@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-primary: linear-gradient(160deg, #f0f2f5 0%, #e2e6ec 50%, #dfe4eb 100%);
    --bg-primary-solid: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f6f8fa;
    --text-primary: #141b2d;
    --text-secondary: #2d3748;
    --text-muted: #697586;
    --text-light: #8896a6;
    --border-color: #e0e4ea;
    --border-light: #eef1f5;
    --code-bg: #eef1f6;
    --example-bg: #f6f8fa;
    --example-hover: #e0e4ea;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 4px 16px rgba(0, 0, 0, 0.04);
    --accent: #5b5fc7;
    --accent-light: #7b7fda;
    --accent-hover: #484cb0;
    --accent-glow: rgba(91, 95, 199, 0.12);
    --accent-surface: rgba(91, 95, 199, 0.06);
    --success: #0d9668;
    --success-light: #d1fae5;
    --success-surface: rgba(13, 150, 104, 0.08);
    --error: #dc3545;
    --error-light: #fee2e2;
    --error-surface: rgba(220, 53, 69, 0.08);
    --warning: #d97706;
    --warning-light: #fef3c7;
    --warning-surface: rgba(217, 119, 6, 0.08);
    --card-border: rgba(0, 0, 0, 0.06);
    --card-radius: 18px;
    --gb-accent: #1a73e8;
    --gb-accent-light: rgba(26, 115, 232, 0.1);
    --gb-star: #f4b400;
}

[data-theme="dark"] {
    --bg-primary: linear-gradient(160deg, #0c1222 0%, #131a2e 50%, #0f1525 100%);
    --bg-primary-solid: #0c1222;
    --bg-secondary: #161e30;
    --bg-tertiary: #1c2640;
    --text-primary: #e8ecf4;
    --text-secondary: #c4ccda;
    --text-muted: #7b8aa0;
    --text-light: #5c6b82;
    --border-color: #2a3550;
    --border-light: #1f2b42;
    --code-bg: #1c2640;
    --example-bg: #161e30;
    --example-hover: #2a3550;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 8px 20px rgba(0, 0, 0, 0.35);
    --accent: #8b8ff5;
    --accent-light: #a5a9f8;
    --accent-hover: #7074e8;
    --accent-glow: rgba(139, 143, 245, 0.15);
    --accent-surface: rgba(139, 143, 245, 0.08);
    --success: #34d399;
    --success-light: rgba(16, 185, 129, 0.15);
    --success-surface: rgba(52, 211, 153, 0.1);
    --error: #f87171;
    --error-light: rgba(239, 68, 68, 0.15);
    --error-surface: rgba(248, 113, 113, 0.1);
    --warning: #fbbf24;
    --warning-light: rgba(245, 158, 11, 0.15);
    --warning-surface: rgba(251, 191, 36, 0.1);
    --card-border: rgba(255, 255, 255, 0.06);
    --gb-accent: #669df6;
    --gb-accent-light: rgba(102, 157, 246, 0.12);
    --gb-star: #f4b400;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.65;
    padding: 20px;
    min-height: 100vh;
    transition: background 0.4s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 95%;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 0 0 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .header {
    background: rgba(12, 18, 34, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-spacer {
    width: 200px;
}

.header-logo-link {
    text-decoration: none;
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.header-logo-link:hover {
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.header-logo-svg {
    height: 44px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}

.header-logo-svg:hover {
    transform: translateY(-1px) scale(1.02);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
}

[data-theme="dark"] .header-logo-svg {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

[data-theme="dark"] .header-logo-svg:hover {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.header-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.header-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.header-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
    line-height: 1;
}

.header-btn:hover {
    border-color: var(--accent);
    background: var(--accent-surface);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#adminLink {
    background: rgba(91, 95, 199, 0.1);
    border: 1px solid rgba(91, 95, 199, 0.3);
    color: var(--accent);
}

#adminLink:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.logout-btn {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: var(--error);
}

.logout-btn:hover {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.clear-btn {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: var(--error);
}

.clear-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: var(--error);
}

.copy-btn {
    font-size: 12px;
    padding: 2px 6px;
    color: var(--accent);
    transition: opacity 0.15s ease;
    margin-left: 6px;
    opacity: 0.6;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.copy-btn:hover {
    opacity: 1;
}

.copy-btn.copied {
    color: var(--success);
    opacity: 1;
}

.input-section {
    background: var(--bg-secondary);
    padding: 24px 28px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    border: 1px solid var(--card-border);
    max-width: 750px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    transition: margin-top 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body:not(.search-active) .input-section {
    margin-top: 25vh;
    transform: scale(1.02);
}

body.search-active .input-section {
    margin-top: 0;
    transform: scale(1);
}

.input-group {
    display: flex;
    gap: 16px;
}

input[type="text"] {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.25s ease;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: inherit;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input[type="text"]::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

button {
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 600;
    background: none;
    color: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-family: inherit;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Primary action button (Lookup, etc.) */
#lookupBtn,
.btn-primary {
    background: var(--accent);
    color: white;
}

#lookupBtn:hover,
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 16px var(--accent-glow);
    transform: translateY(-1px);
}

#lookupBtn:disabled,
.btn-primary:disabled {
    background: var(--text-muted);
    box-shadow: none;
    opacity: 1;
}

.results-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.result-card {
    background: var(--bg-secondary);
    padding: 28px 32px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--card-border);
    transition: box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-width: 750px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    min-height: 100px;
}

.result-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.result-card.full-width {
    grid-column: 1 / -1;
}

.result-card h2 {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}

.result-card h2::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.result-card h2 a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.result-card h2 a:hover {
    color: var(--accent-hover);
}

.result-card.loading {
    opacity: 0.7;
}

.result-card.error {
    border-left: 3px solid var(--error);
}

.result-card.success {
    border-left: 3px solid var(--success);
}

.data-row {
    display: flex;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 12.5px;
    align-items: center;
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 130px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.data-value {
    color: var(--text-secondary);
    flex: 1;
}

.data-value.highlight {
    font-weight: 600;
    color: #27ae60;
}

.data-value.warning {
    color: #e67e22;
}

.data-value.error {
    color: var(--error);
}

.ean-item {
    background: var(--bg-tertiary);
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border-light);
    transition: all 0.15s ease;
}

.ean-item:hover {
    border-color: var(--accent);
    background: var(--accent-surface);
}

.ean-item:last-child {
    margin-bottom: 0;
}

.ean-code {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 12px;
    background: var(--code-bg);
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    line-height: 1.4;
}

.badge.yes {
    background: var(--success-surface);
    color: var(--success);
    border-color: rgba(13, 150, 104, 0.2);
}

.badge.no {
    background: var(--error-surface);
    color: var(--error);
    border-color: rgba(220, 53, 69, 0.2);
}

.badge.gas {
    background: var(--warning-surface);
    color: var(--warning);
    border-color: rgba(217, 119, 6, 0.2);
}

.badge.elektra {
    background: var(--accent-surface);
    color: var(--accent);
    border-color: rgba(91, 95, 199, 0.2);
}

.energy-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    font-size: 26px;
    font-weight: 700;
    color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 1px;
}

.energy-label.A,
.energy-label.Ap,
.energy-label.App,
.energy-label.Appp,
.energy-label.Apppp {
    background: #00a651;
}

.energy-label.B {
    background: #50b848;
}

.energy-label.C {
    background: #b9d433;
}

.energy-label.D {
    background: #fff200;
    color: #333;
}

.energy-label.E {
    background: #f7941d;
}

.energy-label.F {
    background: #f15a22;
}

.energy-label.G {
    background: #ed1c24;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.status-message {
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.status-message.info {
    background: var(--accent-surface);
    color: var(--accent);
    border: 1px solid rgba(91, 95, 199, 0.2);
}

.status-message.error {
    background: var(--error-surface);
    color: var(--error);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.example-addresses {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.example-addresses code {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.example-addresses code:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 5px;
    transition: all 0.15s ease;
    background: var(--accent-surface);
    border: 1px solid transparent;
}

.external-link:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.links-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* BAG Address Selector Dropdown */
.bag-address-selector {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--accent-surface);
    border-radius: 8px;
    border: 1px solid rgba(91, 95, 199, 0.2);
}

.bag-dropdown {
    width: 100%;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%235b5fc7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 0.15s ease;
}

.bag-dropdown:hover {
    border-color: var(--accent);
}

.bag-dropdown:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

[data-theme="dark"] .bag-dropdown {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8ff5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* BAG Map Styles */
.bag-maps-container {
    display: block;
    margin-bottom: 10px;
}

.map-section {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.map-section-header {
    background: var(--bg-tertiary);
    padding: 7px 12px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

#bagGoogleMapsEmbed iframe {
    width: 100%;
    height: 280px;
    border: 0;
    display: block;
}

#bagLeafletMap {
    width: 100%;
    height: 320px;
    min-height: 320px;
    background: var(--bg-tertiary);
}

.leaflet-container {
    font-family: inherit;
}

/* Layer control styling for dark mode */
[data-theme="dark"] .leaflet-control-layers {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .leaflet-control-layers-selector {
    accent-color: var(--accent);
}

[data-theme="dark"] .leaflet-control-zoom a {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .leaflet-control-zoom a:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .leaflet-control-attribution {
    background: rgba(22, 33, 62, 0.8);
    color: var(--text-muted);
}

[data-theme="dark"] .leaflet-popup-content-wrapper {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .leaflet-popup-tip {
    background: var(--bg-secondary);
}

/* ===== Field Selection Modal Premium Styles ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 18, 34, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 0;
    max-width: 480px;
    width: 92%;
    max-height: 82vh;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--card-border);
    animation: modalSlideUp 0.25s ease;
}

.modal-header {
    padding: 22px 24px 0;
}

.modal-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    border-bottom: none;
    padding-bottom: 0;
}

.modal-header h2::before {
    display: none;
}

.modal-header p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.modal-body {
    padding: 18px 24px;
    overflow-y: auto;
    max-height: calc(82vh - 160px);
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 10px;
    padding-left: 2px;
}

.modal-section-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
}

.modal-option {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.12s ease;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

.modal-option:last-child {
    border-bottom: none;
}

.modal-option:hover {
    background: var(--accent-surface);
}

.modal-option-text {
    flex: 1;
    min-width: 0;
}

.modal-option-text .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-option-text .desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 24px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch input:focus-visible+.toggle-slider {
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Special feature card */
.modal-feature-card {
    background: var(--accent-surface);
    border: 1px solid rgba(91, 95, 199, 0.2);
    border-radius: 10px;
    padding: 14px;
}

.modal-feature-card .modal-option {
    padding: 0;
    border-bottom: none;
    background: none;
}

.modal-feature-card .modal-option:hover {
    background: none;
}

.modal-feature-card .info-pill {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-footer {
    padding: 14px 24px 22px;
    display: flex;
    gap: 8px;
}

.modal-btn {
    flex: 1;
    border: none;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.modal-btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.modal-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.modal-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.modal-btn-secondary:hover {
    background: var(--border-color);
}

/* ===== Lead Detail Modal ===== */
.lead-detail-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
}

.lead-detail-section {
    margin-bottom: 16px;
}

.lead-detail-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-left: 2px;
}

.lead-detail-section-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 14px;
}

/* Leads overview table hover */
.leads-overview-table tbody tr.leads-row {
    transition: background 0.15s ease;
}

.leads-overview-table tbody tr.leads-row:hover {
    background: var(--accent-glow);
}

/* Energy label mini badge for table */
.energy-label-mini {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.energy-label-mini.A,
.energy-label-mini.Ap,
.energy-label-mini.App,
.energy-label-mini.Appp,
.energy-label-mini.Apppp {
    background: #00a651;
}

.energy-label-mini.B {
    background: #50b848;
}

.energy-label-mini.C {
    background: #b9d433;
}

.energy-label-mini.D {
    background: #fff200;
    color: #333;
}

.energy-label-mini.E {
    background: #f7941d;
}

.energy-label-mini.F {
    background: #f15a22;
}

.energy-label-mini.G {
    background: #ed1c24;
}

/* ===== Password Overlay ===== */
.password-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 18, 34, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.password-card {
    background: var(--bg-secondary);
    padding: 36px 32px;
    border-radius: var(--card-radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--card-border);
    text-align: center;
    max-width: 360px;
    width: 90%;
}

.password-icon {
    font-size: 36px;
    margin-bottom: 14px;
}

.password-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.password-subtitle {
    color: var(--text-muted);
    font-size: 12.5px;
    margin-bottom: 20px;
}

.password-input {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.password-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.password-error {
    color: var(--error);
    font-size: 12px;
    margin-top: 8px;
    display: none;
    font-weight: 500;
}

.password-btn {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    background: var(--accent);
    color: white;
    font-size: 14px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.password-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--accent-glow);
}

/* ===== Progress Bar ===== */
.progress-track {
    width: 100%;
    background: var(--border-color);
    border-radius: 6px;
    height: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-status {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Card Header Helpers ===== */
.card-check-indicator {
    display: none;
    color: var(--success);
    font-weight: 700;
    font-size: 13px;
}

.card-header-link {
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    color: var(--accent);
    text-decoration: none;
    padding: 2px 8px;
    background: var(--accent-surface);
    border-radius: 5px;
    transition: all 0.15s ease;
}

.card-header-link:hover {
    background: var(--accent);
    color: white;
}

/* ===== Maps Embed ===== */
.maps-embed-container {
    margin-top: 14px;
}

.maps-iframe {
    border: 0;
    border-radius: 10px;
    display: block;
}

/* ===== Lead Detail Modal Overrides ===== */
.lead-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
}

.lead-detail-header h2 {
    margin: 0;
    font-size: 17px;
    border-bottom: none;
    padding-bottom: 0;
}

.lead-detail-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.15s ease;
}

.nav-btn:hover {
    background: var(--border-color);
    transform: none;
    box-shadow: none;
}

.nav-btn-close:hover {
    background: var(--error-surface);
    color: var(--error);
    border-color: var(--error);
}

.lead-detail-body {
    max-height: calc(90vh - 100px);
}

/* ===== Google Business Profile Styles ===== */
.gb-profile {
    margin-top: 16px;
    padding: 16px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    position: relative;
}

.gb-profile-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.gb-profile-header .gb-icon {
    width: 20px;
    height: 20px;
    background: var(--gb-accent);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
    flex-shrink: 0;
    font-weight: 700;
}

.gb-profile-header .gb-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.gb-profile-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.gb-profile-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--gb-accent);
    background: var(--gb-accent-light);
    padding: 2px 8px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.gb-profile-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.gb-profile-rating .gb-stars {
    display: flex;
    gap: 1px;
    font-size: 14px;
}

.gb-profile-rating .gb-stars .filled {
    color: var(--gb-star);
}

.gb-profile-rating .gb-stars .empty {
    color: var(--border-color);
}

.gb-profile-rating .gb-rating-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.gb-profile-rating .gb-review-count {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.gb-profile-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.gb-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 0;
}

.gb-detail-row .gb-detail-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 12px;
    opacity: 0.7;
}

.gb-detail-row a {
    color: var(--gb-accent);
    text-decoration: none;
    font-weight: 500;
}

.gb-detail-row a:hover {
    text-decoration: underline;
}

.gb-detail-row .copy-btn {
    margin-left: auto;
    font-size: 10px;
    padding: 1px 6px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.gb-detail-row:hover .copy-btn {
    opacity: 0.7;
}

.gb-detail-row:hover .copy-btn:hover {
    opacity: 1;
}

.gb-hours-toggle {
    color: var(--gb-accent);
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 500;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gb-hours-toggle:hover {
    text-decoration: underline;
}

.gb-hours-list {
    display: none;
    margin-top: 6px;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.gb-hours-list div {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 2px 0;
    font-family: 'JetBrains Mono', monospace;
}

.gb-photo {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 180px;
}

.gb-photo img {
    width: 100%;
    height: auto;
    max-height: 110px;
    object-fit: cover;
    display: block;
}

.gb-maps-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gb-accent);
    background: var(--gb-accent-light);
    border-radius: 7px;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.gb-maps-link:hover {
    background: var(--gb-accent);
    color: white;
    border-color: var(--gb-accent);
}

/* ===== Google Business in Address Section ===== */
.gb-address-profile {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.gb-address-profile .gb-profile-header {
    border-bottom: none;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

/* ===== Clock ===== */
#amsterdamClock {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    min-width: 110px;
    text-align: center;
    box-shadow: var(--shadow-card);
    letter-spacing: 0.3px;
    transition: border-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#amsterdamClock:hover {
    border-color: var(--accent);
}

#amsterdamClock::before {
    content: '\1F550';
    font-size: 13px;
}

/* ===== Scripts Page ===== */
.scripts-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.scripts-header {
    text-align: center;
    margin-bottom: 30px;
}

.scripts-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.scripts-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: var(--bg-tertiary);
    margin-bottom: 24px;
}

.upload-zone:hover {
    border-color: var(--accent);
    background: var(--accent-surface);
}

.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-surface);
    transform: scale(1.01);
}

.upload-zone-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.upload-zone-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-zone-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.upload-zone-progress {
    margin-top: 16px;
    display: none;
}

.upload-zone-progress.active {
    display: block;
}

.progress-bar-container {
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    height: 8px;
    margin-bottom: 8px;
}

.progress-bar-fill {
    background: var(--accent);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
}

.scripts-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.scripts-list-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.scripts-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 20px;
}

.scripts-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.scripts-empty-icon {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 16px;
}

.scripts-empty-text {
    font-size: 14px;
}

.script-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 12px;
    background: var(--bg-secondary);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
}

.script-card:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.script-icon {
    font-size: 32px;
    margin-right: 16px;
    flex-shrink: 0;
}

.script-info {
    flex: 1;
    min-width: 0;
}

.script-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.script-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.script-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.script-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.script-actions button {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.script-actions button:hover {
    background: var(--accent-surface);
    border-color: var(--accent);
}

.script-actions .delete-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 8px 12px;
}

.script-actions .delete-btn:hover {
    background: var(--error-surface);
    color: var(--error);
}

/* Script Viewer Modal */
.script-viewer-modal {
    max-width: 900px;
    max-height: 90vh;
    width: 95%;
}

.script-viewer-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.script-viewer-modal .modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.script-viewer-modal .modal-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.script-viewer-modal .modal-header-actions button {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.script-viewer-modal .modal-header-actions button:hover {
    background: var(--accent-surface);
    border-color: var(--accent);
}

.script-viewer-modal .modal-header-actions .close-btn {
    background: var(--error-surface);
    color: var(--error);
    border-color: transparent;
}

.script-viewer-modal .modal-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.script-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.script-content-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .script-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .script-icon {
        margin-bottom: 12px;
    }
    
    .script-actions {
        width: 100%;
        margin-top: 12px;
    }
    
    .script-actions button {
        flex: 1;
    }
    
    .script-meta {
        flex-direction: column;
        gap: 4px;
    }
}

/* Back button base styles */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow-card);
}

.back-btn:hover {
    background: var(--accent-surface);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Action button base styles */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.action-btn:hover {
    background: var(--accent-surface);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.action-btn.copy-btn:hover {
    background: var(--success-surface);
    border-color: var(--success);
    color: var(--success);
}

.action-btn.delete-btn {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-color);
}

.action-btn.delete-btn:hover {
    background: var(--error-surface);
    border-color: var(--error);
    color: var(--error);
}

/* Script Detail View */
.script-detail-nav {
    margin-bottom: 16px;
}

.script-detail-header-card {
    padding: 20px 24px;
}

.script-detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.script-detail-title-row h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    word-break: break-word;
}

.script-detail-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.script-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.script-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 20px;
}

.script-meta-item:first-child {
    background: var(--accent-surface);
    color: var(--accent);
    font-weight: 500;
}

.script-content-card {
    min-height: 300px;
}

.script-content-card .script-content {
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
}

/* ===== RESPONSIVE STYLES ===== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .container {
        max-width: 100%;
    }
    
    .header-logo-svg {
        height: 34px;
    }
    
    .header-spacer {
        width: 100px;
    }
    
    .header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .header-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .input-section {
        padding: 20px;
        margin-top: 0 !important;
        transform: none !important;
    }
    
    body:not(.search-active) .input-section {
        margin-top: 12px !important;
        transform: none !important;
    }
    
    .result-card {
        padding: 20px;
        border-radius: 14px;
    }
    
    .result-card h2 {
        font-size: 14px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .data-row {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .data-label {
        min-width: 100px;
        font-size: 10px;
    }
    
    .data-value {
        word-break: break-word;
    }
    
    .modal-card {
        width: 96%;
        max-height: 88vh;
        border-radius: 12px;
    }
    
    .modal-body {
        padding: 14px 18px;
    }
    
    .modal-header {
        padding: 18px 18px 0;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .modal-option {
        padding: 10px 12px;
    }
    
    .modal-footer {
        padding: 12px 18px 18px;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-btn {
        width: 100%;
        padding: 12px;
    }
    
    .modal-btn-secondary {
        order: 2;
    }
    
    .lead-detail-modal {
        max-width: 96%;
        max-height: 90vh;
    }
    
    .lead-detail-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .lead-detail-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .scripts-container {
        padding: 12px;
    }
    
    .scripts-header {
        margin-bottom: 20px;
    }
    
    .scripts-header h1 {
        font-size: 22px;
    }
    
    .script-card {
        padding: 16px;
    }
    
    .admin-container {
        padding: 12px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        position: relative;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }
    
    .admin-nav-btn {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        min-width: calc(50% - 4px);
        text-align: center;
    }
    
    .card-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .value {
        font-size: 26px;
    }
    
    .admin-card {
        padding: 20px;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .session-table th,
    .session-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .log-table th,
    .log-table td {
        padding: 10px 8px;
        font-size: 11px;
    }
    
    #bagLeafletMap {
        height: 250px;
        min-height: 250px;
    }
    
    .gb-profile {
        padding: 14px;
    }
    
    .gb-profile-name {
        font-size: 14px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    body {
        padding: 8px;
        font-size: 13px;
    }
    
    .header-logo-svg {
        height: 28px;
    }
    
    .header {
        padding: 8px 10px;
        border-radius: 0 0 12px 12px;
    }
    
    .header-spacer {
        display: none;
    }
    
    .header-row-top,
    .header-row-bottom {
        width: 100%;
        justify-content: center;
    }
    
    .header-btn {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    #amsterdamClock {
        padding: 6px 10px;
        font-size: 11px;
        min-width: auto;
    }
    
    .input-section {
        padding: 16px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    input[type="text"] {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    #lookupBtn,
    .btn-primary {
        width: 100%;
        padding: 12px;
    }
    
    .result-card {
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 12px;
        min-height: auto;
    }
    
    .result-card h2 {
        font-size: 13px;
        padding-bottom: 10px;
        margin-bottom: 12px;
        letter-spacing: -0.2px;
    }
    
    .data-label {
        min-width: 90px;
        font-size: 9px;
    }
    
    .data-value {
        font-size: 12px;
    }
    
    .ean-item {
        padding: 10px 12px;
    }
    
    .ean-code {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .badge {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .energy-label {
        padding: 8px 16px;
        font-size: 22px;
    }
    
    .password-card {
        padding: 28px 24px;
        width: 94%;
    }
    
    .password-icon {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .password-title {
        font-size: 16px;
    }
    
    .password-btn {
        padding: 11px;
        font-size: 13px;
    }
    
    .modal-card {
        width: 98%;
        max-height: 92vh;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 14px 14px 0;
    }
    
    .modal-header h2 {
        font-size: 15px;
    }
    
    .modal-body {
        padding: 12px 14px;
        max-height: calc(92vh - 120px);
    }
    
    .modal-section {
        margin-bottom: 14px;
    }
    
    .modal-section-title {
        font-size: 9px;
        letter-spacing: 1px;
    }
    
    .modal-option {
        padding: 10px;
        gap: 10px;
    }
    
    .modal-option-text .name {
        font-size: 12px;
    }
    
    .modal-option-text .desc {
        font-size: 10px;
    }
    
    .toggle-switch {
        width: 40px;
        height: 22px;
    }
    
    .toggle-slider::before {
        height: 16px;
        width: 16px;
    }
    
    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(18px);
    }
    
    .modal-btn {
        padding: 11px 14px;
        font-size: 12px;
    }
    
    .nav-btn {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .bag-address-selector {
        padding: 8px 10px;
    }
    
    .bag-dropdown {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    #bagLeafletMap {
        height: 220px;
        min-height: 220px;
    }
    
    .map-section-header {
        font-size: 9.5px;
        padding: 6px 10px;
    }
    
    .external-link {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .card-header-link {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .copy-btn {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .status-message {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .progress-track {
        height: 16px;
    }
    
    .progress-status {
        font-size: 11px;
    }
    
    .gb-profile {
        padding: 12px;
        border-radius: 10px;
    }
    
    .gb-profile-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .gb-profile-header .gb-icon {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .gb-profile-header .gb-title {
        font-size: 10px;
    }
    
    .gb-profile-name {
        font-size: 13px;
    }
    
    .gb-profile-category {
        font-size: 10px;
        padding: 2px 6px;
        margin-bottom: 8px;
    }
    
    .gb-profile-rating {
        margin-bottom: 8px;
    }
    
    .gb-profile-rating .gb-stars {
        font-size: 12px;
    }
    
    .gb-profile-rating .gb-rating-num {
        font-size: 12px;
    }
    
    .gb-profile-rating .gb-review-count {
        font-size: 10px;
    }
    
    .gb-detail-row {
        font-size: 11px;
        padding: 3px 0;
    }
    
    .gb-detail-row .gb-detail-icon {
        font-size: 11px;
    }
    
    .gb-maps-link {
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .gb-hours-list div {
        font-size: 10px;
        padding: 1px 0;
    }
    
    /* Admin mobile */
    .admin-container {
        padding: 8px;
    }
    
    .admin-title {
        font-size: 20px;
    }
    
    .admin-nav {
        gap: 6px;
    }
    
    .admin-nav-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-width: calc(50% - 3px);
    }
    
    .admin-card {
        padding: 16px;
        border-radius: 14px;
    }
    
    .admin-card h2 {
        font-size: 16px;
        margin-bottom: 14px;
    }
    
    .page-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }
    
    .page-status {
        width: 100%;
        justify-content: space-between;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-card h3 {
        font-size: 10px;
    }
    
    .stat-card .value {
        font-size: 22px;
    }
    
    .config-item label {
        font-size: 11px;
    }
    
    .config-item input,
    .config-item textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .session-table,
    .log-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .session-table th,
    .session-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .log-table th,
    .log-table td {
        padding: 8px 6px;
        font-size: 10px;
    }
    
    /* Scripts page mobile */
    .scripts-header {
        margin-bottom: 16px;
    }
    
    .scripts-header h1 {
        font-size: 20px;
    }
    
    .scripts-header p {
        font-size: 13px;
    }
    
    .upload-zone {
        padding: 30px 16px;
    }
    
    .upload-zone-icon {
        font-size: 36px;
    }
    
    .upload-zone-text {
        font-size: 14px;
    }
    
    .upload-zone-hint {
        font-size: 11px;
    }
    
    .script-card {
        padding: 14px;
        border-radius: 12px;
    }
    
    .script-icon {
        font-size: 26px;
        margin-right: 12px;
    }
    
    .script-title {
        font-size: 14px;
    }
    
    .script-meta {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 11px;
    }
    
    .script-actions {
        width: 100%;
        margin-top: 12px;
    }
    
    .script-actions button {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .script-detail-title-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .script-detail-actions {
        width: 100%;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
    }
    
    .script-meta-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .back-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .script-content {
        font-size: 12px;
        padding: 14px;
    }
}

/* Extra small screens (320px) */
@media (max-width: 360px) {
    body {
        padding: 6px;
        font-size: 12px;
    }
    
    .header-logo-svg {
        height: 22px;
    }
    
    .header-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .input-section {
        padding: 14px;
    }
    
    input[type="text"] {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .result-card {
        padding: 14px;
    }
    
    .result-card h2 {
        font-size: 12px;
    }
    
    .data-label {
        min-width: 80px;
        font-size: 8px;
    }
    
    .data-value {
        font-size: 11px;
    }
    
    .admin-nav-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .modal-header h2 {
        font-size: 14px;
    }
    
    .modal-option-text .name {
        font-size: 11px;
    }
}

/* Landscape orientation tweaks */
@media (max-height: 500px) and (orientation: landscape) {
    .input-section {
        margin-top: 8px !important;
        padding: 16px;
    }
    
    body:not(.search-active) .input-section {
        margin-top: 8px !important;
    }
    
    .modal-card {
        max-height: 95vh;
    }
    
    .password-overlay {
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .password-card {
        padding: 20px;
    }
}

/* Touch improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .header-btn,
    .nav-btn,
    .toggle-switch,
    .modal-btn,
    button,
    .copy-btn,
    .external-link,
    .admin-nav-btn {
        min-height: 44px;
    }
    
    .toggle-switch {
        height: 26px;
        width: 48px;
    }
    
    .toggle-slider::before {
        height: 20px;
        width: 20px;
    }
    
    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(22px);
    }
    
    .modal-option {
        padding: 14px;
    }
    
    input[type="text"] {
        font-size: 16px;
    }
}

/* Print styles */
@media print {
    .header,
    .input-section,
    .password-overlay,
    .modal-backdrop {
        display: none !important;
    }
    
    body {
        padding: 0;
        background: white;
    }
    
    .result-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

/* ===== HAMBURGER MENU FOR MOBILE ===== */
.header-menu-toggle {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow-card);
}

.header-menu-toggle:hover {
    background: var(--accent-surface);
    border-color: var(--accent);
}

.hamburger-icon {
    display: block;
    line-height: 1;
}

@media (max-width: 768px) {
    .header-menu-toggle {
        display: block;
        order: -1;
    }
    
    .header-actions {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 8px;
        padding-top: 12px;
        animation: slideDown 0.3s ease;
    }
    
    .header-actions.open {
        display: flex;
    }
    
    .header-row {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .header-row-top {
        order: 1;
    }
    
    .header-row-bottom {
        order: 2;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .header-menu-toggle {
        padding: 6px 10px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .header-actions {
        gap: 6px;
        padding-top: 10px;
    }
    
    .header-row {
        gap: 4px;
    }
}

/* ===== SCRIPT VIEW TOGGLE ===== */
.view-toggle-container {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.view-toggle-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-toggle-btn:hover {
    background: var(--accent-surface);
    border-color: var(--accent);
    color: var(--accent);
}

.view-toggle-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ===== HTML CONTENT STYLES ===== */
.script-content-html {
    font-size: 14px;
    line-height: 1.7;
    white-space: normal;
    word-wrap: break-word;
}

.script-content-html h1,
.script-content-html h2,
.script-content-html h3,
.script-content-html h4,
.script-content-html h5,
.script-content-html h6 {
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.script-content-html h1 { font-size: 24px; }
.script-content-html h2 { font-size: 20px; }
.script-content-html h3 { font-size: 18px; }
.script-content-html h4 { font-size: 16px; }

.script-content-html p {
    margin-bottom: 12px;
}

.script-content-html strong,
.script-content-html b {
    font-weight: 700;
    color: var(--text-primary);
}

.script-content-html em,
.script-content-html i {
    font-style: italic;
}

.script-content-html u {
    text-decoration: underline;
}

.script-content-html s {
    text-decoration: line-through;
    opacity: 0.7;
}

.script-content-html ul,
.script-content-html ol {
    margin-left: 24px;
    margin-bottom: 12px;
}

.script-content-html li {
    margin-bottom: 4px;
}

.script-content-html a {
    color: var(--accent);
    text-decoration: none;
}

.script-content-html a:hover {
    text-decoration: underline;
}

.script-content-html table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13px;
}

.script-content-html th,
.script-content-html td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
}

.script-content-html th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.script-content-html tr:nth-child(even) {
    background: var(--bg-tertiary);
}

.script-content-html hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
}

.script-content-html pre,
.script-content-html code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.script-content-html pre {
    padding: 12px 16px;
    overflow-x: auto;
}

.script-content-html blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== PDF VIEWER ===== */
.script-content-pdf iframe {
    background: white;
    border-radius: 8px;
}

/* ===== FORMATTING BADGE ===== */
.has-formatting-badge {
    display: inline-block;
    font-size: 12px;
    opacity: 0.7;
    margin-left: 4px;
}

/* ===== AUDIO PLAYER ===== */
.audio-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.audio-header {
    text-align: center;
    margin-bottom: 24px;
}

.audio-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.audio-header p {
    color: var(--text-muted);
}

.audio-player-card {
    margin-bottom: 24px;
}

.audio-now-playing {
    margin-bottom: 16px;
}

.audio-track-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.audio-track-icon {
    font-size: 48px;
    opacity: 0.8;
}

.audio-track-details h3 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.audio-track-details p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.audio-progress-container {
    margin: 16px 0;
}

.audio-progress-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}

.audio-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.audio-progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.audio-progress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.audio-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.audio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.audio-btn:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

.audio-btn:active {
    transform: scale(0.95);
}

.audio-btn-play {
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: white;
}

.audio-btn-play:hover {
    background: var(--accent-hover);
}

.audio-btn-icon {
    font-size: 18px;
}

.audio-speed-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.audio-speed-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 8px;
}

.audio-speed-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.speed-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.speed-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.speed-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.audio-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.audio-library-header h2 {
    font-size: 18px;
}

.audio-count {
    font-size: 13px;
    color: var(--text-muted);
}

.audio-track-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    user-select: none;
}

.audio-track-item:hover {
    background: var(--bg-tertiary);
}

.audio-track-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.audio-track-item.playing {
    background: var(--accent-surface);
    border-color: var(--accent);
}

.audio-track-item.dragging {
    opacity: 0.3;
    transform: scale(0.95) rotate(2deg);
    cursor: grabbing;
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

.audio-track-item.drag-before {
    border-top: 3px solid var(--accent) !important;
    margin-top: -1px;
    padding-top: 11px;
}

.audio-track-item.drag-after {
    border-bottom: 3px solid var(--accent) !important;
    margin-bottom: -1px;
    padding-bottom: 11px;
}

.audio-track-item.drag-over {
    background: var(--accent-surface);
    border-color: var(--accent);
}

@keyframes highlight {
    0% {
        background: var(--accent-surface);
        transform: scale(1.02);
    }
    100% {
        background: var(--bg-secondary);
        transform: scale(1);
    }
}

.undo-btn {
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: inline-block;
}

.undo-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
}

.audio-track-item.ui-draggable-dragging {
    z-index: 1000;
    pointer-events: none;
}

.audio-track-item .audio-action-btn {
    cursor: pointer;
}

.audio-track-item[draggable="true"] {
    cursor: grab;
}

.audio-track-item[draggable="true"]:active {
    cursor: grabbing;
}

.audio-track-item-icon {
    font-size: 32px;
    opacity: 0.7;
}

.audio-track-item-info {
    flex: 1;
    min-width: 0;
}

.audio-track-item-title {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-track-item-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
}

.audio-track-item-actions {
    display: flex;
    gap: 8px;
}

.audio-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.audio-action-btn:hover {
    background: var(--accent);
    color: white;
}

.audio-action-btn.delete-btn:hover {
    background: var(--error);
}

.audio-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.audio-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.audio-modes-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    gap: 16px;
}

.audio-mode-group {
    display: flex;
    gap: 8px;
}

.mode-btn {
    background: var(--bg-tertiary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mode-btn:hover {
    background: var(--accent);
    color: white;
}

.mode-btn.active {
    background: var(--accent);
    color: white;
}

.mode-btn.repeat-one {
    font-size: 14px;
}

.audio-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 200px;
}

.volume-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s;
}

.volume-btn:hover {
    transform: scale(1.1);
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.audio-track-counter {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.queue-item:hover {
    background: var(--bg-tertiary);
}

.queue-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.queue-item-icon {
    font-size: 20px;
    opacity: 0.6;
}

.queue-item-title {
    font-weight: 500;
    color: var(--text-primary);
}

.queue-item-artist {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.queue-item-artist::before {
    content: '-';
    margin-right: 8px;
}

.queue-remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.queue-remove-btn:hover {
    background: var(--error);
    color: white;
}

.clear-queue-btn {
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.clear-queue-btn:hover {
    background: var(--error);
    color: white;
}

.playlist-save-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.playlist-save-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-primary);
}

.playlist-save-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playlist-name-input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.playlist-name-input:focus {
    outline: none;
    border-color: var(--accent);
}

.playlist-save-actions {
    display: flex;
    gap: 12px;
}

.saved-playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.saved-playlist-item:hover {
    background: var(--bg-tertiary);
}

.saved-playlist-info {
    flex: 1;
    min-width: 0;
}

.saved-playlist-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.saved-playlist-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.saved-playlist-actions {
    display: flex;
    gap: 8px;
}

.playlist-action-btn {
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    white-space: nowrap;
}

.playlist-action-btn:hover {
    background: var(--accent);
    color: white;
}

.playlist-action-btn.delete:hover {
    background: var(--error);
    color: white;
}

.queue-btn {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.queue-btn:hover {
    opacity: 1;
}

.notification-toast {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.save-playlist-btn {
    margin-left: 12px;
}

@media (max-width: 768px) {
    .audio-modes-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .audio-volume-container {
        max-width: 100%;
    }
    
    .saved-playlist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .saved-playlist-actions {
        width: 100%;
    }
    
    .playlist-action-btn {
        flex: 1;
    }
}

/* ===== ADMIN AUDIO ===== */
.admin-audio-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.admin-audio-container h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.admin-audio-container > p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.admin-edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-edit-player {
    margin-bottom: 8px;
}

.admin-edit-player audio {
    border-radius: 8px;
}

.admin-edit-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.info-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.admin-edit-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.admin-audio-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-audio-table th,
.admin-audio-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-audio-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-audio-table td {
    vertical-align: middle;
}

.admin-audio-table tr:hover {
    background: var(--bg-tertiary);
}

.admin-audio-table tr.admin-audio-row {
    cursor: grab;
}

.admin-audio-table tr.admin-audio-row:active {
    cursor: grabbing;
}

.admin-audio-table tr.admin-audio-row.dragging {
    opacity: 0.4;
    background: var(--bg-tertiary);
}

.admin-audio-table tr.admin-audio-row.drag-over {
    border-top: 2px dashed var(--accent) !important;
    border-bottom: 2px dashed var(--accent) !important;
    background: var(--accent-surface) !important;
}

.drag-handle {
    color: var(--text-muted);
    font-size: 20px;
    text-align: center;
    cursor: grab;
    opacity: 0.5;
}

.admin-audio-table tr:hover .drag-handle {
    opacity: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

.admin-track-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-track-icon {
    font-size: 20px;
    opacity: 0.7;
}

.admin-track-title {
    font-weight: 500;
}

.text-muted {
    color: var(--text-muted);
    font-style: italic;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder {
    color: var(--text-light);
}
