.ghostsec-dashboard {
    max-width: 1600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

/* Globales box-sizing-Reset, gescoped auf das Dashboard -- ohne das
   wuerden Elemente mit width:100% + Padding (z.B. Inputs) ihren
   Container um genau den Padding-Betrag ueberragen und horizontales
   Scrollen erzwingen, besonders auf schmalen Mobile-Viewports. */
.ghostsec-dashboard,
.ghostsec-dashboard *,
.ghostsec-dashboard *::before,
.ghostsec-dashboard *::after {
    box-sizing: border-box;
}

.ghostsec-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
    gap: 16px;
    align-items: start;
}

/* Unter 600px passt keine 560px-Mindestspalte mehr in den Viewport --
   ohne diese Regel erzwingt das Grid auf jedem Handy horizontales
   Scrollen der kompletten Seite. Einspaltig ist auf Mobile ohnehin die
   sinnvollere Darstellung. */
@media (max-width: 600px) {
    .ghostsec-cards-grid {
        grid-template-columns: 1fr;
    }
}

.ghostsec-muted {
    color: #6b7280;
}

.ghostsec-error {
    color: #b91c1c;
}

.ghostsec-add-domain {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.ghostsec-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.ghostsec-btn {
    padding: 10px 16px;
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.ghostsec-btn:hover {
    background: #1f2937;
}

.ghostsec-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.ghostsec-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
}

.ghostsec-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.ghostsec-card-header h3 {
    margin: 0;
    font-size: 18px;
    word-break: break-word;
}

.ghostsec-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.ghostsec-badge-ok {
    background: #dcfce7;
    color: #166534;
}

.ghostsec-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.ghostsec-badge-suspended {
    background: #fee2e2;
    color: #991b1b;
}

.ghostsec-copy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.ghostsec-copy-row code {
    flex: 1;
    font-size: 13px;
    word-break: break-all;
}

.ghostsec-copy-btn {
    border: none;
    background: #e5e7eb;
    color: #374151;
    cursor: pointer;
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ghostsec-copy-btn:hover {
    background: #d1d5db;
}

.ghostsec-copy-btn-done {
    background: #dcfce7;
    color: #166534;
}

.ghostsec-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.ghostsec-stat-value {
    font-size: 28px;
    font-weight: 700;
}

.ghostsec-stat-label {
    font-size: 13px;
    color: #6b7280;
}

.ghostsec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ghostsec-table th,
.ghostsec-table td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #f3f4f6;
}

.ghostsec-loading {
    color: #6b7280;
    font-size: 13px;
}

.ghostsec-verify-box {
    margin-bottom: 12px;
}

.ghostsec-verify-box .ghostsec-muted {
    font-size: 13px;
    margin: 0 0 8px 0;
}

.ghostsec-verify-box .ghostsec-hint {
    color: #166534;
}

.ghostsec-last-updated {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
    text-align: right;
}

.ghostsec-range-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.ghostsec-range-btn {
    padding: 4px 12px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    color: #374151;
}

.ghostsec-range-btn:hover {
    background: #f9fafb;
}

.ghostsec-range-btn-active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.ghostsec-chart-wrap {
    margin: 12px 0 20px;
}

.ghostsec-chart {
    width: 100%;
    height: 140px;
    display: block;
}

.ghostsec-chart-line {
    fill: none;
    stroke-width: 2;
}

.ghostsec-chart-passed {
    stroke: #16a34a;
}

.ghostsec-chart-failed {
    stroke: #dc2626;
}

.ghostsec-chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    font-size: 12px;
}

.ghostsec-legend-item {
    position: relative;
    padding-left: 16px;
    color: #6b7280;
}

.ghostsec-legend-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 10px;
    height: 3px;
    border-radius: 2px;
}

.ghostsec-legend-passed::before {
    background: #16a34a;
}

.ghostsec-legend-failed::before {
    background: #dc2626;
}

.ghostsec-badge-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.ghostsec-badge-quarantined {
    background: #fef3c7;
    color: #92400e;
}

.ghostsec-badge-allowed {
    background: #f3f4f6;
    color: #374151;
}

.ghostsec-badge-unchecked {
    background: #f3f4f6;
    color: #6b7280;
}

.ghostsec-badge-check-warning {
    background: #fef3c7;
    color: #92400e;
}

.ghostsec-checks-section {
    margin: 16px 0;
}

