:root {
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #475569;
    --accent: #2563eb;
    --accent-2: #06b6d4;
}

body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.08), transparent 30%), #edf1f7;
    color: var(--ink);
    line-height: 1.5;
}

.site-header {
    background: linear-gradient(135deg, #0f172a, #111827 45%, #1e293b);
    border-bottom: none;
    padding: 1.1rem 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    color: #fff;
    box-shadow: 0 25px 40px rgba(15, 23, 42, 0.18);
    border-radius: 0 0 28px 28px;
    position: relative;
    overflow: hidden;
}

.site-header::after {
    content: "";
    position: absolute;
    inset: -30% 60% auto -10%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35), transparent 55%);
    opacity: 0.7;
    pointer-events: none;
}

.site-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.site-header .logo-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.logo-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.brand-logo {
    height: 36px;
    width: auto;
    display: block;
}

.site-header p {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.header-controls a,
.header-controls .btn {
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.header-controls a:hover,
.header-controls .btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.2);
}

/* Höherer Kontrast für Header-Buttons im Admin-Bereich */
.site-header .header-controls .btn,
.site-header .header-controls a {
    background: #ffffff;
    color: #0b1224;
    border: 1px solid #0b1224;
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
    font-weight: 600;
}

.site-header .header-controls .btn:hover,
.site-header .header-controls a:hover {
    background: #0b1224;
    color: #ffffff;
    border-color: #0b1224;
}

main {
    max-width: 1220px;
    margin: 1.5rem auto;
    padding: 0 1.5rem 3rem;
}

.admin-links {
    list-style: none;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.admin-links li {
    margin: 0.4rem 0;
    font-size: 1rem;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.dashboard-hero {
    background: linear-gradient(140deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.08)), var(--surface);
    border-radius: 24px;
    padding: 2.2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    box-shadow: 0 28px 60px rgba(15,23,42,0.08);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before,
.dashboard-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
}

.dashboard-hero::before {
    width: 240px;
    height: 240px;
    top: -120px;
    right: -40px;
    background: #3b82f6;
}

.dashboard-hero::after {
    width: 200px;
    height: 200px;
    bottom: -120px;
    left: -40px;
    background: #06b6d4;
}

.hero-text h2 {
    margin: 0.2rem 0 0.4rem;
    font-size: 2.05rem;
    color: var(--ink);
}

.hero-eyebrow {
    margin: 0;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: #3b82f6;
    font-weight: 600;
}

.hero-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.hero-metric {
    background: linear-gradient(160deg, #0f172a, #111827 65%, #1f2937);
    color: #fff;
    border-radius: 18px;
    padding: 1.15rem 1.2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}

.hero-metric::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.3), transparent 40%);
    opacity: 0.7;
    pointer-events: none;
}

.metric-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    margin: 0 0 0.4rem;
    color: rgba(255,255,255,0.7);
}

.metric-value {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.metric-sub {
    margin: 0.2rem 0 0;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.quick-actions {
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.action-card {
    display: block;
    background: linear-gradient(145deg, #ffffff, #f7fbff);
    border-radius: 18px;
    padding: 1.3rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px rgba(15,23,42,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15,23,42,0.12);
}

.action-label {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #3b82f6;
}

.action-card h3 {
    margin: 0.4rem 0;
}

.action-meta {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    border: 1px solid #ececec;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    gap: 0.8rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 1.2rem 1.4rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 32px rgba(15,23,42,0.07);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.08));
    opacity: 0.6;
    pointer-events: none;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-label {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.stat-value {
    margin: 0.3rem 0 0;
    font-size: 2rem;
    font-weight: 600;
    color: #0f172a;
}

.stat-sub {
    margin: 0.2rem 0 0;
    color: #475569;
    font-size: 0.9rem;
}

.stat-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.9rem;
    color: #1e293b;
}

.stat-list li + li {
    margin-top: 0.3rem;
}

.openai-card {
    border-radius: 18px;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08), transparent 50%), var(--surface);
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 32px rgba(15,23,42,0.08);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #eee;
    color: #444;
}

.badge.live {
    background: #e6f4ea;
    color: #0f8a39;
}

.openai-usage-content p {
    margin: 0.2rem 0;
}

.openai-usage-progress .bar {
    background: #eef2f7;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    margin: 0.35rem 0 0.2rem;
}

.openai-usage-progress .bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    transition: width 0.35s ease;
}

.openai-usage-progress .details {
    font-weight: 600;
    color: #111;
    margin-top: 0.2rem;
}

.openai-usage-progress .budget {
    color: #555;
    font-size: 0.9rem;
}

.dashboard-lists {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.2rem;
}

.progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    margin: 0.4rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
    border-radius: inherit;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
    min-height: 220px;
    margin-top: 1rem;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, rgba(59,130,246,0.8), rgba(14,165,233,0.7));
    border-radius: 12px 12px 4px 4px;
    position: relative;
    height: var(--bar-value, 10%);
    min-height: 10px;
    transition: transform 0.15s ease;
}

