/* Property Leverage Calculator - Standardized Styles */

.plc-root-wrapper {
    margin: 2rem auto;
    width: 100%;
    max-width: 1400px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.plc-root {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #083141;
    background: #ffffff;
    border: 1px solid #e0eaef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 15px;
}

.plc-header {
    margin-bottom: 1.5rem;
}

.plc-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #083141;
    letter-spacing: -0.01em;
}

.plc-header p {
    margin: 0;
    font-size: 0.95rem;
    color: #526b75;
    line-height: 1.6;
}

.plc-main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.plc-card {
    width: 100%;
    box-sizing: border-box;
}

.plc-card {
    border: 1px solid #d5e4eb;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.25rem;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease;
}

.plc-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Section Groups */
.plc-section-group {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e0eaef;
    margin-bottom: 1.5rem;
}

.plc-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: #083141;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0eaef;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.plc-step-help {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: #526b75;
    line-height: 1.5;
}

/* Grid */
.plc-grid {
    display: grid;
    gap: 0.75rem 1rem;
    align-items: start;
}

.plc-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.plc-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Settings Grid - Better organization */
.plc-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.plc-settings-group {
    background: #ffffff;
    border: 1px solid #e0eaef;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease;
}

.plc-settings-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #d5e4eb;
}

.plc-settings-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #083141;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e8f4f8;
    letter-spacing: -0.01em;
}

.plc-settings-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Property Management */
.plc-properties-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.plc-property-item {
    border: 2px solid #e0eaef;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.plc-property-item:hover {
    border-color: #59747c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.plc-property-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0eaef;
}

.plc-property-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #083141;
}

.plc-btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    border: 1px solid #59747c;
    background: #edf3f5;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    min-height: 36px;
}

.plc-btn:hover {
    background: #dde7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plc-btn--primary {
    background: #59747c;
    color: #ffffff;
    border-color: #59747c;
    font-weight: 600;
}

.plc-btn--primary:hover {
    background: #476069;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(89, 116, 124, 0.3);
}

.plc-btn--remove {
    background: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
    font-weight: 600;
}

.plc-btn--remove:hover {
    background: #fecaca;
    border-color: #dc2626;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.plc-goal-tracking {
    margin: 1.5rem 0;
}

.plc-milestone {
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: #f0f7fa;
    border-radius: 6px;
    border-left: 3px solid #1c7c54;
    font-size: 0.9rem;
    color: #083141;
}

.plc-milestones-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.plc-milestone-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e0eaef;
    border-left: 4px solid #1c7c54;
    transition: all 0.2s ease;
}

.plc-milestone-item:hover {
    border-color: #59747c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateX(2px);
}

.plc-milestone-year {
    min-width: 150px;
    font-size: 0.95rem;
    color: #083141;
    padding-top: 0.25rem;
}

.plc-milestone-details {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .plc-milestone-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .plc-milestone-year {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .plc-grid-2,
    .plc-grid-3,
    .plc-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .plc-settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .plc-settings-group {
        padding: 1rem;
    }
    
    .plc-property-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .plc-btn {
        width: 100%;
    }
}

/* Fields */
.plc-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: fit-content;
    align-items: flex-start;
}

.plc-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.plc-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.plc-input-wrapper:focus-within {
    border-color: #59747c;
    box-shadow: 0 0 0 2px rgba(89, 116, 124, 0.2);
    background: #f8fafc;
}

.plc-input-wrapper .plc-prefix,
.plc-input-wrapper .plc-suffix {
    font-size: 0.9rem;
    color: #64748b;
    white-space: nowrap;
}

.plc-input-wrapper .plc-prefix {
    margin-right: 6px;
}

.plc-input-wrapper .plc-suffix {
    margin-left: 6px;
}

.plc-input {
    border: none;
    outline: none;
    font-size: 0.9rem;
    font-family: inherit;
    width: 100%;
    padding: 0;
    background: transparent;
    color: #083141;
}

.plc-input:focus {
    outline: none;
}

.plc-input-wrapper select.plc-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23083141' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.5rem;
}

.plc-help {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
    margin-top: 0.25rem;
}

/* Summary Cards */
.plc-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}

.plc-card-small {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.plc-card-small:nth-child(1) {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

.plc-card-small:nth-child(2) {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
}

.plc-card-small:nth-child(3) {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #f9a8d4;
}

.plc-card-small:nth-child(4) {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #a5b4fc;
}

.plc-card-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #59747c;
}

.plc-card-label {
    font-size: 0.9rem;
    color: #083141;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.plc-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #083141;
    transition: all 0.3s ease;
}

.plc-card-value.positive {
    color: #1c7c54;
}

.plc-card-value.negative {
    color: #b34723;
}

/* Badges */
.plc-badge {
    margin-top: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    display: inline-block;
    line-height: 1.4;
}

.plc-badge-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.plc-badge-warn {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.plc-badge-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Charts Section */
.plc-charts-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e0eaef;
}

.plc-chart-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #083141;
    margin: 1.5rem 0 0.75rem 0;
    letter-spacing: -0.01em;
}

.plc-chart-title:first-child {
    margin-top: 0;
}

.plc-chart-wrapper {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e0eaef;
}

.plc-chart-wrapper canvas {
    max-height: 100%;
}

/* Table */
.plc-table-container {
    margin-top: 1rem;
}

.plc-table-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #59747c;
}

.plc-table-scroll {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e0eaef;
}

@media (max-width: 1024px) {
    .plc-table {
        font-size: 0.75rem;
        min-width: 700px;
    }
    
    .plc-table th,
    .plc-table td {
        padding: 0.4rem 0.5rem;
    }
}

.plc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.plc-table thead {
    background: #e8f4f8;
}

.plc-table th,
.plc-table td {
    padding: 0.6rem 0.75rem;
    text-align: right;
    border: 1px solid #d4e0e6;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.plc-table tbody tr:hover {
    background-color: #f8fafc;
}

.plc-table tbody tr.plc-milestone-row {
    background-color: #f0f9f4;
    border-left: 4px solid #1c7c54;
    font-weight: 500;
}

.plc-table tbody tr.plc-milestone-row:hover {
    background-color: #e8f5e9;
}

.plc-table th:first-child,
.plc-table td:first-child {
    text-align: left;
}

.plc-table th {
    font-weight: 700;
    color: #083141;
    font-size: 0.9rem;
}

.plc-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* Empty state */
.plc-empty {
    padding: 1.5rem;
    border-radius: 10px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    font-size: 0.95rem;
    color: #4b5563;
    text-align: center;
}

/* Metric Cards Grid */
.plc-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.plc-metric-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.plc-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #59747c;
}

.plc-metric-label {
    font-size: 0.9rem;
    color: #083141;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.plc-metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #083141;
    transition: all 0.3s ease;
}

.plc-metric-value.positive {
    color: #1c7c54;
}

.plc-metric-value.negative {
    color: #b34723;
}

/* Print tweaks */
@media print {
    .plc-root-wrapper {
        max-width: 100%;
        padding: 0;
    }
    
    .plc-root {
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .plc-layout {
        flex-direction: column;
    }
    
    .plc-table-scroll {
        overflow: visible;
        border: none;
    }
    
    .plc-chart-wrapper {
        break-inside: avoid;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .plc-root-wrapper {
        padding: 0 0.5rem;
    }

    .plc-root {
        padding: 1rem;
    }

    .plc-card {
        padding: 1rem;
    }

    .plc-chart-wrapper {
        height: 250px;
    }

    .plc-metrics-grid,
    .plc-summary-cards {
        grid-template-columns: 1fr;
    }
}
