body{
    margin:0;
    font-family:Arial;
    background:#f4f6f9;
}

#app{
    display:flex;
    height:100vh;
}

.sidebar{
    width:260px;
    background:#1f2937;
    color:white;
    padding:20px;
    display:flex;
    flex-direction:column;
}

.sidebar h2{
    margin-top:0;
}

.sidebar button{
    margin-bottom:10px;
    padding:12px;
    border:none;
    background:#374151;
    color:white;
    cursor:pointer;
    border-radius:6px;
    text-align:left;
}

.sidebar button:hover{
    background:#4b5563;
}

.content{
    flex:1;
    padding:30px;
    overflow:auto;
}

.cards{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.card{
    background:white;
    padding:20px;
    border-radius:10px;
    box-shadow:0 2px 6px rgba(0,0,0,0.1);
}

table{
    width:100%;
    border-collapse:collapse;
    background:white;
}

table th,
table td{
    padding:12px;
    border-bottom:1px solid #ddd;
    text-align:left;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.topbar button{
    padding:12px 20px;
    border:none;
    background:#2563eb;
    color:white;
    border-radius:6px;
    cursor:pointer;
}

.modal{
    position:fixed;
    inset:0;
    width:100vw;
    height:100vh;
    background:rgba(0,0,0,0.5);

    display:flex;
    justify-content:center;
    align-items:center;

    padding:20px;
    box-sizing:border-box;

    z-index:99999;
}

.modal-box{
    background:white;
    padding:30px;
    border-radius:10px;
    width:400px;

    max-width:90vw;
    max-height:90vh;

    overflow:auto;

    display:flex;
    flex-direction:column;
    gap:10px;

    margin:auto;
}

.modal-box input,
.modal-box select{
    padding:12px;
}

.modal-box button{
    padding:12px;
    border:none;
    background:#2563eb;
    color:white;
    border-radius:6px;
    cursor:pointer;
}

#login-screen{
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
}

.login-box{
    width:350px;
    background:white;
    padding:30px;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(0,0,0,0.2);
    display:flex;
    flex-direction:column;
    gap:10px;
}

.login-box input{
    padding:12px;
}

.login-box button{
    padding:12px;
    background:#2563eb;
    color:white;
    border:none;
    border-radius:6px;
    cursor:pointer;
}

textarea{
    padding:12px;
    min-height:80px;
    resize:vertical;
    font-family:Arial;
}

table button{
    padding:7px 10px;
    margin-right:5px;
    border:none;
    border-radius:5px;
    cursor:pointer;
    background:#2563eb;
    color:white;
}


.status-ofertowanie{
    background:#fef3c7;
    color:#92400e;
    padding:6px 10px;
    border-radius:20px;
    font-size:12px;
    font-weight:bold;
}

.status-realizacja{
    background:#dbeafe;
    color:#1e40af;
    padding:6px 10px;
    border-radius:20px;
    font-size:12px;
    font-weight:bold;
}

.status-zakonczony{
    background:#dcfce7;
    color:#166534;
    padding:6px 10px;
    border-radius:20px;
    font-size:12px;
    font-weight:bold;
}

.status-przegrany{
    background:#fee2e2;
    color:#991b1b;
    padding:6px 10px;
    border-radius:20px;
    font-size:12px;
    font-weight:bold;
}

.status-wstrzymany{
    background:#e5e7eb;
    color:#374151;
    padding:6px 10px;
    border-radius:20px;
    font-size:12px;
    font-weight:bold;
}

.payment-paid{
    background:#dcfce7;
}

.payment-overdue{
    background:#fee2e2;
}

.payment-soon{
    background:#fef3c7;
}

.filters{
    display:flex;
    gap:10px;
    align-items:center;
}

.filters input,
.filters select{
    padding:10px;
    border:1px solid #ccc;
    border-radius:6px;
}

button[onclick*="delete"]{
    background:#dc2626 !important;
    color:white;
}

button[onclick*="delete"]:hover{
    background:#b91c1c !important;
}

.btn-paid{
    background:#16a34a !important;
    color:white;
}

.btn-paid:hover{
    background:#15803d !important;
}

.confirm-box{
    width:360px;
    text-align:center;
    position:relative;
    top:0;
    transform:none;
}

.confirm-box h2{
    margin-top:0;
    color:#111827;
}

.confirm-box p{
    font-size:16px;
    color:#374151;
    line-height:1.5;
}

.confirm-buttons{
    display:flex;
    gap:10px;
    justify-content:center;
    margin-top:15px;
}

.confirm-buttons button{
    min-width:100px;
}

#confirm-ok-button{
    background:#2563eb;
}

#confirm-cancel-button{
    background:#6b7280;
}

#confirm-ok-button:focus{
    outline:3px solid #93c5fd;
}

#confirm-modal .modal-box{
    margin:auto;
}

