:root{
    --bg:#071827;
    --card:#0f2436;
    --text:#f2f7fb;
    --muted:#9fb2c2;
    --accent:#21d4c2;
    --bad:#e05252;
    --warn:#f0b429;
    --good:#37c978;
    --sidebar:#0b1f30;
    --sidebar-hover:#17364d;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    background:linear-gradient(135deg,#06131f,#0a2133);
    color:var(--text);
}

.app{
    max-width:1400px;
    margin:0 auto;
    padding:18px;
}

.login-card,
.card{
    background:rgba(15,36,54,.94);
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    padding:22px;
    margin:14px 0;
    box-shadow:0 12px 30px rgba(0,0,0,.22);
}

.login-card{
    max-width:420px;
    margin:12vh auto;
}

.brand{
    font-size:42px;
    font-weight:800;
    letter-spacing:.5px;
}

.subtitle{
    color:var(--muted);
    margin:8px 0 22px;
}

label{
    display:block;
    margin:14px 0 6px;
    color:var(--muted);
}

input,
textarea,
select{
    width:100%;
    padding:13px 14px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.15);
    background:#071827;
    color:var(--text);
    font-size:16px;
}

input:focus,
textarea:focus,
select:focus{
    outline:none;
    border-color:rgba(33,212,194,.75);
    box-shadow:0 0 0 3px rgba(33,212,194,.10);
}

textarea{
    min-height:90px;
}

button,
input,
textarea,
select{
    font-family:inherit;
}

.btn{
    display:inline-block;
    background:var(--accent);
    color:#03201d;
    border:0;
    padding:12px 16px;
    border-radius:12px;
    text-decoration:none;
    font-weight:700;
    cursor:pointer;
    margin-top:14px;
    transition:filter .15s ease,transform .15s ease;
}

.btn:hover{
    filter:brightness(1.05);
    transform:translateY(-1px);
}

.btn:disabled{
    opacity:.55;
    cursor:not-allowed;
    transform:none;
}

.btn.secondary{
    background:#27455d;
    color:var(--text);
}

.btn.small{
    padding:9px 12px;
    font-size:14px;
    margin:2px;
}

.topbar{
    display:flex;
    gap:14px;
    align-items:center;
    justify-content:space-between;
    background:#0b1f30;
    border-radius:16px;
    padding:14px 16px;
    margin-bottom:14px;
}

.topbar a{
    color:var(--accent);
    text-decoration:none;
    font-weight:700;
}

/* ČLANSKA NAVIGACIJA */

.member-nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    background:#0f2436;
    border:1px solid rgba(255,255,255,.08);
    border-radius:16px;
    padding:16px 20px;
    margin-bottom:18px;
    box-shadow:0 12px 30px rgba(0,0,0,.18);
}

.member-nav .brand{
    font-size:22px;
    line-height:1;
    white-space:nowrap;
}

.member-nav-links{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:8px;
}

.member-nav-links a{
    display:inline-block;
    color:var(--accent);
    text-decoration:none;
    font-weight:700;
    padding:9px 11px;
    border-radius:10px;
    transition:background .15s ease,color .15s ease;
}

.member-nav-links a:hover{
    background:rgba(33,212,194,.12);
    color:#fff;
}

.member-nav-links a.active{
    background:var(--accent);
    color:#03201d;
}

/* ADMIN RASPORED */

.shell{
    display:grid;
    grid-template-columns:240px minmax(0,1fr);
    gap:22px;
    align-items:start;
    min-height:calc(100vh - 36px);
}

.sidebar{
    position:sticky;
    top:18px;
    display:flex;
    flex-direction:column;
    gap:6px;
    min-height:calc(100vh - 36px);
    padding:18px;
    background:rgba(11,31,48,.96);
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    box-shadow:0 12px 30px rgba(0,0,0,.22);
}

.sidebar-brand{
    font-size:26px;
    line-height:1.1;
    font-weight:800;
    letter-spacing:.6px;
    padding:8px 10px 18px;
    margin-bottom:6px;
    border-bottom:1px solid rgba(255,255,255,.09);
}

.nav-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    width:100%;
    padding:12px 13px;
    border-radius:11px;
    color:#dce7ef;
    text-decoration:none;
    font-weight:700;
    transition:background .15s ease,color .15s ease;
}

a.nav-item:hover{
    background:var(--sidebar-hover);
    color:#fff;
}

.nav-item.active{
    background:var(--accent);
    color:#03201d;
}

.nav-item.disabled{
    color:#758d9f;
    cursor:default;
}

.nav-item small{
    font-size:11px;
    font-weight:700;
    color:#7e99aa;
}

.nav-item.active small{
    color:#07483f;
}

.nav-item.logout{
    margin-top:auto;
    color:#ff8e8e;
}

.nav-item.logout:hover{
    background:rgba(224,82,82,.15);
    color:#ffb0b0;
}

.content{
    min-width:0;
}

.page-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
    flex-wrap:wrap;
    margin:4px 0 18px;
}

.page-head h1{
    margin:0 0 6px;
    font-size:36px;
}

.page-head p{
    margin:0;
    color:var(--muted);
}

.head-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.head-actions .btn,
.page-head > .btn{
    margin-top:0;
}

.quick-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.quick-actions .btn{
    margin-top:0;
}

.form-card{
    max-width:900px;
}

