:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --bg-color: #0F172A;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --card-bg: rgba(30, 41, 59, 0.75);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.4;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: #4F46E5;
}

.shape-2 {
    bottom: -15%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: #0EA5E9;
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 850px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60A5FA, #A78BFA);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
}

input[type="number"] {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.6);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.symptoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-wrapper:hover {
    background: rgba(30, 41, 59, 1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.checkbox-wrapper input {
    margin-right: 12px;
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #3B82F6);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-submit:hover {
    opacity: 0.95;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-submit:active {
    transform: translateY(2px);
}

.hidden {
    display: none !important;
}

#results-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#results-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

.result-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    transition: transform 0.3s ease, border-left 0.3s ease;
    border-left: 4px solid transparent;
}

.result-card:hover {
    transform: translateX(5px);
    border-left: 4px solid var(--primary);
    background: rgba(30, 41, 59, 0.9);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 10px;
}

.disease-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #60A5FA;
}

.match-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.journal-ref {
    display: inline-block;
    background: rgba(245, 158, 11, 0.1);
    color: #FBBF24;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.treatment-ref {
    display: block;
    margin-top: 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.matched-symptoms-list {
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: #E2E8F0;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    border-radius: 8px;
}

.disclaimer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #FCA5A5;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    line-height: 1.5;
}

/* Nav & Admin Styles */
.app-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.nav-btn.active {
    color: #60A5FA;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: #60A5FA;
    border-radius: 3px 3px 0 0;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-action {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-action:hover {
    background: rgba(16, 185, 129, 0.3);
}

.admin-list-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-list-actions button {
    margin-left: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Login Container General Styles */
.auth-container,
.admin-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
    perspective: 1000px;
}

.futuristic-login-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: rgba(10, 15, 30, 0.85);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    text-align: center;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 165, 250, 0.2);
    box-shadow: 0 0 40px rgba(96, 165, 250, 0.1), inset 0 0 20px rgba(96, 165, 250, 0.05);
    overflow: hidden;
    transform-style: preserve-3d;
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0) rotateX(0);
    }

    50% {
        transform: translateY(-10px) rotateX(2deg);
    }
}

.glow-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #60A5FA, transparent);
    opacity: 0.6;
}

.login-content {
    position: relative;
    z-index: 2;
}

.login-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(96, 165, 250, 0.1);
    color: #60A5FA;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.futuristic-login-card h2 {
    color: #F8FAFC;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.futuristic-login-card p {
    color: #94A3B8;
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
}

.futuristic-input-group {
    position: relative;
    margin-bottom: 2rem;
    text-align: left;
}

.futuristic-input-group input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.8rem 0;
    color: #F8FAFC;
    font-size: 1rem;
    outline: none;
}

.futuristic-input-group label {
    position: absolute;
    top: 0.8rem;
    left: 0;
    color: #64748B;
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
    font-weight: 400;
}

.futuristic-input-group input:focus~label,
.futuristic-input-group input:not(:placeholder-shown)~label {
    top: -1.2rem;
    font-size: 0.8rem;
    color: #60A5FA;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.input-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #60A5FA;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px #60A5FA;
}

.futuristic-input-group input:focus~.input-line::after {
    width: 100%;
}

.btn-futuristic {
    position: relative;
    width: 100%;
    padding: 1rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #60A5FA;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-futuristic:hover {
    background: rgba(96, 165, 250, 0.2);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
    color: #FFF;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.btn-futuristic span {
    position: relative;
    z-index: 2;
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.4) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.btn-futuristic:hover .btn-glow {
    opacity: 1;
    animation: moveGlow 3s linear infinite;
}

@keyframes moveGlow {
    0% {
        transform: translate(-30%, -30%);
    }

    50% {
        transform: translate(-70%, -70%);
    }

    100% {
        transform: translate(-30%, -30%);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-left: 4px solid #3B82F6;
    color: #F8FAFC;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hiding {
    transform: translateX(120%);
    opacity: 0;
}

.toast-success {
    border-color: #10B981;
}

.toast-success .toast-icon {
    color: #10B981;
}

.toast-error {
    border-color: #EF4444;
}

.toast-error .toast-icon {
    color: #EF4444;
}

.toast-warning {
    border-color: #F59E0B;
}

.toast-warning .toast-icon {
    color: #F59E0B;
}

.toast-content h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
}

