/* MikroTik Control Center — views.css (dipecah dari frontend/index.html) */

/* --- DYNAMIC ISLAND (MERGED WITH NOTIF BELL) --- */
#dynamic-island { position: relative; height: 40px; min-width: 40px; border-radius: 12px; background: rgba(0,0,0,0.04); color: var(--text-main); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); overflow: hidden; box-shadow: none; margin: 0; padding: 0; }

#dynamic-island:hover { background: rgba(0,0,0,0.08); }

#dynamic-island.active { background: #000; color: #fff; border-radius: 20px; min-width: 220px; padding: 0 20px; box-shadow: var(--shadow-float); }

#dynamic-island.active.expand { min-width: 280px; }

.di-bell { position: absolute; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); width: 100%; height: 100%; }

#dynamic-island.active .di-bell { opacity: 0; transform: scale(0.5) translateY(-20px); pointer-events: none; }

.di-content-wrapper { display: flex; align-items: center; gap: 10px; opacity: 0; transform: scale(0.8) translateY(20px); transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: none; white-space: nowrap; font-size: 13px; font-weight: 600; }

#dynamic-island.active .di-content-wrapper { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }

.di-icon { font-size: 16px; animation: pulseDi 1.5s infinite; }

.di-loader { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spinSvg 0.8s linear infinite; }

/* --- SCREENS & MODALS --- */
#login-screen, #checklist-screen, #login-pin-screen, #greeting-screen { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; background: var(--bg-light); transition: opacity 0.4s ease, transform 0.4s ease; }

#greeting-screen { background: rgba(244, 247, 252, 0.8); backdrop-filter: blur(20px); }

.login-card { width: 90%; max-width: 340px; padding: 40px 30px; text-align: center; }

.chk-list { list-style: none; padding: 0; margin: 20px 0; max-height: 220px; overflow-y: auto; text-align: left; border-top: 1px solid rgba(0,0,0,0.05); border-bottom: 1px solid rgba(0,0,0,0.05); }

.chk-list::-webkit-scrollbar { display: none; }

.chk-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--text-main); opacity: 0; transform: translateY(10px); transition: all 0.3s ease; }

.chk-item.show { opacity: 1; transform: translateY(0); }

.chk-icon { width: 16px; height: 16px; display: flex; justify-content: center; align-items: center; font-size: 10px; border-radius: 50%; }

.chk-spin { border: 2px solid rgba(0,0,0,0.1); border-top-color: var(--accent); border-radius: 50%; animation: spinSvg 0.8s linear infinite; width: 14px; height: 14px; }

.chk-ok { background: var(--success); color: white; }

.chk-fail { background: var(--danger); color: white; }

.greet-box { width: 90%; max-width: 450px; padding: 35px; text-align: center; transform: scale(0.9); opacity: 0; animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

.greet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; text-align: left; }

.greet-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; padding: 8px 12px; background: rgba(0,0,0,0.03); border-radius: 10px; }

.greet-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }

.greet-sum-card { padding: 12px; border: 1px solid rgba(0,0,0,0.05); border-radius: 12px; text-align: left; }

/* --- SPLASH SCREEN (JAVAICA TYPING EFFECT) --- */
#splash-screen { position: fixed; inset: 0; background: var(--bg-light); z-index: 10000; display: none; justify-content: center; align-items: center; flex-direction: column; transition: opacity 0.5s ease; }

.splash-logo { font-size: 3.5rem; font-weight: 800; color: var(--accent); letter-spacing: 2px; border-right: 4px solid var(--accent); padding-right: 5px; animation: blinkCaret 0.75s step-end infinite; margin-bottom: 0; }

.splash-sub { font-size: 12px; font-weight: 700; color: var(--text-sub); letter-spacing: 4px; margin-top: 15px; opacity: 0; transition: opacity 1s ease; }

.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 20px; }

.chart-box { padding: 15px 20px; border: 1px solid rgba(0,0,0,0.05); }

.chart-canvas-wrap { position: relative; height: 140px; width: 100%; }

.status-view { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 0; }

