:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --primary: #111827;
    --primary-hover: #1f2937;
    --success-soft: #d1fae5;
    --success: #16a34a;
    --success-dark: #065f46;
    --danger-soft: #fee2e2;
    --danger: #ef4444;
    --danger-dark: #991b1b;
    --sent-soft: #ecfdf5;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover,
button[type="submit"]:hover {
    background: var(--primary-hover);
}

.btn:active,
button[type="submit"]:active {
    transform: translateY(1px);
}

.btn,
.form-grid button[type="submit"],
.motif-form button[type="submit"],
.login-card button[type="submit"] {
    background: var(--primary);
    color: #fff;
}
.btn-remove-order {
    background: #dc2626;
    color:#fff;
    font-size:22px;
    line-height:1;
}
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-light:hover {
    background: var(--surface-2);
}

.btn-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-pdf:hover {
    background: #1d4ed8;
}

.logout-btn,
.adminbtn {
    padding: 8px 14px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.logout-btn {
    background: #ef4444;
}

.logout-btn:hover {
    background: #dc2626;
}

.adminbtn {
    background: #1ed44e;
}

.adminbtn:hover {
    background: #1cbd47;
}

/* LAYOUT */
.wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 18px 48px;
}

.title {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 15px;
}

.admin-section {
    margin-top: 30px;
}

/* TOPBAR */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.topbar-logo span {
    color: #22c55e;
}

.topbar-menu {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-menu a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.topbar-menu a:hover {
    background: #1f2937;
    color: #fff;
}

/* CARDS */
.card,
.stat-card {
    background: var(--surface);
    border: 1px solid rgba(17, 24, 39, 0.05);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    padding: 22px;
}

.stat-card {
    padding: 20px;
}

.card h2,
.stat-card h2 {
    margin-top: 0;
}

/* DASHBOARD */
.stats {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

.dashboard-top {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

.stat-card small,
.stats-main-card small,
.stat-block small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card small {
    margin-bottom: 6px;
}

.stat-card strong {
    display: block;
    margin-bottom: 14px;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.chart-stat-card {
    width: 100%;
    height: 100%;
}

.chart-stat-card .chart-box {
    height: 100%;
    min-height: 220px;
}

.stats-main-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 22px;
}

.stat-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.stat-block small {
    margin: 0 0 4px;
}

.stat-block strong {
    display: block;
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat-red {
    color: red;
    font-size: 16px;
    font-weight: 700;
    margin-left: 1px;
}

.stat-sub {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    line-height: 1.2;
}

.stat-tight {
    display: block;
    margin-top: -2px;
    line-height: 1;
}

.revenue-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.revenue-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.revenue-card-header h2 {
    margin: 0;
    font-size: 22px;
}

.revenue-card-header span {
    color: var(--muted);
    font-size: 14px;
}

.revenue-chart-box {
    flex: 1;
    min-height: 240px;
}

/* HOME */
.home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.box-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 20px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.box-link:hover {
    transform: translateY(-4px);
    border-color: rgba(17, 24, 39, 0.12);
    box-shadow: var(--shadow-hover);
}

/* TABLES */
.table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-2);
    color: #374151;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr {
    background: #fff;
    transition: background 0.15s ease;
}

tbody tr:hover td {
    background: #f9fbff;
}

td img {
    border-radius: 10px;
    object-fit: cover;
}

.empty {
    padding: 12px 0;
    color: var(--muted);
    text-align: center;
}

/* FORMS */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    height: 48px;
    padding: 12px 14px;
    border: 1px solid #d7dde7;
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.15);
    background: #fff;
}

input[type="file"] {
    height: auto;
    padding: 12px;
}

/* ALERTS */
.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
}