.dashboard-section{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

.dashboard-half{
    background:white;
    padding:20px;
    border-radius:10px;
    box-shadow:0 2px 6px rgba(0,0,0,0.1);
}

.quick-actions{
    display:flex;
    gap:10px;
    margin-bottom:20px;
}

.quick-actions button{
    padding:12px 18px;
    border:none;
    border-radius:6px;
    background:#2563eb;
    color:white;
    cursor:pointer;
    font-weight:bold;
}

.quick-actions button:hover{
    background:#1d4ed8;
}

.payment-summary-cards{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:20px;
    margin-bottom:10px;
}

.payment-summary-cards .card p{
    font-size:24px;
    font-weight:bold;
    margin:0;
}

.topbar-actions{
    display:flex;
    gap:10px;
    align-items:center;
}

.topbar-actions button{
    padding:12px 20px;
    border:none;
    background:#2563eb;
    color:white;
    border-radius:6px;
    cursor:pointer;
}

.topbar-actions button:hover{
    background:#1d4ed8;
}

body{
    background:linear-gradient(135deg, #f8fafc, #eef2ff);
}

/* SIDEBAR */

.sidebar{
    transition:width 0.25s ease;
    background:linear-gradient(180deg, #111827, #1e293b);
}

.sidebar-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:20px;
}

.sidebar-title{
    margin:0;
    white-space:nowrap;
}

.sidebar-toggle{
    width:42px;
    height:42px;
    border-radius:10px;
    background:#334155 !important;
    color:white;
    text-align:center !important;
    padding:0 !important;
    display:flex;
    align-items:center;
    justify-content:center;
}

.sidebar-toggle:hover{
    background:#475569 !important;
}

.sidebar button{
    display:flex;
    align-items:center;
    gap:12px;
    transition:all 0.2s ease;
    font-size:15px;
}

.sidebar button:hover{
    transform:translateX(4px);
    background:linear-gradient(135deg, #475569, #334155);
}

.menu-icon{
    width:24px;
    min-width:24px;
    text-align:center;
    font-size:18px;
}

.menu-text{
    white-space:nowrap;
}

.sidebar.collapsed{
    width:72px;
    padding:20px 10px;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .menu-text{
    display:none;
}

.sidebar.collapsed button{
    justify-content:center;
    padding:12px 0;
}

.sidebar.collapsed .sidebar-toggle{
    margin:auto;
}

.sidebar.collapsed button:hover{
    transform:none;
}

/* CONTENT */

.content{
    background:linear-gradient(135deg, #f8fafc, #eef2ff);
}

/* DASHBOARD CARDS */

.dashboard-card{
    cursor:pointer;
    position:relative;
    overflow:hidden;
    transition:all 0.25s ease;
    border:1px solid rgba(255,255,255,0.7);
}

.dashboard-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 25px rgba(15,23,42,0.18);
}

.dashboard-card h3{
    margin-top:0;
    font-size:16px;
}

.dashboard-card p{
    font-size:30px;
    font-weight:bold;
    margin-bottom:0;
}

.card-projects{
    background:linear-gradient(135deg, #dbeafe, #eff6ff);
}

.card-offers{
    background:linear-gradient(135deg, #fef3c7, #fffbeb);
}

.card-invoice{
    background:linear-gradient(135deg, #ede9fe, #f5f3ff);
}

.card-payments{
    background:linear-gradient(135deg, #dcfce7, #f0fdf4);
}

.card-projects:hover{
    background:linear-gradient(135deg, #bfdbfe, #dbeafe);
}

.card-offers:hover{
    background:linear-gradient(135deg, #fde68a, #fef3c7);
}

.card-invoice:hover{
    background:linear-gradient(135deg, #ddd6fe, #ede9fe);
}

.card-payments:hover{
    background:linear-gradient(135deg, #bbf7d0, #dcfce7);
}

/* SEKCJE DASHBOARD */

.dashboard-half{
    border:1px solid rgba(255,255,255,0.8);
    background:rgba(255,255,255,0.85);
    backdrop-filter:blur(8px);
    transition:all 0.2s ease;
}

.dashboard-half:hover{
    box-shadow:0 10px 22px rgba(15,23,42,0.12);
}

/* OGÓLNE KARTY */

.card{
    transition:all 0.2s ease;
}

.card:hover{
    box-shadow:0 8px 18px rgba(15,23,42,0.12);
}

/* TABELE */

table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    overflow:hidden;

    background:white;

    border-radius:18px;

    box-shadow:
        0 6px 18px rgba(15,23,42,0.06),
        0 2px 6px rgba(15,23,42,0.04);

    margin-top:16px;
}

/* NAGŁÓWKI */

table thead th{

    background:linear-gradient(
        180deg,
        #f8fafc,
        #eef2ff
    );

    color:#334155;

    font-size:12px;
    font-weight:800;

    text-transform:uppercase;
    letter-spacing:0.04em;

    padding:18px 16px;

    border-bottom:1px solid #e2e8f0;

    position:sticky;
    top:0;
    z-index:2;
}

/* WIERSZE */

table tbody tr{
    transition:
        background 0.18s ease,
        transform 0.12s ease;
}

/* HOVER */

table tbody tr:hover{
    background:#f8fafc;
}

/* KOMÓRKI */

table td{

    padding:18px 16px;

    border-bottom:1px solid #eef2ff;

    vertical-align:middle;

    font-size:14px;

    color:#0f172a;
}

/* OSTATNI WIERSZ */

table tbody tr:last-child td{
    border-bottom:none;
}

/* PRZYCISKI */

button{
    transition:all 0.2s ease;
}

button:hover{
    transform:translateY(-1px);
    box-shadow:0 4px 10px rgba(15,23,42,0.15);
}

/* MODALE */

.modal-box{
    box-shadow:0 20px 50px rgba(15,23,42,0.25);
    border:1px solid rgba(255,255,255,0.8);
}

.badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
    letter-spacing:0.02em;
}

.badge-offer{
    background:#fef3c7;
    color:#92400e;
}

.badge-realization{
    background:#dbeafe;
    color:#1e40af;
}

.badge-warning{
    background:#ffedd5;
    color:#9a3412;
}

.badge-done{
    background:#dcfce7;
    color:#166534;
}

.badge-lost{
    background:#fee2e2;
    color:#991b1b;
}

.badge-paused{
    background:#e5e7eb;
    color:#374151;
}

.badge-paid{
    background:#dcfce7;
    color:#166534;
}

.badge-overdue{
    background:#fee2e2;
    color:#991b1b;
}

.badge-waiting{
    background:#fef3c7;
    color:#92400e;
}

.badge-neutral{
    background:#e5e7eb;
    color:#374151;
}

.form-modal{
    width:460px;
}

.form-modal h2{
    margin-top:0;
    margin-bottom:10px;
    color:#0f172a;
}

.form-modal label{
    font-size:13px;
    font-weight:700;
    color:#475569;
    margin-top:6px;
}

.form-modal input,
.form-modal select,
.form-modal textarea{
    width:100%;
    box-sizing:border-box;
    border:1px solid #cbd5e1;
    border-radius:10px;
    padding:12px 14px;
    font-size:14px;
    background:#f8fafc;
    transition:all 0.2s ease;
}

.form-modal input:focus,
.form-modal select:focus,
.form-modal textarea:focus{
    outline:none;
    border-color:#2563eb;
    background:white;
    box-shadow:0 0 0 4px rgba(37,99,235,0.12);
}

.form-modal textarea{
    min-height:90px;
}

.form-modal button{
    margin-top:6px;
}

.topbar{
    position:relative;
    z-index:1;
    background:transparent;
    padding:0;
    border-bottom:none;
}

.fade-view{
    opacity:0;
    transform:translateY(8px);
    transition:opacity 0.22s ease, transform 0.22s ease;
}

.fade-view.active-view{
    opacity:1;
    transform:translateY(0);
}

.modal .modal-box{
    animation:modalPop 0.2s ease;
}

@keyframes modalPop{
    from{
        opacity:0;
        transform:scale(0.96) translateY(8px);
    }

    to{
        opacity:1;
        transform:scale(1) translateY(0);
    }
}

tbody tr{
    animation:rowFade 0.18s ease;
}

@keyframes rowFade{
    from{
        opacity:0;
        transform:translateY(4px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}
.view h1{
    margin-bottom:22px;
    color:#0f172a;
    letter-spacing:-0.02em;
}

.view h2{
    margin-bottom:18px;
    color:#0f172a;
}

.filters{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    align-items:center;
}

table td button{

    border:none;

    border-radius:10px;

    padding:10px 14px;

    font-size:13px;
    font-weight:700;

    display:inline-flex;
    align-items:center;
    gap:6px;

    margin-right:6px;

    transition:all 0.18s ease;
}

/* HOVER */

table td button:hover{
    transform:translateY(-1px);
}

/* EDYTUJ */

table td button[onclick*="edit"]{
    background:linear-gradient(
        135deg,
        #2563eb,
        #1d4ed8
    );

    color:white;
}

/* USUŃ */

table td button[onclick*="delete"]{
    background:linear-gradient(
        135deg,
        #dc2626,
        #b91c1c
    ) !important;

    color:white;
}

/* ZAPŁACONE */

.btn-paid{
    background:linear-gradient(
        135deg,
        #16a34a,
        #15803d
    ) !important;

    color:white;
}

.cards{
    gap:20px;
}

.card{
    border-radius:18px;
    overflow:hidden;
}

.card h3{
    font-size:15px;
    margin-bottom:10px;
}

.card p{
    font-size:30px;
}

.content{
    padding:28px;
}

.view{
    padding-bottom:30px;
}

select{
    cursor:pointer;
}

input,
select,
textarea{
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}