.detail-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    padding:14px;
    margin-bottom:15px;
    background:#071827;
    border-radius:12px;
}

.detail-row span{
    color:var(--muted);
}

.detail-row strong{
    text-align:right;
}

/* OPĆE KOMPONENTE */

.grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
}

.stat span{
    display:block;
    color:var(--muted);
    font-size:14px;
}

.stat b{
    display:block;
    font-size:30px;
    margin-top:8px;
}

.stat-link{
    color:var(--text);
    text-decoration:none;
    transition:transform .15s ease,border-color .15s ease;
}

.stat-link:hover{
    transform:translateY(-2px);
    border-color:rgba(33,212,194,.55);
}

.alert{
    padding:12px;
    border-radius:12px;
    margin:12px 0;
}

.alert.bad{
    background:rgba(224,82,82,.15);
    border:1px solid rgba(224,82,82,.4);
}

.alert.good{
    background:rgba(55,201,120,.15);
    border:1px solid rgba(55,201,120,.4);
}

.pill{
    display:inline-block;
    padding:7px 10px;
    border-radius:99px;
    font-weight:700;
    margin-right:8px;
}

.pill.good{
    background:rgba(55,201,120,.15);
    color:var(--good);
}

.pill.warn{
    background:rgba(240,180,41,.15);
    color:var(--warn);
}

.pill.bad{
    background:rgba(224,82,82,.15);
    color:var(--bad);
}

.pill.neutral{
    background:rgba(159,178,194,.14);
    color:#c9d5df;
}

.muted{
    color:var(--muted);
}

.member-row{
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:center;
}

.member-row h3{
    margin:0 0 6px;
}

.member-row p{
    margin:0 0 10px;
    color:var(--muted);
}

.credentials{
    background:#071827;
    border-radius:12px;
    padding:15px;
    font-size:18px;
    line-height:1.8;
}

.search{
    display:flex;
    gap:8px;
}

.search .btn{
    margin-top:0;
}

.hero h1{
    margin-top:0;
}

.big{
    font-size:20px;
}

hr{
    border:0;
    border-top:1px solid rgba(255,255,255,.1);
    margin:22px 0;
}

.filter-row{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:15px;
}

.filter-btn{
    display:inline-block;
    padding:9px 12px;
    border-radius:10px;
    background:#203d54;
    color:var(--text);
    text-decoration:none;
    font-weight:700;
}

.filter-btn.selected{
    background:var(--accent);
    color:#03201d;
}

.month-choice{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
    margin:8px 0 18px;
}

.month-choice label{
    margin:0;
    padding:12px;
    border-radius:12px;
    background:#071827;
    cursor:pointer;
}

.month-choice input{
    width:auto;
    margin-right:6px;
}

/* TABLETI */

@media(max-width:1050px){
    .shell{
        grid-template-columns:210px minmax(0,1fr);
        gap:16px;
    }

    .sidebar{
        padding:14px;
    }

    .sidebar-brand{
        font-size:23px;
    }
}

@media(max-width:900px){
    .shell{
        display:block;
    }

    .sidebar{
        position:static;
        min-height:auto;
        display:flex;
        flex-direction:row;
        align-items:center;
        flex-wrap:wrap;
        gap:7px;
        margin-bottom:18px;
    }

    .sidebar-brand{
        width:100%;
        padding:4px 6px 14px;
        margin-bottom:2px;
    }

    .nav-item{
        width:auto;
        padding:10px 12px;
    }

    .nav-item.logout{
        margin-top:0;
        margin-left:auto;
    }
}

@media(max-width:800px){
    .grid{
        grid-template-columns:1fr 1fr;
    }

    .member-row{
        display:block;
    }

    .actions{
        margin-top:12px;
    }

    .month-choice{
        grid-template-columns:1fr 1fr;
    }

    .member-nav{
        align-items:flex-start;
    }

    .page-head h1{
        font-size:31px;
    }
}

@media(max-width:650px){
    .member-nav{
        display:block;
        padding:16px;
    }

    .member-nav .brand{
        margin-bottom:12px;
    }

    .member-nav-links{
        justify-content:flex-start;
        gap:6px;
    }

    .member-nav-links a{
        padding:8px 9px;
        font-size:14px;
    }

    .sidebar{
        display:block;
    }

    .sidebar-brand{
        width:auto;
    }

    .nav-item{
        width:100%;
        margin-bottom:5px;
    }

    .nav-item.logout{
        margin-left:0;
    }

    .page-head{
        display:block;
    }

    .page-head .head-actions,
    .page-head > .btn{
        margin-top:14px;
    }

    .detail-row{
        display:block;
    }

    .detail-row strong{
        display:block;
        margin-top:6px;
        text-align:left;
    }
}

@media(max-width:520px){
    .grid{
        grid-template-columns:1fr;
    }

    .brand{
        font-size:34px;
    }

    .topbar{
        display:block;
    }

    .topbar a{
        display:inline-block;
        margin:8px 10px 0 0;
    }

    .search{
        display:block;
    }

    .search .btn{
        margin-top:10px;
    }

    .month-choice{
        grid-template-columns:1fr;
    }

    .app{
        padding:12px;
    }

    .card,
    .login-card{
        padding:18px;
        border-radius:15px;
    }

    .member-nav-links a{
        width:auto;
    }

    .page-head h1{
        font-size:28px;
    }
}