/* ==========================================
   DESIGN SYSTEM & VARIABLES (LIGHT MODE)
   ========================================== */
:root {
    --bg-primary: #f8fafc;          /* Slate 50 */
    --bg-gradient-end: #f1f5f9;     /* Slate 100 */
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(248, 250, 252, 0.95);
    --border-color: rgba(15, 23, 42, 0.08); /* Slate 900 border with low opacity */
    --border-active: rgba(16, 185, 129, 0.8);
    
    /* Brand Colors */
    --color-primary: #2563eb;       /* Royal Blue */
    --color-primary-glow: rgba(37, 99, 235, 0.15);
    --color-success: #10b981;       /* Emerald Green */
    --color-success-glow: rgba(16, 185, 129, 0.15);
    --color-warning: #ea580c;       /* Orange-Red */
    --color-danger: #e11d48;        /* Rose-Red */
    
    /* Text Colors */
    --text-main: #0f172a;           /* Slate 900 */
    --text-muted: #475569;          /* Slate 600 */
    --text-light: #64748b;          /* Slate 500 */
    
    /* Layout */
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', 'Prompt', sans-serif;
    --font-body: 'Prompt', sans-serif;
}

/* ==========================================
   BASE STYLES & RESET
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(185deg, var(--bg-primary) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Background glows for premium visual design */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(160px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}

.bg-glow-1 {
    background: radial-gradient(circle, #bfdbfe 0%, transparent 70%); /* Light blue glow */
    top: -100px;
    right: -100px;
}

.bg-glow-2 {
    background: radial-gradient(circle, #a7f3d0 0%, transparent 70%); /* Light emerald glow */
    bottom: -100px;
    left: -100px;
}

/* ==========================================
   LAYOUT CONTAINERS
   ========================================== */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 25px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

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

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    color: var(--text-main);
}

.logo-text span {
    color: var(--color-success);
}

/* ==========================================
   WIDGETS & COMPONENT BASES
   ========================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

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

/* ==========================================
   BUTTON SYSTEM
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.btn-secondary:hover:not(:disabled) {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: rgba(15, 23, 42, 0.2);
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-accent:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.btn-icon-text {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: var(--border-radius-md);
    padding: 8px 14px;
    font-family: var(--font-body);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon-text:hover {
    color: var(--text-main);
    border-color: rgba(15, 23, 42, 0.2);
    background: #f8fafc;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-large {
    padding: 16px 36px;
    font-size: 18px;
    border-radius: var(--border-radius-lg);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================
   PROGRESS BAR
   ========================================== */
.progress-container {
    display: flex;
    flex-direction: column;
    width: 45%;
    gap: 6px;
}

.progress-bar-wrapper {
    height: 6px;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-success) 100%);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.3);
    width: 0%;
    transition: width 0.4s ease-out;
}

.progress-status {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.progress-step-text {
    font-weight: 500;
}

/* ==========================================
   VIEW 1: WELCOME SCREEN
   ========================================== */
.welcome-card {
    max-width: 800px;
    margin: 40px auto;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.welcome-badge {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
}

.welcome-title {
    font-size: 42px;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--text-main);
}

.welcome-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 35px;
    max-width: 680px;
}

.welcome-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

@media(min-width: 768px) {
    .welcome-features {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-item {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.04);
    padding: 20px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 10px rgba(0,0,0,0.01);
    transition: var(--transition-smooth);
}

.feature-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feature-info h3 {
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.feature-info p {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}

.action-bar {
    display: flex;
    justify-content: flex-start;
}

/* ==========================================
   VIEW 2: WIZARD & QUESTIONNAIRE
   ========================================== */
.quiz-container {
    max-width: 700px;
    margin: 20px auto;
}

.category-indicator {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.question-card {
    margin-bottom: 25px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.question-text {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 25px;
    color: var(--text-main);
    line-height: 1.4;
}

/* Option Cards Layout */
.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: auto;
}

/* Interactive Option Card (Light Mode Style) */
.option-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition-smooth);
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.option-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(15, 23, 42, 0.2);
    transform: translateX(4px);
}

.option-card.selected {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--color-success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.option-radio-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-smooth);
    background: #ffffff;
}

.option-card.selected .option-radio-indicator {
    border-color: var(--color-success);
    background: var(--color-success);
}

.option-card.selected .option-radio-indicator::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
}