.toast-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #94A3B8;
}

/* ==========================================
   PRODUCT RECOMMENDATIONS SECTION
   ========================================== */
.product-recommendations {
    margin-top: 1rem;
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}

.product-rec-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #A78BFA;
    font-size: 0.92rem;
    margin-bottom: 0.9rem;
}

.product-rec-header svg {
    flex-shrink: 0;
    color: #A78BFA;
}

.product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.product-card:hover::before {
    opacity: 1;
}

.product-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-pharma {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-vitamin {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-disinfektan {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #E2E8F0;
    line-height: 1.3;
}

.product-desc {
    font-size: 0.78rem;
    color: #94A3B8;
    line-height: 1.4;
    flex-grow: 1;
}

.product-link-icon {
    font-size: 0.78rem;
    color: #A78BFA;
    font-weight: 600;
    margin-top: 4px;
    transition: color 0.2s;
}

.product-card:hover .product-link-icon {
    color: #C4B5FD;
}

@media (max-width: 600px) {
    .container {
        padding: 2rem 1.5rem;
    }

    header h1 {
        font-size: 2.2rem;
    }

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

    .product-cards {
        grid-template-columns: 1fr;
    }

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

/* ==========================================
   PRODUCTION GOALS SECTION
   ========================================== */
.goals-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.goal-card {
    cursor: pointer;
    display: block;
}

.goal-card input.goal-checkbox {
    display: none;
}

.goal-card-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    transition: all 0.25s ease;
    position: relative;
}

.goal-card:hover .goal-card-inner {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(30, 41, 59, 0.8);
    transform: translateX(4px);
}

.goal-card input.goal-checkbox:checked ~ .goal-card-inner {
    border-color: rgba(245, 158, 11, 0.7);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.goal-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.goal-text {
    flex: 1;
}

.goal-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #E2E8F0;
    margin-bottom: 0.3rem;
}

.goal-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.goal-check-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    transition: all 0.2s ease;
}

.goal-card input.goal-checkbox:checked ~ .goal-card-inner .goal-check-indicator {
    background: #F59E0B;
    border-color: #F59E0B;
    color: #0F172A;
}

/* Goal Results */
.goal-result-section {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-left: 4px solid #F59E0B;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    animation: fadeIn 0.4s ease;
}

.goal-result-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.goal-result-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.goal-result-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #F59E0B;
    margin-bottom: 0.4rem;
}

.goal-result-tips {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    background: rgba(245, 158, 11, 0.06);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border-left: 3px solid rgba(245, 158, 11, 0.4);
}

