/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
    min-height: 100vh;
}

/* === Navbar === */
.navbar {
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
}

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

/* === Container === */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.login-container {
    max-width: 400px;
    margin-top: 10vh;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 0.25rem;
    color: #1a1a2e;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #666;
    font-weight: 400;
    font-size: 1rem;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
    background: #f0f0f0;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: #0066ff;
    color: #fff;
    border-color: #0066ff;
}

.btn-primary:hover {
    background: #0052cc;
}

.btn-success {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #fd7e14;
    color: #fff;
    border-color: #fd7e14;
}

.btn-warning:hover {
    background: #e8690b;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

/* === Forms === */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0,102,255,0.15);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.task-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* === Alerts === */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-warning {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

/* === Filters === */
.filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* === Table === */
.task-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.task-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
}

.task-table td a {
    color: #0066ff;
    text-decoration: none;
}

.task-table td a:hover {
    text-decoration: underline;
}

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

/* === Badges === */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-nowe {
    background: #cce5ff;
    color: #004085;
}

.badge-w_trakcie {
    background: #fff3cd;
    color: #856404;
}

.badge-wykonane {
    background: #d4edda;
    color: #155724;
}

/* === Task Card === */
.task-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.task-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    font-size: 0.95rem;
}

.meta-item strong {
    color: #666;
}

.task-description {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-bottom: 1.5rem;
}

.task-description h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.task-description p {
    white-space: pre-wrap;
    color: #444;
}

.task-actions {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.task-actions h3 {
    margin-bottom: 0.75rem;
    color: #333;
}

.status-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.back-link {
    margin-top: 1rem;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 3rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* === Settings form headings === */
.task-form h2 {
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
    font-size: 1.1rem;
}

/* === Responsive === */
@media (max-width: 600px) {
    .task-meta {
        grid-template-columns: 1fr;
    }

    .task-table th:nth-child(3),
    .task-table td:nth-child(3),
    .task-table th:nth-child(4),
    .task-table td:nth-child(4) {
        display: none;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