.chart-bar:hover {
    transform: translateY(-4px);
}

.chart-bar-value {
    position: absolute;
    top: -28px;
    font-size: 0.8rem;
    color: #0f172a;
    font-weight: 600;
}

.chart-bar-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #475569;
}

.chart-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.tax-checklist {
    list-style: disc;
    margin-left: 1.2rem;
    color: #475569;
}

.tax-checklist li + li {
    margin-top: 0.4rem;
}

.list-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-card li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease, transform 0.2s ease;
}

.list-card li:last-child {
    border-bottom: none;
}

.list-card li:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.item-title {
    margin: 0;
    font-weight: 600;
}

.item-meta {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

.item-value {
    font-weight: 600;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.95rem;
}

.empty-state {
    justify-content: center;
    text-align: center;
    color: #94a3b8;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.product-card h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.product-thumb {
    margin-bottom: 0.8rem;
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
}

.product-card .price {
    font-weight: bold;
    margin: 0.3rem 0 0.6rem;
}

.product-card img,
.product-hero img {
    width: 100%;
    display: block;
    border-radius: 6px;
    object-fit: cover;
}

.product-detail .price {
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-hero {
    margin: 0 auto 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    max-width: 600px;
}
.product-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.description {
    margin-bottom: 1rem;
}

.paypal-checkout {
    margin-top: 1.5rem;
}

.paypal-note {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.6rem;
}

.paypal-license-result {
    margin-top: 1rem;
}

.paypal-success {
    background: #ecfdf5;
    border: 1px solid #34d399;
    color: #065f46;
    border-radius: 6px;
    padding: 0.8rem;
}

.paypal-success ul {
    margin: 0.6rem 0 0;
    padding-left: 1.2rem;
}

.paypal-error {
    background: #fef2f2;
    border: 1px solid #f87171;
    color: #7f1d1d;
    border-radius: 6px;
    padding: 0.8rem;
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    border: 1px solid #222;
    text-decoration: none;
    color: #222;
    font-size: 0.9rem;
    background: #fafafa;
    cursor: pointer;
}

.btn.primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.btn.secondary {
    background: #ffffff;
    border-color: #2563eb;
    color: #2563eb;
}

.btn.ghost {
    background: transparent;
    border-color: rgba(15,23,42,0.25);
    color: inherit;
}

.site-header .btn {
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

.site-header .btn.ghost {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.08);
}

.site-header .btn.primary {
    background: #3b82f6;
    border-color: #3b82f6;
}

.btn.small {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pill.active {
    background: #dcfce7;
    color: #166534;
}

.status-pill.inactive {
    background: #fee2e2;
    color: #b91c1c;
}

/* Code styling in success messages */
.paypal-success code {
    background: rgba(0,0,0,0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, monospace;
}

/* Improved contrast for AI disclaimer boxes on bright shop backgrounds */
.product-detail .sb-ai-disclaimer {
    background: #0f172a;
    color: #e5e7eb;
    border-color: rgba(249, 250, 251, 0.45);
}
.product-detail .sb-ai-disclaimer__title {
    color: #f9fafb;
}
.product-detail .sb-ai-disclaimer__body,
.product-detail .sb-ai-disclaimer__module {
    color: #e5e7eb;
}

.form-card {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    max-width: 700px;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.35rem;
    margin-top: 0.2rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 1rem;
    padding: 0.8rem;
}

legend {
    padding: 0 0.3rem;
    font-size: 0.9rem;
    color: #555;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.table th,
.table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    main {
        padding: 0 1rem 2rem;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .quick-actions,
    .stats-grid,
    .dashboard-lists {
        grid-template-columns: 1fr;
    }

    .list-card li {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-value {
        align-items: flex-start;
    }
}

.table th {
    background: #f0f0f0;
    text-align: left;
}

.error {
    color: #c00;
    background: #ffecec;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert.success {
    background: #ecfdf3;
    color: #0f5132;
    border: 1px solid #bbf7d0;
}

.alert.error {
    background: #fef2f2;
    color: #7f1d1d;
    border: 1px solid #fecdd3;
}

.pill {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.pill.success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.pill.danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecdd3;
}

.btn.danger {
    background: #dc2626;
    color: #fff;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.device-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.device-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e5e7eb;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    margin: 0.3rem 0;
}

@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
}

.sb-credits-info {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Shared AI disclaimer */
.sb-ai-disclaimer {
    margin: 1.5rem 0;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 200, 0, 0.4);
    background: rgba(255, 235, 150, 0.06);
    color: #f3e9c0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.sb-ai-disclaimer__title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.sb-ai-disclaimer__icon {
    font-size: 1.1rem;
}
.sb-ai-disclaimer__body {
    margin: 0.2rem 0;
}
.sb-ai-disclaimer__module {
    margin-top: 0.4rem;
    font-style: italic;
    opacity: 0.9;
}
