@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --slate-900: #1e2430; --slate-700: #3c495e; --slate-500: #5c6c82; --slate-100: #f0f3f7;
  --accent-peach: #dfbead; --accent-sand: #c7b5a3; --accent-sage: #95b3aa;
  --ink: #1a202c; --muted: #718096; --paper: #ffffff; --bg-body: #edf2f7; --line: #e2e8f0;
  --shadow-hover: 0 8px 24px -10px rgba(30, 36, 48, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
body.dark-theme {
  --slate-900: #ffffff; --slate-700: #a0aec0; --slate-500: #718096; --slate-100: #2a3441;
  --ink: #f0f3f7; --muted: #a0aec0; --paper: #1e2430; --bg-body: #0f131a; --line: #2d3748;
  --shadow-hover: 0 8px 24px -10px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg-body); color: var(--ink); font-family: 'Inter', system-ui, sans-serif; height: 100dvh; width: 100vw; overflow: hidden; }

/* Header & Full-Width Custom Dropdown (Absolute Floating tanpa layout shift) */
.main__header { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; flex: none; }
.header-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.custom-dropdown { position: relative; width: 100%; user-select: none; z-index: 100; }
.dropdown-header { display: flex; align-items: center; justify-content: space-between; background: var(--paper); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; transition: all 0.3s var(--ease); box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.dropdown-header:hover { border-color: var(--slate-500); }
.dropdown-icon { display: flex; transition: transform 0.3s var(--ease); color: var(--muted); }
.dropdown-icon svg { width: 16px; height: 16px; }
.custom-dropdown.open .dropdown-header { border-color: var(--slate-900); }
.custom-dropdown.open .dropdown-icon { transform: rotate(180deg); }
.dropdown-list { position: absolute; top: calc(100% + 6px); left: 0; width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,0.15); overflow: hidden; list-style: none; margin: 0; padding: 6px; z-index: 999; opacity: 0; pointer-events: none; transform: translateY(-10px); transition: all 0.3s var(--ease); }
.custom-dropdown.open .dropdown-list { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown-list li { padding: 12px 14px; font-size: 13.5px; font-weight: 500; color: var(--slate-700); cursor: pointer; border-radius: 10px; transition: background 0.2s, color 0.2s; }
.dropdown-list li:hover { background: var(--slate-100); color: var(--ink); }
.dropdown-list li.active { background: var(--slate-900); color: #fff; font-weight: 600; }

/* Custom Select Wrapper (Simetris, Panah Kustom & Tidak Overflow) */
.select-wrap { position: relative; width: 100%; }
.select-wrap select { appearance: none; -webkit-appearance: none; -moz-appearance: none; width: 100%; padding: 14px 40px 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-body); color: var(--ink); font-size: 14px; cursor: pointer; transition: border 0.2s; }
.select-wrap select:focus { outline: none; border-color: var(--slate-500); }
.select-arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); display: flex; align-items: center; }
.select-arrow svg { width: 16px; height: 16px; }

/* Sensor Blur Kaca */
.censor-blur { filter: blur(4px); opacity: 0.6; user-select: none; background: var(--line); color: transparent; border-radius: 4px; padding: 0 2px; margin: 0 2px;}

#app { width: 100%; height: 100%; display: flex; }
.card { position: relative; width: 100%; height: 100%; display: flex; background: var(--paper); border-radius: 0; overflow: hidden; isolation: isolate; opacity: 0; animation: cardFadeIn 0.7s var(--ease) forwards; }
@keyframes cardFadeIn { to { opacity: 1; } }