/* Premix badge */
.badge-premix {
    background: rgba(167, 139, 250, 0.15);
    color: #C4B5FD;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

/* ==========================================
   DARK / LIGHT THEME SYSTEM
   ========================================== */
:root, [data-theme="dark"] {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --bg-color: #0F172A;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --card-bg: rgba(30, 41, 59, 0.75);
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --body-gradient-1: #4F46E5;
    --body-gradient-2: #0EA5E9;
}

[data-theme="light"] {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --bg-color: #F1F5F9;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.1);
    --input-bg: rgba(241, 245, 249, 0.9);
    --body-gradient-1: #818CF8;
    --body-gradient-2: #38BDF8;
}

[data-theme="light"] body { background-color: var(--bg-color); color: var(--text-main); }
[data-theme="light"] .container { background: var(--card-bg); border-color: var(--border-color); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
[data-theme="light"] .shape-1 { background: var(--body-gradient-1); opacity: 0.15; }
[data-theme="light"] .shape-2 { background: var(--body-gradient-2); opacity: 0.15; }
[data-theme="light"] header p { color: var(--text-muted); }
[data-theme="light"] .checkbox-wrapper { background: rgba(241,245,249,0.6); border-color: var(--border-color); color: var(--text-main); }
[data-theme="light"] .checkbox-wrapper:hover { background: rgba(224,231,239,1); }
[data-theme="light"] input[type="number"], [data-theme="light"] .calc-select { background: var(--input-bg); color: var(--text-main); border-color: var(--border-color); }
[data-theme="light"] .result-card { background: rgba(241,245,249,0.9); color: var(--text-main); }
[data-theme="light"] .result-card:hover { background: rgba(224,231,239,1); }
[data-theme="light"] .nav-btn { color: var(--text-muted); }
[data-theme="light"] .nav-btn.active { color: #4F46E5; }
[data-theme="light"] .nav-btn.active::after { background: #4F46E5; }
[data-theme="light"] .goal-card-inner { background: rgba(241,245,249,0.6); border-color: var(--border-color); }
[data-theme="light"] .goal-result-section { background: rgba(241,245,249,0.9); }
[data-theme="light"] .calc-result-card { background: rgba(241,245,249,0.95); border-color: rgba(139,92,246,0.25); }
[data-theme="light"] .calc-item { background: rgba(255,255,255,0.8); border-color: var(--border-color); }
[data-theme="light"] .calc-item .calc-label { color: var(--text-muted); }
[data-theme="light"] .calc-item .calc-value { color: var(--text-main); }
[data-theme="light"] .calc-item.highlight { background: rgba(139,92,246,0.08); }
[data-theme="light"] .calc-item.highlight .calc-value { color: #7C3AED; }
[data-theme="light"] .product-card { background: rgba(241,245,249,0.7); border-color: var(--border-color); }
[data-theme="light"] .product-name { color: var(--text-main); }
[data-theme="light"] .futuristic-login-card { background: rgba(255,255,255,0.9); border-color: rgba(79,70,229,0.2); }
[data-theme="light"] .futuristic-login-card h2 { color: var(--text-main); text-shadow: none; }
[data-theme="light"] .futuristic-login-card p { color: var(--text-muted); }
[data-theme="light"] .futuristic-input-group input { color: var(--text-main); }
[data-theme="light"] .toast { background: rgba(255,255,255,0.96); color: var(--text-main); }
[data-theme="light"] .toast-content p { color: var(--text-muted); }
[data-theme="light"] .modal-content { background: #F8FAFC; }
[data-theme="light"] .admin-list-item { background: rgba(241,245,249,0.7); }
[data-theme="light"] .disclaimer { color: #DC2626; background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.15); }

/* Theme Toggle Button */
.theme-toggle-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.theme-toggle-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: rotate(20deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ==========================================
   SELECT DROPDOWN STYLING
   ========================================== */
.calc-select {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg, rgba(15, 23, 42, 0.6));
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
.calc-select:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* ==========================================
   SYMPTOM CARD ENHANCED (with images)
   ========================================== */
.symptom-card-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 0.9rem;
    min-height: 60px;
}
.symptom-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1;
}
.symptom-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}
.symptom-card-enhanced:hover .symptom-thumb {
    opacity: 1;
    transform: scale(1.08);
}
.symptom-label-text {
    font-size: 0.88rem;
    line-height: 1.3;
    color: var(--text-main);
}

/* ==========================================
   KALKULATOR DOSIS — RESULT CARD
   ========================================== */
.calc-result-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-left: 4px solid #8B5CF6;
    border-radius: 16px;
    padding: 1.8rem;
    animation: fadeIn 0.4s ease;
}
.calc-drug-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #A78BFA;
    margin-bottom: 0.3rem;
}
.calc-ingredient {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.calc-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}
.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: background 0.2s;
}
.calc-item:hover {
    background: rgba(255, 255, 255, 0.07);
}
.calc-item.highlight {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
}
.calc-item.highlight .calc-value {
    color: #A78BFA;
    font-size: 1.15rem;
}
.calc-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.calc-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: right;
}
.calc-notes {
    font-size: 0.88rem;
    color: var(--text-muted);
    background: rgba(245, 158, 11, 0.06);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border-left: 3px solid rgba(245, 158, 11, 0.4);
    margin-bottom: 1rem;
    line-height: 1.5;
}
.calc-product-link {
    display: inline-block;
    color: #A78BFA;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    transition: all 0.25s ease;
}
.calc-product-link:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #C4B5FD;
    transform: translateX(4px);
}

