* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f6f6f8;
    color: #17171a;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Login ---------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(160deg, #111 0%, #2b2b2f 100%);
}

.login-box {
    background: #fff;
    padding: 40px 36px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 340px;
}

.login-box h1 { font-size: 20px; margin: 0 0 20px; text-align: center; }

.site-logo {
    display: block;
    max-width: 140px;
    max-height: 70px;
    margin: 0 auto 24px;
    object-fit: contain;
}

.site-logo-header {
    max-height: 32px;
    max-width: 150px;
    object-fit: contain;
}

/* ---------- Admin header/nav ---------- */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 14px 32px;
    border-bottom: 1px solid #ececef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-header nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    color: #666;
}

.admin-main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 36px 24px 60px;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-toolbar h2 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }

/* ---------- Forme ---------- */
label { display: block; font-size: 12.5px; font-weight: 700; margin: 16px 0 6px; color: #555; text-transform: uppercase; letter-spacing: 0.02em; }

input[type=text], input[type=password], textarea, input[type=number] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e5ea;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fafafa;
    transition: border-color 0.15s ease, background 0.15s ease;
}

input[type=text]:focus, input[type=password]:focus, textarea:focus, input[type=number]:focus {
    outline: none;
    border-color: #17171a;
    background: #fff;
}

input[type=color] {
    width: 60px;
    height: 38px;
    border: 1.5px solid #e5e5ea;
    border-radius: 10px;
    padding: 2px;
    background: #fafafa;
}

.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 400; text-transform: none; font-size: 14px; margin-top: 14px; }
.checkbox-label input { width: auto; }

/* ---------- Dugmad ---------- */
.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #e5e5ea;
    background: #fff;
    color: #17171a;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #f4f4f6; }

.btn-primary { background: #17171a; color: #fff; border-color: #17171a; }
.btn-primary:hover { background: #000; box-shadow: 0 6px 16px rgba(0,0,0,0.2); }

.btn-small { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-danger { color: #d3352c; border-color: #f5d4d1; background: #fff5f4; }
.btn-danger:hover { background: #ffe9e7; }

/* ---------- Poruke ---------- */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.alert-error { background: #fdecea; color: #c0392b; }
.alert-success { background: #e9faf0; color: #1e8449; }

.empty-state { color: #999; font-size: 14px; }

/* ---------- Kartice klijenata ---------- */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.client-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f2;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.client-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.09); transform: translateY(-2px); }

.client-card-top {
    height: 62px;
    display: flex;
    align-items: flex-end;
    padding: 0 18px;
}

.client-avatar-sm {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    transform: translateY(27px);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.client-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #555;
}

.client-card-body { padding: 36px 18px 18px; }
.client-card-body h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; }
.client-link { font-size: 12px; color: #888; word-break: break-all; text-decoration: none; }
.client-link:hover { color: #17171a; text-decoration: underline; }
.client-status { font-size: 12px; margin: 10px 0; font-weight: 700; }
.status-active { color: #1e8449; }
.status-inactive { color: #999; }
.client-card-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- Forme za klijenta ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 800px) {
    .two-col { grid-template-columns: 1fr; }
}

.card-form {
    background: #fff;
    padding: 26px;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f2;
}

.card-form h3 { margin-top: 0; font-size: 16px; }

.slug-preview {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #888;
}
.slug-preview input { flex: 1; }

.link-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.link-row input[type=text] { flex: 1; }
.sort-input { width: 60px !important; flex: none; }

.icon-select {
    padding: 9px 6px;
    border: 1.5px solid #e5e5ea;
    border-radius: 8px;
    font-size: 13px;
    max-width: 100px;
    background: #fafafa;
}

hr { border: none; border-top: 1px solid #eee; margin: 20px 0; }

.image-preview {
    display: block;
    margin-bottom: 8px;
    background: #f0f0f0;
    border: 1px solid #e5e5ea;
}
.image-preview-round {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}
.image-preview-banner {
    width: 100%;
    max-width: 300px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

input[type=file] {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed #d5d5da;
    border-radius: 10px;
    font-size: 13px;
    background: #fafafa;
}

.hint-text {
    font-size: 12px;
    color: #999;
    margin-top: 12px;
}

.empty-state-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: #999;
    font-size: 14px;
    text-align: center;
}
