/* ========================================
   SKRIPSEEK - Workspace Dashboard Styles
   Notion-style sidebar layout
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --orange: #FF6B00;
    --orange-light: #FFF3EB;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.2s ease;
    --sidebar-width: 280px;
    --sidebar-collapsed: 64px;
    --topbar-height: 56px;
}

html, body {
    height: 100%;
    font-family: var(--font);
    color: var(--black);
    background: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* ========================================
   Auth Pages (Login/Register)
   ======================================== */
/* html/body dikunci (overflow: hidden) untuk layout dashboard;
   halaman auth harus bisa di-scroll di layar pendek. */
body.auth-page {
    overflow-y: auto;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    background: var(--gray-50);
}

.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-right {
    flex: 1;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--gray-800) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-right-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
}

.auth-right-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--white);
}

.auth-right-content p {
    font-size: 1.125rem;
    color: var(--gray-400);
    max-width: 400px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    margin-bottom: 2rem;
    display: inline-block;
}

.auth-logo img {
    height: 32px;
    width: auto;
    display: block;
}

.auth-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--black);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.auth-btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.auth-btn-primary {
    background: var(--black);
    color: var(--white);
}

.auth-btn-primary:hover {
    background: var(--gray-800);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    font-size: 0.8125rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.google-btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.google-btn:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.google-btn svg {
    width: 20px;
    height: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--black);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.auth-link a {
    color: var(--black);
    font-weight: 600;
}

/* ========================================
   Dashboard Layout
   ======================================== */
.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gray-50);
    border-right: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

/* Handle tarik di tepi kanan sidebar untuk ubah lebar */
.sidebar-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 5;
    touch-action: none;
    transition: background 0.15s ease;
}

.sidebar-resizer:hover,
.sidebar-resizer:focus-visible,
.sidebar.resizing .sidebar-resizer {
    background: var(--gray-300);
    outline: none;
}

.sidebar.resizing {
    transition: none;
}

.sidebar.collapsed .sidebar-resizer {
    display: none;
}

body.sidebar-resizing {
    cursor: col-resize;
    user-select: none;
}

.sidebar-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
    min-height: 56px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.sidebar-logo img {
    height: 24px;
    width: auto;
    display: block;
}

.sidebar.collapsed .sidebar-logo { display: none; }

.sidebar-toggle {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--gray-200);
    color: var(--black);
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-section-title {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    width: 100%;
    text-align: left;
}

.sidebar-item:hover {
    background: var(--gray-100);
    color: var(--black);
}

.sidebar-item.active {
    background: var(--gray-200);
    color: var(--black);
    font-weight: 600;
}

.sidebar-item .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.sidebar-item .label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-item .label {
    display: none;
}

.sidebar-item .badge {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: var(--gray-200);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
}

.sidebar.collapsed .sidebar-item .badge {
    display: none;
}

.sidebar-item .lock {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.sidebar.collapsed .sidebar-item .lock {
    display: none;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-100);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-user:hover {
    background: var(--gray-100);
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--black);
}