/* ==========================================
   USER PROFILE DROPDOWN
   ========================================== */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.user-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #60A5FA;
}

.dropdown-icon {
    width: 20px;
    height: 20px;
}

.dropdown-caret {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.user-dropdown-container.open .dropdown-caret {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: #0c5a7d; /* Matching image teal/blue */
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.user-dropdown-container.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.9rem 1.2rem;
    color: #F8FAFC;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dropdown-item.text-red {
    color: #FCA5A5;
}

.dropdown-item.text-red svg {
    color: #FCA5A5;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    body {
        background: white !important;
        color: #1a1a1a !important;
        padding: 0 !important;
    }
    .background-shapes, .app-nav, .theme-toggle-btn,
    .btn-submit, .toast-container, #nav-auth, #nav-member,
    #nav-produksi, #nav-kalkulator, #nav-admin,
    .btn-action, .btn-futuristic, #btn-user-logout { display: none !important; }

    .container {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
        padding: 1rem !important;
    }
    .result-card, .calc-result-card, .goal-result-section {
        background: #f9f9f9 !important;
        border: 1px solid #ddd !important;
        color: #1a1a1a !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .calc-item {
        background: #f0f0f0 !important;
        border: 1px solid #ddd !important;
        color: #1a1a1a !important;
    }
    .calc-label { color: #555 !important; }
    .calc-value { color: #1a1a1a !important; }
    .calc-item.highlight { background: #e8e4f9 !important; border-color: #8B5CF6 !important; }
    .calc-item.highlight .calc-value { color: #5B21B6 !important; }
    .calc-drug-name { color: #5B21B6 !important; }
    .calc-notes { background: #fff8e1 !important; border-color: #F59E0B !important; color: #333 !important; }
    .disclaimer { display: block !important; color: #666 !important; background: #f0f0f0 !important; border-color: #ccc !important; }
    .calc-product-link { color: #5B21B6 !important; border-color: #5B21B6 !important; }
    a { color: #4F46E5 !important; }
    h1, h2, h3 { color: #1a1a1a !important; -webkit-text-fill-color: #1a1a1a !important; background: none !important; }
    header h1 { background: none !important; -webkit-background-clip: unset !important; background-clip: unset !important; -webkit-text-fill-color: #4F46E5 !important; }
    
    /* Specific overrides for Production Recommendations */
    #view-produksi > .form-group, #btn-get-rekomendasi, #btn-print-produksi { display: none !important; }
    .product-card { background: #f9fafb !important; border: 1px solid #ccc !important; page-break-inside: avoid; break-inside: avoid; }
    .product-name { color: #1a1a1a !important; }
    .product-desc { color: #444 !important; }
    .product-badge { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    #expectation-chart-container { background: white !important; border: 1px solid #ccc !important; }

    /* Specific overrides for Kalkulator Dosis */
    #view-kalkulator > .form-group,
    #view-kalkulator > div[style*="display: flex; gap: 1rem"],
    #btn-calc-dose,
    #btn-print-kalkulator { display: none !important; }
    #calc-result { display: block !important; }
    .calc-result-card { background: #f9fafb !important; border: 1px solid #ccc !important; color: #1a1a1a !important; page-break-inside: avoid; break-inside: avoid; }
    .calc-drug-name { color: #5B21B6 !important; }
    .calc-ingredient { color: #555 !important; }
    .calc-summary { border-color: #ddd !important; }
    .calc-item { background: #f0f0f0 !important; border: 1px solid #ddd !important; color: #1a1a1a !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .calc-item.highlight { background: #e8e4f9 !important; border-color: #8B5CF6 !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}