.option-content {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
}

/* Multiple-choice option adjustments */
.option-card.checkbox-type.selected .option-radio-indicator {
    border-radius: 4px;
}
.option-card.checkbox-type .option-radio-indicator {
    border-radius: 4px;
}

/* Custom numeric inputs (Light Theme) */
.custom-input-group {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-top: 15px;
}

.custom-input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.numeric-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.numeric-input-wrapper input,
select#healthSelect,
input#currentAgeInput,
input#retireAgeInput {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 14px 44px 14px 20px;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    outline: none;
    transition: var(--transition-smooth);
}

select#healthSelect,
input#currentAgeInput,
input#retireAgeInput {
    padding-right: 20px;
    font-size: 15px;
    font-family: var(--font-body);
    font-weight: 500;
}

.numeric-input-wrapper input:focus,
select#healthSelect:focus,
input#currentAgeInput:focus,
input#retireAgeInput:focus {
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.1);
}

/* ช่องกรอกเบี้ยประกันรายปี: เพิ่ม padding ขวาให้มากขึ้นรองรับ 'บาท / ปี' ที่ยาวกว่า 'บาท' */
.premium-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.premium-input-wrapper input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 14px 90px 14px 20px;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    outline: none;
    transition: var(--transition-smooth);
}

.premium-input-wrapper input:focus {
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.1);
}

.premium-input-wrapper .currency-symbol {
    position: absolute;
    right: 14px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.currency-symbol {
    position: absolute;
    right: 20px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.quick-adds-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.btn-quick-add {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-quick-add:hover {
    background: #cbd5e1;
    color: var(--text-main);
}

/* Quiz Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.step-counter {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================
   VIEW 3: RESULTS DASHBOARD (LIGHT MODE)
   ========================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media(min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 320px 1fr;
    }
}

.db-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.db-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.section-title-bar h2 {
    font-size: 26px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.section-title-bar .subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* SVG Radar Chart Card styling */
.radar-chart-card {
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
}

.radar-grid-line {
    stroke: #e2e8f0;
    stroke-width: 0.5px;
}

.radar-axis-line {
    stroke: #cbd5e1;
    stroke-width: 1px;
}

.radar-user-poly {
    fill: rgba(16, 185, 129, 0.18);
    stroke: #10b981;
    stroke-dasharray: none;
    stroke-width: 2.5px;
}

.radar-label {
    fill: #334155;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
}

/* Radial Score Card */
.score-radial-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 20px auto;
}

.score-radial {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 2.8;
}

.circle-fill {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s ease-in-out;
}

.score-fill-danger { stroke: var(--color-danger); }
.score-fill-warning { stroke: var(--color-warning); }
.score-fill-success { stroke: var(--color-success); }

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: var(--font-heading);
}

.score-val {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    display: block;
    line-height: 1;
}

.score-max {
    font-size: 12px;
    color: var(--text-light);
}

.score-label {
    font-weight: 600;
    font-size: 16px;
    margin-top: 8px;
}

.score-card .score-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.5;
}

/* Agent Information Card */
.agent-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.agent-avatar {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 1px solid var(--border-color);
}

.agent-info h4 {
    font-size: 15px;
    color: var(--text-main);
}

.agent-info .agent-title {
    font-size: 12px;
    color: var(--text-muted);
}

.agent-contact-details {
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agent-contact-details a {
    color: var(--color-success);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
}

.agent-contact-details a:hover {
    text-decoration: underline;
}

.print-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

/* Gap Details list */
.gap-cards-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gap-card {
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
}

/* ตารางสรุปเบี้ยประกันและสิทธิ์ลดภาษี */
.tax-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    font-size: 13px;
}

.tax-breakdown-table thead tr {
    background: #f1f5f9;
    color: var(--text-main);
    font-weight: 600;
}

.tax-breakdown-table tbody tr {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.tax-breakdown-table tbody tr:last-child {
    border-bottom: none;
    background: #f8fafc;
    font-weight: 600;
}

.tax-breakdown-table th,
.tax-breakdown-table td {
    padding: 10px 14px;
    text-align: right;
    border-left: 1px solid var(--border-color);
}

.tax-breakdown-table th:first-child,
.tax-breakdown-table td:first-child {
    text-align: left;
    border-left: none;
}

.tax-highlight-green {
    color: #059669;
    font-weight: 600;
}

.tax-highlight-orange {
    color: var(--color-warning);
    font-weight: 600;
}

/* แถบแยกหัวข้อย่อยภายในการ์ด */
.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 16px 0;
}

