/* ============================================
   ALTERSVORSORGE TOOL - PROFESSIONAL DESIGN
   ============================================ */

/* Hero Section */
.tool-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 32px 80px;
    background: linear-gradient(135deg,
        var(--bg-primary) 0%,
        var(--bg-secondary) 100%
    );
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.tool-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%,
        rgba(124, 58, 237, 0.1) 0%,
        transparent 60%
    );
}

.tool-hero-content {
    max-width: 1000px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tool-hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.tool-hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-feature {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    transition: var(--transition-smooth);
}

.hero-feature:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-4px);
}

.hero-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.hero-feature-icon i {
    font-size: 22px;
    color: white;
}

.hero-feature h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hero-feature p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Tool Info Boxes */
.tool-info-boxes {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 48px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.tool-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--accent);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.tool-info-box:hover {
    background: rgba(124, 58, 237, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.tool-info-box i {
    font-size: 20px;
    color: var(--accent);
}

.tool-info-box span {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Form Container */
.form-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 32px 20px;
}

/* Final Hinweis box at bottom - wider and centered to fit text in 3 lines */
.form-container > .info-panel[style*="margin-top"] {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 80px !important;
    margin-bottom: 30px;
}

.calculationyear-title {
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 300;
    text-align: center;
    color: var(--text-primary);
}

.form-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.form-description {
    font-size: 17px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Form Sections */
.form-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition-smooth);
    width: 100%;
}

.form-section:hover {
    border-color: rgba(124, 58, 237, 0.3);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    padding-bottom: 6px;
    border-bottom: 3px solid var(--border-color);
}

/* Add space between header and first input field */
.section-header + * {
    margin-top: 20px;
}

.section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon i {
    font-size: 16px;
    color: white;
}

.section-header h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.info-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
    transition: var(--transition-smooth);
    position: relative;
}

.info-icon:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.info-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    width: 300px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.info-icon:focus .info-box,
.info-icon:hover .info-box {
    display: block;
}

/* Form Fields */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3px;
}

/* Income Section - Display fields in a single column */
#income_blocks .form-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#income_blocks .form-group {
    width: 100%;
}

/* Ensure other sections use normal width */
.form-section:not(#income_blocks) .form-group {
    width: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input,
.form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    font-family: inherit;
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* White number input arrows - standard browser arrows but inverted to white */
.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
    filter: invert(1) brightness(1.2);
}

#form input[type="number"]::-webkit-inner-spin-button,
#form input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
    filter: invert(1) brightness(1.2);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f5f5f7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-group select option {
    background: #2d2d2d;
    color: white;
}

/* Buttons */
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 12px;
}

.btn-add:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 18px 48px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    max-width: 400px;
    margin: 48px auto 0;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

.btn-submit i {
    transition: transform 0.3s ease;
}

.btn-submit:hover i {
    transform: translateX(4px);
}

/* Dynamic Entries */
.dynamic-entry {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    position: relative;
    border-top: 2px solid var(--border-color);
    padding-top: 24px;
}