/* Hero Section */
.hero { position: relative; flex: 0 0 350px; background: radial-gradient(130% 130% at 20% 10%, #5c6c82 0%, #3c495e 45%, #1e2430 100%); padding: 50px 46px; color: #fff; overflow: hidden; display: flex; flex-direction: column; }
.hero__blob { position: absolute; inset: -10% -10% 0 auto; width: 120%; height: 115%; background: inherit; border-radius: 44% 56% 62% 38% / 48% 42% 58% 52%; z-index: -1; animation: morphBlob 16s ease-in-out infinite alternate; }
@keyframes morphBlob { 0% { border-radius: 44% 56% 62% 38% / 48% 42% 58% 52%; transform: scale(1); } 100% { border-radius: 64% 36% 42% 58% / 42% 62% 38% 58%; transform: scale(1.05); } }

.hero__shape { position: absolute; filter: blur(0.5px); animation: float 6s ease-in-out infinite; }
.hero__shape--cube { top: 10px; left: -14px; width: 70px; height: 70px; background: var(--accent-sand); border-radius: 20px; transform: rotate(-18deg); box-shadow: 0 14px 24px -10px rgba(0, 0, 0, 0.2); animation-delay: 0s; }
.hero__shape--ball { top: 35px; right: -20px; width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, var(--accent-sage) 70%); box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.2); animation-delay: 2s; }
.hero__shape--tri { bottom: 100px; left: -10px; width: 0; height: 0; border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 50px solid var(--accent-peach); transform: rotate(24deg); opacity: 0.85; animation-delay: 4s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-12px) rotate(calc(var(--rot, 0deg) + 5deg)); } }

.hero__eyebrow { position: relative; z-index: 1; font-size: 14px; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.7); margin: 0 0 12px; line-height: 1.4; }
.hero__title { position: relative; z-index: 1; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(32px, 4vw, 42px); line-height: 1.1; margin: 0; max-width: 9ch; }
.hero__foot { margin-top: auto; position: relative; z-index: 1; font-size: 14px; color: rgba(255, 255, 255, 0.75); line-height: 1.5; background: rgba(255, 255, 255, 0.06); padding: 16px 20px; border-radius: 16px; backdrop-filter: blur(8px); }
.hero__foot strong { display: block; color: #fff; font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; margin-bottom: 4px; }

/* Main Content */
.main { flex: 1; height: 100%; min-width: 0; min-height: 0; padding: 40px 60px 30px; display: flex; flex-direction: column; }
.main__title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 30px; margin: 0; color: var(--slate-900); }
.badge { width: 48px; height: 48px; border-radius: 14px; background: var(--slate-100); color: var(--slate-700); display: flex; align-items: center; justify-content: center; flex: none; }

.col-labels { display: grid; gap: 20px; padding: 0 16px 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); border-bottom: 1px solid var(--line); flex: none; }
.list { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: none; }
.list::-webkit-scrollbar { display: none; }

.state-msg { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 15px; }
.state-msg.error { color: #d66455; }
.skeleton-load { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.3; } }

/* Row Design */
.row { opacity: 0; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), background 0.2s ease, box-shadow 0.2s ease, border-color 0.3s; border-radius: 14px; margin-bottom: 4px; flex: none; }
.row.reveal-down { transform: translateY(-20px); }
.row.reveal-up { transform: translateY(20px); }
.row.is-visible { opacity: 1; transform: translateY(0); }
.row:hover { background: var(--slate-100); box-shadow: var(--shadow-hover); border-color: transparent; }

