* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #172033;
}


/* =========================
   LOGIN
========================= */

.login-page {
    min-height: 100vh;
    background:
        linear-gradient(
            135deg,
            #0f2344 0%,
            #183a6b 55%,
            #2365b3 100%
        );

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
}

.login-wrapper {
    width: 100%;
    max-width: 1050px;

    display: grid;
    grid-template-columns: 1fr 430px;

    gap: 70px;
    align-items: center;
}


/* LIJEVI DIO */

.login-brand {
    color: #ffffff;
}

.brand-logo {
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    color: #1d5ca8;

    font-size: 34px;
    font-weight: bold;

    border-radius: 20px;

    margin-bottom: 25px;
}

.login-brand h1 {
    margin: 0 0 14px;

    font-size: 48px;
    line-height: 1.1;
}

.login-brand p {
    margin: 0;

    max-width: 500px;

    font-size: 19px;
    line-height: 1.6;

    color: rgba(255, 255, 255, 0.82);
}


/* KARTICA ZA PRIJAVU */

.login-card {
    background: #ffffff;

    border-radius: 22px;

    padding: 38px;

    box-shadow:
        0 25px 60px
        rgba(0, 0, 0, 0.20);
}

.login-card-header {
    margin-bottom: 28px;
}

.login-card-header h2 {
    margin: 0 0 8px;

    font-size: 28px;
}

.login-card-header p {
    margin: 0;

    color: #6d7788;

    font-size: 15px;
}


/* FORMA */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;
    font-weight: 600;

    color: #27364d;
}

.form-group input {
    width: 100%;
    height: 50px;

    padding: 0 15px;

    border: 1px solid #d9e0ea;
    border-radius: 10px;

    background: #ffffff;

    font-size: 15px;

    outline: none;

    transition: 0.2s;
}

.form-group input:focus {
    border-color: #2f70c9;

    box-shadow:
        0 0 0 4px
        rgba(47, 112, 201, 0.12);
}


/* GUMB */

.btn-login {
    width: 100%;
    height: 52px;

    border: 0;
    border-radius: 10px;

    background: #2563b8;
    color: #ffffff;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.btn-login:hover {
    background: #1d529a;
}


/* GREŠKA */

.alert {
    padding: 13px 15px;

    border-radius: 9px;

    margin-bottom: 20px;

    font-size: 14px;
}

.alert-error {
    background: #fff0f0;
    color: #b42318;

    border: 1px solid #ffc9c9;
}


/* FOOTER */

.login-footer {
    margin-top: 25px;

    text-align: center;

    font-size: 13px;

    color: #9aa3b1;
}


/* =========================
   MOBITEL
========================= */

@media (max-width: 800px) {

    .login-page {
        padding: 20px;
    }

    .login-wrapper {
        grid-template-columns: 1fr;

        gap: 30px;

        max-width: 450px;
    }

    .login-brand {
        text-align: center;
    }

    .brand-logo {
        margin:
            0 auto
            18px;
    }

    .login-brand h1 {
        font-size: 36px;
    }

    .login-brand p {
        font-size: 16px;
    }

    .login-card {
        padding: 28px 22px;
    }
}

/* =========================
   POSTAVKE UDRUGE
========================= */

.settings-page {
    min-height: 100vh;
    padding: 40px 20px;
    background: #f4f7fb;
}

.settings-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.settings-header h1 {
    margin: 0 0 8px;
}

.settings-header p {
    margin: 0;
    color: #6d7788;
}

.settings-back {
    text-decoration: none;
    color: #2563b8;
    font-weight: 600;
}

.settings-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(22, 34, 55, 0.08);
}

.settings-section {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid #e8edf4;
}

.settings-section:last-of-type {
    border-bottom: 0;
}

.settings-section h2 {
    margin-top: 0;
    margin-bottom: 22px;
    font-size: 19px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.organization-preview {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 16px;
    margin-bottom: 25px;

    background: #f7f9fc;
    border-radius: 14px;
}

.organization-preview strong {
    display: block;
    margin-bottom: 4px;
}

.organization-preview span {
    color: #808a99;
    font-size: 13px;
}

.organization-logo-preview,
.organization-logo-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 16px;
}

.organization-logo-preview {
    object-fit: contain;
    background: #ffffff;
    padding: 6px;
    border: 1px solid #e5eaf1;
}

.organization-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    background: #2563b8;
    color: #ffffff;

    font-size: 28px;
    font-weight: bold;
}

.form-group small {
    display: block;
    margin-top: 7px;
    color: #8791a0;
    font-size: 12px;
}

input[type="color"] {
    width: 90px;
    height: 48px;
    border: 1px solid #d9e0ea;
    border-radius: 10px;
    padding: 5px;
    background: #ffffff;
}

.alert-success {
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #abefc6;
}

@media (max-width: 700px) {

    .settings-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .settings-card {
        padding: 22px;
    }
}
/* =========================
   DINAMIČNA BOJA UDRUGE
========================= */

.login-page {
    background:
        linear-gradient(
            135deg,
            #0f2344 0%,
            var(--primary-color) 100%
        );
}