.alert-success {
    background: #ecfdf5;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

/* ORDERS */
.orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.orders-header h2 {
    margin: 0;
}

.orders-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.orders-search input {
    width: 320px;
    max-width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d7dde7;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
}

.orders-search button {
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.orders-search button:hover {
    background: #1f2937;
}

.status-cell {
    min-width: 230px;
}

.status-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.status-actions form {
    display: inline-block;
    margin: 0;
}

.status-btn,
.status-actions .status-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s ease;
}

.status-poslato,
.status-actions button.status-btn.status-poslato {
    background: #bbf7d0;
    color: #065f46;
}

.status-poslato:hover,
.status-actions button.status-btn.status-poslato:hover {
    background: #86efac;
    color: #064e3b;
}

.status-naplaceno,
.status-actions button.status-btn.status-naplaceno {
    background: #16a34a;
    color: #fff;
}

.status-naplaceno:hover,
.status-actions button.status-btn.status-naplaceno:hover {
    background: #15803d;
    color: #fff;
}

.status-odbijeno,
.status-actions button.status-btn.status-odbijeno {
    background: #ef4444;
    color: #fff;
}

.status-odbijeno:hover,
.status-actions button.status-btn.status-odbijeno:hover {
    background: #dc2626;
    color: #fff;
}

.row-default td {
    background: #fff;
}

.row-poslato td {
    background: var(--sent-soft);
}

.row-naplaceno td {
    background: #dcfce7;
}

.row-odbijeno td {
    background: #fee2e2;
}

.customer-name-btn {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.customer-name-btn:hover {
    color: #1d4ed8;
}

.motif-cell {
    position: relative;
    overflow: visible;
    min-width: 140px;
    text-align: center;
}

.motif-hover {
    position: relative;
    display: inline-block;
}

.motif-text {
    position: relative;
    z-index: 2;
    font-weight: 600;
    cursor: pointer;
}

.motif-preview {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    z-index: 9999;
    width: 220px;
    max-width: 220px;
    height: auto;
    padding: 6px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.motif-hover:hover .motif-preview {
    opacity: 1;
    visibility: visible;
}

.circle {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.white {
    background: #fff;
    border: 1px solid #999;
}

.black {
    background: #000;
}

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination-info {
    color: #6b7280;
    font-size: 14px;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.page-btn:hover {
    background: #f3f4f6;
}

.page-btn.active {
    background: #111827;
    color: #fff;
}

.page-dots {
    padding: 8px 4px;
    color: #6b7280;
    font-weight: 600;
}

/* MOTIFS */
.motif-form {
    display: grid;
    grid-template-columns: 1.3fr 1.2fr 1fr 1.2fr auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.btn-group button {
    width: 100%;
    min-width: 140px;
}

/* CHARTS */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.chart-card {
    padding: 20px;
}

.chart-box {
    position: relative;
    width: 100%;
    height: 320px;
}

.small-chart {
    height: 150px;
}

.full-width {
    grid-column: 1 / -1;
}

/* LOGIN */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 30px;
    border: 1px solid rgba(17, 24, 39, 0.05);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-hover);
}

.login-card h1 {
    margin: 0 0 10px;
    font-size: 30px;
    letter-spacing: -0.02em;
}

.login-card p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 15px;
}

.login-card .btn {
    width: 100%;
    margin-top: 14px;
}

/* ORDER MODAL */
.order-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
}

.order-modal.show {
    display: flex;
}

.order-modal-box {
    position: relative;
    width: 95%;
    max-width: 500px;
    max-height: 85vh;
    padding: 20px;
    overflow-y: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.order-modal-box h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.order-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #f3f4f6;
    color: #111827;
    font-size: 24px;
    cursor: pointer;
}

.order-modal-close:hover {
    background: #e5e7eb;
}

.order-modal-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-detail-item {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    text-align: left;
    white-space: normal;
    word-break: break-word;
}

.order-modal-image-wrap {
    margin-bottom: 6px;
    text-align: center;
}

.order-modal-image {
    max-width: 100%;
    max-height: 220px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    object-fit: contain;
}

/* STOCK */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
    align-items: start;
}

.stock-grid .card,
.stock-grid .table-wrap {
    width: 100%;
    overflow: hidden;
}

.stock-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}

.stock-table th,
.stock-table td {
    width: 50%;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: normal;
}

.stock-table th {
    position: static;
    top: auto;
    text-align: left;
}

.stock-table td:first-child,
.stock-table th:first-child {
    text-align: left;
}

.stock-table td:last-child,
.stock-table th:last-child {
    text-align: center;
}

