/* Custom styles - Dinas Lingkungan Hidup */

.hero-section {
    background: linear-gradient(135deg, #198754 0%, #0f5132 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="70" r="2.5" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

/* Slideshow / Carousel */
.hero-slide {
    min-height: 420px;
    display: flex;
    align-items: center;
}

.min-vh-50 {
    min-height: 380px;
}

#heroCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
}

#heroCarousel .carousel-indicators button.active {
    background-color: #ffc107;
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 5%;
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.employee-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #198754;
}

.gallery-item img {
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.struktur-card {
    border-left: 4px solid #198754;
}

.agenda-today {
    border-left: 5px solid #ffc107;
}

.badge-role-admin {
    background-color: #dc3545;
}

.badge-role-petugas {
    background-color: #0d6efd;
}

.sidebar {
    min-height: calc(100vh - 56px);
    background: #212529;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    border-radius: 0.375rem;
    margin-bottom: 2px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background-color: #198754;
}

.stat-card {
    border: none;
    border-radius: 12px;
}

.table img.thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .hero-section,
    .hero-slide {
        min-height: auto;
        padding: 50px 0;
    }
    .min-vh-50 {
        min-height: auto;
    }
}

/* ===== Modal Pengumuman ===== */
#pengumumanModal .modal-content {
    border-radius: 1rem;
}

#pengumumanModal .pengumuman-content {
    border-radius: 0 1rem 1rem 0;
    min-height: 420px;
}

#pengumumanModal .btn-close {
    filter: none;
    opacity: 0.9;
}

#pengumumanModal .btn-close:hover {
    opacity: 1;
}

@media (max-width: 991.98px) {
    #pengumumanModal .pengumuman-content {
        border-radius: 1rem;
        min-height: auto;
    }
}


/* ===== Asisten Virtual AI (style JDIH) ===== */
.dlh-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #0b3d2e 0%, #145c43 100%);
    color: #fff;
    font-size: 1.55rem;
    box-shadow: 0 8px 24px rgba(11, 61, 46, 0.4);
    z-index: 1060;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dlh-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 28px rgba(11, 61, 46, 0.5);
}
.dlh-fab.open {
    background: #1a1a1a;
}
.dlh-fab-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #e53935;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
}
.dlh-fab-badge.hidden { display: none !important; }

.dlh-panel {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: 360px;
    max-width: calc(100vw - 20px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    z-index: 1061;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.dlh-panel.open {
    display: flex;
    animation: dlhFadeIn 0.22s ease;
}
.dlh-panel.expanded {
    width: min(480px, calc(100vw - 20px));
    height: min(680px, calc(100vh - 40px));
    bottom: 20px;
    right: 20px;
}
@keyframes dlhFadeIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.dlh-panel-header {
    background: #0b3d2e;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.dlh-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dlh-panel-boticon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.dlh-panel-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}
.dlh-panel-online {
    font-size: 0.72rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
.dlh-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
}
.dlh-panel-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dlh-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.85);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: background 0.15s;
}
.dlh-icon-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* Body messages */
.dlh-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dlh-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 100%;
}
.dlh-msg-row.user {
    flex-direction: row-reverse;
}
.dlh-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0b3d2e;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dlh-msg-row.user .dlh-msg-avatar {
    background: #198754;
}
.dlh-msg-content {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 42px);
}
.dlh-msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.dlh-msg-row.bot .dlh-msg-bubble {
    background: #fff;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.dlh-msg-row.user .dlh-msg-bubble {
    background: #0b3d2e;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.dlh-msg-time {
    font-size: 0.68rem;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
}
.dlh-msg-row.user .dlh-msg-time {
    text-align: right;
}
.dlh-msg-row.typing .dlh-msg-bubble {
    background: #fff;
    color: #6b7280;
    font-style: italic;
    font-size: 0.82rem;
}

/* Suggestion chips */
.dlh-panel-chips {
    padding: 6px 12px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.dlh-panel-chips:empty { display: none; }
.dlh-chip {
    border: 1px solid #d1d5db;
    color: #374151;
    background: #fff;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.dlh-chip:hover {
    border-color: #0b3d2e;
    color: #0b3d2e;
    background: #f0fdf4;
}

/* Footer input */
.dlh-panel-footer {
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}
.dlh-panel-footer form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px 4px 4px 14px;
}
.dlh-panel-footer input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: #1a1a1a;
    padding: 8px 0;
}
.dlh-panel-footer input::placeholder {
    color: #9ca3af;
}
.dlh-panel-footer button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #0b3d2e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.dlh-panel-footer button:hover {
    background: #145c43;
}
.dlh-panel-footer button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .dlh-panel {
        right: 8px;
        left: 8px;
        width: auto;
        bottom: 88px;
        height: 65vh;
        border-radius: 14px;
    }
    .dlh-panel.expanded {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    .dlh-fab {
        right: 16px;
        bottom: 16px;
    }
}