/* --- FITUR 1: ANALYTICS --- */
.analytics-top-users { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; margin-bottom: 20px; }

.top-user-card { display: flex; align-items: center; gap: 15px; padding: 15px; }

.top-user-icon { width: 45px; height: 45px; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 20px; color: white; flex-shrink: 0; }

.top-user-info { flex-grow: 1; }

.heatmap-container { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; overflow-x: auto; padding-bottom: 10px;}

.heatmap-row { display: flex; gap: 2px; align-items: center; }

.heatmap-label { width: 80px; font-size: 11px; font-weight: 600; color: var(--text-sub); text-align: right; padding-right: 10px; flex-shrink: 0;}

.heatmap-cell { width: 20px; height: 20px; border-radius: 3px; background: rgba(0,0,0,0.03); flex-shrink: 0; position: relative; cursor: pointer; transition: transform 0.1s; }

.heatmap-cell:hover { transform: scale(1.2); z-index: 2; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }

.heatmap-header { display: flex; gap: 2px; margin-left: 80px; margin-bottom: 5px; }

.heatmap-hour { width: 20px; font-size: 9px; text-align: center; color: var(--text-sub); flex-shrink: 0; }

/* --- FLOATING WIDGET (ADMIN) --- */
#floating-widget { position: fixed; bottom: 20px; right: 20px; z-index: 2500; background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(25px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: var(--shadow-float); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); overflow: hidden; display: flex; flex-direction: column; }

#floating-widget.collapsed { width: 60px; height: 60px; border-radius: 30px; cursor: pointer; }

#floating-widget.collapsed:hover { transform: scale(1.05); background: rgba(255, 255, 255, 0.9); }

#floating-widget.expanded { width: 340px; height: auto; max-height: 85vh; border-radius: 20px; cursor: default; }

.fw-header { display: none; padding: 12px 15px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(0,0,0,0.05); cursor: grab; background: rgba(255,255,255,0.5); }

.fw-header:active { cursor: grabbing; }

#floating-widget.expanded .fw-header { display: flex; }

.fw-title { font-size: 13px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px;}

.fw-live-dot { width: 8px; height: 8px; background: var(--danger); border-radius: 50%; animation: pulseRed 2s infinite; }

.fw-btn-collapse { background: rgba(0,0,0,0.05); border: none; width: 26px; height: 26px; border-radius: 13px; font-size: 12px; cursor: pointer; transition: 0.2s; display: flex; justify-content: center; align-items: center; }

.fw-btn-collapse:hover { background: rgba(0,0,0,0.1); }

.fw-icon-collapsed { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; font-size: 24px; transition: 0.3s; pointer-events: none; }

#floating-widget.expanded .fw-icon-collapsed { opacity: 0; transform: scale(0.5); }

.fw-notif-badge { position: absolute; top: 12px; right: 12px; width: 12px; height: 12px; background: var(--danger); border-radius: 50%; border: 2px solid #fff; transition: 0.3s; }

#floating-widget.expanded .fw-notif-badge { opacity: 0; }

.fw-content { padding: 15px; display: none; flex-direction: column; gap: 15px; overflow-y: auto; max-height: calc(85vh - 50px); }

.fw-content::-webkit-scrollbar { display: none; }

#floating-widget.expanded .fw-content { display: flex; }

.fw-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.fw-box { background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.03); padding: 10px; border-radius: 12px; }

.fw-box-title { font-size: 10px; font-weight: 700; color: var(--text-sub); text-transform: uppercase; margin-bottom: 5px; }

.fw-box-val { font-size: 18px; font-weight: 800; color: var(--text-main); }

.fw-box-sub { font-size: 10px; font-weight: 600; margin-top: 2px; }

.fw-status-item { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(0,0,0,0.05); }

.fw-status-item:last-child { border-bottom: none; }

.fw-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

.fw-dot.green { background: var(--success); }

.fw-dot.yellow { background: var(--warning); }

.fw-dot.red { background: var(--danger); }

.fw-dot.gray { background: var(--text-sub); }