.stock-input {
    width: 72px;
    max-width: 100%;
    height: 40px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.stock-input:invalid {
    border-color: red;
}

/* EXPENSES */
.expense-form-grid {
    display: grid;
    grid-template-columns: 1fr 180px 180px 1.5fr auto;
    gap: 16px;
    align-items: end;
}

.expense-form-grid label,
.expenses-filter-grid label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.expense-form-submit {
    display: flex;
    align-items: end;
    height: 100%;
}

.expenses-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.expenses-topbar h3 {
    margin: 0;
}

.expenses-total {
    color: var(--muted);
    font-size: 14px;
}

.expenses-load-all {
    margin-top: 14px;
    text-align: center;
}

.load-all-link {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.load-all-link:hover {
    background: var(--surface-2);
}

.expenses-filter-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 140px 140px auto;
    gap: 16px;
    align-items: end;
}

.expenses-filter-actions {
    display: flex;
    align-items: end;
    gap: 10px;
}

.expenses-filter-actions .expense-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    outline: none;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

.expenses-filter-actions .expense-filter-btn:hover {
    background: #1f2937;
}

.expenses-filter-actions .expense-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* MOCKUP */
.mockup-editor {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 22px;
    align-items: start;
}

.mockup-controls,
.mockup-preview-card {
    min-width: 0;
}

.mockup-controls h2,
.mockup-preview-card h2 {
    margin-top: 0;
    margin-bottom: 18px;
}

.mockup-form-group {
    margin-bottom: 18px;
}

.mockup-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.mockup-form-group input[type="range"] {
    width: 100%;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.mockup-stage-wrap {
    width: 100%;
    overflow: hidden;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
}

.mockup-stage {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    overflow: hidden;
}

.shirt-base {
    display: block;
    width: 100%;
    height: auto;
    max-height: 55vh;
    margin: 0 auto;
    object-fit: contain;
}

.design-overlay {
    position: absolute;
    top: 45%;
    left: 50%;
    width: 180px;
    max-width: 40%;
    height: auto;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .motif-form,
    .expense-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .expense-form-submit {
        grid-column: 1 / -1;
    }

    .mockup-editor {
        grid-template-columns: 1fr;
    }

    .mockup-stage {
        max-width: 480px;
    }
}

@media (max-width: 980px) {
    .stock-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-top {
        grid-template-columns: 1fr;
    }

    .stats-main-card,
    .revenue-card {
        min-height: auto;
    }

    .revenue-chart-box {
        min-height: 260px;
    }

    .expenses-filter-grid {
        grid-template-columns: 1fr;
    }

    .expenses-filter-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .topbar-menu {
        flex-wrap: wrap;
        gap: 10px;
    }

    .wrapper {
        padding: 18px 12px 34px;
    }

    .title {
        font-size: 25px;
    }

    .subtitle {
        margin-bottom: 20px;
        font-size: 14px;
    }

    .card,
    .stat-card {
        padding: 16px;
        border-radius: 16px;
    }

    .card h2 {
        margin-bottom: 10px;
        font-size: 22px;
    }

    .stats,
    .home-grid,
    .charts-grid,
    .form-grid,
    .motif-form,
    .dashboard-top {
        grid-template-columns: 1fr;
    }

    .stats-main-card {
        gap: 18px;
    }

    .stat-block {
        gap: 4px;
    }

    .stat-card strong,
    .stat-block strong {
        font-size: 24px;
        line-height: 1.2;
        word-break: break-word;
    }

    .stat-red {
        font-size: 17px;
        margin-left: 6px;
    }

    .stat-sub {
        font-size: 16px;
    }

    .box-link {
        min-height: 110px;
        border-radius: 18px;
        font-size: 17px;
    }

    .chart-box {
        height: 260px;
    }

    .small-chart {
        height: 180px;
    }

    .full-width {
        grid-column: auto;
    }

    table {
        min-width: 900px;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 13px;
    }

    input,
    select {
        height: 46px;
        font-size: 16px;
    }

    .btn,
    button[type="submit"] {
        width: 100%;
    }

    .orders-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 12px;
    }

    .orders-search {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        width: 100%;
        margin-left: 0;
        gap: 10px;
    }

    .orders-search input {
        width: 100%;
        min-width: 0;
        height: 46px;
        border-radius: 14px;
        font-size: 16px;
    }

    .orders-search button,
    .orders-search button[type="submit"] {
        width: auto;
        min-width: 110px;
        height: 46px;
        padding: 0 16px;
        border-radius: 14px;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .status-cell {
        min-width: 210px;
    }

    .motif-text {
        white-space: normal;
        word-break: break-word;
    }

    .login-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .login-card h1 {
        font-size: 26px;
    }

    .order-modal {
        padding: 12px;
    }

    .order-modal-box {
        padding: 18px;
        border-radius: 16px;
    }

    .order-modal-box h2 {
        font-size: 20px;
    }

    .mockup-editor {
        grid-template-columns: 1fr;
    }

    .mockup-controls {
        order: 2;
    }

    .mockup-preview-card {
        order: 1;
    }

    .mockup-stage {
        max-width: 100%;
    }

    .shirt-base {
        max-height: 45vh;
    }

    .design-overlay {
        max-width: 40%;
    }

    .mockup-stage-wrap {
        padding: 6px;
    }
}

@media (max-width: 700px) {
    .expense-form-grid {
        grid-template-columns: 1fr;
    }

    .expenses-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 22px;
    }

    .box-link {
        min-height: 92px;
        padding: 14px;
        font-size: 15px;
    }

    .table-wrap {
        margin: 0 -4px;
    }

    .topbar a {
        font-size: 12px;
    }
}

@media (hover: none), (pointer: coarse) {
    .motif-preview,
    .motif-hover:hover .motif-preview,
    .motif-hover:active .motif-preview,
    .motif-hover:focus .motif-preview {
        display: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu-overlay {
    display: none;
}

.mobile-actions {
    display: none;
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .topbar-right {
        display: none;
    }

    .topbar-menu {
        position: fixed;
        top: 0;
        right: -320px;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        padding: 80px 18px 20px;
        background: #ffffff;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        transition: right 0.28s ease;
        z-index: 2000;
        overflow-y: auto;
        flex-wrap: nowrap;
    }

    .topbar-menu.show {
        right: 0;
    }

    .topbar-menu a {
        display: block;
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        background: #f8fafc;
        color: #111827;
        font-size: 15px;
    }

    .topbar-menu a:hover {
        background: #eef2f7;
        color: #111827;
    }

    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 8px;
        padding-top: 14px;
        border-top: 1px solid #e5e7eb;
    }

    .mobile-actions .adminbtn,
    .mobile-actions .logout-btn {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .mobile-menu-overlay.show {
        display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1000;
    }
	.topbar-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    padding: 80px 18px 20px;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    transition: right 0.28s ease;
    z-index: 2001;
    overflow-y: auto;
    flex-wrap: nowrap;
}

.mobile-menu-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1500;
}
	
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-menu {
    display: flex;
    align-items: center;
    gap: 18px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.mobile-slide-menu,
.mobile-menu-overlay {
    display: none;
}

.mobile-actions {
    display: none;
}

@media (max-width: 768px) {
    .desktop-menu,
    .topbar-right {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .mobile-slide-menu {
        position: fixed;
        top: 0;
        right: -320px;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        padding: 80px 18px 20px;
        background: #fff;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
        display: flex;
        flex-direction: column;
        gap: 10px;
        transition: right 0.28s ease;
        z-index: 99999;
        overflow-y: auto;
    }

    .mobile-slide-menu.show {
        right: 0;
    }

    .mobile-slide-menu a {
        display: block;
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        background: #f8fafc;
        color: #111827;
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
    }

    .mobile-slide-menu a:hover {
        background: #eef2f7;
        color: #111827;
    }

    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 8px;
        padding-top: 14px;
        border-top: 1px solid #e5e7eb;
    }

    .mobile-actions .adminbtn {
        display: flex;
        justify-content: center;
        width: 100%;
		background:#1ed44e;
		color:#fff;
    }
	
    .mobile-actions .logout-btn {
		display: flex;
        justify-content: center;
        width: 100%;
		background:#ff5024;
		color:#fff;
	}
    .mobile-menu-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 99998;
    }
}
.btn-reset-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    background: #ffffff;
    color: #374151;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    transition: all 0.2s ease;
    cursor: pointer;
}

/* hover */
.btn-reset-filter:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

/* klik */
.btn-reset-filter:active {
    transform: translateY(1px);
}

/* opcionalno mala ikonica */
.btn-reset-filter::before {
    content: "↺";
    margin-right: 6px;
    font-size: 14px;
}
.inbox-upload-box {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-2);
}