.sidebar-user-tier {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.sidebar.collapsed .sidebar-user-info {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
}

.topbar {
    height: var(--topbar-height);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.breadcrumb .current {
    color: var(--black);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-search {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    width: 240px;
    transition: var(--transition);
    background: var(--gray-50);
}

.topbar-search:focus {
    outline: none;
    border-color: var(--black);
    background: var(--white);
}

.topbar-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
    position: relative;
}

.topbar-icon:hover {
    background: var(--gray-100);
    color: var(--black);
}

.topbar-icon .notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--orange);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* ========================================
   Dashboard Cards & Widgets
   ======================================== */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dashboard-header p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.stat-card:hover {
    border-color: var(--gray-200);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-card-icon.orange { background: var(--orange-light); }
.stat-card-icon.green { background: #ECFDF5; }
.stat-card-icon.blue { background: #EFF6FF; }
.stat-card-icon.purple { background: #F5F3FF; }

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card-change {
    font-size: 0.8125rem;
    font-weight: 500;
}

.stat-card-change.positive { color: #10B981; }
.stat-card-change.negative { color: #EF4444; }
.stat-card-change.neutral { color: var(--gray-500); }

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.content-card {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
}

.content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.content-card-title {
    font-size: 1rem;
    font-weight: 700;
}

.content-card-action {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
}

.content-card-action:hover {
    color: var(--black);
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    cursor: pointer;
}

.task-item:hover {
    border-color: var(--gray-200);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.task-checkbox.checked {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
    font-size: 0.75rem;
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-name {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.task-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.task-status {
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.task-status.pending { background: #FEF3C7; color: #92400E; }
.task-status.progress { background: #DBEAFE; color: #1E40AF; }
.task-status.done { background: #D1FAE5; color: #065F46; }

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.activity-dot.orange { background: var(--orange); }
.activity-dot.green { background: #10B981; }
.activity-dot.blue { background: #3B82F6; }

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

/* ========================================
   Page Styles (Tasks, Revisi, Cek, etc.)
   ======================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-header-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-header-left p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.page-header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--black);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--gray-800);
}

.btn-secondary {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
}

.btn-orange {
    background: var(--orange);
    color: var(--white);
}

.btn-orange:hover {
    background: #E55A00;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--gray-300);
}

.filter-chip.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-100);
}

.data-table td {
    padding: 1rem;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--gray-50);
}

.data-table .file-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.file-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.file-icon.doc { background: #DBEAFE; }
.file-icon.pdf { background: #FEE2E2; }
.file-icon.img { background: #D1FAE5; }

/* ========================================
   Checker Page
   ======================================== */
.checker-upload {
    border: 2px dashed var(--gray-200);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 2rem;
}

.checker-upload:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.checker-upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.checker-upload h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.checker-upload p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.checker-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.checker-result-card {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-100);
}

.checker-result-score {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.checker-result-score.good { color: #10B981; }
.checker-result-score.warning { color: #F59E0B; }
.checker-result-score.bad { color: #EF4444; }

.checker-result-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ========================================
   Settings Page
   ======================================== */
.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
}

/* Tanpa settings-nav, konten memakai lebar penuh */
.settings-layout > .settings-content:only-child {
    grid-column: 1 / -1;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-nav-item {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

.settings-nav-item:hover {
    background: var(--gray-100);
    color: var(--black);
}

.settings-nav-item.active {
    background: var(--gray-200);
    color: var(--black);
    font-weight: 600;
}

.settings-content {
    max-width: 600px;
}

.settings-section {
    margin-bottom: 2.5rem;
}

.settings-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.settings-section > p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row-label {
    font-size: 0.9375rem;
    font-weight: 500;
}

.settings-row-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Toggle Switch */
.toggle {
    width: 44px;
    height: 24px;
    background: var(--gray-200);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.toggle.active {
    background: var(--black);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle.active::after {
    left: 22px;
}

/* ========================================
   Empty States
   ======================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Mobile Bottom Nav
   ======================================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    padding: 0.5rem;
    z-index: 100;
}

.mobile-nav-inner {
    display: flex;
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--gray-500);
    transition: var(--transition);
}

.mobile-nav-item.active {
    color: var(--black);
}

.mobile-nav-item .icon {
    font-size: 1.25rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .checker-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* On phones the sidebar becomes a drawer, opened from "Menu" in the bottom nav. */
    .sidebar,
    .sidebar.collapsed {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 85vw);
        height: 100%;
        z-index: 300;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.25s ease, visibility 0.25s;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
    }

    .sidebar.mobile-open {
        transform: none;
        visibility: visible;
    }

    .sidebar-resizer {
        display: none;
    }

    .sidebar-nav {
        overflow-y: auto;
    }

    .sidebar-footer {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 299;
        background: rgba(0, 0, 0, 0.4);
    }

    .mobile-nav {
        display: block;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }

    .main-content {
        padding-bottom: 80px;
    }

    .content-area {
        padding: 1.5rem;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .auth-right {
        display: none;
    }

    .auth-left {
        padding: 1.5rem;
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .topbar-search {
        display: none;
    }

    .checker-results {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .chapter-progress-label { width: 140px; font-size: 0.75rem; }
    .chapter-progress-status { width: 100px; font-size: 0.6875rem; }
    .paraphrase-layout { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 380px; }
    .workspace-grid { grid-template-columns: 1fr; }
}

/* ========================================
   Premium Lock (Sidebar)
   ======================================== */
.sidebar-item .lock {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.sidebar-item .lock-label {
    font-size: 0.6875rem;
    padding: 0.125rem 0.4rem;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-500);
    white-space: nowrap;
    font-weight: 500;
}

/* Kalau sidebar sempit, badge yang mengalah (dipotong), bukan nama menu */
.sidebar-item:has(.lock) .label {
    flex-shrink: 0;
}

.sidebar-item .lock,
.sidebar-item .lock-label {
    min-width: 0;
}

.sidebar-item .lock-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-item .lock {
    display: none;
}

/* ========================================
   Thesis Progress Section
   ======================================== */
.thesis-progress-section {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
    margin-bottom: 1.5rem;
}

.thesis-progress-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.chapter-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chapter-progress-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chapter-progress-label {
    width: 240px;
    font-size: 0.875rem;
    font-weight: 500;
    flex-shrink: 0;
}

.chapter-progress-bar-wrapper {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: hidden;
}

.chapter-progress-bar {
    height: 100%;
    border-radius: 100px;
    transition: width 0.4s ease;
}

.chapter-progress-bar.selesai { background: #10B981; width: 100%; }
.chapter-progress-bar.revisi { background: #F59E0B; width: 60%; }
.chapter-progress-bar.dikerjakan { background: #3B82F6; width: 35%; }
.chapter-progress-bar.belum { background: var(--gray-300); width: 0%; }

.chapter-progress-status {
    width: 150px;
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
    text-align: right;
}

.chapter-progress-status.done { color: #10B981; }
.chapter-progress-status.warn { color: #D97706; }
.chapter-progress-status.active { color: #2563EB; }
.chapter-progress-status.none { color: var(--gray-400); }

/* ========================================
   Thesis Health Score
   ======================================== */
.health-score-card {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--gray-100);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.health-score-number {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: var(--black);
}

.health-score-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* ========================================
   Revision Tracker
   ======================================== */
.revision-tracker {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
}

.revision-tracker h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.revision-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.revision-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    transition: background 0.15s;
}

.revision-item:hover {
    background: var(--white);
}

.revision-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.revision-checkbox.checked {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
    font-size: 0.625rem;
}

.revision-text {
    font-size: 0.875rem;
    flex: 1;
}

.revision-text.checked {
    text-decoration: line-through;
    color: var(--gray-400);
}

.btn-add-revision {
    margin-top: 1rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1.5px dashed var(--gray-300);
    background: var(--white);
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
}

.btn-add-revision:hover {
    border-color: var(--gray-400);
    color: var(--black);
    background: var(--gray-50);
}

/* ========================================
   Workspace Chapter Cards
   ======================================== */
.workspace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.workspace-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.2s;
    cursor: pointer;
}

.workspace-card:hover {
    border-color: var(--gray-200);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.workspace-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.workspace-card-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.workspace-card-progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.workspace-card-progress-bar {
    height: 100%;
    border-radius: 100px;
    background: var(--orange);
}

.workspace-card-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

.workspace-card-status .label {
    color: var(--gray-500);
}

.workspace-card-status .value {
    font-weight: 600;
    color: var(--black);
}

.workspace-card-source {
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    color: var(--gray-500);
}

.workspace-card-missing {
    margin-top: 0.25rem;
    color: var(--gray-600);
}

.workspace-card-warning {
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    color: #B45309;
}

.section-analysis {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    background: var(--gray-50);
}

.section-analysis:empty {
    display: none;
}

.section-analysis-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.section-analysis-note {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.section-analysis-checks {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.section-analysis-checks .ok {
    color: #059669;
}

.section-analysis-checks .miss {
    color: var(--gray-500);
}

.workspace-card-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--gray-100);
    cursor: default;
}

.workspace-card-controls .workspace-status-select {
    flex: 1;
    min-width: 0;
    padding: 0.4375rem 0.625rem;
    font-size: 0.75rem;
}

.workspace-card-controls .workspace-card-edit {
    flex-shrink: 0;
    white-space: nowrap;
}

.storage-disclaimer {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* ========================================
   Paraphrase Page
   ======================================== */
.paraphrase-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.paraphrase-input-area textarea {
    width: 100%;
    min-height: 220px;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.9375rem;
    font-family: var(--font);
    resize: vertical;
    transition: border-color 0.2s;
    line-height: 1.6;
}

.paraphrase-input-area textarea:focus {
    outline: none;
    border-color: var(--black);
}

.paraphrase-input-area textarea::placeholder {
    color: var(--gray-400);
}

.paraphrase-output-area {
    min-height: 220px;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    background: var(--gray-50);
    color: var(--gray-600);
}

.paraphrase-output-area.has-text {
    color: var(--black);
    background: var(--white);
}

.paraphrase-header {
    margin-bottom: 1.5rem;
}

.paraphrase-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    color: #92400E;
    line-height: 1.5;
}

.paraphrase-note {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 1.5rem;
    font-style: italic;
}

/* ========================================
   Usage Counter
   ======================================== */
.usage-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    background: #FEF2F2;
    color: #DC2626;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.usage-counter.unlimited {
    background: #ECFDF5;
    color: #059669;
}

/* ========================================
   Pricing Page
   ======================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 960px;
}

.pricing-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.pricing-card.highlight {
    border-color: var(--orange);
    position: relative;
}

.pricing-card-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orange);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-tier {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pricing-price {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.pricing-price span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
}

.pricing-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    flex: 1;
}

.pricing-features li {
    padding: 0.375rem 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li .check {
    color: var(--orange);
    font-weight: 700;
}

.pricing-plan-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--gray-100);
    border-radius: 10px;
    padding: 0.25rem;
    max-width: 360px;
}

.pricing-plan-toggle button {
    flex: 1;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: all 0.2s;
}

.pricing-plan-toggle button.active {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ========================================
   Responsive Additions
   ======================================== */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
    }
}

/* ========================================
   STRUCTURE SETUP
   ======================================== */
.structure-setup-container {
    max-width: 640px;
}
.structure-helper-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}
.structure-group {
    margin-bottom: 1.5rem;
}
.structure-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}
.structure-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--gray-100);
}
.structure-group-input {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-family: var(--font);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    margin-left: -0.5rem;
    transition: all 0.15s;
}
.structure-group-input:hover { border-color: var(--gray-200); }
.structure-group-input:focus {
    outline: none;
    border-color: var(--black);
    background: var(--white);
    color: var(--gray-700);
}
.structure-group-empty {
    font-size: 0.8125rem;
    color: var(--gray-400);
    padding: 0.5rem 0.75rem;
}
.structure-move-btns {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}
.structure-move-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    background: transparent;
    color: var(--gray-500);
    font-size: 0.625rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.structure-move-btn:hover:not(:disabled) {
    border-color: var(--gray-400);
    color: var(--black);
    background: var(--gray-50);
}
.structure-move-btn:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 1px;
}
.structure-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.structure-group-delete:hover:not(:disabled) {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}
.structure-add-group {
    margin: 0 0 1.5rem;
}
.structure-delete-spacer {
    width: 28px;
    flex-shrink: 0;
}
.structure-chapter-num { white-space: nowrap; flex-shrink: 0; }
.structure-section-name { min-width: 0; }
@media (max-width: 560px) {
    .structure-section-item { padding: 0.5rem 0.25rem; gap: 0.5rem; }
    .structure-checkbox-label { gap: 0.5rem; min-width: 0; }
    .structure-delete-spacer { display: none; }
    .structure-chapter-num { font-size: 0.75rem; }
    .structure-label-input { padding: 0.25rem 0.25rem; min-width: 0; }
}
.structure-add-btn.structure-add-section {
    padding: 0.4rem 1rem;
    margin-top: 0.25rem;
    font-weight: 500;
    border-width: 1px;
}
.structure-section-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 10px;
    transition: background 0.15s;
    margin-bottom: 0.25rem;
}
.structure-section-item:hover {
    background: var(--gray-50);
}
.structure-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex: 1;
    font-size: 0.875rem;
    color: var(--gray-700);
    user-select: none;
}
.structure-checkbox {
    display: none;
}
.structure-checkbox-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    background: var(--white);
}
.structure-checkbox:checked + .structure-checkbox-mark {
    background: var(--black);
    border-color: var(--black);
}
.structure-checkbox:checked + .structure-checkbox-mark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}
.structure-section-name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.structure-label-input {
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.875rem;
    color: var(--gray-700);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.15s;
    font-family: var(--font);
    width: 100%;
    max-width: 280px;
}
.structure-label-input:hover {
    border-color: var(--gray-200);
}
.structure-label-input:focus {
    outline: none;
    border-color: var(--black);
    background: var(--white);
}
.structure-delete-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: all 0.15s;
    flex-shrink: 0;
    border: none;
    background: none;
    cursor: pointer;
}
.structure-delete-btn:hover {
    background: #FEF2F2;
    color: #DC2626;
}
.structure-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1.5px dashed var(--gray-300);
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    margin-top: 0.5rem;
}
.structure-add-btn:hover {
    border-color: var(--gray-400);
    color: var(--black);
    background: var(--gray-50);
}
.structure-validation-msg {
    font-size: 0.8125rem;
    color: #DC2626;
    padding: 0.625rem 0.875rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}
.structure-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
}
.structure-actions .btn-primary {
    min-width: 180px;
}

@media (max-width: 768px) {
    .chapter-progress-label { width: 140px; font-size: 0.75rem; }
    .chapter-progress-status { width: 100px; font-size: 0.6875rem; }
    .paraphrase-layout { grid-template-columns: 1fr; }
    .workspace-grid { grid-template-columns: 1fr; }
    .health-score-number { font-size: 3rem; }
    .structure-label-input { max-width: 100%; }
    .structure-actions { flex-direction: column; }
    .structure-actions .btn { width: 100%; }
}

/* ========================================
   Upgrade Modal & Plan Selection
   ======================================== */
.upgrade-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upgrade-modal-overlay.hidden { display: none; }
.upgrade-modal {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.upgrade-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    font-size: 1.125rem;
}
.upgrade-modal-close:hover { background: var(--gray-100); color: var(--black); }
.upgrade-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}
.upgrade-modal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.upgrade-modal p {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.upgrade-modal-usage {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-100);
}
.upgrade-modal-actions {
    display: flex;
    gap: 0.75rem;
}
.upgrade-modal-actions .btn { flex: 1; }
.upgrade-offer {
    border: 1px solid var(--orange);
    background: var(--orange-light);
    border-radius: 12px;
    padding: 1rem 1.125rem;
    margin-bottom: 1.5rem;
}
.upgrade-offer-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    background: var(--orange);
    color: var(--on-accent, #fff);
    margin-bottom: 0.5rem;
}
.upgrade-offer-badge[hidden], .upgrade-offer-price s[hidden] { display: none; }
.upgrade-offer-price { display: flex; align-items: baseline; gap: 0.25rem; flex-wrap: wrap; }
.upgrade-offer-price strong { font-size: 1.5rem; font-weight: 800; color: var(--black); }
.upgrade-offer-price span { font-size: 0.875rem; color: var(--gray-500); }
.upgrade-offer-price s { font-size: 0.875rem; color: var(--gray-400); margin-left: 0.375rem; }
.upgrade-offer-note { font-size: 0.75rem; color: var(--gray-500); margin: 0.125rem 0 0.75rem; }
.upgrade-offer-list { list-style: none; padding: 0; margin: 0; }
.upgrade-offer-list li { padding: 0.1875rem 0; font-size: 0.8125rem; color: var(--gray-600); display: flex; align-items: center; gap: 0.5rem; }
.upgrade-offer-list .check { color: var(--orange); font-weight: 700; }

/* Offer bar on a feature page once the free quota is used up */
.quota-offer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    margin: -0.75rem 0 1.5rem;
    border: 1px solid var(--orange);
    border-radius: 12px;
    background: var(--orange-light);
}
.quota-offer-text { display: flex; flex-direction: column; gap: 0.125rem; font-size: 0.8125rem; color: var(--gray-600); line-height: 1.5; }
.quota-offer-text strong { color: var(--black); font-size: 0.875rem; }
.quota-offer-bar .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 640px) {
    .quota-offer-bar { flex-direction: column; align-items: stretch; }
}

/* Plan Selection Modal */
.plan-selection-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.plan-selection-overlay.hidden { display: none; }
.plan-selection-modal {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.plan-selection-modal .plan-option {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.plan-selection-modal .plan-option:hover { border-color: var(--gray-300); }
.plan-selection-modal .plan-option.current { opacity: 0.55; pointer-events: none; }
.plan-selection-modal .plan-option.highlighted { border-color: var(--orange); background: var(--orange-light); }
.plan-option-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.plan-option-name { font-size: 1rem; font-weight: 700; }
.plan-option-badge { font-size: 0.6875rem; padding: 0.125rem 0.5rem; border-radius: 100px; background: var(--gray-100); color: var(--gray-500); font-weight: 600; }
.plan-option-badge.active { background: var(--orange); color: var(--white); }
.plan-option-price { font-size: 0.875rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.plan-option-features { list-style: none; padding: 0; }
.plan-option-features li { padding: 0.25rem 0; font-size: 0.8125rem; color: var(--gray-600); display: flex; align-items: center; gap: 0.5rem; }
.plan-option-features li .check { color: var(--orange); font-weight: 700; }

/* ========================================
   Structure Limit Counter
   ======================================== */
.structure-limit-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.structure-limit-counter.at-limit { background: #FEF3C7; color: #92400E; }
.structure-limit-counter.unlimited { background: #ECFDF5; color: #059669; }
.structure-upgrade-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--orange);
    color: var(--white);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    margin-left: 0.75rem;
    vertical-align: middle;
}
.structure-upgrade-cta:hover { background: #E55A00; }

/* ========================================
   Checker Upload UI
   ======================================== */
.checker-upload-zone {
    border: 2px dashed var(--gray-200);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
    position: relative;
}
.checker-upload-zone:hover { border-color: var(--gray-400); background: var(--gray-50); }
.checker-upload-zone.dragover { border-color: var(--orange); background: var(--orange-light); }
.checker-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.checker-upload-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.checker-upload-text { font-size: 0.9375rem; font-weight: 500; margin-bottom: 0.25rem; }
.checker-upload-hint { font-size: 0.8125rem; color: var(--gray-400); }
.checker-file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    margin-bottom: 1rem;
}
.checker-file-info .file-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.checker-file-info .file-icon.txt { background: #DBEAFE; }
.checker-file-info .file-icon.pdf { background: #FEE2E2; }
.checker-file-info .file-details { flex: 1; min-width: 0; }
.checker-file-info .file-name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checker-file-info .file-meta { font-size: 0.75rem; color: var(--gray-500); }
.checker-file-info .file-remove {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    font-size: 0.875rem;
    flex-shrink: 0;
}
.checker-file-info .file-remove:hover { background: #FEF2F2; color: #DC2626; }

/* Section File Upload Zone */
.section-file-upload-zone {
    border: 2px dashed var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
    position: relative;
}
.section-file-upload-zone:hover { border-color: var(--gray-400); background: var(--gray-50); }
.section-file-upload-zone.dragover { border-color: var(--orange); background: var(--orange-light); }
.section-file-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.section-upload-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.section-upload-text { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.section-upload-hint { font-size: 0.75rem; color: var(--gray-400); }
.section-file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    margin-bottom: 1rem;
}
.section-file-info .file-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; flex-shrink: 0; }
.section-file-info .file-icon.txt { background: #DBEAFE; }
.section-file-info .file-icon.pdf { background: #FEE2E2; }
.section-file-info .file-icon.doc { background: #DBEAFE; }
.section-file-info .file-details { flex: 1; min-width: 0; }
.section-file-info .file-name { font-size: 0.8125rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-file-info .file-meta { font-size: 0.6875rem; color: var(--gray-500); }
.section-file-info .file-remove {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.section-file-info .file-remove:hover { background: #FEF2F2; color: #DC2626; }

/* Document Picker Modal */
.doc-picker-search {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-family: var(--font);
}
.doc-picker-search:focus { outline: none; border-color: var(--black); }
.doc-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
}
.doc-picker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.doc-picker-item:hover { border-color: var(--gray-300); background: var(--gray-50); }
.doc-picker-item .file-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; flex-shrink: 0; background: #DBEAFE; }
.doc-picker-item-info { flex: 1; min-width: 0; }
.doc-picker-item-name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-picker-item-meta { font-size: 0.75rem; color: var(--gray-500); }
.doc-picker-empty { text-align: center; padding: 2rem 1rem; color: var(--gray-400); font-size: 0.875rem; }
.doc-picker-select { font-size: 0.75rem; padding: 0.25rem 0.625rem; border-radius: 6px; background: var(--black); color: var(--white); font-weight: 600; border: none; cursor: pointer; flex-shrink: 0; }

/* Cari Judul Direction Group */
.judul-direction-group {
    margin-bottom: 1.5rem;
}
.judul-direction-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}
.judul-direction-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--black);
}
.judul-direction-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    background: var(--gray-100);
}

/* Cari Judul Filter Section */
.judul-filter-section {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
}
.judul-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}
.judul-filter-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
}
.judul-filter-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--gray-300);
    cursor: pointer;
}
.judul-filter-label input[type="checkbox"]:checked {
    background: var(--black);
    border-color: var(--black);
}

/* Sidebar Product Links */
.sidebar-link {
    text-decoration: none;
}
.product-price {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: var(--gray-100);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
}
.sidebar.collapsed .product-price {
    display: none;
}

/* ========================================
   ASPECT-BASED DASHBOARD - SKP-046
   ======================================== */

/* Dashboard Two Column Layout */
.dashboard-two-col {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-col-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-col-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Quick Actions Bar */
.quick-actions-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.quick-action-btn:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* Insights Section */
.insights-section {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
}

.insights-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: var(--white);
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.insight-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.insight-text {
    flex: 1;
}

/* Aspects Section */
.aspects-section {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
}

.aspects-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.aspects-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.aspect-card {
    background: var(--white);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-100);
}

.aspect-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.aspect-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.aspect-pct {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--gray-700);
}

.aspect-progress-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: hidden;
}

.aspect-progress-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.4s ease;
}

.aspect-empty {
    text-align: center;
    padding: 1rem;
    color: var(--gray-400);
    font-size: 0.8125rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px dashed var(--gray-200);
}

/* Recommendations Section */
.recommendations-section {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
}

.recommendations-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recommendation-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.15s;
}

.recommendation-card:hover {
    border-color: var(--gray-300);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.recommendation-card.urgent {
    border-left: 3px solid #EF4444;
    background: #FEF2F2;
}

.recommendation-card.high {
    border-left: 3px solid #F59E0B;
    background: #FFFBEB;
}

.recommendation-card.normal {
    border-left: 3px solid var(--gray-300);
}

.recommendation-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.recommendation-content {
    flex: 1;
    min-width: 0;
}

.recommendation-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommendation-desc {
    font-size: 0.6875rem;
    color: var(--gray-500);
    margin-top: 0.125rem;
}

.recommendation-arrow {
    color: var(--gray-400);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.recommendation-empty {
    text-align: center;
    padding: 1rem;
    color: var(--gray-400);
    font-size: 0.8125rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px dashed var(--gray-200);
}

/* Ideas Section */
.ideas-section {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
}

.ideas-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.ideas-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.idea-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--gray-100);
    transition: all 0.15s;
}

.idea-card:hover {
    border-color: var(--gray-200);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.idea-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.idea-aspect-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-size: 0.625rem;
    font-weight: 600;
}

.idea-trending {
    font-size: 0.625rem;
    color: #F59E0B;
    font-weight: 600;
}

.idea-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.idea-desc {
    font-size: 0.6875rem;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.idea-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.idea-tag {
    display: inline-block;
    padding: 0.125rem 0.4rem;
    border-radius: 4px;
    font-size: 0.5625rem;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-600);
}

.idea-actions {
    display: flex;
    gap: 0.5rem;
}

.idea-btn {
    flex: 1;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    transition: all 0.15s;
    text-align: center;
}

.idea-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.idea-btn.save {
    border-color: var(--orange);
    color: var(--orange);
}

.idea-btn.save:hover {
    background: var(--orange-light);
}

.idea-btn.save.saved {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.idea-btn.use {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.idea-btn.use:hover {
    background: var(--gray-800);
}

.ideas-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--gray-400);
    font-size: 0.8125rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px dashed var(--gray-200);
}

.ideas-empty-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.ideas-empty-hint {
    font-size: 0.6875rem;
    margin-top: 0.25rem;
    color: var(--gray-400);
}

/* ========================================
   Responsive - Dashboard Two Column
   ======================================== */
@media (max-width: 1024px) {
    .dashboard-two-col {
        grid-template-columns: 1fr;
    }
    .dashboard-col-side {
        order: -1;
    }
    .quick-actions-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
    }
}

@media (max-width: 768px) {
    .quick-actions-bar {
        gap: 0.5rem;
    }
    .quick-action-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.875rem;
    }
    .idea-title {
        font-size: 0.75rem;
    }
    .idea-desc {
        font-size: 0.625rem;
    }
    .recommendation-title {
        font-size: 0.75rem;
    }
}

/* ==================== SKRIPSI CHECKER - ISSUE CARDS ==================== */
.issue-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.issue-sev-label {
    font-size: 0.6875rem;
    color: var(--gray-500);
}
.issue-page {
    font-size: 0.6875rem;
    color: var(--gray-400);
    margin-left: auto;
}
.issue-original {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
}
.issue-original code {
    background: #FEF2F2;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8125rem;
}
.issue-suggestion {
    color: #059669;
    font-weight: 500;
    margin-left: 0.375rem;
}
.issue-context {
    margin-top: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50, #F9FAFB);
    border-left: 3px solid var(--gray-200, #E5E7EB);
    border-radius: 0 4px 4px 0;
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.5;
    font-style: italic;
}
.issue-actions {
    margin-top: 0.375rem;
}
.issue-loc-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border: 1px solid #FF6B00;
    border-radius: 4px;
    background: #fff;
    color: #FF6B00;
    cursor: pointer;
    transition: all 0.15s;
}
.issue-loc-btn:hover {
    background: #FF6B00;
    color: #fff;
}

/* ==================== SKRIPSI CHECKER - VIEWER MODAL ==================== */
.cek-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.cek-viewer-overlay.hidden {
    display: none;
}
.cek-viewer-container {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.cek-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200, #E5E7EB);
    gap: 1rem;
}
.cek-viewer-header #cek-viewer-info {
    flex: 1;
    min-width: 0;
}
.cek-viewer-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100, #F3F4F6);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.cek-viewer-close:hover {
    background: var(--gray-200, #E5E7EB);
}
.cek-viewer-body {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
}
.cek-viewer-nav {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid var(--gray-100, #F3F4F6);
    flex-shrink: 0;
}
.cek-viewer-nav button {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gray-200, #E5E7EB);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: var(--gray-700);
    transition: all 0.15s;
}
.cek-viewer-nav button:hover {
    background: var(--gray-50, #F9FAFB);
    border-color: var(--gray-300, #D1D5DB);
}
.cek-viewer-pdf {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: var(--gray-100, #F3F4F6);
    min-height: 400px;
}
.cek-viewer-pdf canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.cek-highlight {
    position: absolute;
    background: rgba(255, 107, 0, 0.3);
    border: 2px solid #FF6B00;
    border-radius: 2px;
    pointer-events: none;
    animation: cek-highlight-pulse 2s ease-in-out infinite;
}
@keyframes cek-highlight-pulse {
    0%, 100% { background: rgba(255, 107, 0, 0.3); }
    50% { background: rgba(255, 107, 0, 0.5); }
}

/* ========================================
   GABUNGKAN JADI PDF
   ======================================== */
.modal.modal-wide { max-width: 640px; }
.compile-intro { font-size: 0.875rem; color: var(--gray-600); line-height: 1.55; margin-bottom: 1rem; }
.compile-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin: 1.25rem 0 0.625rem;
}
.compile-order {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-700);
}
.compile-row {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.compile-row > span:first-child { font-weight: 600; }
.compile-row-note { float: right; color: var(--gray-500); font-weight: 400; }
.compile-row.is-empty > span:first-child { color: var(--gray-400); font-weight: 400; }
.compile-row.is-empty .compile-row-note { color: #B45309; }
.compile-hint { font-size: 0.75rem; color: var(--gray-500); line-height: 1.5; margin: 0.25rem 0; }
.compile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; }
.compile-check { display: flex; align-items: flex-end; }
.compile-check label { display: flex !important; align-items: center; gap: 0.5rem; font-weight: 500 !important; cursor: pointer; }
.compile-logo-preview { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.compile-logo-preview img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--gray-100); }
.modal .form-input { width: 100%; }
.compile-actions { flex-wrap: wrap; }
.compile-tips { padding-left: 1.25rem; margin: 0; font-size: 0.8125rem; color: var(--gray-600); line-height: 1.55; }
.compile-tips li { margin-bottom: 0.5rem; }
@media (max-width: 560px) {
    .compile-grid { grid-template-columns: 1fr; }
    .modal.modal-wide { padding: 1.25rem; }
}
[data-theme="dark"] .compile-row.is-empty .compile-row-note { color: var(--warn-fg); }

/* ========================================
   Cari Skripsi
   ======================================== */
.cs-search { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.cs-search .form-input { flex: 1; min-width: 0; }
.cs-status { display: flex; align-items: center; gap: 0.625rem; padding: 1rem; border: 1px solid var(--gray-100); border-radius: 12px; font-size: 0.875rem; color: var(--gray-600); }
.cs-spinner { width: 16px; height: 16px; border: 2px solid var(--gray-200); border-top-color: var(--orange); border-radius: 50%; animation: cs-spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes cs-spin { to { transform: rotate(360deg); } }
.cs-summary { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; font-size: 0.875rem; color: var(--gray-600); }
.cs-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cs-filters .form-input { width: auto; max-width: 100%; padding-top: 0.375rem; padding-bottom: 0.375rem; font-size: 0.8125rem; }
.cs-note { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.cs-list { display: flex; flex-direction: column; gap: 0.5rem; }
.cs-item { display: block; padding: 0.875rem 1rem; border: 1px solid var(--gray-100); border-radius: 12px; background: var(--white); color: inherit; text-decoration: none; transition: border-color 0.15s; }
.cs-item:hover { border-color: var(--orange); }
.cs-item-title { font-weight: 600; font-size: 0.9375rem; line-height: 1.4; margin-bottom: 0.375rem; overflow-wrap: anywhere; }
.cs-item-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.8125rem; color: var(--gray-500); }
.cs-tag { padding: 0.0625rem 0.5rem; border-radius: 100px; background: var(--info-bg, #EFF6FF); color: var(--info-fg, #2563EB); font-weight: 600; font-size: 0.75rem; }
.cs-tag-file { background: var(--ok-bg, #ECFDF5); color: var(--ok-fg, #059669); }
.cs-locked { text-align: center; padding: 2rem 1.25rem; border: 1px solid var(--gray-100); border-radius: 16px; }
.cs-locked p { max-width: 520px; margin: 0.5rem auto 1.25rem; color: var(--gray-600); font-size: 0.875rem; line-height: 1.6; }
@media (max-width: 560px) {
    .cs-filters, .cs-filters .form-input { width: 100%; }
}