.fw-chart-wrap { height: 50px; width: 100%; position: relative; margin-top: 5px; }

.fw-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 5px; }

/* --- OWNER FLOATING WIDGET --- */
#owner-widget { position: fixed; bottom: 100px; right: 20px; z-index: 2500; background: rgba(255, 149, 0, 0.9); color: white; backdrop-filter: blur(25px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: var(--shadow-float); border-radius: 20px; padding: 12px 20px; display: none; align-items: center; gap: 15px; cursor: pointer; transition: all 0.3s ease; }

#owner-widget:hover { transform: translateY(-5px); box-shadow: 0 25px 50px rgba(255, 149, 0, 0.3); }

.ow-icon { font-size: 24px; animation: pulseDi 2s infinite; }

.ow-text { font-size: 12px; font-weight: 600; line-height: 1.4; }

.ow-val { font-size: 16px; font-weight: 800; }

/* --- APPROVAL CENTER DETAILS --- */
.approval-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; background: rgba(0,0,0,0.02); padding: 15px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.04); }

.appr-item { font-size: 12px; }

.appr-item span.lbl { font-weight: 600; color: var(--text-sub); display: block; margin-bottom: 2px; text-transform: uppercase; font-size: 10px; }

.appr-item span.val { font-weight: 700; color: var(--text-main); }

.code-preview { background: #1e1e1e; color: #a6e22e; padding: 15px; border-radius: 12px; font-family: monospace; font-size: 12px; overflow-x: auto; margin-bottom: 15px; line-height: 1.5; border: 1px solid #333; }

/* --- SYSTEM FREEZE MODE OVERLAY --- */
#freeze-overlay { position: fixed; inset: 0; background: rgba(255, 59, 48, 0.2); backdrop-filter: blur(15px); z-index: 8000; display: none; flex-direction: column; justify-content: center; align-items: center; text-align: center; }

#freeze-overlay.show { display: flex; animation: fadeIn 0.4s ease; }

.freeze-card { background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(255, 59, 48, 0.3); padding: 40px 30px; border-radius: 24px; box-shadow: 0 25px 50px rgba(255, 59, 48, 0.2); max-width: 420px; width: 90%; }

.freeze-icon { font-size: 60px; margin-bottom: 15px; animation: pulseDi 2s infinite; }

/* --- MAINTENANCE CHECKLIST LIST --- */
.mnt-chk-list { list-style: none; padding: 0; margin: 15px 0; max-height: 350px; overflow-y: auto; }

.mnt-chk-item { display: flex; align-items: center; gap: 10px; padding: 12px 15px; font-size: 13px; font-weight: 600; border-bottom: 1px solid rgba(0,0,0,0.05); cursor: pointer; transition: 0.2s; border-radius: 8px; }

.mnt-chk-item:hover { background: rgba(0,0,0,0.02); }

.mnt-box { width: 20px; height: 20px; border: 2px solid var(--text-sub); border-radius: 6px; display: flex; justify-content: center; align-items: center; font-size: 12px; color: transparent; transition: 0.2s; }

.mnt-chk-item.checked .mnt-box { background: var(--success); border-color: var(--success); color: white; }

.mnt-chk-item.checked span { color: var(--text-sub); text-decoration: line-through; }

@media (max-width: 900px) {
    .chart-grid { grid-template-columns: 1fr; }
    .grid-wa-layout { grid-template-columns: 1fr !important; }
    #floating-widget.expanded { width: calc(100% - 40px); bottom: 20px; right: 20px; left: auto; max-height: 80vh; }
    #owner-widget { bottom: 90px; right: 20px; }
}

@media (max-width: 480px) {
    .analytics-top-users { grid-template-columns: 1fr; }
    .greet-grid { grid-template-columns: 1fr; }
    .greet-summary { grid-template-columns: 1fr; }
    .approval-detail-grid { grid-template-columns: 1fr; }
    #dynamic-island.active { min-width: 180px; padding: 0 15px; }
    #dynamic-island.active.expand { min-width: 220px; }
    .di-content-wrapper { font-size: 11px; }
}