.inbox-upload-box h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.inbox-upload-box p {
    margin: 0 0 14px;
    color: var(--muted);
}

.inbox-upload-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.inbox-preview-wrap {
    margin-top: 16px;
}

.inbox-preview-img {
    display: block;
    max-width: 100%;
    max-height: 420px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between; /* gura select desno */
    gap: 12px;
    margin-bottom: 12px;
}

.chart-select {
    width: auto;            /* KLJUČNO - da ne bude full width */
    min-width: 160px;
    padding: 8px 10px;
    border: 1px solid #dcdfe5;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}
.customer-actions{
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
}

.btn-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:34px;
    height:34px;
    padding:0 12px;
    border-radius:10px;
    text-decoration:none;
    font-weight:700;
    border:none;
    cursor:pointer;
}

.btn-add-order{
    background:#16a34a;
    color:#fff;
    font-size:22px;
    line-height:1;
}

.btn-edit{
    background:#2563eb;
    color:#fff;
    font-size:14px;
}
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    padding: 10px 12px;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 160px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    overflow: hidden;
    z-index: 999;
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    color: #111;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-page {
    background: #e0f2fe;
    color: #0369a1;
}

.btn-sm {
    display: inline-block;
    padding: 6px 10px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}
.page-link {
    display: inline-block;
    min-width: 36px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
}

