/* Operations module — HTML/CSS only (no MudBlazor) */

.ops-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.ops-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.ops-stat {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.95rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    color: inherit;
    min-height: 88px;
}

.ops-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.ops-stat__icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.ops-stat__icon--blue { background: #dbeafe; color: #1d4ed8; }
.ops-stat__icon--green { background: #d1fae5; color: #047857; }
.ops-stat__icon--purple { background: #ede9fe; color: #6d28d9; }
.ops-stat__icon--amber { background: #fef3c7; color: #b45309; }
.ops-stat__icon--cyan { background: #cffafe; color: #0e7490; }
.ops-stat__icon--rose { background: #ffe4e6; color: #be123c; }
.ops-stat__icon--slate { background: #e2e8f0; color: #334155; }
.ops-stat__icon--indigo { background: #e0e7ff; color: #4338ca; }
.ops-stat__icon--teal { background: #ccfbf1; color: #0f766e; }
.ops-stat__icon--orange { background: #ffedd5; color: #c2410c; }

.ops-stat__body { min-width: 0; flex: 1; }

.ops-stat__label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.01em;
}

.ops-stat__value {
    margin: 0.15rem 0 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.ops-stat__sub {
    margin: 0.2rem 0 0;
    font-size: 0.68rem;
    color: #94a3b8;
}

.ops-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.ops-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid #c7d2fe;
    color: #3730a3;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ops-chip:hover { background: #eef2ff; border-color: #a5b4fc; color: #312e81; }
.ops-chip--warn { border-color: #fcd34d; color: #92400e; }
.ops-chip--warn:hover { background: #fffbeb; }
.ops-chip--ok { border-color: #6ee7b7; color: #065f46; }
.ops-chip--ok:hover { background: #ecfdf5; }

.ops-section {
    margin-bottom: 1.35rem;
}

.ops-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}

.ops-section__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.ops-section__title i { color: #2563eb; }

.ops-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.72rem;
    font-weight: 700;
}

.ops-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.ops-panel__empty {
    padding: 1.25rem 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.ops-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eef2f7;
    background: #fafbfd;
    align-items: end;
}

.ops-filters .bk-field label,
.ops-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.ops-filters__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.ops-bulk {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #1e3a5f 0%, #1e40af 100%);
    border-radius: 12px;
    color: #fff;
}

.ops-bulk .bk-input,
.ops-bulk .bk-select {
    background: #fff;
    min-width: 160px;
    max-width: 240px;
    height: 38px;
}

.ops-bulk label {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.ops-bulk__count {
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 0.25rem;
}

.ops-tabs {
    display: flex;
    gap: 0.15rem;
    overflow-x: auto;
    border-bottom: 1px solid #e2e8f0;
    margin: 0 -0.25rem 1rem;
    padding: 0 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.ops-tab {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.ops-tab:hover { color: #1e40af; }
.ops-tab.is-active {
    color: #1e40af;
    border-bottom-color: #4f46e5;
}

.ops-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ops-day {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.ops-day__head {
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, #f1f5f9, #fff);
    border-bottom: 1px solid #eef2f7;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ops-day__head i { color: #2563eb; }

.ops-day__list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.ops-day__item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 0.65rem;
    align-items: start;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.ops-day__item:last-child { border-bottom: none; }

.ops-day__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    margin-top: 0.4rem;
    box-shadow: 0 0 0 3px #e0e7ff;
}

.ops-day__cat {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ops-day__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0.1rem 0;
}

.ops-day__meta {
    font-size: 0.78rem;
    color: #64748b;
}

.ops-menu {
    position: relative;
    display: inline-block;
}

.ops-menu__btn {
    appearance: none;
    border: 1px solid #e2e8f0;
    background: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ops-menu__btn:hover { background: #f8fafc; border-color: #cbd5e1; }

.ops-menu__list {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 180px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    z-index: 20;
    padding: 0.35rem;
    display: none;
}

.ops-menu.is-open .ops-menu__list { display: block; }

.ops-menu__item {
    appearance: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    font: inherit;
    font-size: 0.82rem;
    color: #0f172a;
    cursor: pointer;
}

.ops-menu__item:hover { background: #f1f5f9; }
.ops-menu__item--danger { color: #be123c; }

.ops-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.88rem;
}

.ops-alert i { font-size: 1.1rem; margin-top: 0.1rem; }
.ops-alert--warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.ops-check {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    cursor: pointer;
}

.ops-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #64748b;
}

.ops-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

@media (max-width: 768px) {
    .ops-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .ops-stat {
        padding: 0.75rem;
        min-height: 76px;
    }

    .ops-stat__value { font-size: 1.2rem; }

    .ops-filters {
        grid-template-columns: 1fr 1fr;
        padding: 0.85rem 1rem;
    }

    .ops-bulk {
        flex-direction: column;
        align-items: stretch;
    }

    .ops-bulk .bk-input,
    .ops-bulk .bk-select {
        max-width: none;
        width: 100%;
    }

    .bk-header--with-action {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .ops-day__item {
        grid-template-columns: 20px 1fr;
    }

    .ops-day__item .bk-badge {
        grid-column: 2;
        justify-self: start;
        margin-top: 0.25rem;
    }
}

@media (max-width: 480px) {
    .ops-stats { grid-template-columns: 1fr; }
    .ops-filters { grid-template-columns: 1fr; }
}
