/**
 * Custom Stylesheet - IT-SUPPORT Grand Mercure Bandung Setiabudi
 * Theme: Accor Hospitality Navy & Modern Clean Dashboard
 */

:root {
    --gmbs-navy: #4d1c6b;
    --gmbs-purple: #4d1c6b;
    --gmbs-dark: #2d0f3e;
    --gmbs-blue: #1d4ed8;
    --gmbs-gold: #c5a880;
    --gmbs-light-gold: #f4ede4;
    --gmbs-coral-red: #e03131;
    --gmbs-emerald-green: #2b8a3e;
    --gmbs-bg: #f8fafc;
    --gmbs-card-border: #e2e8f0;
    --gmbs-text: #1e293b;
    --gmbs-muted: #64748b;
}

body {
    background-color: var(--gmbs-bg);
    color: var(--gmbs-text);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navbar */
.navbar-gmbs {
    background-color: #4d1c6b !important;
    background: linear-gradient(135deg, #4d1c6b 0%, #3a1452 100%) !important;
    border-bottom: 2px solid var(--gmbs-gold);
}

.navbar-brand-title {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hotel-subtitle {
    font-size: 0.78rem;
    color: var(--gmbs-gold);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Big Action Cards Sesuai Diagram Mockup */
.card-action-ticket {
    background: linear-gradient(135deg, #4169e1 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(65, 105, 225, 0.3);
    text-decoration: none;
    display: block;
    padding: 2.2rem 1.8rem;
}

.card-action-ticket:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(65, 105, 225, 0.45);
    color: #ffffff;
}

.card-action-mytickets {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: #ffffff;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.25);
    text-decoration: none;
    display: block;
    padding: 2.2rem 1.8rem;
}

.card-action-mytickets:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
    color: #ffffff;
}

.card-action-icon {
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    opacity: 0.95;
}

.card-action-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.card-action-desc {
    font-size: 0.95rem;
    opacity: 0.92;
    line-height: 1.4;
    margin: 0;
}

/* Action Navigation Buttons */
.btn-action-pill {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-action-pill:hover, .btn-action-pill.active {
    background-color: var(--gmbs-navy);
    border-color: var(--gmbs-navy);
    color: #ffffff;
}

/* Stat Cards */
.stat-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--gmbs-card-border);
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-number {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gmbs-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Colors */
.bg-orange {
    background-color: #f97316 !important;
}

.bg-purple {
    background-color: #3b0764 !important;
    color: #ffc107 !important;
}

/* Badges */
.badge-sla-breached {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
    font-weight: 600;
}

.badge-sla-ontrack {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
    font-weight: 600;
}

/* Ticket Thread Chat */
.chat-bubble-requester {
    background-color: #f1f5f9;
    border-left: 4px solid #3b82f6;
    border-radius: 0 12px 12px 12px;
    padding: 1rem 1.25rem;
}

.chat-bubble-agent {
    background-color: #f0fdf4;
    border-left: 4px solid #16a34a;
    border-radius: 0 12px 12px 12px;
    padding: 1rem 1.25rem;
}

.chat-bubble-internal {
    background-color: #fffbeb;
    border-left: 4px solid #d97706;
    border-radius: 0 12px 12px 12px;
    padding: 1rem 1.25rem;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: var(--gmbs-muted);
}

/* ==========================================================
   Mobile Responsive Modal Scrolling Fix (Android & iOS)
   ========================================================== */
.modal-dialog-scrollable {
    display: flex !important;
    max-height: calc(100% - 1rem) !important;
    max-height: calc(100dvh - 1rem) !important;
    height: auto !important;
}

.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 2rem) !important;
    max-height: calc(100dvh - 2rem) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

/* Dukungan jika tag <form> membungkus modal-content atau berada di dalam modal-content */
.modal-dialog-scrollable form.modal-content,
.modal-dialog-scrollable .modal-content > form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

.modal-dialog-scrollable .modal-body,
.modal-dialog-scrollable form > .modal-body,
.modal-dialog-scrollable .modal-content > form > .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
}

.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer {
    flex-shrink: 0 !important;
}

@media (max-width: 576px) {
    .modal-dialog-scrollable {
        margin: 0.5rem auto !important;
        max-width: calc(100vw - 1rem) !important;
        width: calc(100vw - 1rem) !important;
    }
    
    .modal-dialog-scrollable .modal-content {
        max-height: calc(100dvh - 1rem) !important;
        border-radius: 1rem !important;
    }

    .modal-dialog-scrollable .modal-header {
        padding: 1rem 1.25rem 0.5rem !important;
    }

    .modal-dialog-scrollable .modal-body {
        padding: 0.85rem 1.25rem !important;
    }

    .modal-dialog-scrollable .modal-footer {
        padding: 0.75rem 1.25rem 1rem !important;
        background-color: #f8fafc;
        border-top: 1px solid #e2e8f0 !important;
    }
}

/* ========================================================
 * LAMPIRAN TIKET: THUMBNAIL KECIL, LIGHTBOX & UPLOAD PREVIEW
 * ======================================================== */

/* Card Thumbnail Lampiran Gambar */
.attachment-card {
    display: inline-flex;
    flex-direction: column;
    width: 125px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.attachment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
    color: inherit;
}

.attachment-thumb-wrap {
    position: relative;
    width: 100%;
    height: 110px;
    background-color: #f1f5f9;
    overflow: hidden;
    cursor: pointer;
}

.attachment-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.attachment-card:hover .attachment-thumb-img {
    transform: scale(1.08);
}

.attachment-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 1.35rem;
}

.attachment-card:hover .attachment-thumb-overlay {
    opacity: 1;
}

.attachment-card-info {
    padding: 6px 8px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.attachment-card-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.3;
}

.attachment-card-size {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 2px;
}

.attachment-card-size a:hover {
    color: #1d4ed8 !important;
}

/* Card Lampiran Dokumen Non-Gambar */
.attachment-card-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    color: #1e293b;
    max-width: 260px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.attachment-card-file:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    color: #1d4ed8;
}

