:root {
    --primary: #FF9900;
    --dark: #232F3E;
    --light: #F3F3F3;
    --bg: #f8f9fa;
    /* Korrigierter Standard-Hintergrund für Tools */
    --surface: #ffffff;
    --text-main: #333;
    --text-sub: #555;
    /* Zurück auf Original-Dunkelgrau */
    --success: #06d6a0;
    --token-bg: #f0f7ff;
    --token-text: #0550ae;
    --token-border: #c8e1ff;
    --container-padding: 1.25rem;
    /* 20px Standard für alle Container-Ränder */
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
}

/* Spezifischer Dashboard-Hintergrund */
.dashboard-body {
    background: #e3e6e8 !important;
}

main {
    max-width: 900px;
    /* Global auf 900px reduziert */
    margin: 0 auto;
    padding: 2rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Mindestbreite reduziert, um Kacheln kleiner zu machen */
    gap: 1rem;
    /* Final auf 1rem reduziert */
    margin-bottom: 2rem;
}

/* Card Styles */
.card {
    background: var(--surface);
    border-radius: 12px;
    padding: var(--container-padding);
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    border-top: 4px solid #ddd;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.card.active {
    cursor: pointer;
}

.card.inactive {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    /* Abstand reduziert */
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Icon Colors */
.icon-blue {
    background: #e3f2fd;
    color: #1976d2;
}

.icon-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.icon-purple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.icon-orange {
    background: #fff3e0;
    color: #f57c00;
}

.icon-red {
    background: #ffebee;
    color: #c62828;
}

.icon-teal {
    background: #e0f2f1;
    color: #00796b;
}

/* Header Actions & Tokens */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.token-badge {
    background: var(--token-bg);
    color: var(--token-text);
    border: 1px solid var(--token-border);
    height: 32px;
    /* Kompakt wie gewünscht */
    padding: 0 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.token-badge svg {
    color: var(--token-text);
}

/* Card Color Accents */
.card-blue {
    border-top-color: #1976d2 !important;
}

.card-green {
    border-top-color: #2e7d32 !important;
}

.card-purple {
    border-top-color: #7b1fa2 !important;
}

.card-orange {
    border-top-color: #f57c00 !important;
}

.card-red {
    border-top-color: #c62828 !important;
}

.card-teal {
    border-top-color: #00796b !important;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

.card-list {
    list-style: none;
}

.card-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    /* Abstand zwischen Punkten halbiert */
    font-size: 0.7rem;
    /* Weiter reduziert auf Wunsch */
    color: var(--text-sub);
    line-height: 1.4;
}

.check-icon {
    color: var(--success);
    font-weight: bold;
    flex-shrink: 0;
}

/* Info Section */
.info-container {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    /* Reduziert von 3rem für Kompaktheit */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border: 1px solid #eee;
    border-top: 4px solid #1976d2;
    /* Blaue Oberkante passend zur ersten Kachel oder Primärfarbe */
}

.info-display-box h3 {
    font-size: 0.9rem;
    /* Erhöht auf 0.9rem */
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
}

.info-display-box p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: var(--text-sub);
    font-size: 0.8rem;
    /* Einheitlich auf 0.8rem */
}

.highlight-text {
    display: block;
    margin-top: 1.5rem;
    /* Leicht reduziert */
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    /* Erhöht auf 0.9rem */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Header */
header {
    background: var(--dark);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    /* Wichtig für Spacing in den Tools */
}

/* Neue Klasse für abgerundeten Header in Tools */
.header-rounded {
    border-radius: 16px;
    margin: 1rem 0 2rem 0 !important;
    /* Volle Breite (900px)! Keine Seitenränder. */
    width: 100%;
}

.brand-area {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #ccc;
    font-size: 0.9rem;
}

.system-status {
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 4px;
}

.status-online {
    color: var(--success);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--dark);
}

.settings-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.settings-link:hover {
    color: var(--primary);
}

/* Shop Badges */
.shop-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.shop-badge {
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-badge.active {
    color: var(--primary);
    /* Geändert von #fff für bessere Lesbarkeit */
    border-color: var(--primary);
    background: rgba(255, 153, 0, 0.1);
    box-shadow: none;
}

.shop-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
}

/* Footer */
footer {
    background: var(--dark);
    color: #ccc;
    padding: 1rem 2rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 0.4rem;
    font-size: 8pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.15rem;
    line-height: 1.6;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 8pt;
    transition: color 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact {
    font-size: 8pt;
    color: #aaa;
    line-height: 1.6;
}

.copyright-info {
    font-size: 8pt;
    color: #666;
    line-height: 1.3;
}

.copyright-info strong {
    color: #aaa;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Layout Containers */
.container {
    max-width: 900px;
    /* Alles auf 900px vereinheitlicht */
    margin: 0 auto;
    padding: 2rem;
}

.container-narrow {
    max-width: 900px;
}

/* Common Layout Elements */
.search-box {
    background: var(--surface);
    padding: var(--container-padding);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    margin-bottom: 0.85rem;
    border: 1px solid #eee;
    border-top: 4px solid var(--primary);
}

/* Forms & Inputs */
input {
    width: 100%;
    padding: 0.6rem 1rem;
    /* Reduziert für Kompaktheit */
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 0.9rem;
    /* Reduziert auf 0.9rem */
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

/* Spin Buttons ausblenden */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    /* Fix für Lint */
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Standard Buttons */
button {
    background: var(--dark);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    /* Final reduziert für maximale Kompaktheit */
    border-radius: 8px;
    font-size: 0.85rem;
    /* Jetzt identisch mit der Textinfo in Ausgabefeldern (0.85rem) */
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}

button:hover {
    background: #37475A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- MODERN BUTTON REDESIGN (ICON-PILL STYLE) --- */
.btn-modern {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 2px;
    padding-right: 1.1rem;
    height: 32px;
    /* Exakt so groß wie das Credit-Badge */
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.8rem;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: #e2e8f0;
    /* Slate 200 - noticeably darker but still light */
    color: #1e293b;
}

.btn-modern:hover .lucide {
    animation: pro-icon-pulse 0.4s ease forwards;
}

.btn-icon-circle {
    width: 28px;
    /* Kleinerer Kreis für 32px Button */
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.9);
    /* Der weiße Ring aus dem Pro-Bild */
}

/* Der Glossy-Effekt aus der Pro-Referenz */
.btn-icon-circle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

/* --- Modern Button Variants (Deep Pro Gradients) --- */
.bg-grad-blue {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.bg-grad-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.bg-grad-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-grad-slate {
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
}

.bg-grad-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

/* Lucide Icon Standard Styling (Ultra Pro 1.2px) */
.lucide {
    width: 18px;
    height: 18px;
    stroke-width: 1.2;
    /* Feinere Linien für Pro-Look */
    color: currentColor;
    display: inline-block;
    vertical-align: middle;
}

.btn-icon-circle .lucide {
    color: #fff;
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 2;
}

/* Pro Icon Animation */
@keyframes pro-icon-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Neue Klasse für Copy-Buttons (Harmonisiert auf Pro-Glossy Style) */
.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 3px 12px 3px 3px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-copy .btn-icon-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-copy:hover .btn-icon-circle {
    transform: rotate(15deg) scale(1.1);
    background: linear-gradient(135deg, var(--primary) 0%, #ff7b00 100%);
}

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy .lucide {
    width: 12px;
    height: 12px;
    stroke-width: 2;
}

/* Custom Overrides for Searchbox Buttons */
.search-box .btn-modern {
    height: 42px;
}

/* Common Components */
.loader {
    display: none;
    text-align: center;
    margin: 3rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--dark);
}

.modal-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark);
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border-left: 4px solid #333;
    pointer-events: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    font-size: 1.2rem;
    line-height: 1;
    margin-top: 2px;
}

.toast-content {
    flex: 1;
    font-size: 0.85rem;
    color: #1e293b;
    line-height: 1.5;
    font-weight: 500;
}

.toast-close {
    cursor: pointer;
    color: #cbd5e1;
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #64748b;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}