.ghostsec-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.ghostsec-chip {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ghostsec-chip-unchecked {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

.ghostsec-chip-ok {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.ghostsec-chip-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.ghostsec-chip-fail {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.ghostsec-chip-locked {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: default;
    opacity: 0.7;
}

.ghostsec-checks-locked .ghostsec-muted {
    margin-top: 4px;
}

.ghostsec-summary-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.ghostsec-summary-loading {
    color: #6b7280;
    font-size: 13px;
}

.ghostsec-summary-headline {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}

.ghostsec-summary-headline-ok {
    color: #166534;
}

.ghostsec-summary-headline-warning {
    color: #92400e;
}

.ghostsec-summary-headline-fail {
    color: #991b1b;
}

.ghostsec-summary-category-box {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.ghostsec-summary-category-fail {
    background: #fef2f2;
    border-color: #fecaca;
}

.ghostsec-summary-category-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.ghostsec-summary-category-info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ghostsec-card-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.ghostsec-card-stat {
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 10px;
}

.ghostsec-trend-up {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.ghostsec-trend-down {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.ghostsec-trend-flat {
    color: #6b7280;
}

.ghostsec-health-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 12px 0;
    border: 1px solid transparent;
}

.ghostsec-health-banner-good {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.ghostsec-health-banner-medium {
    background: #fffbeb;
    border-color: #fde68a;
}

.ghostsec-health-banner-bad {
    background: #fef2f2;
    border-color: #fecaca;
}

.ghostsec-health-banner-text {
    min-width: 0;
}

.ghostsec-health-banner-title {
    font-weight: 700;
    font-size: 14px;
}

.ghostsec-health-banner-good .ghostsec-health-banner-title {
    color: #166534;
}

.ghostsec-health-banner-medium .ghostsec-health-banner-title {
    color: #92400e;
}

.ghostsec-health-banner-bad .ghostsec-health-banner-title {
    color: #991b1b;
}

.ghostsec-health-banner-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.ghostsec-health-circle-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ghostsec-health-circle-svg {
    position: absolute;
    top: 0;
    left: 0;
}

.ghostsec-health-circle-label {
    position: relative;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.ghostsec-setup-checklist {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 10px 0;
}

.ghostsec-setup-checklist-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #1e40af;
}

.ghostsec-setup-progress-outer {
    background: #dbeafe;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ghostsec-setup-progress-inner {
    background: #2563eb;
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.ghostsec-setup-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ghostsec-setup-step {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
}

.ghostsec-setup-step-done {
    background: #dcfce7;
    color: #166534;
}

.ghostsec-setup-step-open {
    background: #fff;
    color: #6b7280;
    border: 1px solid #dbeafe;
}

.ghostsec-2fa-warning-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.ghostsec-settings-wrap {
    margin-bottom: 16px;
}

.ghostsec-settings-toggle {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.ghostsec-settings-toggle:hover {
    background: #f3f4f6;
}

.ghostsec-settings-panel {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 8px;
    max-width: 480px;
}

.ghostsec-settings-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    cursor: pointer;
}

.ghostsec-summary-item {
    margin: 2px 0;
    font-size: 12px;
    line-height: 1.5;
}

.ghostsec-summary-category-fail .ghostsec-summary-item {
    color: #991b1b;
}

.ghostsec-summary-category-warning .ghostsec-summary-item {
    color: #92400e;
}

.ghostsec-summary-category-info .ghostsec-summary-item {
    color: #1e40af;
}

.ghostsec-summary-box .ghostsec-check-msg {
    font-size: 12px;
}

.ghostsec-dmarc-stats-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.ghostsec-check-panel {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 8px;
}

.ghostsec-panel-hidden {
    display: none;
}

.ghostsec-panel-subtitle {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.ghostsec-check-details:first-child .ghostsec-panel-subtitle {
    margin-top: 0;
}

.ghostsec-btn-small {
    padding: 6px 12px;
    background: #fff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.ghostsec-btn-small:hover {
    background: #f3f4f6;
}

.ghostsec-btn-small:disabled {
    opacity: 0.5;
    cursor: default;
}

.ghostsec-dkim-input-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.ghostsec-dkim-input-row .ghostsec-input {
    padding: 6px 10px;
    font-size: 12px;
}

.ghostsec-check-record {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 6px 8px;
    font-family: monospace;
    font-size: 11px;
    word-break: break-all;
    margin-bottom: 6px;
    color: #374151;
}

.ghostsec-check-msg {
    margin: 0 0 4px;
    padding-left: 16px;
    position: relative;
    font-size: 12px;
}

.ghostsec-check-msg::before {
    content: "•";
    position: absolute;
    left: 4px;
}

.ghostsec-check-msg-error {
    color: #991b1b;
}

.ghostsec-check-msg-warning {
    color: #92400e;
}

.ghostsec-check-msg-info {
    color: #1e40af;
}

.ghostsec-summary-group-title {
    margin: 10px 0 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.ghostsec-summary-group-title:first-of-type {
    margin-top: 4px;
}

.ghostsec-msg-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ghostsec-msg-bubble {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.ghostsec-msg-bubble-error {
    background: #fee2e2;
    color: #991b1b;
}

.ghostsec-msg-bubble-warning {
    background: #fef3c7;
    color: #92400e;
}

.ghostsec-msg-bubble-info {
    background: #dbeafe;
    color: #1e40af;
}

.ghostsec-generator-box {
    font-size: 12px;
}

.ghostsec-gen-label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin: 8px 0 4px;
}

.ghostsec-generator-output {
    margin-top: 8px;
}

.ghostsec-private-key-box {
    flex: 1;
    font-family: monospace;
    font-size: 10px;
    padding: 6px 8px;
    border: 1px solid #fecaca;
    border-radius: 4px;
    background: #fff;
    resize: vertical;
}

.ghostsec-copy-row-textarea {
    align-items: flex-start;
}

.ghostsec-stat-value.ghostsec-flash {
    animation: ghostsec-flash-anim 1.2s ease-out;
}

@keyframes ghostsec-flash-anim {
    0% { color: #166534; transform: scale(1.08); }
    100% { color: inherit; transform: scale(1); }
}

.ghostsec-card-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ghostsec-delete-btn {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
}

.ghostsec-delete-btn:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.ghostsec-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ghostsec-modal {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.ghostsec-modal p {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #111827;
}

.ghostsec-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.ghostsec-btn-secondary {
    background: #f3f4f6;
    color: #111827;
}

.ghostsec-btn-secondary:hover {
    background: #e5e7eb;
}

.ghostsec-btn-danger {
    background: #dc2626;
}

.ghostsec-btn-danger:hover {
    background: #b91c1c;
}
