/* styles.css */

:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.5rem;
}

header i {
    margin-right: 0.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: var(--secondary-color);
}

main {
    padding: 2rem;
}

.container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.map-container {
    flex: 2;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#map {
    height: 100%;
    width: 100%;
}

.form-container {
    flex: 1;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-container h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-edit {
    background-color: var(--warning-color);
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: var(--danger-color);
}

.btn-delete:hover {
    background-color: #c0392b;
}

.summary {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.summary h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: var(--light-color);
    font-weight: 600;
}

table tr:hover {
    background-color: #f9f9f9;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--dark-color);
    color: white;
    margin-top: 2rem;
}

/* Admin styles */
.admin-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.admin-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1024px) {
    .container, .admin-container {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    
    .map-container, .form-container {
        width: 100%;
    }
}

#map {
    height: 100%;
    width: 100%;
    min-height: 400px; /* minimalna wysokość */
}

.map-container {
    height: 500px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.status-processed {
    color: #28a745;
    font-weight: bold;
}
.status-pending {
    color: #dc3545;
    font-weight: bold;
}

/* karty oczekujących zwrotów */
.return-card {
    transition: all 0.3s ease;
}
.return-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* przyciski akcji */
.btn-success {
    background-color: #28a745;
}
.btn-success:hover {
    background-color: #218838;
}

/* alerty */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.btn-return {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-return:hover {
    background-color: #138496;
}

.return-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid #17a2b8;
}

.return-section h3 {
    margin-top: 0;
    color: #17a2b8;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.close {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #555;
}

.map-loader, .map-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.map-error .alert {
    margin: 0;
}

.custom-marker {
    display: flex;
    justify-content: center;
    align-items: center;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #2b87d3;
    transform: rotate(-45deg);
    position: relative;
}

.marker-pin::after {
    content: '';
    width: 24px;
    height: 24px;
    margin: 3px;
    background: white;
    position: absolute;
    border-radius: 50%;
}

.map-popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.map-popup-grid .highlight {
    font-weight: bold;
    color: #d32b2b;
    grid-column: span 2;
}