/* Container for Attachment Previews */
.attachment-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

/* Upload Preview Box (Saat Memilih File di Form) */
.attachment-upload-preview {
    display: inline-flex;
    flex-direction: column;
    width: 125px;
    position: relative;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.attachment-upload-preview .preview-thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    background-color: #f1f5f9;
    transition: opacity 0.2s ease;
}

.attachment-upload-preview .preview-thumb:hover {
    opacity: 0.9;
}

.attachment-upload-preview .btn-remove-preview {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 5;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.attachment-upload-preview .btn-remove-preview:hover {
    background: #e03131;
    transform: scale(1.12);
}

.attachment-upload-preview .preview-caption {
    padding: 6px 8px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.attachment-upload-preview .preview-filename {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.attachment-upload-preview .preview-filesize {
    font-size: 0.7rem;
    color: #64748b;
}

/* Lightbox Modal */
#modalImageLightbox {
    z-index: 1065 !important;
}

#modalImageLightbox.show {
    display: block !important;
}

#modalImageLightbox .modal-content {
    background-color: #0f172a !important;
    color: #f8fafc;
    border: 1px solid #334155;
    border-radius: 16px;
    overflow: hidden;
}

#modalImageLightbox .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

#lightboxBackdropFallback {
    z-index: 1060 !important;
    background-color: rgba(15, 23, 42, 0.85) !important;
}

/* Daily Checklist Styles */
.checklist-row {
    transition: background-color 0.2s ease;
}

.table-success-subtle {
    background-color: #f0fdf4 !important;
}

.table-danger-subtle {
    background-color: #fef2f2 !important;
}

.item-notes-input:focus {
    background-color: #ffffff !important;
    border-color: var(--gmbs-blue) !important;
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.15) !important;
}

