:root {
    --card-bg-main: linear-gradient(180deg, #1e1f33 0%, #141420 100%);
    --card-bg-inner: #1c1c2f;
    --card-border: rgba(127,133,228,.35);
    --card-border-soft: rgba(127,133,228,.2);
    --control-bg: #26264a;
}


#system-config {
    position: fixed;
    right: 0;
    top: 1rem;
    bottom: 1rem;
    width: 340px;
    padding: 1.2rem 1rem 1.5rem;
    background: var(--card-bg-main);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow:
        -10px 0 25px rgba(0,0,0,0.35),
        inset 0 0 0 1px rgba(255,255,255,0.03);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

#system-config h2 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #d0d4e8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 10px rgba(127, 133, 228, 0.1);
}

#system-config .config-item {
    background: var(--card-bg-inner);
    border: 1px solid rgba(127,133,228,.2);
    border-radius: 12px;
    padding: .75rem .8rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

#system-config select,
#system-config input {
    background: var(--control-bg);
    border: 1px solid rgba(127,133,228,.4);
    border-radius: 10px;
    padding: .65rem .8rem;
    color: #fff;
    font-weight: 500;
    transition: all .25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

#system-config select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--control-bg);
    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='%237f85e4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.5rem;
}

#system-config select:hover,
#system-config input:hover {
    border-color: rgba(127, 133, 228, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 12px rgba(127, 133, 228, 0.1);
}

#system-config select:focus,
#system-config input:focus {
    outline: none;
    border-color: rgba(127, 133, 228, 0.6);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(127,133,228,.15);
}

#system-config select option {
    background: #1c1c2f;
    color: #ffffff;
    padding: 0.5rem;
}

#system-config select option:checked,
#system-config select option:hover {
    background: linear-gradient(145deg, #3a3a5e 0%, #2e2e4a 100%);
}


#system-config.collapsed h2 {
    display: none !important;
}

#system-config.collapsed .config-item {
    display: none !important;
}

#price-overview.collapsed .config-item {
    display: none !important;
}

#price-overview.collapsed #ergebnis {
    display: none !important;
}

#system-config .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: .6rem;
    border-bottom: 1px solid rgba(127,133,228,.25);
}

#system-config.collapsed .sidebar-header {
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    width: 40px;
}

#system-config .sidebar-toggle {
    display: block !important;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    position: absolute;
    left: 0.5rem;
    top: 20px;
    width: 16px;
    line-height: 1.4rem;
    z-index: 1001;
}

#system-config.collapsed .sidebar-toggle {
    left: 0.6rem;
    top: 20px;
    width: 16px;
    z-index: 1001;
}

#system-config.collapsed .icon-container {
    display: block !important;
    position: absolute;
    left: 0.5rem;
    top: 3rem;
}

#price-overview .sidebar-toggle {
    display: block !important;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    position: absolute;
    right: 0.5rem;
    top: 20px;
    width: 16px;
    line-height: 1.4rem;
    z-index: 1001;
}

#price-overview {
    position: fixed;
    left: 0;
    top: 1rem;
    bottom: 1rem;
    width: 500px;
    padding: 1.2rem 1rem 2rem;
    background: var(--card-bg-main);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow:
        10px 0 25px rgba(0,0,0,0.35),
        inset 0 0 0 1px rgba(255,255,255,0.03);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}

#price-overview #billing-period {
    background: var(--control-bg);
    border: 1px solid rgba(127,133,228,.4);
    border-radius: 10px;
    padding: .55rem .6rem;
    color: #ffffff;
    font-weight: 500;
    transition: all .2s ease;
}

#price-overview #billing-period:hover {
    border-color: #9aa0ff;
}

#price-overview #billing-period:focus {
    outline: none;
    border-color: #aab0ff;
    box-shadow: 0 0 0 2px rgba(127,133,228,.25);
}


#price-overview h2 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    background: linear-gradient(135deg, #ffffff 0%, #d0d4e8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    text-align: left;
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(127, 133, 228, 0.1);
}

#price-overview p {
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    color: #c0c4d8;
}

#price-overview .sidebar-header {
   padding-bottom: .6rem;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, rgba(127,133,228,.6), rgba(170,176,255,.2)) 1;
}

#price-overview .config-item {
    background: var(--card-bg-inner);
    border: 1px solid rgba(127,133,228,.2);
    border-radius: 12px;
    padding: .75rem .8rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

#price-overview.collapsed .sidebar-header {
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    width: 40px;
}

#price-overview.collapsed .sidebar-toggle {
    right: 0.6rem;
    top: 20px;
    width: 16px;
    z-index: 2002;
}

#price-overview.collapsed .icon-container {
    display: block !important;
    position: absolute;
    right: 0.5rem;
    top: 3rem;
}

#price-overview.collapsed h2,
#price-overview.collapsed p,
#price-overview.collapsed .billing-method,
#price-overview.collapsed .quote-button,
#price-overview.collapsed .disclaimer-block,
#price-overview.collapsed .pdf-actions {
    display: none !important;
}

