@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
    --primary: #008069;
    --primary-hover: #006c59;
    --primary-soft: #e0f2f1;
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-soft: #fef2f2;
    
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    
    --success: #16a34a;
    --success-soft: #f0fdf4;
    
    --bg-body: #f1f5f9;    
    --surface: #ffffff;  
    --text-main: #0f172a; 
    --text-sec: #64748b;    
    --border: #e2e8f0;    

    --sidebar-width: 260px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background: var(--bg-body); 
    color: var(--text-main); 
    font-size: 14px; 
    line-height: 1.5;
    -webkit-font-smoothing: antialiased; 
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); cursor: pointer; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-weight: 700; color: var(--text-main); line-height: 1.2; margin-bottom: 0.5rem; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.fs-xl { font-size: 1.5rem; }
.fs-lg { font-size: 1.25rem; }
.fs-md { font-size: 1rem; }
.fs-sm { font-size: 0.875rem; }
.fs-xs { font-size: 0.75rem; }

.text-main { color: var(--text-main) !important; }
.text-sec { color: var(--text-sec) !important; }
.text-primary { color: var(--primary) !important; }
.text-orange { color: var(--warning) !important; }
.text-green { color: var(--success) !important; }
.text-red { color: var(--danger) !important; }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.block { display: block; }
.w-full { width: 100%; }
.h-fit { height: fit-content; }
.opacity-70 { opacity: 0.7; }
.text-center { text-align: center; }
.d-block { display: block; }

.grid-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.9rem;
    border: 1px solid transparent;
    transition: var(--transition);
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 4px rgba(0, 128, 105, 0.2); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 6px rgba(0, 128, 105, 0.3); }

.btn-outline { background: white; border-color: var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fee2e2; color: var(--danger-hover); }

.btn-danger-solid { background: var(--danger); color: white; }
.btn-danger-solid:hover { background: var(--danger-hover); }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }
.btn-icon { padding: 6px; border-radius: 50%; color: var(--text-sec); display: inline-flex; }
.btn-icon:hover { background: var(--bg-body); color: var(--primary); }
.btn-icon-only { padding: 0.6rem; }
.hover-underline:hover { text-decoration: underline; }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge.green { background: var(--success-soft); color: var(--success); border: 1px solid rgba(22, 163, 74, 0.1); }
.badge.orange { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.1); }
.badge.gray, .badge.basic { background: var(--bg-body); color: var(--text-sec); border: 1px solid var(--border); }

.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0; overflow: hidden;
    border: 2px solid white; box-shadow: var(--shadow-sm);
}
.avatar-lg { width: 72px; height: 72px; font-size: 1.8rem; border-width: 3px; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initial { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); }

.card { 
    background: var(--surface); border-radius: var(--radius-lg); 
    border: 1px solid var(--border); box-shadow: var(--shadow-sm); 
    overflow: hidden; margin-bottom: 1.5rem;
}
.card-header { padding: 1.25rem; border-bottom: 1px solid var(--border); background: #fff; }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; background: #f8fafc; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; align-items: center; }
.separator { border: 0; border-top: 1px dashed var(--border); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--surface); padding: 1.5rem;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.stat-num { font-size: 2.25rem; font-weight: 800; line-height: 1; margin-bottom: 6px; letter-spacing: -0.02em; }
.stat-label { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }

.input, .select, .textarea {
    width: 100%; padding: 0.65rem 1rem;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: white; color: var(--text-main);
    font-family: inherit; font-size: 0.95rem;
    transition: var(--transition);
}
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.textarea { min-height: 100px; resize: vertical; }

.table-header-control { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.control-left, .control-right { display: flex; align-items: center; gap: 1rem; flex: 1; }
.control-right { justify-content: flex-end; }
.filter-box { min-width: 150px; }

.search-wrapper { position: relative; flex: 1; max-width: 300px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-sec); font-size: 1.2rem; pointer-events: none; }
.search-input { padding-left: 40px; }
.button-group { display: flex; gap: 8px; }

.table-responsive { width: 100%; overflow-x: auto; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { text-align: left; padding: 1rem 1.5rem; background: #f8fafc; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-sec); font-weight: 700; border-bottom: 1px solid var(--border); }
td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fcfcfc; }
.is-lulus td { opacity: 0.6; background: #f9fafb; filter: grayscale(1); }
.table-empty-state { background: #fdfdfd; padding: 3rem !important; }

.empty-state { 
    text-align: center; padding: 4rem 1.5rem; 
    border: 2px dashed var(--border); border-radius: var(--radius-lg); 
    background: #fdfdfd; margin-bottom: 2rem; 
}
.empty-state-title { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text-main); }
.empty-state-text { color: var(--text-sec); margin-bottom: 1.5rem; max-width: 400px; margin-left: auto; margin-right: auto; }

.progress-container { 
    width: 100%;
    margin-top: 8px;
}

.progress-track {
    background: var(--bg-body); 
    border-radius: 10px; 
    overflow: hidden; 
    height: 10px; 
    width: 100%;
    position: relative;
}

.progress-fill { 
    height: 100%; 
    border-radius: 10px; 
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1); 
}

.is-success { background: var(--success); }
.is-warning { background: var(--warning); }
.is-danger { background: var(--danger); }
.is-primary { background: var(--primary); }

.timeline { position: relative; padding-left: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.timeline-item { position: relative; }
.timeline-marker { 
    position: absolute; left: -2rem; top: 0; width: 24px; height: 24px; 
    border-radius: 50%; background: white; border: 2px solid var(--border); 
    display: flex; align-items: center; justify-content: center; z-index: 2; 
}
.timeline-item.done .timeline-marker { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.timeline-item.revisi .timeline-marker { border-color: var(--warning); color: var(--warning); background: var(--warning-soft); }
.timeline-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; gap: 8px; }
.timeline-bab { font-weight: 700; font-size: 0.95rem; }
.timeline-footer { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--text-sec); }

/* MODAL */
.modal { 
    position: fixed; 
    inset: 0; 
    z-index: 1000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 1.25rem; 
    visibility: hidden; 
    opacity: 0; 
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px); 
    background: rgba(15, 23, 42, 0.65); 
}

.modal:target { 
    visibility: visible; 
    opacity: 1; 
    pointer-events: auto; 
}

.modal-dialog { 
    background: var(--surface); 
    width: 100%; 
    max-width: 520px; 
    border-radius: 24px; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.92) translateY(20px); 
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    max-height: 90vh;
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
}

