:root {
    --bar-bg: #f4f6f8;
    --bar-card: #fff;
    --bar-text: #1a1a1a;
    --bar-muted: #5c6670;
    --bar-accent: #2d7a4f;
    --bar-accent-hover: #256641;
    --bar-danger: #b42318;
    --bar-ok: #067647;
    --bar-border: #d0d7de;
    --bar-radius: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.bar-body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    line-height: 1.4;
    color: var(--bar-text);
    background: var(--bar-bg);
}

.bar-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

.bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bar-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.bar-logout {
    font-size: 0.95rem;
    color: var(--bar-muted);
    text-decoration: none;
}

.bar-card {
    background: var(--bar-card);
    border: 1px solid var(--bar-border);
    border-radius: var(--bar-radius);
    padding: 1.25rem;
}

.bar-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bar-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bar-input {
    width: 100%;
    padding: 0.75rem 0.85rem;
    font-size: 1.05rem;
    border: 1px solid var(--bar-border);
    border-radius: 8px;
    background: #fff;
}

.bar-input:focus {
    outline: 2px solid var(--bar-accent);
    outline-offset: 1px;
    border-color: var(--bar-accent);
}

.bar-input--mono {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    letter-spacing: 0.05em;
}

.bar-btn {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #e8ecef;
    color: var(--bar-text);
    cursor: pointer;
}

.bar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bar-btn--primary {
    background: var(--bar-accent);
    color: #fff;
}

.bar-btn--primary:hover:not(:disabled) {
    background: var(--bar-accent-hover);
}

.bar-alert {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.bar-alert--error {
    background: #fef3f2;
    color: var(--bar-danger);
    border: 1px solid #fecdca;
}

.bar-alert--ok {
    background: #ecfdf3;
    color: var(--bar-ok);
    border: 1px solid #abefc6;
}

.bar-suggest {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--bar-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bar-suggest li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #eef1f4;
    font-size: 0.85rem;
    line-height: 1.35;
}

.bar-suggest li:last-child {
    border-bottom: none;
}

.bar-suggest li:hover,
.bar-suggest li[aria-selected="true"] {
    background: #f0f7f3;
}

.bar-suggest-naziv {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.bar-suggest .bar-sifra {
    display: block;
    color: var(--bar-muted);
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.bar-selected {
    margin: 0;
    padding: 0.5rem 0.75rem;
    background: #f0f7f3;
    border-radius: 8px;
    font-size: 0.95rem;
}

.bar-selected strong {
    display: block;
}

.bar-hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--bar-muted);
    line-height: 1.35;
}

.bar-hint--error {
    color: var(--bar-danger);
}