.brand-logo {
    color: var(--primary-color);
}

.btn-login {
    background: var(--primary-color);
}

.btn-login:hover {
    filter: brightness(0.90);
}

.form-group input:focus {
    border-color: var(--primary-color);

    box-shadow:
        0 0 0 4px
        color-mix(
            in srgb,
            var(--primary-color) 15%,
            transparent
        );
}


/* LOGO UDRUGE */

/* LOGO UDRUGE NA LOGINU */

.login-organization-logo-wrapper {
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border-radius: 16px;

    padding: 8px;

    margin-bottom: 20px;

    box-shadow:
        0 8px 20px
        rgba(0, 0, 0, 0.10);

    overflow: hidden;
}

.login-organization-logo {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 54px;
    max-height: 54px;

    object-fit: contain;
}

@media (max-width: 800px) {

    .login-organization-logo-wrapper {
        width: 64px;
        height: 64px;

        margin:
            0 auto
            16px;
    }

    .login-organization-logo {
        max-width: 48px;
        max-height: 48px;
    }
}

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border-radius: 22px;

    padding: 10px;

    margin-bottom: 25px;

    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, 0.12);
}

.login-organization-logo {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

@media (max-width: 800px) {

    .login-organization-logo-wrapper {
        margin:
            0 auto
            18px;
    }
}
/* =========================
   ADMIN LAYOUT
========================= */

.admin-page {
    margin: 0;
    background: #f4f7fb;
    color: #172033;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
}


/* SIDEBAR */

.sidebar {
    width: 260px;
    min-height: 100vh;

    background: #102343;
    color: #ffffff;

    display: flex;
    flex-direction: column;

    padding: 22px 16px;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 5px 8px 24px;
}

.sidebar-logo,
.sidebar-logo-placeholder {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    border-radius: 12px;
}

.sidebar-logo {
    object-fit: contain;
    background: #ffffff;
    padding: 5px;
}

.sidebar-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary-color);
    color: #ffffff;

    font-weight: 700;
    font-size: 20px;
}

.sidebar-brand-text {
    min-width: 0;
}

.sidebar-brand-text strong {
    display: block;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-brand-text span {
    display: block;

    margin-top: 3px;

    color: rgba(255, 255, 255, 0.55);

    font-size: 12px;
}


/* NAVIGACIJA */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    min-height: 46px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 14px;

    border-radius: 10px;

    color: rgba(255, 255, 255, 0.75);

    text-decoration: none;

    font-size: 14px;

    transition: 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-item.active {
    background: var(--primary-color);
    color: #ffffff;
}

.nav-icon {
    width: 24px;

    text-align: center;

    font-size: 18px;
}


/* USER DOLJE */

.sidebar-bottom {
    margin-top: auto;

    padding-top: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 14px;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary-color);

    font-weight: 700;
}

.sidebar-user-info {
    min-width: 0;
}

.sidebar-user-info strong,
.sidebar-user-info span {
    display: block;
}

.sidebar-user-info strong {
    font-size: 13px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info span {
    margin-top: 2px;

    color: rgba(255, 255, 255, 0.5);

    font-size: 11px;
}

.logout-link {
    display: block;

    color: rgba(255, 255, 255, 0.65);

    text-decoration: none;

    font-size: 13px;
}

.logout-link:hover {
    color: #ffffff;
}


/* DESNI DIO */

.admin-main {
    width: calc(100% - 260px);

    margin-left: 260px;
}


/* TOPBAR */

.topbar {
    min-height: 88px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 32px;

    background: #ffffff;

    border-bottom: 1px solid #e8edf4;
}

.topbar h1 {
    margin: 0 0 5px;

    font-size: 25px;
}

.topbar p {
    margin: 0;

    color: #7a8494;

    font-size: 14px;
}

.topbar-organization {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #465268;

    font-size: 13px;
    font-weight: 600;
}

.topbar-organization img {
    width: 32px;
    height: 32px;

    border-radius: 8px;

    object-fit: contain;

    border: 1px solid #e3e8ef;

    padding: 3px;
}


/* SADRŽAJ */

.dashboard-content {
    padding: 28px 32px 40px;
}

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 22px;
}

.stat-card,
.dashboard-card {
    background: #ffffff;

    border: 1px solid #e7ecf3;

    border-radius: 16px;

    box-shadow:
        0 6px 18px
        rgba(26, 39, 62, 0.04);
}

.stat-card {
    padding: 21px;
}

.stat-card-label {
    color: #738095;

    font-size: 13px;
    font-weight: 600;
}

.stat-card-value {
    margin-top: 10px;

    font-size: 30px;
    font-weight: 700;

    color: #182338;
}

.stat-card-footer {
    margin-top: 8px;

    color: #98a1af;

    font-size: 12px;
}


/* DONJI BLOKOVI */

.dashboard-grid {
    display: grid;

    grid-template-columns: 2fr 1fr;

    gap: 22px;
}

.dashboard-card {
    padding: 22px;
}

.dashboard-card-header h2 {
    margin: 0 0 6px;

    font-size: 18px;
}

