* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #0f172a;
    font-size: 16px;
}

.navbar {
    background: #1f2937;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    background-color: #f97316;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.form-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-card h2 {
    color: #0f172a;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #047857;
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.form-card h3 {
    color: #0f172a;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #0f172a;
    font-size: 16px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    font-size: 16px;
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-input-wrapper input[type="text"] {
    flex: 1;
}

.calendar-icon {
    background-color: #f97316;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.calendar-icon:hover {
    background-color: #ea580c;
}

.calendar-icon:active {
    background-color: #c2410c;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: #047857;
    color: white;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

table input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    font-size: 16px;
}

.btn-primary {
    background-color: #047857;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #065f46;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    margin: 0.5rem 0;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-remove {
    background-color: #e74c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-remove:hover {
    background-color: #c0392b;
}

.summary {
    background-color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.summary-item {
    text-align: center;
}

.summary-item span {
    display: block;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 16px;
    font-weight: 600;
}

.summary-item strong {
    font-size: 1.5rem;
    color: #0f172a;
    font-weight: 700;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

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

.notification.success {
    background-color: #27ae60;
    color: white;
}

.notification.error {
    background-color: #e74c3c;
    color: white;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: #ecf0f1;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.tab-btn.active {
    background-color: white;
    border-bottom: 3px solid #f97316;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.raport-table {
    width: 100%;
    margin-top: 1rem;
}

.raport-section {
    margin-top: 2rem;
}

.raport-section h4 {
    color: #0f172a;
    margin-bottom: 1rem;
    font-weight: 700;
}

.pracownicy-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pracownik-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.pracownik-item:hover {
    background-color: #e9ecef;
}

.asortyment-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.asortyment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-inputs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.form-group-inline {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.form-group-inline label {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.3rem;
    font-size: 16px;
}

.form-group-inline input {
    padding: 0.5rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    font-size: 16px;
}

.btn-remove-asortyment {
    background-color: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    height: fit-content;
}

.btn-remove-asortyment:hover {
    background-color: #c0392b;
}

.btn-remove-section {
    background-color: #e67e22;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-remove-section:hover {
    background-color: #d35400;
}

.belki-table {
    margin: 1rem 0;
}

.belki-table table {
    margin-bottom: 0.5rem;
}

.btn-dodaj-belke {
    background-color: #047857;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-dodaj-belke:hover {
    background-color: #065f46;
}

.asortyment-summary {
    background-color: #dbeafe;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 0.5rem;
}

#asortymentContainer {
    margin-bottom: 1rem;
}

.dzialanie-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.dzialanie-row input {
    padding: 0.5rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    font-size: 16px;
}

#dzialaniaContainer {
    margin-bottom: 1rem;
}

.status-sent {
    background-color: #27ae60;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.status-draft {
    background-color: #f97316;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-action {
    background-color: #047857;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-action:hover {
    background-color: #065f46;
}

.readonly-pracownik {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background-color: #f3f4f6;
    color: #0f172a;
    font-size: 16px;
    cursor: not-allowed;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.pracownik-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
