/**
 * Stylesheet: Operations Report Hub (Trung Tâm Báo Cáo Vận Hành S5)
 * Cổng Thông Tin Cư Dân Cụm Tòa Nhà S5 - Vinhomes Grand Park
 */

.ops-hub-container {
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    margin: 10px 0 40px;
    line-height: 1.6;
    box-sizing: border-box;
}

.ops-hub-container p:empty {
    display: none !important;
}

/* 1. Header Lead Banner */
.ops-hero-banner {
    background: linear-gradient(135deg, #091e3a 0%, #153e75 50%, #1d4ed8 100%);
    color: #ffffff;
    border-radius: 18px;
    padding: 34px 28px;
    margin-bottom: 24px;
    box-shadow: 0 12px 28px -6px rgba(15, 62, 117, 0.28);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.ops-hero-banner::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ops-org-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.ops-main-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 12px 0;
    color: #ffffff !important;
}

@media (min-width: 768px) {
    .ops-main-title {
        font-size: 28px;
    }
}

.ops-hero-desc {
    font-size: 14.5px;
    color: #dbeafe;
    margin: 0;
    line-height: 1.7;
    max-width: 820px;
}

/* 2. Top Metrics Ribbon */
.ops-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.ops-metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ops-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.ops-metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.ops-metric-icon.blue { background: #eff6ff; color: #2563eb; }
.ops-metric-icon.green { background: #f0fdf4; color: #16a34a; }
.ops-metric-icon.amber { background: #fffbeb; color: #d97706; }
.ops-metric-icon.purple { background: #faf5ff; color: #9333ea; }

.ops-metric-info {
    flex: 1;
}

.ops-metric-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.ops-metric-val {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

/* 3. Controls & Filter Bar */
.ops-control-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .ops-control-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Tabs */
.ops-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ops-tab-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 7px 15px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ops-tab-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ops-tab-btn.active {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3);
}

.ops-tab-count {
    background: rgba(0,0,0,0.08);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
}

.ops-tab-btn.active .ops-tab-count {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
}

/* Search input */
.ops-search-box {
    position: relative;
    min-width: 240px;
    max-width: 320px;
    width: 100%;
}

.ops-search-input {
    width: 100%;
    padding: 9px 34px 9px 36px;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    font-size: 13.5px;
    color: #1e293b;
    background: #ffffff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ops-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ops-search-ic {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.ops-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    display: none;
    padding: 4px;
}

.ops-search-clear:hover {
    color: #475569;
}

/* 4. Report Cards Grid */
.ops-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .ops-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ops-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

.ops-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    border-color: #93c5fd;
}

.ops-card.highlight {
    border-color: #3b82f6;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 40%);
}

.ops-card-badge {
    position: absolute;
    top: -10px;
    right: 18px;
    background: #16a34a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.ops-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.ops-doc-icon {
    width: 44px;
    height: 48px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.12);
}

.ops-doc-icon span:first-child {
    font-size: 18px;
    line-height: 1;
}

.ops-doc-icon span:last-child {
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

.ops-card-meta {
    flex: 1;
}

.ops-card-period {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ops-month-tag {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 6px;
}

.ops-date-tag {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
}

.ops-card-title {
    font-size: 16.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    margin: 0;
}

/* Highlights */
.ops-highlights-list {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ops-hl-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 11.5px;
    color: #334155;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Action buttons */
.ops-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.ops-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    box-sizing: border-box;
}

.ops-btn-preview {
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.ops-btn-preview:hover {
    background: #1d4ed8;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.ops-btn-download {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
}

.ops-btn-download:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}

/* Pending card (upcoming week) */
.ops-card.pending {
    border-style: dashed;
    border-color: #cbd5e1;
    background: #fafafa;
}

.ops-card.pending .ops-doc-icon {
    background: #f1f5f9;
    color: #94a3b8;
    box-shadow: none;
}

/* Empty search state */
.ops-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 16px;
    display: none;
}

.ops-empty-state span {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.ops-empty-state h4 {
    font-size: 17px;
    color: #334155;
    margin: 0 0 6px;
    font-weight: 700;
}

.ops-empty-state p {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}

/* 5. PDF Preview Modal */
.ops-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ops-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.ops-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 960px;
    height: 88vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
}

.ops-modal-backdrop.open .ops-modal-dialog {
    transform: translateY(0) scale(1);
}

.ops-modal-header {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ops-modal-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ops-modal-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ops-modal-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.ops-modal-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.ops-modal-close {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ops-modal-close:hover {
    background: #dc2626;
    color: #ffffff;
}

.ops-modal-body {
    flex: 1;
    background: #334155;
    position: relative;
}

.ops-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 6. Feedback & Inquiries Box */
.ops-feedback-box {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 16px;
    padding: 22px 24px;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (min-width: 768px) {
    .ops-feedback-box {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.ops-fb-text h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 800;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ops-fb-text p {
    margin: 0;
    font-size: 13.5px;
    color: #15803d;
    line-height: 1.6;
}

.ops-fb-btn {
    background: #16a34a;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ops-fb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}
