/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: white;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    color: #c41e3a;
    font-size: 28px;
    margin-bottom: 5px;
}

header p {
    color: #666;
    font-size: 16px;
}

nav {
    margin-top: 15px;
}

nav a {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover {
    background: #e0e0e0;
}

/* Main content */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }
}

.form-container,
.preview-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
}

.tab:hover {
    color: #333;
    background: #f9f9f9;
}

.tab.active {
    color: #c41e3a;
    border-bottom-color: #c41e3a;
    font-weight: 600;
}

/* Form sections */
.section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.section:last-of-type {
    border-bottom: none;
}

.section h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    margin-top: 15px;
    color: #666;
}

/* Form groups */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c41e3a;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Autocomplete suggestions */
.suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    width: calc(100% - 30px);
    margin-top: 2px;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background: #f9f9f9;
}

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

/* Komisja members */
.komisja-member {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 3px solid #c41e3a;
}

.komisja-member h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

/* Denominacje table */
.denominacje-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.denominacje-table th,
.denominacje-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.denominacje-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.denominacje-table tfoot td {
    background: #f9f9f9;
    font-weight: bold;
}

.denominacje-table input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #c41e3a;
    color: white;
}

.btn-primary:hover {
    background: #a01728;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Preview */
.preview {
    min-height: 600px;
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
}

.preview-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.document-preview {
    background: white;
}

/* Installation page */
.installation-section {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.installation-section h2 {
    color: #c41e3a;
    margin-bottom: 15px;
}

.installation-section code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.installation-section pre {
    background: #1e1e1e;
    color: #22c55e;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
}

.download-link {
    display: inline-block;
    padding: 10px 20px;
    background: #c41e3a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    transition: background 0.3s;
}

.download-link:hover {
    background: #a01728;
}

/* 404 page */
.error-page {
    text-align: center;
    padding: 100px 20px;
}

.error-page h1 {
    font-size: 72px;
    color: #c41e3a;
    margin-bottom: 20px;
}

.error-page p {
    font-size: 20px;
    color: #666;
    margin-bottom: 30px;
}

.error-page a {
    display: inline-block;
    padding: 12px 24px;
    background: #c41e3a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.error-page a:hover {
    background: #a01728;
}