.modal:target .modal-dialog { 
    transform: scale(1) translateY(0); 
}

.modal-dialog form {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh; 
    width: 100%;
    overflow: hidden;
}

.modal-header { 
    padding: 1.5rem 1.75rem; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background: #fff;
    flex-shrink: 0;
}

.modal-title { 
    margin: 0; 
    font-size: 1.25rem; 
    font-weight: 800; 
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.modal-body { 
    padding: 1.75rem; 
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.modal-actions { 
    padding: 1.25rem 1.75rem; 
    background: #f8fafc; 
    display: flex; 
    justify-content: flex-end; 
    gap: 1rem; 
    border-top: 1px solid var(--border); 
    flex-shrink: 0;
}

.modal-close { 
    color: var(--text-sec); 
    width: 32px;
    height: 32px;
    border-radius: 50%; 
    display: flex; 
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: var(--bg-body);
}

.modal-close:hover { 
    background: var(--danger-soft); 
    color: var(--danger); 
    transform: rotate(90deg);
}

/* RESPONSIVE */
@media (max-width: 640px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-dialog {
        max-width: 100%;
        margin: 0;
        border-radius: 24px 24px 0 0;
        max-height: 92vh;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0, 0, 0.2, 1);
    }

    .modal-dialog form {
        max-height: 92vh;
    }

    .modal:target .modal-dialog {
        transform: translateY(0);
    }

    .modal-body {
        padding: 1.5rem;
        padding-bottom: 2rem; 
    }

    .modal-actions {
        flex-direction: row;
        padding: 1.25rem;
        gap: 0.75rem;
        background: #fff;
        border-top: 1px solid var(--border);
    }

    .modal-actions .btn { flex: 1; width: auto; padding: 0.85rem 0.5rem; font-size: 0.85rem; white-space: nowrap; }
    .modal-actions .btn-primary { flex: 1.5; }
}

/* ALERT */
.alert { padding: 1rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; font-size: 0.9rem; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #fff; border-right: 1px solid var(--border);
    position: fixed; top: 0; left: 0; bottom: 0;
    padding: 2rem 1.5rem; display: flex; flex-direction: column; z-index: 50;
}
.brand-logo { font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 2.5rem; display: block; letter-spacing: -0.03em; }
.brand-logo span { color: var(--primary); }

.nav-menu { display: flex; flex-direction: column; gap: 0.5rem; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 0.75rem 1rem; border-radius: var(--radius-md);
    color: var(--text-sec); font-weight: 600;
}
.nav-link:hover { background: var(--bg-body); color: var(--text-main); }
.nav-link.active { background: var(--primary-soft); color: var(--primary); }
.nav-link span.material-symbols-rounded { font-size: 1.4rem; }

.main-content {
    flex: 1; margin-left: var(--sidebar-width); padding: 2.5rem;
    width: calc(100% - var(--sidebar-width));
}

.top-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.5rem; }
.header-title { font-size: 1.8rem; margin: 0; }
.user-pill {
    display: flex; align-items: center; gap: 1rem;
    background: #fff; padding: 6px 6px 6px 16px;
    border-radius: 50px; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.user-name { font-weight: 600; font-size: 0.9rem; }
.mobile-top-bar { display: none; }

@media (max-width: 1024px) {
    .main-content { padding: 1.5rem; }
    .grid-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .app-layout { flex-direction: column; }
    .sidebar {
        position: fixed; bottom: 0; top: auto; left: 0; right: 0;
        width: 100%; height: auto;
        padding: 0.75rem 1.5rem 1.75rem 1.5rem; 
        border-right: none; border-top: 1px solid rgba(226, 232, 240, 0.8);
        flex-direction: row; justify-content: space-around;
        background: rgba(255, 255, 255, 0.9); 
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.03);
    }
    .brand-logo { display: none; }
    .nav-menu { flex-direction: row; width: 100%; justify-content: space-between; gap: 0; }
    .nav-link { 
        flex-direction: column; gap: 4px; padding: 6px; 
        font-size: 0.7rem; flex: 1; justify-content: center; text-align: center; border-radius: 8px;
    }
    .nav-link span.material-symbols-rounded { font-size: 1.6rem; }
    .nav-link span:not(.material-symbols-rounded) { font-weight: 600; }

    .main-content { margin-left: 0; width: 100%; padding: 1.25rem; padding-bottom: 110px; }
    .top-header { display: none; }
    .mobile-top-bar { 
        display: flex; justify-content: space-between; align-items: center; 
        margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
    }
    .mobile-top-bar .brand-logo { display: block; margin: 0; font-size: 1.4rem; margin-bottom: 0; }
    
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat-card:last-child:nth-child(odd) { grid-column: span 2; }
    
    .table-header-control { flex-direction: column; align-items: stretch; gap: 1rem; }
    .control-left, .control-right { flex-direction: column; align-items: stretch; width: 100%; }
    .search-wrapper { max-width: 100%; }
    .button-group { width: 100%; }
    .button-group .btn { flex: 1; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card:last-child:nth-child(odd) { grid-column: auto; }
    .form-grid, .grid-2 { grid-template-columns: 1fr; }
    .modal-dialog { height: 100vh; border-radius: 0; }
}


/* Container Side-Tab Vertikal */
.feedback-float {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg); /* Rahasia rotasi vertikal */
    transform-origin: right bottom; /* Memastikan rotasi tetap menempel di pinggir */
    z-index: 1000;
    
    /* Styling Visual */
    background: linear-gradient(135deg, var(--primary) 0%, #00a884 100%);
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    
    /* Border radius hanya di sisi dalam (kiri saat belum dirotasi) */
    border-radius: 12px 12px 0 0; 
    box-shadow: -2px 5px 15px rgba(0, 128, 105, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Efek Hover: Menonjol sedikit ke kiri */
.feedback-float:hover {
    padding-bottom: 25px; /* Memberi efek 'keluar' dari pinggir layar */
    background: #00a884;
}

/* Penyesuaian Icon agar tidak terbalik */
.feedback-float .material-symbols-rounded {
    font-size: 20px;
    transform: rotate(90deg); /* Balikin icon biar tetap tegak */
}

.feedback-text {
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsif Mobile: Tetap vertikal atau sembunyikan jika terlalu penuh */
@media (max-width: 480px) {
    .feedback-float {
        padding: 8px 15px;
        font-size: 11px;
    }
    .feedback-float:hover {
        padding-bottom: 20px;
    }
}

/* Container & Label */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-label-elegant {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

/* Emoji Rating System */
.emoji-rating-wrapper {
    display: flex;
    justify-content: space-between;
    background: #f8fafc;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.emoji-item {
    cursor: pointer;
    position: relative;
}

.emoji-item input {
    position: absolute;
    opacity: 0;
}

.emoji-btn {
    font-size: 28px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: grayscale(100%);
    opacity: 0.6;
}

.emoji-item input:checked + .emoji-btn {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.3);
}

.emoji-btn::after {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    margin-top: 4px;
    color: #64748b;
}

/* Modern Select & Textarea */
.modern-select, .modern-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.modern-select:focus, .modern-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 128, 105, 0.1);
}

.select-wrapper {
    position: relative;
}

/* Submit Button Gradient */
.btn-submit-gradient {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #00a884 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 128, 105, 0.3);
}

.btn-submit-gradient .material-symbols-rounded {
    font-size: 18px;
}