.custom-input-group + .custom-input-group {
    margin-top: 12px;
}

.gap-card-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.gap-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* Icon backgrounds */
.gap-card-icon.red { background: #ffe4e6; }
.gap-card-icon.orange { background: #ffedd5; }
.gap-card-icon.purple { background: #f3e8ff; }
.gap-card-icon.blue { background: #dbeafe; }
.gap-card-icon.green { background: #d1fae5; }

.gap-card-title-group {
    flex-grow: 1;
}

.gap-card-title-group h3 {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 2px;
}

.gap-status-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.gap-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.gap-badge-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.gap-badge-warning { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.gap-badge-danger { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }

/* GAP COMPARISON CHARTS */
.gap-chart-area {
    background: #f8fafc;
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    border: 1px solid rgba(15, 23, 42, 0.03);
    margin-bottom: 16px;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.val-bold {
    font-weight: 600;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.chart-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar-fill.target {
    background: #94a3b8;
}

.chart-bar-fill.existing {
    background: linear-gradient(90deg, var(--color-success) 0%, #059669 100%);
}

.chart-bar-fill.gap-exist {
    background: linear-gradient(90deg, #ea580c 0%, var(--color-danger) 100%);
}

.spacer {
    margin-top: 14px;
}

/* Feedback message container */
.gap-feedback-box {
    background: #f8fafc;
    border-left: 4px solid var(--color-primary);
    padding: 14px 18px;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid rgba(0, 0, 0, 0.01);
    border-right: 1px solid rgba(0, 0, 0, 0.01);
    border-bottom: 1px solid rgba(0, 0, 0, 0.01);
}

.gap-feedback-box strong {
    color: var(--text-main);
}

.tax-saving-box {
    border-left-color: #8b5cf6; /* Violet border for tax */
    background: #fdfafb;
    margin-bottom: 10px;
}

/* Grid layout for health comparison table */
.gap-analysis-table {
    margin-bottom: 16px;
}

.grid-table {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
}

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

.header-row {
    background: #f1f5f9;
    font-weight: 600;
    color: var(--text-main);
}

/* ==========================================
   MODAL WINDOW STYLES
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5); /* Slate overlay background */
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    max-width: 500px;
    width: 100%;
    padding: 25px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #ffffff;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}

/* Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.1);
}

.form-help {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
    display: block;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* ==========================================
   PRINT LAYOUT STYLES (PDF EXPORT)
   ========================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11px;
    }
    
    .bg-glow, 
    .app-header .header-actions,
    .print-actions,
    .modal-overlay,
    .app-header .progress-container,
    .radar-chart-card p {
        display: none !important;
    }
    
    .app-container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .logo-text {
        color: #000000 !important;
    }
    .logo-text span {
        color: #059669 !important;
    }

    .card {
        background: none !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        color: #000000 !important;
        page-break-inside: avoid;
        margin-bottom: 12px !important;
        padding: 12px !important;
    }

    .dashboard-grid {
        display: block !important;
    }

    .db-sidebar {
        margin-bottom: 20px;
    }

    .db-main {
        width: 100% !important;
    }
    
    h1, h2, h3, h4, h5, h6, .val-bold {
        color: #000000 !important;
    }

    .chart-bar-container {
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
    }

    .chart-bar-fill.target {
        background: #64748b !important;
    }

    .chart-bar-fill.existing {
        background: #059669 !important;
    }

    .chart-bar-fill.gap-exist {
        background: #dc2626 !important;
    }

    .gap-badge {
        border: 1px solid #777 !important;
        color: #000000 !important;
        background: #f1f5f9 !important;
    }

    .gap-feedback-box {
        border-left: 3px solid #64748b !important;
        background: #fafafa !important;
        color: #111111 !important;
    }

    .agent-card {
        border: 2px solid #059669 !important;
    }

    .agent-card button {
        display: none !important;
    }
    
    .radar-chart-card {
        border: 1px solid #ccc !important;
        margin-bottom: 20px !important;
    }
    
    .radar-user-poly {
        fill: rgba(0, 0, 0, 0.05) !important;
        stroke: #000000 !important;
    }
}