.page-link.active {
    background: #2563eb;
    color: #fff;
}
.earnings-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 10px;
    margin-top: 15px;
}
.card-t {
    min-width: 0;
    width: 100%;
}

.transactions-box {
    width: 100%;
    min-width: 0;
}

.table-wrap-t {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.table-wrap-t table {
    width: auto;
    min-width: 100%;
}
.earnings-form select:focus,
.earnings-form input:focus {
    border-color: #15bad6;
    box-shadow: 0 0 0 2px rgba(21,186,214,0.2);
}
@media (max-width: 768px) {
    .earnings-form {
        grid-template-columns: 1fr 1fr;
    }

    .earnings-form button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .earnings-form {
        grid-template-columns: 1fr;
    }

    .earnings-form select,
    .earnings-form input,
    .earnings-form button {
        width: 100%;
    }
}
.approve{
    background:#fff;
    color:#fff;
    border:none;
    border-radius:8px;
    padding:8px 12px;
    cursor:pointer;
}

.reject{
    background:#fff;
    color:#fff;
    border:none;
    border-radius:8px;
    padding:8px 12px;
    cursor:pointer;
}

.empty{
    background:#fff;
    padding:30px;
    border-radius:16px;
    text-align:center;
}
.sql-console-wrap {
    padding: 20px;
}

.sql-console-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sql-console-form textarea {
    width: 100%;
    min-height: 180px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: Consolas, monospace;
    font-size: 14px;
    resize: vertical;
    background: #fff;
}

.sql-console-form label {
    font-weight: 600;
}

.sql-error {
    margin-top: 15px;
    padding: 12px;
    background: #ffe5e5;
    color: #9b0000;
    border: 1px solid #ffb3b3;
    border-radius: 8px;
}

.sql-success {
    margin-top: 15px;
    padding: 12px;
    background: #e8fff0;
    color: #087a2f;
    border: 1px solid #a7e8bb;
    border-radius: 8px;
}

.sql-result-table {
    margin-top: 18px;
    overflow-x: auto;
}

.sql-result-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sql-result-table th,
.sql-result-table td {
    padding: 9px 10px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.sql-result-table th {
    background: #f3f3f3;
    font-weight: 700;
}

.sql-null {
    color: #999;
    font-style: italic;
}

.muted {
    color: #777;
    font-size: 14px;
}

@media (max-width: 768px) {
    .sql-console-wrap {
        padding: 12px;
    }

    .sql-console-form textarea {
        font-size: 13px;
    }

    .sql-result-table table {
        font-size: 12px;
    }
}