#price-overview.collapsed~#ergebnis {
    display: none !important;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-item label {
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
}

.config-item select,
.config-item input {
    background: linear-gradient(145deg, rgba(38, 38, 74, 0.9) 0%, rgba(32, 32, 58, 0.95) 100%);
    border: 1px solid rgba(127, 133, 228, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    outline: none;
    width: 100%;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.config-item select {
    -webkit-appearance: none;
    -moz-appearance: none;
    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='%237f85e4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.5rem;
}

.config-item select:hover,
.config-item input:hover {
    border-color: rgba(127, 133, 228, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 12px rgba(127, 133, 228, 0.1);
}

.config-item select:focus,
.config-item input:focus {
    border-color: rgba(127, 133, 228, 0.6);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(127, 133, 228, 0.15);
}

.config-item select option {
    background: #1c1c2f;
    color: #ffffff;
    padding: 0.5rem;
}

.step {
    padding-left: 540px;
    padding-right: 320px;
    transition: padding-left 0.3s ease, padding-right 0.3s ease;
}

/* ===== Modern Price Overview Table ===== */
#ergebnis,
#ergebnis * {
    text-align: left;
}

#ergebnis {
    max-width: none;
    margin: 1rem auto;
    background: linear-gradient(145deg, rgba(20, 20, 32, 0.95) 0%, rgba(16, 16, 26, 0.98) 100%);
    border: 1px solid rgba(127, 133, 228, 0.15);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    max-height: calc(60vh - 230px);
    overflow-y: auto;
    overflow-x: auto;
    transition: max-width 0.3s ease;
}

#ergebnis table {
    width: 100%;
    min-width: 420px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82em;
}

#ergebnis table thead tr {
    background: linear-gradient(90deg, rgba(127, 133, 228, 0.08) 0%, rgba(127, 133, 228, 0.03) 100%);
}

#ergebnis table th {
    padding: 0.7rem 0.5rem;
    font-weight: 600;
    color: #a0a4b8;
    text-transform: uppercase;
    font-size: 0.72em;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(127, 133, 228, 0.2);
    white-space: nowrap;
}

#ergebnis table td {
    padding: 0.6rem 0.5rem;
    color: #d0d4e0;
    border-bottom: 1px solid rgba(127, 133, 228, 0.08);
    transition: background-color 0.2s ease;
    font-size: 0.95em;
}

#ergebnis table tbody tr:hover td {
    background: rgba(127, 133, 228, 0.04);
}

#ergebnis table tbody tr:last-child td {
    border-bottom: none;
}

/* Total row styling */
#ergebnis table tbody tr:last-child td {
    padding-top: 0.8rem;
    font-weight: 600;
}

#ergebnis table tbody tr:last-child td:last-child {
    background: linear-gradient(135deg, rgba(127, 133, 228, 0.15) 0%, rgba(127, 133, 228, 0.05) 100%);
    border-radius: 6px;
    color: #9a9ff0;
}

#ergebnis table th:nth-child(1),
#ergebnis table td:nth-child(1) {
    width: 36px;
    text-align: center;
    color: #7a7e90;
    font-size: 0.85em;
}

#ergebnis table th:nth-child(3),
#ergebnis table td:nth-child(3) {
    width: 50px;
    text-align: center;
    white-space: nowrap;
}

#ergebnis table th:nth-child(4),
#ergebnis table td:nth-child(4) {
    width: 95px;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#ergebnis table th:nth-child(5),
#ergebnis table td:nth-child(5) {
    width: 115px;
    text-align: right;
    font-weight: 500;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#ergebnis table th:nth-child(2),
#ergebnis table td:nth-child(2) {
    width: auto;
}

#ergebnis table td:nth-child(2) {
    white-space: normal;
    word-wrap: break-word;
}

/* Discount rows styling */
#ergebnis table td[style*="color: #4CAF50"],
#ergebnis table tr td:last-child[style*="-"] {
    color: #6dd670 !important;
}

/* Modern scrollbar */
#ergebnis::-webkit-scrollbar {
    width: 6px;
}

#ergebnis::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(127, 133, 228, 0.5) 0%, rgba(168, 159, 239, 0.5) 100%);
    border-radius: 3px;
    border: 1px solid rgba(20, 20, 32, 0.5);
}

#ergebnis::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(154, 159, 240, 0.7) 0%, rgba(127, 133, 228, 0.7) 100%);
}

#ergebnis::-webkit-scrollbar-track {
    background: rgba(20, 20, 32, 0.3);
    border-radius: 3px;
}

#ergebnis ul {
    list-style: none;
    padding-right: 1rem;
}

#ergebnis li {
    margin-bottom: 0.5rem;
}

#ergebnis h3 {
    margin-top: 1rem;
    text-align: left;
    font-size: 0.95rem;
    color: #a0a4b8;
    font-weight: 600;
}

