/* ============================================
   CornVision — Modern Light Theme
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;800&display=swap');

:root {
    /* Premium Light Theme Colors */
    --bg-main: #f8fafc; /* Slate 50 */
    --bg-card: rgba(255, 255, 255, 0.85); /* Semi-transparent white for glassmorphism */
    --border: rgba(203, 213, 225, 0.4); /* Slate 300 with opacity */
    --border-light: rgba(226, 232, 240, 0.6);
    --text-main: #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94a3b8; /* Slate 400 */
    
    /* Primary Accent (Emerald/Green) */
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.2);
    --primary-100: #d1fae5;
    --primary-900: #064e3b;
    --accent: #059669;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.05), 0 2px 4px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08), 0 8px 16px rgba(15, 23, 42, 0.04);
    
    /* Layout */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Subtle background pattern/gradient */
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    line-height: 1.3;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Glassmorphism Utilities
   ============================================ */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.icon-svg {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin: 0;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--text-main);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.header-badge:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateY(-2px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: #fff;
    color: var(--text-main);
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--border-light);
    background: #f8fafc;
    transform: translateY(-2px);
}

.btn-secondary.active {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
    color: var(--primary);
}

/* ============================================
   Hero Section (Index)
   ============================================ */
.hero {
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

/* Blob dekoratif — harus absolute agar tidak memakan ruang layout */
.hero-blobs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent 70%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
    bottom: -80px;
    right: -80px;
}

