/* Scoped to `.structura-widget` so wp-admin's default
   `.postbox .inside` rules don't bleed in (and we
   don't bleed out either). All tokens literal so the
   widget stays readable without a build step. */
.structura-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
    color: #e0e7ff;
    margin: -12px -12px -12px -12px; /* span the .inside padding */
}
.structura-widget__card {
    position: relative;
    border-radius: 10px;
    padding: 18px 18px 16px;
    background:
        radial-gradient(110% 130% at 100% 0%, rgba(99,102,241,0.28) 0%, transparent 55%),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 65%, #1e1b4b 100%);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.07) inset,
        0 6px 20px -12px rgba(30, 27, 75, 0.6);
    border: 1px solid rgba(165, 180, 252, 0.18);
}
.structura-widget__card[data-state="green"]::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(16,185,129,0) 0%, #10b981 50%, rgba(16,185,129,0) 100%);
    opacity: 0.9;
}
.structura-widget__card[data-state="alert"]::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #6366f1 100%);
    opacity: 0.9;
}
.structura-widget__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.structura-widget__mark {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px -4px rgba(99,102,241,0.55);
}
.structura-widget__mark svg { width: 20px; height: 20px; }
.structura-widget__title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.structura-widget__subtitle {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(199, 210, 254, 0.82);
    margin-top: 2px;
}
.structura-widget__list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 1px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}
.structura-widget__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: rgba(30, 27, 75, 0.55);
    text-decoration: none;
    color: #e0e7ff;
    transition: background .12s ease;
    min-width: 0;
}
.structura-widget__row:hover,
.structura-widget__row:focus {
    background: rgba(49, 46, 129, 0.9);
    color: #ffffff;
    outline: none;
}
.structura-widget__pill {
    flex: 0 0 auto;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2.5px 7px;
    border-radius: 999px;
    border: 1px solid currentColor;
    line-height: 1;
}
.structura-widget__pill--failed   { color: #fca5a5; }
.structura-widget__pill--warnings { color: #fcd34d; }
.structura-widget__row-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.structura-widget__campaign {
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.structura-widget__step {
    font-size: 11px;
    color: rgba(199, 210, 254, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.structura-widget__time {
    flex: 0 0 auto;
    font-size: 11px;
    color: rgba(199, 210, 254, 0.6);
    font-variant-numeric: tabular-nums;
}
.structura-widget__footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.structura-widget__cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 7px;
    background: #ffffff;
    color: #1e1b4b !important;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px -6px rgba(255,255,255,0.25);
    transition: transform .1s ease;
}
.structura-widget__cta:hover,
.structura-widget__cta:focus {
    transform: translateY(-1px);
    outline: none;
}
.structura-widget__overflow {
    font-size: 11.5px;
    color: rgba(199, 210, 254, 0.7);
}
.structura-widget__empty {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(199, 210, 254, 0.9);
    margin-top: 2px;
}
.structura-widget__empty-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16,185,129,0.18);
}