/* Table row types */
#ergebnis table .main-product-row td {
    background: rgba(127, 133, 228, 0.03);
}

#ergebnis table .main-product {
    font-weight: 600;
    color: #e0e4f0;
}

#ergebnis table .feature-row td {
    font-size: 0.92em;
    color: #b8bcc8;
}

#ergebnis table .connector-row td {
    font-size: 0.92em;
    color: #b8bcc8;
}

#ergebnis table .section-header td {
    padding-top: 1rem;
    border-bottom: 1px solid rgba(127, 133, 228, 0.15);
}

#ergebnis table .section-header td:nth-child(2) {
    color: #a0a4b8;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#ergebnis table .discount-row td {
    color: #7dd67d;
}

#ergebnis table .discount-row .discount-value {
    color: #6dd670;
    font-weight: 600;
}

#ergebnis table .total-row td {
    border-top: 2px solid rgba(127, 133, 228, 0.3);
    border-bottom: none;
    padding-top: 0.9rem;
    padding-bottom: 0.5rem;
}

#ergebnis table .total-row td:nth-child(2) {
    color: #e0e4f0;
}

#ergebnis table .total-row .total-value {
    background: linear-gradient(135deg, rgba(127, 133, 228, 0.2) 0%, rgba(127, 133, 228, 0.08) 100%);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    color: #a0a6f0;
    font-size: 1.05em;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 0.5rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
}

.toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.icon-container {
    display: none;
    width: 24px;
    height: 24px;
}

.icon-container svg {
    width: 100%;
    height: 100%;
    fill: #7f85e4;
}

#system-config.collapsed .icon-container {
    display: block;
}

#price-overview.collapsed .icon-container {
    display: block;
}

#price-overview.collapsed {
    transform: translateX(calc(-100% + 40px));
}

#system-config.collapsed {
    transform: translateX(calc(100% - 40px));
}

.step.left-collapsed {
    padding-left: 40px;
}

.step.right-collapsed {
    padding-right: 40px;
}

.disclaimer-block {
    background: linear-gradient(145deg, rgba(28, 28, 40, 0.9) 0%, rgba(20, 20, 32, 0.95) 100%);
    border: 1px solid rgba(127, 133, 228, 0.2);
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
    margin: 0.5rem 0 0;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    text-align: center;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    position: relative;
}

.disclaimer-block h5 {
    color: #9098b0;
    font-size: 0.64rem;
    text-align: center;
    line-height: 1.35;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin: 0;
}

.disclaimer-block h3 {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #c0c4d8;
    font-size: 0.7rem;
    text-align: center;
    font-weight: 600;
    margin: 0 0 0.3rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
}

.disclaimer-block h3::before {
    content: '⚠';
    font-size: 0.75rem;
    filter: grayscale(0.3);
}

.disclaimer-block .disclaimer-title {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    background: linear-gradient(135deg, #ffffff 0%, #c0c4d8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.disclaimer-block p {
    font-size: clamp(0.8rem, 1.4vw, 0.9rem);
    color: #8890a0;
    line-height: 1.5;
    margin: 0;
}

.billing-method {
    margin-top: 0;
}

.quote-button button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #2c2c46;
    border: 1px solid #7f85e4;
    border-radius: 6px;
    color: #ffffff;
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.quote-button button::before {
    content: '📧';
    margin-right: 0.3rem;
}

/* PDF download button & action container */
.pdf-actions {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.pdf-download-btn {
    background: var(--control-bg);
    border: 1px solid rgba(127,133,228,.4);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0; /* icon-only */
    padding: 0.55rem 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-height: 44px; /* consistent height */
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.pdf-download-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: currentColor;
}
/* Share button inherits same sizing */
/* .share-btn uses the same base .pdf-download-btn styles; extra rule removed to satisfy linter */

.pdf-download-btn:hover:not([disabled]) {
    border-color: #9aa0ff;
}

.pdf-download-btn:focus {
    outline: none;
    border-color: #aab0ff;
    box-shadow: 0 0 0 2px rgba(127,133,228,.25);
}

/* ===== Discount Badge ===== */
.discount-badge {
    display: inline-block;
    background: rgba(109, 214, 112, 0.12);
    border: 1px solid rgba(109, 214, 112, 0.3);
    color: #6dd670;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 0.4rem;
    white-space: nowrap;
}

/* ===== Empty State ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 0.75rem;
}

.empty-state-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg {
    width: 100%;
    height: 100%;
    fill: #5a5e72;
}

.empty-state-text {
    font-size: 0.82rem;
    color: #5a5e72;
    text-align: center;
    margin: 0;
    line-height: 1.6;
}

/* ===== Price Flash Animation ===== */
@keyframes price-flash {
    0%   { opacity: 0.5; transform: scale(0.94); }
    60%  { opacity: 1;   transform: scale(1.06); }
    100% { opacity: 1;   transform: scale(1); }
}

.price-flash {
    display: inline-block;
    animation: price-flash 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pdf-download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
