:root {
    --bg-color: #0f1115;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f0f0f0;
    --text-muted: #9aa0a6;
    --primary: #d92534; /* Polska czerwień jako akcent */
    --primary-hover: #b91d29;
    --secondary: #20242b;
    --danger: #ff4757;
    --success: #2ed573;
    --font: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Tło z gradientem dla efektu premium */
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(217, 37, 52, 0.05) 0%, transparent 50%);
    z-index: -1;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Logowanie */
.login-body {
    justify-content: center;
    align-items: center;
}

.login-container {
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    text-align: center;
}

.login-header img.logo {
    width: 80px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-footer-disclaimer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
    line-height: 1.4;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 37, 52, 0.2);
}

.input-group select option {
    background: var(--bg-color);
    color: var(--text-main);
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(217, 37, 52, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    height: 1.2em;
}

/* Dashboard Layout */
.sidebar {
    width: 280px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    border-radius: 0;
    border-left: none;
    border-top: none;
    border-bottom: none;
}

.sidebar-header {
    padding: 0 2rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.logo-small {
    width: 40px;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li a {
    display: block;
    padding: 1rem 2rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-links li a:hover, .nav-links li a.active {
    color: var(--text-main);
    background: rgba(255,255,255,0.03);
    border-left-color: var(--primary);
}

.sidebar-footer {
    padding: 2rem 2rem 0;
    border-top: 1px solid var(--glass-border);
}

.sidebar-footer p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(217, 37, 52, 0.2);
    color: #ff6b81;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.main-content {
    flex-grow: 1;
    padding: 3rem;
    overflow-y: auto;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-actions h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Tabele */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.styled-table th, .styled-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.styled-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.styled-table tbody tr {
    transition: background 0.2s;
}

.styled-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.styled-table tbody tr:last-of-type td {
    border-bottom: none;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-oczekujące { background: rgba(255, 171, 0, 0.2); color: #ffab00; }
.status-do-glosowania { background: rgba(0, 184, 217, 0.2); color: #00b8d9; }
.status-uchwalone { background: rgba(54, 179, 126, 0.2); color: #36b37e; }
.status-odrzucone { background: rgba(255, 86, 48, 0.2); color: #ff5630; }
.status-wygasłe { background: rgba(143, 155, 179, 0.2); color: #8f9bb3; }

.law-link {
    color: #4dabf7;
    text-decoration: none;
}
.law-link:hover { text-decoration: underline; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.close {
    position: absolute;
    top: 1rem; right: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.close:hover { color: white; }

.modal h2 {
    margin-bottom: 1.5rem;
}

select.status-select {
    background: var(--bg-color);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 0.4rem;
    border-radius: 4px;
}