/* Pastikan konten hero di atas blob */
.hero > .container {
    position: relative;
    z-index: 1;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 100px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h2 {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 24px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 0 40px 0;
}

.hero-actions {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Hero Panel */
.hero-panel {
    position: relative;
}

.hero-panel-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero-panel-top {
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.hero-panel-body {
    padding: 32px 24px;
}

.mini-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.mini-image {
    width: 100px;
    height: 100px;
    background: #e2e8f0;
    border-radius: var(--radius);
    background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%), linear-gradient(-45deg, #f1f5f9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f1f5f9 75%), linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.mini-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.mini-lines .line {
    height: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    width: 100%;
}

.mini-lines .line.short {
    width: 60%;
}

.hero-panel-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    text-align: center;
}

/* ============================================
   Main Content (Index)
   ============================================ */
.steps-section {
    padding: 80px 0;
}

.steps-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.step-num {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 auto 24px;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.step-card h4 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.features-section {
    padding: 40px 0 100px;
}

.disease-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.disease-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.disease-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.disease-icon {
    width: 56px;
    height: 56px;
    background: #f8fafc;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.disease-card h4 {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.disease-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Detection Page Layout
   ============================================ */
.page-header {
    padding: 60px 0 40px;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.detection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 0 0 80px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.card-header {
    margin-bottom: 24px;
}

.card-header h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.02);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.upload-text {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-link {
    color: var(--primary);
    text-decoration: underline;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-detect {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-detect:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-detect:not(:disabled):hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* Preview / Canvas */
.preview-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid var(--border);
}

.preview-container img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-height: 400px;
}

.btn-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.9);
}

.canvas-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid var(--border);
}

canvas {
    width: 100%;
    display: block;
}

.result-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.placeholder-icon svg {
    width: 32px;
    height: 32px;
}

.result-placeholder p {
    color: var(--text-secondary);
}

.detection-info {
    margin-top: 24px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.info-header h4 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.detection-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.det-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-main);
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.det-conf {
    font-weight: 700;
    color: var(--text-main);
    background: var(--bg-main);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.9rem;
}

/* ============================================
   Action Buttons inside result panel
   ============================================ */
.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-action:hover {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateY(-1px);
}

.btn-action.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-action.primary:hover {
    background: var(--accent);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: var(--transition);
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.loading-content h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.loading-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.btn-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover { 
    background: #e2e8f0;
    color: var(--text-main); 
}

.modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.modal-header h3 {
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.recommendation-content {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
}

.rec-item {
    margin-bottom: 24px;
}

.rec-item h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rec-item p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.rec-item ul {
    padding-left: 20px;
    color: var(--text-secondary);
}

.rec-item li {
    margin-bottom: 8px;
}

/* ============================================
   History Page
   ============================================ */
.history-stats-bar {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 32px;
    margin-bottom: 32px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

.history-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.history-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.history-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.history-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

.history-card-large {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.history-card-large:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.history-card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
}

.history-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.history-card-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.history-card-info {
    padding: 20px;
}

.history-card-info h4 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.history-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.history-card-conf {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.history-card-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 24px;
    background: rgba(255,255,255,0.5);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 80px;
}

.empty-icon {
    margin-bottom: 24px;
    color: var(--text-muted);
}

.empty-icon svg {
    width: 80px;
    height: 80px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* ============================================
   Penyakit Page Styles
   ============================================ */
.disease-detail-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.disease-detail-header {
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--border);
}

.blight-bg { background: linear-gradient(135deg, rgba(217, 119, 6, 0.05), #fff); border-bottom-color: rgba(217, 119, 6, 0.2); }
.rust-bg { background: linear-gradient(135deg, rgba(234, 88, 12, 0.05), #fff); border-bottom-color: rgba(234, 88, 12, 0.2); }
.gray-bg { background: linear-gradient(135deg, rgba(156, 163, 175, 0.05), #fff); border-bottom-color: rgba(156, 163, 175, 0.2); }
.healthy-bg { background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), #fff); border-bottom-color: rgba(16, 185, 129, 0.2); }

.disease-detail-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    color: var(--primary);
}

.disease-detail-header h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.disease-detail-latin {
    font-size: 1rem;
    color: var(--text-muted);
}

.disease-detail-body {
    padding: 40px;
    display: grid;
    gap: 32px;
}

.detail-section h4 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.detail-section ul {
    color: var(--text-secondary);
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================
   Tentang Page Styles
   ============================================ */
.about-hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
}

.about-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.about-card h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.corn-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.corn-stat-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.corn-stat-card:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.corn-stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.corn-stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
}

.corn-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.morphology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.morph-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.morph-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.morph-item h4 {
    color: var(--text-main);
    margin-bottom: 8px;
}

.morph-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.academic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.academic-item {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.academic-item h4 {
    color: var(--text-main);
    margin-bottom: 12px;
}

.academic-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.disease-overview-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.disease-overview-item {
    display: flex;
    gap: 24px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.disease-overview-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.disease-overview-content h4 {
    color: var(--text-main);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.disease-overview-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.timeline {
    position: relative;
    padding-left: 40px;
    margin-top: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-marker {
    position: absolute;
    left: -44px;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px var(--border);
}

.timeline-content {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.timeline-content h4 {
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    margin: 0;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.benefit-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.benefit-item strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.about-cta {
    text-align: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    margin-top: 60px;
}

.about-cta h3 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 16px;
}

.about-cta p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

/* ============================================
   Evaluation Metrics
   ============================================ */
.metrics-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.metric-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    border-top: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.metric-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.metric-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
}

.metric-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.table-responsive {
    overflow-x: auto;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.confusion-matrix-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.confusion-matrix-table th, .confusion-matrix-table td {
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.confusion-matrix-table th {
    color: var(--text-main);
    font-weight: 600;
    background: #f8fafc;
}

.confusion-matrix-table td.cm-high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-900);
    font-weight: 800;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: auto;
    background: #fff;
}

/* ============================================
   Camera UI
   ============================================ */
.input-tabs button {
    transition: var(--transition);
}
.input-tabs button:not(.active):hover {
    opacity: 0.8 !important;
}

/* ============================================
   Hamburger Button
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   Mobile Nav Drawer
   ============================================ */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 85vw);
    height: 100%;
    background: #fff;
    z-index: 201;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.mobile-nav-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.mobile-nav-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.mobile-nav-close:hover {
    background: #cbd5e1;
    color: var(--text-main);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

.mobile-nav-link.active {
    font-weight: 600;
    border-left: 3px solid var(--primary);
    padding-left: 21px;
}

.mobile-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 16px 16px;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: var(--transition);
}

.mobile-nav-cta:hover {
    background: var(--accent);
}

/* ============================================
   Media Queries — Tablet (≤ 900px)
   ============================================ */
@media (max-width: 900px) {
    .hero h2 {
        font-size: 3rem;
    }

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

/* ============================================
   Media Queries — Mobile (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Container */
    .container {
        padding: 0 16px;
        max-width: 100%;
    }

    /* ---- Header ---- */
    .header-inner {
        height: 64px;
    }

    .nav {
        display: none;
    }

    /* Sembunyikan header-badge "Mulai Deteksi" di mobile */
    .header-badge {
        display: none !important;
    }

    /* Tampilkan hamburger */
    .hamburger {
        display: flex;
    }

    .mobile-nav-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-nav-overlay.open {
        pointer-events: auto;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .logo-subtitle {
        font-size: 0.68rem;
        letter-spacing: 0.5px;
    }

    .logo-img {
        width: 36px;
        height: 36px;
    }

    /* ---- Hero ---- */
    .hero {
        padding: 40px 0 32px;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero h2 {
        font-size: 2rem;
        letter-spacing: -0.3px;
        margin-bottom: 16px;
    }

    .hero p {
        font-size: 0.97rem;
        max-width: 100%;
        margin: 0 0 28px 0;
    }

    .hero-badge {
        font-size: 0.82rem;
        padding: 7px 14px;
        margin-bottom: 16px;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 28px;
    }

    /* Tombol hero full-width di HP kecil */
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        flex: 1 1 140px;
        min-width: 140px;
        max-width: 200px;
        padding: 12px 18px;
        font-size: 0.92rem;
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
        padding-top: 20px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.82rem;
    }

    /* Sembunyikan hero panel dekoratif */
    .hero-panel {
        display: none;
    }

    /* ---- Sections ---- */
    .steps-section {
        padding: 40px 0;
    }

    .features-section {
        padding: 16px 0 56px;
    }

    .section-title {
        font-size: 1.6rem;
        text-align: center;
        gap: 8px;
        justify-content: center;
    }

    .section-subtitle {
        font-size: 0.97rem;
    }

    .steps-header {
        margin-bottom: 32px;
    }

    /* ---- Grids ---- */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .disease-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* ---- Step cards ---- */
    .step-card {
        padding: 20px;
        text-align: left;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .step-num {
        margin: 0 0 8px 0;
    }

    /* ---- Disease cards ---- */
    .disease-card {
        padding: 20px;
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .disease-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    /* ---- Page header ---- */
    .page-header {
        padding: 32px 0 20px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .page-subtitle {
        font-size: 0.97rem;
    }

    /* ---- Detection page ---- */
    .detection-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 0 48px;
    }

    .card {
        padding: 18px;
    }

    .card-header h3 {
        font-size: 1.2rem;
    }

    /* Input tabs di deteksi */
    .input-tabs {
        gap: 8px !important;
    }

    #tabUpload,
    #tabCamera {
        font-size: 0.88rem;
        padding: 8px !important;
    }

    /* Upload zone */
    .upload-zone {
        padding: 36px 16px;
    }

    .upload-icon {
        width: 64px;
        height: 64px;
    }

    .upload-text {
        font-size: 0.97rem;
    }

    /* Tombol detect full width */
    .btn-detect {
        font-size: 1rem;
        padding: 14px;
    }

    /* Result actions */
    .result-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn-action {
        flex: 1 1 130px;
        min-width: 130px;
        justify-content: center;
        font-size: 0.9rem;
        padding: 11px 14px;
    }

    /* ---- Penyakit page ---- */
    .disease-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
    }

    .disease-detail-header h3 {
        font-size: 1.35rem;
    }

    .disease-detail-body {
        padding: 20px;
        gap: 20px;
    }

    .detail-section h4 {
        font-size: 1.05rem;
    }

    .detail-section ul {
        padding-left: 18px;
    }

    /* ---- Modal ---- */
    .modal-content {
        width: 94%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: var(--radius);
    }

    .modal-header {
        padding: 24px 20px 16px;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    .recommendation-content {
        padding: 20px;
        max-height: none;
    }

    /* ---- History ---- */
    .history-stats-bar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px;
    }

    .history-grid-large {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    /* ---- Misc ---- */
    .disease-overview-item {
        flex-direction: column;
        gap: 12px;
    }

    /* ---- Buttons global ---- */
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.93rem;
    }

    /* ---- Footer ---- */
    .footer {
        padding: 20px 0;
        font-size: 0.88rem;
    }

    /* ---- About CTA ---- */
    .about-cta {
        padding: 36px 16px;
    }

    .about-cta h3 {
        font-size: 1.4rem;
    }

    /* ---- Blob dekoratif — sembunyikan di mobile ---- */
    .hero-blobs {
        display: none;
    }
}

/* ============================================
   Media Queries — Small Mobile (≤ 480px)
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    /* Header */
    .header-inner {
        height: 58px;
    }

    .logo h1 {
        font-size: 1.05rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.3px;
    }

    .logo-img {
        width: 30px;
        height: 30px;
    }

    /* Hero */
    .hero {
        padding: 32px 0 28px;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .hero-badge {
        font-size: 0.78rem;
        padding: 6px 12px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        max-width: 100%;
        width: 100%;
        flex: none;
    }

    .hero-stats {
        gap: 12px;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.77rem;
    }

    /* Section title */
    .section-title {
        font-size: 1.35rem;
    }

    /* Page header */
    .page-title {
        font-size: 1.45rem;
    }

    .page-subtitle {
        font-size: 0.92rem;
    }

    /* Card */
    .card {
        padding: 14px;
    }

    /* Upload zone */
    .upload-zone {
        padding: 28px 12px;
    }

    /* Result actions: stack vertically */
    .result-actions {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        max-width: 100%;
    }

    /* Penyakit */
    .disease-detail-header h3 {
        font-size: 1.15rem;
    }

    .disease-detail-header {
        padding: 16px;
    }

    .disease-detail-body {
        padding: 16px;
    }

    /* Metric */
    .metric-value {
        font-size: 2rem;
    }

    /* History */
    .history-stat-value {
        font-size: 1.9rem;
    }

    .history-grid-large {
        grid-template-columns: 1fr;
    }

    /* About */
    .about-card {
        padding: 16px;
    }

    .about-card h3 {
        font-size: 1.3rem;
    }

    /* Modal */
    .modal-content {
        width: 97%;
        border-radius: var(--radius-sm);
    }

    .modal-header {
        padding: 16px 16px 12px;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .recommendation-content {
        padding: 16px;
    }

    /* Steps card (mobile: compact) */
    .step-card {
        padding: 16px;
    }

    .step-num {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Disease card */
    .disease-card {
        padding: 16px;
    }

    /* Footer */
    .footer {
        padding: 16px 0;
        font-size: 0.82rem;
    }
}

/* ============================================
   Disease Image — penyakit.html (Framed)
   ============================================ */

/* Wrapper bingkai luar */
.disease-img-wrapper {
    width: 100%;
    padding: 20px 24px 14px;
    background: #fff;
    border-top: 1px solid var(--border-light);
    box-sizing: border-box;
}

/* Inner frame — bingkai foto (kotak/persegi) */
.disease-img-frame {
    width: 280px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid rgba(203, 213, 225, 0.6);
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    position: relative;
    margin: 0 auto;
}

/* Gambar asli */
.disease-img-frame .disease-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.disease-img-frame:hover .disease-img {
    transform: scale(1.03);
}

/* Placeholder (jika gambar belum ada/gagal load) */
.disease-img-frame .disease-img-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.disease-img-frame .disease-img-placeholder i {
    font-size: 2.2rem;
    opacity: 0.3;
}

/* Tampilkan placeholder saat error */
.disease-img-frame.no-img .disease-img { display: none; }
.disease-img-frame.no-img .disease-img-placeholder { display: flex; }

/* Caption kecil di bawah foto */
.disease-img-caption {
    margin-top: 7px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .disease-img-wrapper {
        padding: 14px 16px 10px;
    }
    .disease-img-frame {
        width: 220px;
        height: 220px;
        border-radius: 10px;
    }
}