/* ========================================================== */
/* PRINT REPORT STYLES (EXCEL SPREADSHEET REPORT STYLE)       */
/* ========================================================== */
@media print {
    /* Reset Body & Background */
    body {
        background-color: #ffffff !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
        font-size: 8pt !important;
        line-height: 1.2 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Sembunyikan elemen navigasi dan kontrol website */
    .navbar, .navbar-gmbs, footer, .d-print-none, .btn, .breadcrumb, 
    .progress, .dropdown, #modalImageLightbox, .modal, .alert-dismissible {
        display: none !important;
    }

    /* Reset Container */
    .container, .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hilangkan gaya card box website */
    .card {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    .card-header, .card-body, .card-footer {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    /* Container Tabel Bebas Overflow */
    .table-responsive, .print-table-container {
        overflow: visible !important;
        max-height: none !important;
        display: block !important;
        width: 100% !important;
    }

    /* Header Dokumen Gaya Excel */
    .print-excel-header {
        display: block !important;
        margin-bottom: 6px !important;
    }

    /* Tabel Metadata Ringkasan Gaya Excel */
    .table-print-summary {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 8px !important;
        font-size: 8pt !important;
        border: 1.5px solid #222222 !important;
    }

    .table-print-summary td {
        border: 1px solid #777777 !important;
        padding: 3px 6px !important;
        vertical-align: middle !important;
        background-color: #f8fafc !important;
        color: #000000 !important;
    }

    /* Tabel Matriks Rekap Bulanan Gaya Excel */
    .print-excel-matrix {
        width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        border: 1.5px solid #000000 !important;
        font-size: 6.8pt !important;
        line-height: 1.15 !important;
        margin-bottom: 8px !important;
    }

    .print-excel-matrix thead th {
        background-color: #e2e8f0 !important;
        color: #000000 !important;
        font-weight: bold !important;
        border: 1px solid #333333 !important;
        padding: 3px 1px !important;
        text-align: center !important;
        vertical-align: middle !important;
    }

    .print-excel-matrix tbody td {
        border: 1px solid #555555 !important;
        padding: 2px 1px !important;
        vertical-align: middle !important;
        text-align: center !important;
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    .print-excel-matrix tbody tr:nth-child(even) td {
        background-color: #f8fafc !important;
    }

    /* Kolom Spesifik Matriks Cetak */
    .print-excel-matrix .col-print-no {
        width: 20px !important;
        text-align: center !important;
    }
    .print-excel-matrix .col-print-item {
        width: 155px !important;
        text-align: left !important;
        padding-left: 4px !important;
        white-space: normal !important;
        font-weight: 600 !important;
    }
    .print-excel-matrix .col-print-category {
        width: 78px !important;
        text-align: left !important;
        padding-left: 3px !important;
        font-size: 6.5pt !important;
        color: #333333 !important;
    }
    .print-excel-matrix .col-print-day {
        width: 18px !important;
        text-align: center !important;
    }
    .print-excel-matrix .col-print-ok {
        width: 26px !important;
        text-align: center !important;
        background-color: #f0fdf4 !important;
        font-weight: bold !important;
        color: #166534 !important;
    }
    .print-excel-matrix .col-print-issue {
        width: 26px !important;
        text-align: center !important;
        background-color: #fef2f2 !important;
        font-weight: bold !important;
        color: #991b1b !important;
    }
    .print-excel-matrix .col-print-uptime {
        width: 32px !important;
        text-align: center !important;
        background-color: #f1f5f9 !important;
        font-weight: bold !important;
    }

    /* Simbol Status dalam Sel Cetak */
    .print-symbol-ok {
        color: #15803d !important;
        font-weight: 800 !important;
        font-size: 6.5pt !important;
    }
    .print-symbol-issue {
        color: #b91c1c !important;
        font-weight: 900 !important;
        font-size: 6.5pt !important;
    }
    .print-symbol-pending {
        color: #94a3b8 !important;
        font-size: 6.5pt !important;
    }

    /* Tabel Harian Gaya Excel */
    .print-excel-daily-table {
        width: 100% !important;
        border-collapse: collapse !important;
        border: 1.5px solid #000000 !important;
        font-size: 8pt !important;
        margin-bottom: 12px !important;
    }
    .print-excel-daily-table th {
        background-color: #e2e8f0 !important;
        color: #000000 !important;
        border: 1px solid #333333 !important;
        padding: 4px 6px !important;
    }
    .print-excel-daily-table td {
        border: 1px solid #444444 !important;
        padding: 3px 6px !important;
        vertical-align: middle !important;
    }

    /* Kotak Tanda Tangan Cetak */
    .print-signatures {
        display: block !important;
        page-break-inside: avoid !important;
        margin-top: 15px !important;
    }
    .print-signatures table {
        width: 100% !important;
        border: none !important;
    }
    .print-signatures table td {
        border: none !important;
        background: transparent !important;
    }
}




