/* eBOX Manager – Custom styles */
[x-cloak] { display: none !important; }

/* ── Base / Dark mode text ── */
.dark body,
.dark .text-muted {
    color: #e2e8f0;
}

.dark .text-subtle {
    color: #94a3b8;
}

.dark h1, .dark h2, .dark h3,
.dark .text-strong {
    color: #f8fafc;
}

.dark a.text-brand-600 {
    color: #38bdf8;
}

.dark a.text-brand-600:hover {
    color: #7dd3fc;
}

/* ── Cards ── */
.card {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 639px) {
    .card {
        padding: 1rem;
    }

    main {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

.dark .card {
    border-color: #334155;
    background: #0f172a;
    color: #e2e8f0;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border-radius: 0.5rem;
    background: #0284c7;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    min-height: 2.75rem;
}

.btn-primary:hover {
    background: #0369a1;
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    text-align: center;
    min-height: 2.75rem;
}

.btn-secondary:hover {
    background: #f8fafc;
}

.dark .btn-secondary {
    border-color: #475569;
    background: #1e293b;
    color: #f1f5f9;
}

.dark .btn-secondary:hover {
    background: #334155;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #0284c7;
    background: transparent;
}

.btn-ghost:hover {
    background: #f0f9ff;
}

.dark .btn-ghost {
    color: #38bdf8;
}

.dark .btn-ghost:hover {
    background: #0c4a6e40;
}

@media (max-width: 639px) {
    .btn-stack-mobile {
        flex-direction: column;
        width: 100%;
    }

    .btn-stack-mobile .btn-primary,
    .btn-stack-mobile .btn-secondary {
        width: 100%;
    }
}

/* ── Forms ── */
.form-input {
    display: block;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

.dark .form-input {
    border-color: #475569;
    background: #1e293b;
    color: #f8fafc;
}

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
}

.dark .form-label {
    color: #cbd5e1;
}

/* ── Service tab icon picker ── */
.service-icon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .service-icon-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.service-icon-option {
    position: relative;
    display: block;
    cursor: pointer;
    margin: 0;
}

.service-icon-option input[type="radio"] {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.service-icon-option__box {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.dark .service-icon-option__box {
    border-color: #334155;
}

.service-icon-option__svg {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 auto;
    color: #334155;
    pointer-events: none;
}

.dark .service-icon-option__svg {
    color: #e2e8f0;
}

.service-icon-option__label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.6875rem;
    line-height: 1.25;
    color: #64748b;
    pointer-events: none;
}

.dark .service-icon-option__label {
    color: #94a3b8;
}

.service-icon-option:hover .service-icon-option__box {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.dark .service-icon-option:hover .service-icon-option__box {
    border-color: #475569;
    background: #0f172a;
}

.service-icon-option input[type="radio"]:checked + .service-icon-option__box,
.service-icon-option input[type="radio"]:focus-visible + .service-icon-option__box {
    border-color: #0284c7;
    background: #f0f9ff;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.dark .service-icon-option input[type="radio"]:checked + .service-icon-option__box,
.dark .service-icon-option input[type="radio"]:focus-visible + .service-icon-option__box {
    border-color: #38bdf8;
    background: rgba(14, 165, 233, 0.12);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

/* ── Tables ── */
.table-wrap {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.dark .table-wrap {
    border-color: #334155;
}

.data-table {
    min-width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.dark .data-table th {
    background: #1e293b;
    color: #cbd5e1;
}

.data-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #334155;
    border-top: 1px solid #e2e8f0;
}

.dark .data-table td {
    color: #e2e8f0;
    border-color: #334155;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.dark .data-table tbody tr:hover {
    background: #1e293b80;
}

/* ── Stat cards ── */
.stat-card {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .stat-card {
    border-color: #334155;
    background: #0f172a;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

.dark .stat-card .stat-label {
    color: #94a3b8;
}

.stat-card .stat-value {
    color: #0f172a;
}

.dark .stat-card .stat-value {
    color: #f8fafc;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-green {
    background: #d1fae5;
    color: #065f46;
}

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

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

.badge-gray {
    background: #f1f5f9;
    color: #334155;
}

.dark .badge-green {
    background: #064e3b;
    color: #6ee7b7;
}

.dark .badge-yellow {
    background: #78350f;
    color: #fde68a;
}

.dark .badge-red {
    background: #7f1d1d;
    color: #fca5a5;
}

.dark .badge-gray {
    background: #334155;
    color: #e2e8f0;
}

/* ── Wallbox panel ── */
.wallbox-panel {
    border-width: 1px;
    border-color: #bae6fd;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.08);
    padding: 0;
    overflow: hidden;
}

.dark .wallbox-panel {
    border-color: #0c4a6e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.wallbox-panel-header {
    padding: 1.25rem 1.25rem 0;
}

@media (min-width: 640px) {
    .wallbox-panel-header {
        padding: 1.5rem 1.5rem 0;
    }
}

.wallbox-panel-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.wallbox-panel-icon {
    display: flex;
    height: 2.75rem;
    width: 2.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.dark .wallbox-panel-icon {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.wallbox-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.dark .wallbox-panel-title {
    color: #f8fafc;
}

.wallbox-panel-subtitle {
    margin-top: 0.125rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.dark .wallbox-panel-subtitle {
    color: #94a3b8;
}

.wallbox-panel > :not(.wallbox-panel-header) {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
}

.wallbox-panel > :last-child {
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .wallbox-panel > :not(.wallbox-panel-header) {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    .wallbox-panel > :last-child {
        margin-bottom: 1.5rem;
    }
}

.wallbox-panel .btn-primary,
.wallbox-panel .wallbox-start-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    width: 100%;
}

.wallbox-idle {
    margin-top: 1.25rem;
}

.wallbox-idle-text {
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #475569;
}

.dark .wallbox-idle-text {
    color: #cbd5e1;
}

.wallbox-start-btn {
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .wallbox-panel .btn-primary,
    .wallbox-panel .wallbox-start-btn {
        width: auto;
    }
}

/* ── Wallbox mobile ── */
@media (max-width: 639px) {
    .wallbox-page {
        max-width: 100%;
    }

    .wallbox-page .user-tariff-card {
        padding: 1rem;
    }

    .wallbox-page .user-tariff-card h2 {
        margin-bottom: 0.375rem;
        font-size: 1rem;
    }

    .wallbox-page .user-tariff-card .text-xl {
        font-size: 1.125rem;
    }

    .wallbox-panel {
        margin-bottom: 1.25rem;
        border-radius: 0.875rem;
        box-shadow: 0 4px 16px rgba(2, 132, 199, 0.06);
    }

    .wallbox-panel-header {
        padding: 1rem 1rem 0;
    }

    .wallbox-panel > :not(.wallbox-panel-header) {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .wallbox-panel > :last-child {
        margin-bottom: 1rem;
    }

    .wallbox-panel-title {
        font-size: 1.125rem;
    }

    .wallbox-panel-subtitle {
        font-size: 0.8125rem;
    }

    .wallbox-alert {
        margin-top: 0.875rem !important;
        margin-bottom: 0.875rem !important;
        padding: 0.75rem !important;
        font-size: 0.8125rem !important;
        line-height: 1.45;
    }

    .wallbox-idle {
        margin-top: 0.875rem;
    }

    .wallbox-idle-text {
        margin-bottom: 1rem;
        font-size: 0.875rem;
    }

    .wallbox-panel .btn-primary,
    .wallbox-panel .wallbox-start-btn {
        width: 100%;
        min-height: 3.25rem;
        font-size: 1rem;
    }

    .wallbox-schedule-summary {
        padding: 0.875rem 0.75rem;
        font-size: 0.875rem;
    }

    .wallbox-schedule-details .charge-schedule-form {
        margin: 0 0.75rem 0.75rem;
    }

    .charge-session-card {
        margin-top: 0.875rem;
        padding: 0.875rem;
    }

    .charge-session-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-bottom: 0.625rem;
    }

    .charge-session-status {
        font-size: 0.8125rem;
    }

    .charge-refresh-btn {
        width: 100%;
        height: auto;
        min-height: 2.5rem;
        padding: 0.5rem 0.75rem;
        border-radius: 0.5rem;
    }

    .charge-refresh-label {
        display: inline;
        font-size: 0.8125rem;
    }

    .charge-refresh-hint {
        margin-bottom: 0.625rem;
    }

    .charge-session-hero {
        gap: 0.625rem;
        margin-bottom: 0.875rem;
    }

    .charge-hero-metric {
        padding: 0.75rem 0.875rem;
    }

    .charge-hero-value {
        font-size: 1.5rem;
    }

    .charge-hero-unit {
        font-size: 0.9375rem;
    }

    .charge-session-meta {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding-top: 0.75rem;
    }

    .charge-meta-item {
        padding: 0.5rem 0.625rem;
        border-radius: 0.5rem;
        background: rgba(255, 255, 255, 0.55);
    }

    .dark .charge-meta-item {
        background: rgba(15, 23, 42, 0.45);
    }

    .charge-planned-window {
        grid-template-columns: 1fr;
    }

    .charge-scheduled-banner {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .charge-session-controls {
        gap: 0.875rem;
        margin-top: 0.875rem;
    }

    .charge-schedule-form {
        padding: 0.875rem;
    }

    .charge-schedule-actions {
        margin-top: 0.875rem;
    }

    .charge-session-hint {
        margin-top: 0.875rem;
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .wallbox-sessions-card {
        padding: 1rem;
    }

    .wallbox-sessions-card h2 {
        margin-bottom: 0.875rem;
        font-size: 1rem;
    }

    .wallbox-sessions-list {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
    }

    .wallbox-session-card {
        padding: 0.75rem;
    }

    .wallbox-session-card-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 0.625rem;
    }

    .wallbox-session-card-date {
        margin: 0;
        font-size: 0.875rem;
        font-weight: 600;
        color: #0f172a;
        line-height: 1.35;
    }

    .dark .wallbox-session-card-date {
        color: #f1f5f9;
    }

    .wallbox-session-card-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem 0.75rem;
        margin: 0;
    }

    .wallbox-session-card-item dt {
        font-size: 0.6875rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #64748b;
    }

    .dark .wallbox-session-card-item dt {
        color: #94a3b8;
    }

    .wallbox-session-card-item dd {
        margin: 0.125rem 0 0;
        font-size: 0.875rem;
        color: #334155;
    }

    .dark .wallbox-session-card-item dd {
        color: #e2e8f0;
    }
}

/* ── Active charging session ── */
.charge-session-card {
    margin-top: 1.25rem;
    border-radius: 0.875rem;
    border: 1px solid #bae6fd;
    background: linear-gradient(165deg, #f0f9ff 0%, #ffffff 45%);
    padding: 1rem;
}

.dark .charge-session-card {
    border-color: #0369a1;
    background: linear-gradient(165deg, rgba(12, 74, 110, 0.45) 0%, #0f172a 50%);
}

.charge-session-card--waiting {
    background: linear-gradient(165deg, #fffbeb 0%, #ffffff 45%);
    border-color: #fde68a;
}

.dark .charge-session-card--waiting {
    background: linear-gradient(165deg, rgba(120, 53, 15, 0.35) 0%, #0f172a 50%);
    border-color: #92400e;
}

.charge-session-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.charge-session-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #166534;
}

.dark .charge-session-status {
    color: #86efac;
}

.charge-session-status--waiting {
    color: #92400e;
}

.dark .charge-session-status--waiting {
    color: #fde68a;
}

.charge-pulse {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: charge-pulse 1.8s ease-in-out infinite;
}

@keyframes charge-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    50% {
        opacity: 0.75;
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

.charge-spinner {
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 9999px;
    border: 2px solid #fbbf24;
    border-top-color: #92400e;
    animation: charge-spin 0.8s linear infinite;
}

@keyframes charge-spin {
    to { transform: rotate(360deg); }
}

.charge-session-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.charge-session-status {
    flex: 1 1 auto;
    min-width: 0;
}

.charge-refresh-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 0.5rem;
    border: 1px solid #bae6fd;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #0369a1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.charge-refresh-label {
    display: none;
}

.charge-refresh-hint {
    min-height: 1rem;
    margin: 0 0 0.75rem;
    font-size: 0.6875rem;
    line-height: 1.3;
    color: #64748b;
}

.charge-refresh-hint--ok {
    color: #15803d;
}

.charge-refresh-hint--error {
    color: #b91c1c;
}

.dark .charge-refresh-hint {
    color: #94a3b8;
}

.dark .charge-refresh-hint--ok {
    color: #86efac;
}

.dark .charge-refresh-hint--error {
    color: #fca5a5;
}

@media (min-width: 640px) {
    .charge-refresh-btn {
        width: auto;
        height: auto;
        padding: 0.35rem 0.75rem;
        border-radius: 9999px;
    }

    .charge-refresh-label {
        display: inline;
    }
}

.charge-refresh-btn:hover:not(:disabled) {
    background: #f0f9ff;
    border-color: #0284c7;
}

.charge-refresh-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.charge-refresh-btn--loading .charge-refresh-icon {
    animation: charge-spin 0.8s linear infinite;
}

.dark .charge-refresh-btn {
    border-color: #0369a1;
    background: #0f172a;
    color: #7dd3fc;
}

.dark .charge-refresh-btn:hover:not(:disabled) {
    background: #1e293b;
    border-color: #38bdf8;
}

.charge-refresh-icon {
    height: 0.875rem;
    width: 0.875rem;
}

.charge-session-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .charge-session-hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.charge-hero-metric {
    border-radius: 0.75rem;
    border: 1px solid rgba(186, 230, 253, 0.8);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.875rem 1rem;
}

.dark .charge-hero-metric {
    border-color: rgba(14, 165, 233, 0.25);
    background: rgba(15, 23, 42, 0.65);
}

.charge-hero-metric--energy {
    border-color: rgba(34, 197, 94, 0.35);
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.dark .charge-hero-metric--energy {
    background: linear-gradient(145deg, rgba(6, 78, 59, 0.35) 0%, rgba(15, 23, 42, 0.65) 100%);
    border-color: rgba(52, 211, 153, 0.3);
}

.charge-metric-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.dark .charge-metric-label {
    color: #94a3b8;
}

.charge-hero-value {
    margin-top: 0.375rem;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.dark .charge-hero-value {
    color: #f8fafc;
}

.charge-hero-metric--energy .charge-hero-value {
    color: #15803d;
}

.dark .charge-hero-metric--energy .charge-hero-value {
    color: #86efac;
}

.charge-hero-prefix {
    margin-right: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.dark .charge-hero-prefix {
    color: #94a3b8;
}

.charge-hero-unit {
    margin-left: 0.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.dark .charge-hero-unit {
    color: #94a3b8;
}

.charge-tariff-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
}

.dark .charge-tariff-hint {
    color: #94a3b8;
}

.charge-session-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(186, 230, 253, 0.9);
}

.dark .charge-session-meta {
    border-top-color: rgba(14, 165, 233, 0.2);
}

.charge-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.charge-meta-icon {
    display: flex;
    height: 2rem;
    width: 2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

.charge-meta-icon svg {
    height: 1.125rem;
    width: 1.125rem;
}

.dark .charge-meta-icon {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.charge-meta-icon--duration {
    background: rgba(234, 179, 8, 0.12);
    color: #ca8a04;
}

.dark .charge-meta-icon--duration {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

.charge-meta-value {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.dark .charge-meta-value {
    color: #f1f5f9;
}

.charge-wait-time {
    font-size: 0.9375rem;
    color: #475569;
}

.dark .charge-wait-time {
    color: #cbd5e1;
}

.charge-wait-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #64748b;
}

.dark .charge-wait-hint {
    color: #94a3b8;
}

.charge-session-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 1rem;
    border-radius: 0.625rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #475569;
}

.dark .charge-session-hint {
    border-color: #334155;
    background: #1e293b;
    color: #cbd5e1;
}

.charge-hint-icon {
    flex-shrink: 0;
    color: #0284c7;
}

.charge-hint-icon svg {
    height: 1.125rem;
    width: 1.125rem;
}

.dark .charge-hint-icon {
    color: #38bdf8;
}

.charge-session-hint p {
    margin: 0;
}

.charge-session-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.charge-control-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.dark .charge-control-label {
    color: #e2e8f0;
}

.charge-schedule-form {
    border-radius: 0.625rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 1rem;
}

.dark .charge-schedule-form {
    border-color: #334155;
    background: #0f172a;
}

.charge-schedule-field + .charge-schedule-field {
    margin-top: 0.25rem;
}

.charge-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.charge-datetime-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    align-items: center;
}

@media (min-width: 480px) {
    .charge-datetime-row {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    }
}

.charge-date-input,
.charge-time-input,
.charge-schedule-form .form-input {
    width: 100%;
    min-width: 0;
    min-height: 3rem;
    font-size: 1rem;
    line-height: 1.25;
}

.charge-field-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

.dark .charge-field-label {
    color: #cbd5e1;
}

.charge-field-hint {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
}

.dark .charge-field-hint {
    color: #94a3b8;
}

.charge-schedule-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 1rem;
}

.charge-schedule-btn,
.charge-schedule-clear-btn {
    width: 100%;
    min-height: 3rem;
    justify-content: center;
}

.charge-schedule-clear-btn {
    border-color: #cbd5e1;
    color: #475569;
    background: #f8fafc;
}

.dark .charge-schedule-clear-btn {
    border-color: #475569;
    color: #e2e8f0;
    background: #1e293b;
}

.wallbox-schedule-details {
    margin-top: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow: hidden;
}

.dark .wallbox-schedule-details {
    border-color: #334155;
    background: #1e293b;
}

.wallbox-schedule-details[open] {
    border-color: #bae6fd;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
}

.dark .wallbox-schedule-details[open] {
    border-color: #0369a1;
}

.wallbox-schedule-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0369a1;
    cursor: pointer;
    list-style: none;
    min-height: 3rem;
    -webkit-tap-highlight-color: transparent;
}

.wallbox-schedule-summary::-webkit-details-marker {
    display: none;
}

.wallbox-schedule-summary::after {
    content: '＋';
    font-size: 1.125rem;
    font-weight: 400;
    color: #64748b;
}

.wallbox-schedule-details[open] .wallbox-schedule-summary::after {
    content: '−';
}

.dark .wallbox-schedule-summary {
    color: #7dd3fc;
}

.wallbox-schedule-details .charge-schedule-form {
    margin: 0 1rem 1rem;
    border: none;
    padding: 0;
    background: transparent;
}

.dark .wallbox-schedule-details .charge-schedule-form {
    background: transparent;
}

@media (min-width: 640px) {
    .charge-schedule-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .charge-schedule-field + .charge-schedule-field {
        margin-top: 0;
    }

    .charge-schedule-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .charge-schedule-btn,
    .charge-schedule-clear-btn {
        width: auto;
        min-width: 9rem;
    }
}

.charge-schedule-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.charge-session-card--scheduled {
    background: linear-gradient(165deg, #eff6ff 0%, #ffffff 45%);
    border-color: #93c5fd;
}

.dark .charge-session-card--scheduled {
    background: linear-gradient(165deg, rgba(30, 58, 138, 0.35) 0%, #0f172a 50%);
    border-color: #2563eb;
}

.charge-planned-window {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
    .charge-planned-window {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.charge-planned-item {
    border-radius: 0.625rem;
    border: 1px solid rgba(147, 197, 253, 0.6);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.75rem;
}

.dark .charge-planned-item {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(15, 23, 42, 0.65);
}

.charge-planned-value {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1e3a8a;
}

.dark .charge-planned-value {
    color: #bfdbfe;
}

@media (min-width: 480px) {
    .charge-schedule-row {
        flex-direction: row;
        align-items: stretch;
    }
}

.charge-stop-form {
    margin: 0;
}

.charge-stop-btn {
    width: 100%;
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}

.charge-cancel-waiting-btn {
    width: 100%;
    border-color: #cbd5e1;
    color: #475569;
    background: #f8fafc;
}

.dark .charge-cancel-waiting-btn {
    border-color: #475569;
    color: #e2e8f0;
    background: #1e293b;
}

.charge-stop-btn:hover {
    background: #fee2e2;
}

.dark .charge-stop-btn {
    border-color: #7f1d1d;
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.35);
}

.charge-scheduled-banner {
    margin-top: 0.875rem;
    border-radius: 0.5rem;
    border: 1px dashed #0284c7;
    background: rgba(2, 132, 199, 0.06);
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: #0369a1;
}

.dark .charge-scheduled-banner {
    border-color: #38bdf8;
    background: rgba(14, 165, 233, 0.1);
    color: #7dd3fc;
}

.charge-scheduled-banner.hidden {
    display: none;
}

/* ── Bank transfer / payment card ── */
.bank-transfer-card {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 1rem;
}

.dark .bank-transfer-card {
    border-color: #334155;
    background: #1e293b;
}

.bank-transfer-amount {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.dark .bank-transfer-amount {
    color: #f8fafc;
}

.bank-field {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.75rem;
}

.dark .bank-field {
    border-color: #475569;
    background: #0f172a;
}

.bank-field-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.dark .bank-field-label {
    color: #94a3b8;
}

.bank-field-value {
    font-size: 0.9375rem;
    color: #0f172a;
    word-break: break-word;
}

.dark .bank-field-value {
    color: #f1f5f9;
}

.bank-field-value.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
}

.bank-qr-box {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 1rem;
    text-align: center;
}

.dark .bank-qr-box {
    border-color: #475569;
    background: #0f172a;
}

.bank-qr-box canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

/* ── Billing open session cards (mobile) ── */
.billing-session-card {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 1rem;
}

.dark .billing-session-card {
    border-color: #334155;
    background: #0f172a;
}

.billing-alert-open {
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #78350f;
}

.dark .billing-alert-open {
    border-color: #b45309;
    background: #451a03;
    color: #fde68a;
}

/* ── History cards (mobile) ── */
.history-card {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 0.875rem;
}

.dark .history-card {
    border-color: #334155;
    background: #0f172a;
}

.history-card dt {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.dark .history-card dt {
    color: #94a3b8;
}

.history-card dd {
    font-size: 0.875rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.dark .history-card dd {
    color: #e2e8f0;
}

/* Dashboard Wallbox teaser */
.wallbox-teaser {
    text-decoration: none;
    color: inherit;
}

.wallbox-teaser-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.wallbox-teaser-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    flex-shrink: 0;
}

.dark .wallbox-teaser-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.wallbox-teaser--active .wallbox-teaser-icon {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.dark .wallbox-teaser--active .wallbox-teaser-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.wallbox-teaser--waiting .wallbox-teaser-icon,
.wallbox-teaser--scheduled .wallbox-teaser-icon {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.wallbox-teaser--busy .wallbox-teaser-icon {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}

.wallbox-teaser-body {
    flex: 1;
    min-width: 0;
}

.wallbox-teaser-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
}

.dark .wallbox-teaser-label {
    color: #f1f5f9;
}

.wallbox-teaser-detail {
    margin-top: 0.125rem;
    font-size: 0.875rem;
    color: #64748b;
}

.dark .wallbox-teaser-detail {
    color: #94a3b8;
}

.wallbox-teaser--active .wallbox-teaser-label {
    color: #15803d;
}

.dark .wallbox-teaser--active .wallbox-teaser-label {
    color: #4ade80;
}

.wallbox-teaser-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    flex-shrink: 0;
}

.dark .wallbox-teaser-action {
    color: #60a5fa;
}

.wallbox-teaser-action-text {
    display: none;
}

@media (min-width: 640px) {
    .wallbox-teaser-action-text {
        display: inline;
    }
}

/* ── Gästemappe ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gf-admin-toolbar {
    border-color: #bae6fd;
    background: rgba(240, 249, 255, 0.5);
}

.dark .gf-admin-toolbar {
    border-color: #0c4a6e;
    background: rgba(12, 74, 110, 0.15);
}

.gf-admin-section__header {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.gf-admin-section__toggle {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.gf-admin-section__body {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.dark .gf-admin-section__body {
    border-top-color: #334155;
}

.gf-sort-btn {
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.gf-sort-btn:hover {
    background: #f1f5f9;
}

.dark .gf-sort-btn:hover {
    background: #1e293b;
}

.gf-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    background: #f0f9ff;
    color: #0284c7;
}

.gf-section-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.dark .gf-section-icon {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.gf-item-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 639px) {
    .gf-item-row {
        grid-template-columns: 1fr;
    }

    .gf-item-remove {
        justify-self: start;
    }
}

.gf-item-remove {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.dark .gf-item-remove {
    border-color: #334155;
    background: #0f172a;
    color: #94a3b8;
}

.gf-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gf-nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.gf-nav-chip:hover {
    border-color: #7dd3fc;
    color: #0284c7;
}

.dark .gf-nav-chip {
    border-color: #334155;
    background: #0f172a;
    color: #e2e8f0;
}

.dark .gf-nav-chip:hover {
    border-color: #0284c7;
    color: #38bdf8;
}

.gf-guest-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
}

.dark .gf-guest-section {
    border-color: #334155;
    background: #0f172a;
}

.gf-guest-section__header {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
}

.gf-guest-section__body {
    padding: 0 1.25rem 1.25rem;
}

.gf-content p {
    margin: 0 0 0.5rem;
}

.gf-content p:last-child {
    margin-bottom: 0;
}

.gf-list {
    margin: 0 0 0.5rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.gf-list li {
    margin-bottom: 0.25rem;
}

.gf-info-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .gf-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gf-info-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    border: 1px solid #e0f2fe;
    background: #f0f9ff;
}

.dark .gf-info-card {
    border-color: #0c4a6e;
    background: rgba(14, 165, 233, 0.08);
}

.gf-info-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0369a1;
}

.dark .gf-info-card__label {
    color: #7dd3fc;
}

.gf-info-card__value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    word-break: break-word;
}

.gf-info-card__text {
    flex: 1;
    min-width: 0;
}

.gf-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #bae6fd;
    background: #fff;
    color: #0284c7;
    cursor: pointer;
}

.gf-copy-btn:hover {
    background: #e0f2fe;
}

.gf-copy-btn--done {
    border-color: #86efac;
    background: #f0fdf4;
    color: #16a34a;
}

.dark .gf-copy-btn {
    border-color: #0c4a6e;
    background: #0f172a;
    color: #38bdf8;
}

.dark .gf-copy-btn--done {
    border-color: #166534;
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
}

.gf-wifi-connect__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    background: #0284c7;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s;
}

.gf-wifi-connect__btn:hover {
    background: #0369a1;
    color: #fff;
}

.dark .gf-wifi-connect__btn {
    background: #0ea5e9;
    color: #0f172a;
}

.dark .gf-wifi-connect__btn:hover {
    background: #38bdf8;
}

.gf-wifi-connect__hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

.dark .gf-wifi-connect__hint {
    color: #94a3b8;
}

/* Service availability calendar (admin) */
.svc-cal-legend-item {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.svc-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.svc-cal-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    padding: 0.25rem;
}

.svc-cal-cell {
    position: relative;
    min-height: 5.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dark .svc-cal-cell {
    border-color: #334155;
}

.svc-cal-cell--empty {
    border: none;
    background: transparent;
    min-height: 0;
}

.svc-cal--open {
    background: #ecfdf5;
    border-color: #6ee7b7;
}

.svc-cal--request {
    background: #fffbeb;
    border-color: #fcd34d;
}

.svc-cal--closed {
    background: #f1f5f9;
    border-color: #cbd5e1;
    opacity: 0.85;
}

.dark .svc-cal--open {
    background: rgba(6, 78, 59, 0.35);
    border-color: #047857;
}

.dark .svc-cal--request {
    background: rgba(120, 53, 15, 0.35);
    border-color: #b45309;
}

.dark .svc-cal--closed {
    background: rgba(30, 41, 59, 0.6);
    border-color: #475569;
}

.svc-cal-cell--override {
    box-shadow: inset 0 0 0 2px #0284c7;
}

.svc-cal-day {
    font-weight: 700;
    font-size: 0.875rem;
}

.svc-cal-mode {
    font-size: 0.625rem;
    line-height: 1.2;
    color: #475569;
}

.dark .svc-cal-mode {
    color: #cbd5e1;
}

.svc-cal-note {
    position: absolute;
    top: 0.25rem;
    right: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0284c7;
}

.svc-cal-actions {
    margin-top: auto;
    display: flex;
    gap: 0.15rem;
}

.svc-cal-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 0.25rem;
    padding: 0 0.35rem;
    font-size: 0.75rem;
    line-height: 1.4;
    cursor: pointer;
}

.dark .svc-cal-btn {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.svc-cal-legend-item.svc-cal--open {
    background: #ecfdf5;
    color: #047857;
}

.svc-cal-legend-item.svc-cal--request {
    background: #fffbeb;
    color: #b45309;
}

.svc-cal-cell--selected {
    box-shadow: inset 0 0 0 3px #0284c7;
    outline: 2px solid #0284c7;
    outline-offset: 1px;
}

.svc-cal-cell--range-anchor {
    box-shadow: inset 0 0 0 3px #f59e0b;
    outline: 2px dashed #f59e0b;
    outline-offset: 1px;
}

.svc-cal-bulk-range {
    width: 100%;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(2, 132, 199, 0.25);
    margin-bottom: 0.25rem;
}

.svc-cal-range-input {
    min-width: 10.5rem;
}

.svc-copy-list-card {
    margin-top: 0;
}

.svc-copy-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.svc-copy-list-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 6rem;
}

.svc-copy-list-btn--done {
    border-color: #86efac;
    color: #166534;
    background: #f0fdf4;
}

.dark .svc-copy-list-btn--done {
    border-color: #166534;
    color: #86efac;
    background: rgba(6, 78, 59, 0.35);
}

.svc-order-copy {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.svc-order-copy-body {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.svc-order-copy-text {
    min-height: 5rem;
}

.svc-order-copy-btn {
    align-self: flex-start;
}

.dark .svc-order-copy {
    border-top-color: rgba(71, 85, 105, 0.65);
}

.svc-workflow-stats {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .svc-workflow-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.svc-workflow-stat--alert {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(254, 242, 242, 0.65);
}

.dark .svc-workflow-stat--alert {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.2);
}

.svc-workflow-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 1024px) {
    .svc-workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.svc-workflow-card {
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.75rem;
    background: #fff;
    padding: 1rem;
}

.dark .svc-workflow-card {
    border-color: rgba(71, 85, 105, 0.8);
    background: #0f172a;
}

.svc-workflow-card--urgent {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.dark .svc-workflow-card--urgent {
    border-color: rgba(248, 113, 113, 0.45);
}

.svc-workflow-card-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.dark .svc-workflow-card-actions {
    border-top-color: rgba(71, 85, 105, 0.65);
}

.svc-workflow-copy {
    margin-left: auto;
}

.svc-workflow-copy summary {
    cursor: pointer;
    list-style: none;
}

.svc-workflow-copy summary::-webkit-details-marker {
    display: none;
}

.avail-matrix-label-col--active {
    box-shadow: inset 3px 0 0 #0284c7;
    background: #f0f9ff;
}

.dark .avail-matrix-label-col--active {
    background: rgba(12, 74, 110, 0.35);
}

.svc-cal-selectable {
    cursor: pointer;
    user-select: none;
}

.svc-cal-selectable:focus-visible {
    outline: 2px solid #0284c7;
    outline-offset: 2px;
}

.svc-cal-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #0284c7;
    background: #f0f9ff;
}

.dark .svc-cal-bulk {
    background: rgba(12, 74, 110, 0.35);
    border-color: #0369a1;
}

.svc-cal-bulk--hidden {
    display: none;
}

.svc-cal-bulk-count {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0c4a6e;
}

.dark .svc-cal-bulk-count {
    color: #bae6fd;
}

.svc-cal-bulk-form,
.svc-cal-bulk-reset-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.svc-cal-bulk-mode {
    min-width: 11rem;
}

.svc-cal-legend-item.svc-cal--closed {
    background: #f1f5f9;
    color: #475569;
}

.avail-matrix-wrap {
    margin: 0 -0.25rem;
}

.avail-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0.25rem;
    min-width: 48rem;
}

.avail-matrix-label-col {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 9rem;
    max-width: 11rem;
    padding: 0.35rem 0.5rem;
    text-align: left;
    vertical-align: top;
    background: var(--card-bg, #fff);
    border-radius: 0.375rem;
}

.dark .avail-matrix-label-col {
    background: rgb(15 23 42);
}

.avail-matrix-head {
    min-width: 2.25rem;
    padding: 0.15rem;
    text-align: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: #64748b;
}

.avail-matrix-dow {
    display: block;
}

.avail-matrix-dom {
    display: block;
    font-size: 0.75rem;
    color: #334155;
}

.dark .avail-matrix-dom {
    color: #e2e8f0;
}

.avail-matrix-cell {
    padding: 0;
    vertical-align: top;
}

.avail-matrix-cell .svc-cal-cell {
    min-height: 2.25rem;
    min-width: 2.25rem;
    padding: 0.2rem;
}

.avail-matrix-cell .svc-cal-mode {
    display: none;
}

.avail-matrix-row--highlight .avail-matrix-label-col {
    box-shadow: inset 3px 0 0 #0284c7;
}

.avail-matrix-row--highlight .svc-cal-cell {
    outline: 1px solid rgba(2, 132, 199, 0.35);
}

