* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 24px;
}

h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74,144,217,0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
    line-height: 1.5;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.char-counter.warn {
    color: #e67e22;
}

.char-counter.over {
    color: #e74c3c;
    font-weight: bold;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #2c7be5;
    color: #fff;
}

.btn-primary:hover {
    background: #1a63c5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44,123,229,0.3);
}

.btn-secondary {
    background: #f0f2f5;
    color: #555;
    border: 1.5px solid #ddd;
}

.btn-secondary:hover {
    background: #e4e6ea;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #1e8449;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Tablica proizvoda */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

table tr:hover td {
    background: #fafbff;
}

table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #e8f4fd;
    color: #2c7be5;
}

.nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    border: 1.5px solid #ddd;
    background: #fff;
    transition: all 0.2s;
}

.nav a:hover,
.nav a.active {
    background: #2c7be5;
    color: #fff;
    border-color: #2c7be5;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

.alert-error {
    background: #fdedec;
    color: #c0392b;
    border: 1px solid #f1948a;
}

.logo-preview {
    max-height: 60px;
    max-width: 120px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
    margin-top: 8px;
}

/* Preview naljepnice */
.label-preview {
    width: 270px;
    height: 320px;
    border: 2px solid #333;
    border-radius: 4px;
    padding: 10px;
    background: #fff;
    font-family: Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

.label-preview .preview-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.label-preview .preview-logo {
    flex: 1;
}

.label-preview .preview-logo img {
    max-height: 45px;
    max-width: 80px;
}

.label-preview .preview-opg {
    font-size: 8px;
    margin-top: 2px;
    color: #333;
}

.label-preview .preview-ellipse {
    width: 64px;
    height: 50px;
    border: 1.5px solid #333;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    line-height: 1.4;
    flex-shrink: 0;
}

.label-preview .preview-content {
    font-size: 9px;
    line-height: 1.5;
}

.label-preview .preview-naziv {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 3px;
}

.label-preview .preview-footer {
    position: absolute;
    bottom: 8px;
    left: 10px;
    right: 10px;
    font-size: 8px;
    line-height: 1.5;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
    padding: 8px 14px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.empty-state .empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}