.list .row { display: grid; grid-template-columns: 56px 1.2fr 2fr 1fr; gap: 20px; padding: 20px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.list .row__who, .list .row__role { display: flex; flex-direction: column; justify-content: center; width: 100%; }
.list .row__role { align-items: flex-start; }

.row__avatar { width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; overflow: hidden; }
.row__who { min-width: 0; overflow: hidden; }
.row__name { font-weight: 600; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__username { font-size: 13px; color: var(--muted); margin-top: 2px; }

.row__comment { font-size: 14.5px; color: var(--ink); line-height: 1.6; font-style: italic; }

.row__role { min-width: 0; overflow: hidden; }
.row__specialty { display: inline-block; font-size: 13px; font-weight: 500; color: var(--slate-700); background: var(--paper); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.row:hover .row__specialty { border-color: transparent; background: var(--paper); }
.row__skills { font-size: 12.5px; color: var(--muted); margin-top: 6px;}

/* Toolbar */
.toolbar { flex: none; margin-top: 16px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; background: var(--paper); width: 100%; }
.tool-btn { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); display: flex; align-items: center; justify-content: center; color: var(--slate-700); cursor: pointer; flex: none; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease); }
.tool-btn:hover { background: var(--slate-100); border-color: var(--slate-500); transform: translateY(-2px); }
.tool-btn svg { width: 22px; height: 22px; }

.btn-primary { background: var(--slate-900); color: #fff; border: none; font-weight: 600; cursor: pointer; transition: 0.2s var(--ease); display: flex; align-items: center; justify-content: center; }
.btn-primary:hover { background: var(--slate-700); transform: translateY(-2px); box-shadow: 0 6px 16px -6px rgba(0,0,0,0.3); }

/* Modal Form Khusus Ulasan */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 20px; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card { background: var(--paper); width: 100%; max-width: 500px; padding: 32px; border-radius: 20px; box-shadow: var(--shadow-hover); transform: translateY(20px); transition: transform 0.3s var(--ease); }
.modal-overlay.active .modal-card { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 22px; color: var(--slate-900); }
.nav-btn-close { width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--slate-100); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.nav-btn-close:hover { background: var(--line); }
.nav-btn-close svg { width: 20px; height: 20px; }
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 13px; font-weight: 600; color: var(--muted); }
input, textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-body); color: var(--ink); font-size: 14px; transition: border 0.2s; }
input:focus, textarea:focus { outline: none; border-color: var(--slate-500); }
.alert { padding: 12px; border-radius: 10px; font-size: 14px; text-align: center; margin-bottom: 16px; }
.alert.hidden { display: none; }
.alert.error { background: rgba(214, 100, 85, 0.2); color: #d66455; }
.alert.success { background: rgba(22, 163, 74, 0.2); color: #16a34a; }
.w-full { width: 100%; padding: 14px; border-radius: 14px; font-size: 15px; margin-top: 10px; }

/* Responsive HP */
@media (max-width: 1024px) { .hero { flex-basis: 300px; padding: 40px 32px; } .main { padding: 40px 32px 30px; } }
@media (max-width: 900px) {
  .card { flex-direction: column; }
  .hero { flex: none; padding: 30px 24px; }
  .main { padding: 24px 20px; }
  .col-labels { display: none !important; }
  
  .list .row { 
    grid-template-columns: 50px 1fr; 
    grid-template-areas: 
      "avatar who" 
      "comment comment" 
      "role role"; 
    gap: 0 16px; 
    padding: 20px 16px; 
  }
  .list .row__avatar { grid-area: avatar; align-self: start; }
  .list .row__who { grid-area: who; }
  .list .row__comment { grid-area: comment; margin-top: 12px; font-size: 14px; }
  
  .list .row__role { 
    grid-area: role; 
    flex-direction: row; 
    align-items: center; 
    gap: 8px; 
    margin-top: 16px; 
    padding-top: 16px; 
    border-top: 1px dashed var(--line); 
  }
  .list .row__skills { margin-top: 0; }
}
@media (max-width: 480px) {
  .hero { padding: 24px 20px; } .hero__title { font-size: 28px; } .hero__foot { margin-top: 16px; padding: 14px 16px; }
  .hero__shape--tri { display: none; }
  .main { padding: 20px 16px; } 
  .toolbar { padding-bottom: 12px; gap: 8px; margin-top: 10px; padding-top: 16px;}
  .btn-primary { font-size: 15px; height: 48px !important; }
  .tool-btn { width: 48px; height: 48px; } .tool-btn svg { width: 20px; height: 20px; }
}

.no-transitions, .no-transitions * { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; display: block; pointer-events: none; }
::view-transition-old(root) { z-index: 1; } ::view-transition-new(root) { z-index: 2; }