.dashboard-card-header p {
    margin: 0;

    color: #8791a0;

    font-size: 13px;
}


/* EMPTY STATE */

.empty-state {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 30px;
}

.empty-state-icon {
    width: 55px;
    height: 55px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 15px;

    border-radius: 50%;

    background: #edf4fd;
    color: var(--primary-color);

    font-size: 24px;
}

.empty-state strong {
    margin-bottom: 7px;
}

.empty-state p {
    max-width: 420px;

    margin: 0;

    color: #8d96a5;

    font-size: 13px;
    line-height: 1.6;
}


/* BRZE RADNJE */

.quick-actions {
    display: grid;
    gap: 11px;

    margin-top: 24px;
}

.quick-actions button {
    width: 100%;
    min-height: 45px;

    border: 1px solid #dfe5ed;
    border-radius: 10px;

    background: #f8fafc;

    color: #8c96a4;

    text-align: left;

    padding: 0 14px;

    font-weight: 600;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 800px) {

    .sidebar {
        width: 78px;

        padding-left: 10px;
        padding-right: 10px;
    }

    .sidebar-brand {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .sidebar-brand-text,
    .nav-item span:not(.nav-icon),
    .sidebar-user-info,
    .logout-link {
        display: none;
    }

    .nav-item {
        justify-content: center;

        padding: 0;
    }

    .nav-icon {
        width: auto;
    }

    .sidebar-user {
        justify-content: center;
    }

    .admin-main {
        width: calc(100% - 78px);
        margin-left: 78px;
    }

    .topbar {
        padding:
            16px 20px;
    }

    .topbar-organization span {
        display: none;
    }

    .dashboard-content {
        padding:
            20px;
    }
}


@media (max-width: 560px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
    }
}
/* =========================
   ČLANOVI
========================= */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 18px;

    background: var(--primary-color);
    color: #ffffff;

    text-decoration: none;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    transition: 0.2s;
}

.btn-primary:hover {
    filter: brightness(0.92);
}

.members-card {
    background: #ffffff;

    border: 1px solid #e7ecf3;
    border-radius: 16px;

    box-shadow:
        0 6px 18px
        rgba(26, 39, 62, 0.04);

    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.members-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 14px;
}

.members-table th,
.members-table td {
    padding: 16px 18px;

    text-align: left;

    border-bottom: 1px solid #edf0f4;

    vertical-align: middle;
}

.members-table th {
    background: #f8fafc;

    color: #667085;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.members-table tbody tr:hover {
    background: #fafbfd;
}

.members-table tbody tr:last-child td {
    border-bottom: 0;
}

.member-public-id {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 7px;

    background: #f0f4f9;

    color: #475467;

    font-family: monospace;
    font-size: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;

    padding: 6px 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}

.status-active {
    background: #ecfdf3;
    color: #027a48;
}

.status-inactive {
    background: #f2f4f7;
    color: #667085;
}

.status-pending {
    background: #fffaeb;
    color: #b54708;
}

@media (max-width: 700px) {

    .members-table {
        min-width: 800px;
    }

    .topbar {
        gap: 12px;
    }

    .btn-primary {
        padding: 0 13px;
        font-size: 13px;
    }
}
/* =========================
   FORMA ČLANA
========================= */

.member-form-card {
    max-width: 900px;

    background: #ffffff;

    border: 1px solid #e7ecf3;
    border-radius: 16px;

    padding: 28px;

    box-shadow:
        0 6px 18px
        rgba(26, 39, 62, 0.04);
}

.member-form-section {
    padding-bottom: 25px;
    margin-bottom: 25px;

    border-bottom: 1px solid #edf0f4;
}

.member-form-section:last-of-type {
    border-bottom: 0;
}

.member-form-section h2 {
    margin: 0 0 20px;

    font-size: 18px;
}

.member-form-card select,
.member-form-card textarea {
    width: 100%;

    padding: 13px 15px;

    border: 1px solid #d9e0ea;
    border-radius: 10px;

    background: #ffffff;

    font-family: inherit;
    font-size: 15px;

    outline: none;
}

.member-form-card select {
    height: 50px;
}

.member-form-card textarea {
    resize: vertical;
}

.member-form-card select:focus,
.member-form-card textarea:focus {
    border-color: var(--primary-color);
}

.member-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 12px;

    margin-top: 10px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 18px;

    border: 1px solid #d9e0ea;
    border-radius: 10px;

    background: #ffffff;
    color: #475467;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #f8fafc;
}

.form-submit-button {
    border: 0;
    cursor: pointer;
}
/* =========================
   RADNJE ČLANA
========================= */

.member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-edit-button,
.member-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 0 11px;

    border-radius: 8px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;
}

.member-edit-button {
    border: 1px solid #d5deea;

    background: #ffffff;

    color: #344054;
}

.member-edit-button:hover {
    background: #f8fafc;
}

.member-delete-form {
    margin: 0;
}

.member-delete-button {
    border: 1px solid #fecdca;

    background: #fff5f5;

    color: #b42318;
}

.member-delete-button:hover {
    background: #fee4e2;
}