/* Added Income Blocks - with separator line */
.select-income-entry {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.select-income-entry:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* Separator for all added blocks */
.select-entry-yearly-status:not(:first-child),
.erziehungsberechtigt-template-wrapper:not(:first-child),
.betreuungsgutschrfiten-container-template,
.bvg-contrib-angestellt-template,
.bvg-contrib-selbständig-template,
.bvg-yield-template,
.bvg-contrib-share-template,
.erziehunsgberechtigt-standard-temp {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

/* Beitragslücken separator - erstes Element ohne Border */
#contrib_gap_period_container > .contrib-gap-period:first-child {
    margin-top: 26px;
    padding-top: 0;
    border-top: none;
}

/* Weitere Elemente mit Trennlinie - näher zusammen */
.contrib-gap-period:not(:first-child) {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

/* Full-width chart for saving rates */
.chart-full-width {
    width: 100%;
    max-width: 100%;
}

.chart-full-width .card {
    width: 100%;
}

.chart-full-width canvas {
    width: 100% !important;
    max-width: 100%;
}

/* Betreuungsgutschriften separator for first block */
.betreuungsgutschriften-container {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

/* Erziehungsgutschriften separators */
.childcare-credits {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

#child_year_block {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

.erziehungsberechtigt-template-wrapper {
    margin-top: 26px;
    padding-top: 2px;
    border-top: 1px solid var(--border-color);
}

/* BVG Konditionen separators for first input blocks */
.bvg-contrib-angestellt-inputs,
.bvg-contrib-selbständig-inputs {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

/* Monatliche Wunsch-Rente separator */
#monthly_pension {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

/* Zeitdauer für Sparrate-Simulation separator */
.saving-rate-range {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

/* Reduce gap between fields within each block - ensure templates match originals */
.select-entry-yearly-status,
.entry-yearly-status,
.erziehungsberechtigt-template-wrapper,
.betreuungsgutschrfiten-container-template,
.betreuungsgutschriften-container,
.betreuungsgutschriften,
.bvg-contrib-angestellt-template,
.bvg-contrib-selbständig-template,
.bvg-yield-template,
.bvg-contrib-share-template,
.select-income-entry,
.bvg-yield,
.bvg-contrib-share,
.bvg-contrib-angestellt-inputs,
.bvg-contrib-selbständig-inputs,
#bvg_contrib_angestellt_container,
#bvg_contrib_selbständig_container,
.erziehungsberechtigt-standard,
.duration-erziehunsgberechtigt-standard,
.erziehunsgberechtigt-standard-temp,
#childcare_credit,
.rente-plafoniert,
.portfolio-necessary,
#spec_monthly_payment,
#monthly_pension,
.saving-rate,
.saving-rate-range {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
}

/* Beitragslücken - larger gap between fields */
.contrib-gap-period {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Childcare/Erziehungsgutschriften - consistent spacing */
.childcare-credits,
.childcare-entry {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Style labels in template containers that don't have form-group wrappers - ensure all match */
.select-income-entry > label,
.contrib-gap-period > label,
.select-entry-yearly-status > label,
.entry-yearly-status > label,
.betreuungsgutschrfiten-container-template > label,
.betreuungsgutschriften-container > label,
.bvg-contrib-angestellt-template > label,
.bvg-contrib-selbständig-template > label,
.bvg-yield-template > label,
.bvg-contrib-share-template > label,
.bvg-yield > label,
.bvg-contrib-share > label,
.bvg-contrib-angestellt-inputs > label,
.bvg-contrib-selbständig-inputs > label,
.erziehungsberechtigt-template-wrapper > label,
.erziehungsberechtigt-standard > label,
.duration-erziehunsgberechtigt-standard > label,
.erziehunsgberechtigt-standard-temp > label,
.childcare-credits > label,
.childcare-entry > label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: block;
}

/* Style inputs and selects in template containers that don't have form-group wrappers - ensure all match */
.select-income-entry > input,
.select-income-entry > select,
.contrib-gap-period > select,
.select-entry-yearly-status > select,
.select-entry-yearly-status > input,
.entry-yearly-status > select,
.entry-yearly-status > input,
.betreuungsgutschrfiten-container-template > select,
.betreuungsgutschriften-container > select,
.bvg-contrib-angestellt-template > select,
.bvg-contrib-angestellt-template > input,
.bvg-contrib-selbständig-template > select,
.bvg-contrib-selbständig-template > input,
.bvg-yield-template > select,
.bvg-contrib-share-template > select,
.bvg-yield > select,
.bvg-contrib-share > select,
.bvg-contrib-angestellt-inputs > select,
.bvg-contrib-angestellt-inputs > input,
.bvg-contrib-selbständig-inputs > select,
.bvg-contrib-selbständig-inputs > input,
.erziehungsberechtigt-template-wrapper > select,
.erziehungsberechtigt-standard > select,
.duration-erziehunsgberechtigt-standard > select,
.erziehunsgberechtigt-standard-temp > select,
.childcare-credits > select,
.childcare-entry > select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    font-family: inherit;
    width: 100%;
    margin-bottom: 0;
}

/* Focus states for template inputs/selects - ensure all match */
.select-income-entry > input:focus,
.select-income-entry > select:focus,
.contrib-gap-period > select:focus,
.select-entry-yearly-status > select:focus,
.select-entry-yearly-status > input:focus,
.entry-yearly-status > select:focus,
.entry-yearly-status > input:focus,
.betreuungsgutschrfiten-container-template > select:focus,
.betreuungsgutschriften-container > select:focus,
.bvg-contrib-angestellt-template > select:focus,
.bvg-contrib-angestellt-template > input:focus,
.bvg-contrib-selbständig-template > select:focus,
.bvg-contrib-selbständig-template > input:focus,
.bvg-yield-template > select:focus,
.bvg-contrib-share-template > select:focus,
.bvg-yield > select:focus,
.bvg-contrib-share > select:focus,
.bvg-contrib-angestellt-inputs > select:focus,
.bvg-contrib-angestellt-inputs > input:focus,
.bvg-contrib-selbständig-inputs > select:focus,
.bvg-contrib-selbständig-inputs > input:focus,
.erziehungsberechtigt-template-wrapper > select:focus,
.erziehungsberechtigt-standard > select:focus,
.duration-erziehunsgberechtigt-standard > select:focus,
.erziehunsgberechtigt-standard-temp > select:focus,
.childcare-credits > select:focus,
.childcare-entry > select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Dropdown arrows for template selects - ensure all match */
.select-income-entry > select,
.contrib-gap-period > select,
.select-entry-yearly-status > select,
.entry-yearly-status > select,
.betreuungsgutschrfiten-container-template > select,
.betreuungsgutschriften-container > select,
.bvg-contrib-angestellt-template > select,
.bvg-contrib-selbständig-template > select,
.bvg-yield-template > select,
.bvg-contrib-share-template > select,
.bvg-yield > select,
.bvg-contrib-share > select,
.bvg-contrib-angestellt-inputs > select,
.bvg-contrib-selbständig-inputs > select,
.erziehungsberechtigt-template-wrapper > select,
.erziehungsberechtigt-standard > select,
.duration-erziehunsgberechtigt-standard > select,
.erziehunsgberechtigt-standard-temp > select,
.childcare-credits > select,
.childcare-entry > select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f5f5f7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* Dropdown option colors for template selects - ensure all match */
.select-income-entry > select option,
.contrib-gap-period > select option,
.select-entry-yearly-status > select option,
.entry-yearly-status > select option,
.betreuungsgutschrfiten-container-template > select option,
.betreuungsgutschriften-container > select option,
.bvg-contrib-angestellt-template > select option,
.bvg-contrib-selbständig-template > select option,
.bvg-yield-template > select option,
.bvg-contrib-share-template > select option,
.bvg-yield > select option,
.bvg-contrib-share > select option,
.bvg-contrib-angestellt-inputs > select option,
.bvg-contrib-selbständig-inputs > select option,
.erziehungsberechtigt-template-wrapper > select option,
.erziehungsberechtigt-standard > select option,
.duration-erziehunsgberechtigt-standard > select option,
.erziehunsgberechtigt-standard-temp > select option,
.childcare-credits > select option,
.childcare-entry > select option {
    background: #2d2d2d;
    color: white;
}

/* White number input arrows for template inputs - ensure all match */
.select-income-entry > input[type="number"]::-webkit-inner-spin-button,
.select-income-entry > input[type="number"]::-webkit-outer-spin-button,
.select-entry-yearly-status > input[type="number"]::-webkit-inner-spin-button,
.select-entry-yearly-status > input[type="number"]::-webkit-outer-spin-button,
.entry-yearly-status > input[type="number"]::-webkit-inner-spin-button,
.entry-yearly-status > input[type="number"]::-webkit-outer-spin-button,
.bvg-contrib-angestellt-template > input[type="number"]::-webkit-inner-spin-button,
.bvg-contrib-angestellt-template > input[type="number"]::-webkit-outer-spin-button,
.bvg-contrib-selbständig-template > input[type="number"]::-webkit-inner-spin-button,
.bvg-contrib-selbständig-template > input[type="number"]::-webkit-outer-spin-button,
.bvg-contrib-angestellt-inputs > input[type="number"]::-webkit-inner-spin-button,
.bvg-contrib-angestellt-inputs > input[type="number"]::-webkit-outer-spin-button,
.bvg-contrib-selbständig-inputs > input[type="number"]::-webkit-inner-spin-button,
.bvg-contrib-selbständig-inputs > input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
    filter: invert(1) brightness(1.2);
}

/* Placeholder styles for template inputs - ensure all match */
.select-income-entry > input::placeholder,
.select-entry-yearly-status > input::placeholder,
.entry-yearly-status > input::placeholder,
.bvg-contrib-angestellt-template > input::placeholder,
.bvg-contrib-selbständig-template > input::placeholder,
.bvg-contrib-angestellt-inputs > input::placeholder,
.bvg-contrib-selbständig-inputs > input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.btn-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-remove:hover {
    background: #ff3b30;
    color: white;
}

/* Generic Form Styling for All Sections */
#form h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 0;
    border-bottom: none;
}

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

#form input[type="number"],
#form select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    font-family: inherit;
    width: 100%;
    margin-bottom: 12px;
}

#form input[type="number"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

#form input[type="number"]:focus,
#form select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

#form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f5f5f7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

#form select option {
    background: #2d2d2d;
    color: white;
}

/* Specific styling for sections without form-grid - removed duplicates, already covered above */

/* Ensure all separator lines span full width */
.contrib-gap-period,
.select-entry-yearly-status,
.erziehungsberechtigt-template-wrapper,
.betreuungsgutschrfiten-container-template,
.bvg-contrib-angestellt-template,
.bvg-contrib-selbständig-template,
.bvg-yield-template,
.bvg-contrib-share-template,
.select-income-entry {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Ensure section headers are full width */
.section-header {
    width: 100%;
}

/* Ensure all form h4 titles with borders are full width */
#form h4 {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}


#form button[type="button"]:not(.btn-add):not(.btn-submit) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin: 16px 8px 16px 0;
}

#form button[type="button"]:not(.btn-add):not(.btn-submit):hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

#form button[type="submit"],
#form button[type="reset"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 18px 48px;
    font-size: 18px;
    border-radius: 1000px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

#form button[type="reset"] {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: none;
    margin-top: 12px;
}

#form button[type="submit"]:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

#form button[type="reset"]:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Info Panel Wrapper */
.info-panel-wrapper {
    max-width: 1100px;
    margin: 60px auto 40px;
}

/* Info Panel */
.info-panel {
    background: rgba(124, 58, 237, 0.05);
    border: 2px solid var(--accent);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 48px;
}

.info-panel h5,
.info-panel h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-panel h5 i,
.info-panel h3 i {
    font-size: 20px;
}

.info-panel p,
.info-panel ol {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.info-panel ol {
    padding-left: 24px;
    margin-top: 12px;
}

.info-panel li {
    margin-bottom: 4px;
}

/* Legacy Help Box Support */
.help-box {
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 32px;
}

.help-box h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-box p,
.help-box ol {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.help-box ol {
    padding-left: 20px;
    margin-top: 8px;
}

.help-box li {
    margin-bottom: 8px;
}

/* Results Section */
.results-section {
    margin-top: 60px;
    padding: 48px 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

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

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: var(--transition-smooth);
}

.result-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.result-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.result-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.result-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Footer Disclaimer */
.hinweis {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    margin-top: 60px;
}

.hinweis h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hinweis p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* Card Wrapper for Charts */
.card-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-wrapper:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.chart-wrapper {
    margin-bottom: 24px;
}

.chart-wrapper:last-child {
    margin-bottom: 0;
}

/* Chart Containers */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    margin: 20px 0;
}

.chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* Responsive */
@media (max-width: 980px) {
    .tool-hero-features {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tool-info-boxes {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .tool-info-box {
        justify-content: center;
    }

    /* Optimize chart containers for mobile */
    .chart-container {
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .tool-hero {
        min-height: 50vh;
        padding: 120px 24px 60px;
    }

    .form-container {
        padding: 40px 24px 80px;
    }

    .form-section {
        padding: 24px 20px;
    }

    .section-header {
        flex-wrap: wrap;
    }

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

    .form-group input,
    .form-group select,
    #form input[type="number"],
    #form select {
        font-size: 17px;
        padding: 16px;
    }

    .btn-submit,
    #form button[type="submit"],
    #form button[type="reset"] {
        font-size: 17px;
        padding: 16px 40px;
        width: 100%;
    }

    .btn-add,
    #form button[type="button"] {
        width: 100%;
        justify-content: center;
    }

    .info-panel {
        padding: 20px;
    }

    .info-panel h5,
    .info-panel h3 {
        font-size: 17px;
    }

    .info-panel p,
    .info-panel ol {
        font-size: 15px;
    }

    .help-box {
        font-size: 15px;
    }

    .help-box p,
    .help-box ol {
        font-size: 15px;
    }

    .hinweis {
        padding: 24px 20px;
    }

    .hinweis h3 {
        font-size: 20px;
    }

    .hinweis p {
        font-size: 16px;
    }

    /* Mobile chart optimizations */
    .chart-container {
        min-height: 400px;
        margin: 15px 0;
    }

    .card-wrapper {
        padding: 16px;
    }

    /* Ensure charts have enough space on mobile */
    canvas {
        max-height: 400px !important;
    }
}
