:root {
    --nwc-primary: #D81E3A;
    --nwc-success: #10b981;
    --nwc-danger: #D81E3A;
    --nwc-warning: #f59e0b;
    --nwc-light-bg: #f9fafb;
    --nwc-border-color: #e5e7eb;
    --nwc-text-dark: #1f2937;
    --nwc-text-light: #6b7280;
    --nwc-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --nwc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --mm-red: #D81E3A;
    --mm-dark: #1a1a1a;
    --mm-light: #f5f5f5;
}

.nwc-calculator-wrapper {
    background: linear-gradient(135deg, #D81E3A 0%, #A01529 100%);
    min-height: 100vh;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.nwc-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
    padding: 30px 0;
}

.nwc-brand-label {
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 5px;
}

.nwc-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    letter-spacing: -1px;
}

.nwc-icon {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

.nwc-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 0;
    font-weight: 400;
}

.nwc-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

/* Sections */
.nwc-section {
    background: var(--nwc-light-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.nwc-assets-section {
    border-color: #FFD9E0;
}

.nwc-assets-section:hover {
    border-color: #D81E3A;
    background: rgba(216, 30, 58, 0.02);
}

.nwc-liabilities-section {
    border-color: #FFD9E0;
}

.nwc-liabilities-section:hover {
    border-color: #D81E3A;
    background: rgba(216, 30, 58, 0.02);
}

.nwc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--nwc-border-color);
}

.nwc-section-header h2 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--nwc-text-dark);
}

.nwc-badge {
    font-size: 1.8rem;
}

.nwc-section-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: #D81E3A;
}

.nwc-liabilities-section .nwc-section-total {
    color: #D81E3A;
}

/* Categories */
.nwc-categories {
    margin-bottom: 15px;
}

.nwc-category {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--nwc-border-color);
    transition: all 0.3s ease;
}

.nwc-category:hover {
    box-shadow: var(--nwc-shadow-lg);
    border-color: var(--nwc-primary);
}

.nwc-category-title {
    font-weight: 600;
    color: var(--nwc-text-dark);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.nwc-category-total {
    float: right;
    font-weight: 700;
    color: var(--nwc-primary);
}

.nwc-category-total.negative {
    color: var(--nwc-danger);
}

.nwc-items-list {
    clear: both;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nwc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.nwc-item:last-child {
    border-bottom: none;
}

.nwc-item-name {
    color: var(--nwc-text-dark);
    font-weight: 500;
    flex: 1;
}

.nwc-item-amount {
    color: #D81E3A;
    font-weight: 600;
    margin: 0 15px;
    min-width: 100px;
    text-align: right;
}

.nwc-liabilities-section .nwc-item-amount {
    color: #D81E3A;
}

.nwc-item-delete {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    transition: color 0.2s;
}

.nwc-item-delete:hover {
    color: var(--nwc-danger);
}

/* Summary Card */
.nwc-summary-card {
    background: linear-gradient(135deg, #D81E3A 0%, #A01529 100%);
    border-radius: 15px;
    padding: 30px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(216, 30, 58, 0.4);
}

.nwc-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.nwc-summary-label {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
}

.nwc-summary-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.nwc-summary-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 10px 0;
}

.nwc-summary-divider-thick {
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
}

.nwc-summary-networth {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 0 -30px -30px -30px;
    padding: 20px 30px;
}

.nwc-summary-networth .nwc-summary-label {
    opacity: 1;
    font-size: 1rem;
}

.nwc-summary-networth .nwc-summary-value {
    font-size: 2.5rem;
    color: #4ade80;
}

.nwc-networth-negative .nwc-summary-networth .nwc-summary-value {
    color: #fca5a5;
}

.nwc-assets-color {
    color: #10b981 !important;
}

.nwc-liabilities-color {
    color: #ef4444 !important;
}

/* Charts */
.nwc-charts-container {
    margin-bottom: 30px;
}

.nwc-chart-box {
    background: var(--nwc-light-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--nwc-border-color);
}

.nwc-chart-box h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--nwc-text-dark);
    font-weight: 600;
}

canvas {
    max-height: 250px;
}

/* Actions */
.nwc-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nwc-actions .btn {
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nwc-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--nwc-shadow-lg);
}

.nwc-actions .btn-primary {
    background-color: #D81E3A;
    border-color: #D81E3A;
}

.nwc-actions .btn-primary:hover {
    background-color: #A01529;
    border-color: #A01529;
}

/* Quick Add Form */
.nwc-quick-add-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid #D81E3A;
    animation: slideDown 0.4s ease-out;
}

.nwc-quick-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nwc-quick-add-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--nwc-text-dark);
    font-weight: 600;
}

.nwc-quick-add-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
    width: 30px;
    height: 30px;
    transition: color 0.2s;
}

.nwc-quick-add-close:hover {
    color: var(--nwc-text-dark);
}

.nwc-quick-add-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nwc-form-group {
    display: flex;
    flex-direction: column;
}

.nwc-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--nwc-text-dark);
    font-size: 0.95rem;
}

.nwc-form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--nwc-border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.nwc-form-input:focus {
    outline: none;
    border-color: #D81E3A;
    box-shadow: 0 0 0 3px rgba(216, 30, 58, 0.1);
}

.nwc-form-input::placeholder {
    color: #d1d5db;
}

.nwc-form-input::-webkit-outer-spin-button,
.nwc-form-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nwc-form-input[type=number] {
    -moz-appearance: textfield;
}

/* Notifications */
.nwc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--nwc-shadow-lg);
    display: none;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.nwc-notification.show {
    display: block;
}

.nwc-notification.success {
    border-left: 4px solid var(--nwc-success);
    color: var(--nwc-success);
}

.nwc-notification.error {
    border-left: 4px solid var(--nwc-danger);
    color: var(--nwc-danger);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .nwc-container {
        padding: 20px;
    }

    .nwc-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nwc-calculator-wrapper {
        padding: 20px 10px;
    }

    .nwc-container {
        border-radius: 15px;
        padding: 15px;
    }

    .nwc-section {
        padding: 15px;
    }

    .nwc-summary-card {
        padding: 20px;
    }

    .nwc-title {
        font-size: 1.75rem;
        gap: 10px;
    }

    .nwc-icon {
        font-size: 2rem;
    }

    .nwc-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nwc-section-total {
        margin-top: 10px;
    }

    .nwc-summary-value {
        font-size: 1.5rem;
    }

    .nwc-summary-networth .nwc-summary-value {
        font-size: 2rem;
    }

    .nwc-actions {
        flex-direction: column;
    }

    .nwc-actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .nwc-actions,
    .nwc-icon {
        display: none;
    }

    .nwc-calculator-wrapper {
        background: white;
        padding: 0;
    }

    .nwc-container {
        box-shadow: none;
        padding: 0;
    }
}
