:root {
    --bg: #f6f8fb;
    --card: #fff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #dbe3ee;
    --blue: #1f4e78;
    --green: #166534;
    --red: #b91c1c;
    --gold: #8a5a00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 24px;
    overflow-x: auto;
}

h1, h2, h3 {
    margin-bottom: 12px;
    color: var(--text);
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: var(--text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 78, 120, 0.1);
}

textarea {
    min-height: 70px;
    resize: vertical;
}

input[readonly] {
    background: #f9fafb;
    color: #374151;
}

button, .btn {
    display: inline-block;
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: var(--blue);
    font-size: 14px;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
}

.btn-green { background: var(--green); }
.btn-red { background: var(--red); }

.msg-ok {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.msg-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e5eef8;
    color: #1f4e78;
    font-weight: 700;
    font-size: 12px;
}

.small {
    font-size: 12px;
    color: var(--muted);
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: bold; }

.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.file-upload {
    border: 2px dashed #cfd8e3;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: #f9fafb;
    margin-bottom: 16px;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload label {
    cursor: pointer;
    color: var(--blue);
    font-weight: 700;
    font-size: 14px;
}

.xml-data-loaded {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #166534;
}

.table-responsive {
    overflow-x: auto;
}

@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .row-2, .row-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    .sat-field {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    }

    .sat-field:last-child {
        border-bottom: none;
    }

    .sat-field label {
        font-size: 13px;
        color: var(--muted);
        margin-bottom: 4px;
    }

    .sat-value {
        font-size: 18px;
        font-weight: 700;
        color: var(--text);
    }
}