/* BX Tools CSS - Unified Styles for BX Tools Applications */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f0f9fc;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 15px;
    cursor: pointer;
}

h1 {
    color: #219fcd;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.promo-block {
    background: linear-gradient(135deg, #219fcd 0%, #1a7fa3 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.promo-block h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: white;
}

.promo-block p {
    margin-bottom: 15px;
    opacity: 0.95;
}

.promo-block a {
    display: inline-block;
    background: white;
    color: #219fcd;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.2s;
}

.promo-block a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 3px solid #219fcd;
    margin-bottom: 30px;
}

.tab {
    padding: 15px 30px;
    background-color: #e0f2f7;
    color: #1a7fa3;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.tab.active {
    background-color: #219fcd;
    color: white;
}

.tab:hover:not(.active) {
    background-color: #b3e0f0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.card {
    background: white;
    border: 2px solid #b3e0f0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    color: #219fcd;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

h3 {
    color: #219fcd;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

label {
    display: block;
    font-weight: 600;
    color: #1a7fa3;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

select, input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #b3e0f0;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 15px;
}

button {
    padding: 15px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-generate {
    width: 100%;
    background-color: #219fcd;
    color: white;
    font-size: 1.2rem;
    padding: 20px;
}

.btn-generate:hover {
    background-color: #1a7fa3;
}

.btn-export {
    background-color: #16a34a;
    color: white;
}

.btn-export:hover {
    background-color: #15803d;
}

.btn-add {
    background-color: #219fcd;
    color: white;
}

.btn-add:hover {
    background-color: #1a7fa3;
}

.btn-remove {
    background-color: #dc2626;
    color: white;
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-remove:hover {
    background-color: #b91c1c;
}

.settlement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.detail-box {
    background-color: #f0f9fc;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #219fcd;
}

.detail-box.wide {
    grid-column: span 2;
}

.detail-box .detail-label {
    color: #1a7fa3;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-box .detail-value {
    color: #333;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.service-list, .infra-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-item, .infra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 5px;
}

.service-item {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
}

.infra-item {
    background-color: #fae8ff;
    border: 1px solid #d8b4fe;
}

.count-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.service-item .count-badge {
    background-color: #16a34a;
}

.infra-item .count-badge {
    background-color: #9333ea;
}

.empty-state {
    color: #6b7280;
    font-style: italic;
    padding: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #b3e0f0;
}

th {
    background-color: #f0f9fc;
    font-weight: 600;
    color: #1a7fa3;
}

td input {
    width: 100%;
    padding: 6px;
    border: 1px solid #b3e0f0;
    border-radius: 3px;
    margin: 0;
}

.info-box {
    background-color: #dbeafe;
    border: 2px solid #219fcd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.info-box h3 {
    color: #1a7fa3;
    margin-bottom: 15px;
}

.info-box div {
    margin-bottom: 12px;
    color: #1e3a8a;
}

.info-box strong {
    color: #1a7fa3;
}

.info-box .example {
    font-size: 0.9rem;
    font-style: italic;
    color: #1a7fa3;
    display: block;
    margin-top: 5px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: white;
    border-radius: 8px;
    color: #6b7280;
    border: 1px solid #b3e0f0;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .tabs {
        flex-direction: column;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .detail-box.wide {
        grid-column: span 1;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 8px;
    }

    .logo {
        max-width: 200px;
    }
}
/* NPC Generator Specific Styles */
.npc-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

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

.npc-form-group label {
    margin-bottom: 8px;
}

.npc-form-group select {
    margin-bottom: 0;
}

.npc-card {
    background: #f8f9fa;
    border-left: 5px solid #219fcd;
    margin-bottom: 20px;
}

.npc-card pre {
    background: white;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #b3e0f0;
    overflow-x: auto;
    line-height: 1.8;
    font-size: 0.95rem;
}

#npcResults {
    margin-top: 25px;
}

/* Responsive styles for NPC Generator */
@media (max-width: 768px) {
    .npc-form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .npc-card pre {
        font-size: 0.85rem;
    }
}
