﻿/* izradafotki design — loaded only when appSetting SoftwareDesign=izradafotki */

:root {
	--if-ink: #1c1d2b;
	--if-ink-2: #2a2c3f;
	--if-ink-3: #3a3d55;
	--if-paper: #f7f5f2;
	--if-card: #ffffff;
	--if-coral: #ff5a7a;
	--if-coral-d: #e8435f;
	--if-sun: #ffb347;
	--if-mint: #2bc6a0;
	--if-muted: #8a8ca3;
	--if-line: #ece8e3;
	--if-text: #24253a;
	--if-radius: 18px;
	--if-side: 248px;
}

* { font-family: 'Poppins', sans-serif; }

html, body { background: var(--if-paper); color: var(--if-text); }
body { padding: 0; font-size: 14px; overflow-x: hidden; }
a { color: var(--if-coral-d); }
a:hover, a:focus { color: var(--if-ink); text-decoration: none; }
label { font-weight: 500; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Sidebar ---------- */
.if-side {
	position: fixed; top: 0; left: 0; bottom: 0;
	width: var(--if-side);
	background: var(--if-ink);
	color: #c9cad8;
	display: flex; flex-direction: column;
	z-index: 1030;
	transition: transform .25s ease;
}

.if-brand { display: flex; align-items: center; gap: 12px; padding: 26px 22px 30px; color: #fff; }
.if-brand:hover, .if-brand:focus { color: #fff; }
.if-brand-mark {
	width: 42px; height: 42px; border-radius: 14px;
	background: linear-gradient(135deg, var(--if-coral), var(--if-sun));
	display: inline-flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 18px; color: #fff; letter-spacing: -0.04em;
}
.if-brand-text { line-height: 1.1; font-size: 17px; font-weight: 300; }
.if-brand-text b { font-weight: 700; }
.if-brand-text small { display: block; font-size: 11px; color: var(--if-sun); letter-spacing: .18em; text-transform: uppercase; margin-top: 3px; }

.if-nav { flex: 1; padding: 0 14px; }
.if-nav-caption { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #6c6e88; padding: 0 12px 10px; }
.if-nav a {
	display: flex; align-items: center; gap: 14px;
	padding: 12px 14px; margin-bottom: 4px;
	border-radius: 12px; color: #c9cad8; font-weight: 500;
}
.if-nav a .fa { width: 18px; text-align: center; font-size: 16px; color: #7d7f9a; }
.if-nav a:hover { background: var(--if-ink-2); color: #fff; }
.if-nav a.active { background: var(--if-coral); color: #fff; box-shadow: 0 10px 24px rgba(255, 90, 122, .28); }
.if-nav a.active .fa { color: #fff; }

.if-side-foot { padding: 18px; border-top: 1px solid var(--if-ink-2); }
.if-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 12px; border-radius: 99px; background: var(--if-ink-2); }
.if-status i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.if-status.on i { background: var(--if-mint); box-shadow: 0 0 0 4px rgba(43, 198, 160, .18); }
.if-status.off i { background: var(--if-coral); box-shadow: 0 0 0 4px rgba(255, 90, 122, .18); }
.if-user { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #fff; font-size: 13px; word-break: break-all; }
.if-user .if-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--if-ink-3); display: inline-flex; align-items: center; justify-content: center; color: var(--if-sun); }
.if-logout { display: inline-block; margin-top: 12px; color: #9fa1b8; font-size: 12px; }
.if-logout:hover { color: var(--if-coral); }

.if-mobilebar { display: none; }

/* ---------- Main ---------- */
.if-main { margin-left: var(--if-side); min-height: 100vh; padding: 34px 42px 60px; }
.if-bare .if-main { margin-left: 0; padding: 0; }

.if-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.if-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .22em; color: var(--if-coral-d); font-weight: 600; }
.if-head h1 { margin: 6px 0 4px; font-size: 30px; }
.if-head p { margin: 0; color: var(--if-muted); }
.if-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.if-card { background: var(--if-card); border-radius: var(--if-radius); padding: 26px; box-shadow: 0 1px 0 var(--if-line), 0 18px 40px -28px rgba(28, 29, 43, .35); margin-bottom: 22px; }
.if-card-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; margin: 0 0 18px; }
.if-card-title .if-step { width: 28px; height: 28px; border-radius: 50%; background: var(--if-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }

/* ---------- Buttons ---------- */
.if-btn, .btn-success, .btn-primary {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 0 !important; border-radius: 99px !important;
	padding: 11px 22px; font-weight: 600; font-size: 13px;
	background: var(--if-coral) !important; color: #fff !important;
	box-shadow: 0 10px 22px -10px rgba(255, 90, 122, .7);
	transition: transform .15s ease, background .15s ease;
}
.if-btn:hover, .btn-success:hover, .btn-primary:hover, .if-btn:focus { background: var(--if-coral-d) !important; color: #fff !important; transform: translateY(-1px); }
.if-btn--ghost { background: transparent !important; color: var(--if-ink) !important; box-shadow: inset 0 0 0 1.5px var(--if-line) !important; }
.if-btn--ghost:hover, .if-btn--ghost:focus { background: #fff !important; color: var(--if-ink) !important; }
.if-btn--dark { background: var(--if-ink) !important; box-shadow: none; }
.if-btn--dark:hover, .if-btn--dark:focus { background: var(--if-ink-3) !important; }
.if-btn--block { width: 100%; }
.if-btn--lg { padding: 15px 26px; font-size: 15px; }

/* ---------- Forms ---------- */
.form-group label, .if-field label { font-size: 12px; color: var(--if-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; display: block; }
.form-control {
	height: 46px; border-radius: 12px; border: 1.5px solid var(--if-line);
	background: #fbfaf8; box-shadow: none; font-size: 14px; color: var(--if-text);
}
textarea.form-control { height: auto; }
.form-control:focus { border-color: var(--if-coral); background: #fff; box-shadow: 0 0 0 4px rgba(255, 90, 122, .12); }
.if-field { margin-bottom: 16px; }
.if-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; }
.if-filters .form-control { max-width: none; }
.if-span-2 { grid-column: span 2; }
.if-range { display: flex; gap: 8px; }
.if-range .form-control { flex: 1; min-width: 0; }

/* ---------- Home ---------- */
.if-hero {
	position: relative; overflow: hidden;
	border-radius: 28px; padding: 54px 48px; margin-bottom: 26px;
	background: radial-gradient(circle at 85% 20%, rgba(255, 179, 71, .55), transparent 40%), linear-gradient(120deg, var(--if-ink) 0%, #3b2a4a 60%, var(--if-coral-d) 130%);
	color: #fff;
}
.if-hero h1 { font-size: 40px; font-weight: 300; margin: 12px 0; }
.if-hero h1 em { font-style: normal; font-weight: 700; color: var(--if-sun); }
.if-hero p { max-width: 460px; color: #e5e1ee; font-size: 15px; }
.if-hero .if-eyebrow { color: var(--if-sun); }
.if-hero .if-status { background: rgba(255, 255, 255, .12); color: #fff; margin-top: 16px; }
.if-frames { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); width: 230px; height: 190px; }
.if-frames span { position: absolute; width: 150px; height: 120px; border-radius: 10px; border: 8px solid #fff; box-shadow: 0 20px 40px rgba(0, 0, 0, .3); }
.if-frames span:nth-child(1) { left: 0; top: 30px; transform: rotate(-9deg); background: linear-gradient(160deg, #ffd29a, #ff8a65); }
.if-frames span:nth-child(2) { left: 60px; top: 0; transform: rotate(6deg); background: linear-gradient(160deg, #8fd3c4, #3a6f8f); }
.if-frames span:nth-child(3) { left: 40px; top: 60px; transform: rotate(-2deg); background: linear-gradient(160deg, #f5b8c7, #8b5fbf); }

.if-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.if-tile {
	display: flex; flex-direction: column; gap: 6px;
	padding: 24px; border-radius: 22px; background: #fff; color: var(--if-text);
	box-shadow: 0 1px 0 var(--if-line), 0 18px 40px -30px rgba(28, 29, 43, .4);
	transition: transform .18s ease, box-shadow .18s ease;
}
.if-tile:hover, .if-tile:focus { transform: translateY(-4px); color: var(--if-text); box-shadow: 0 26px 50px -30px rgba(28, 29, 43, .55); }
.if-tile .fa { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; color: #fff; }
.if-tile strong { font-size: 17px; }
.if-tile span { color: var(--if-muted); font-size: 13px; }
.if-tile--a .fa { background: var(--if-coral); }
.if-tile--b .fa { background: var(--if-ink); }
.if-tile--c .fa { background: var(--if-sun); }
.if-tile--d .fa { background: var(--if-mint); }

.if-legal { margin-top: 34px; padding: 16px 20px; border-radius: 14px; border: 1.5px dashed #d9d3cb; color: var(--if-muted); font-size: 12px; text-align: center; }

/* ---------- Receipts (invoice list) ---------- */
.if-receipts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.if-receipt {
	position: relative; display: block; padding: 22px 22px 18px; border-radius: 20px;
	background: #fff; color: var(--if-text);
	box-shadow: 0 1px 0 var(--if-line), 0 18px 40px -30px rgba(28, 29, 43, .4);
	border-top: 5px solid var(--if-ink);
}
.if-receipt:hover, .if-receipt:focus { color: var(--if-text); transform: translateY(-2px); }
.if-receipt * { pointer-events: none; }
.if-receipt.is-refunded { border-top-color: var(--if-coral); }
.if-receipt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--if-muted); }
.if-receipt-no { font-weight: 600; color: var(--if-ink); word-break: break-all; }
.if-receipt-sum { font-size: 26px; font-weight: 700; margin: 12px 0 6px; }
.if-receipt-sum small { font-size: 12px; font-weight: 500; color: var(--if-muted); }
.if-receipt-meta { font-size: 12px; color: var(--if-muted); line-height: 1.7; }
.if-receipt-items { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--if-line); font-size: 12px; color: var(--if-ink-3); }

.if-badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; background: #f1eef9; color: #5a4a8a; }
.if-badge--warn { background: #ffe6eb; color: var(--if-coral-d); }
.if-badge--ok { background: #dff7f0; color: #148a6d; }

.if-empty { text-align: center; padding: 50px 20px; color: var(--if-muted); }
.if-empty .fa { font-size: 34px; color: #d5cfc7; display: block; margin-bottom: 12px; }

/* table/copy view */
.copy-table { width: 100%; background: #fff; border-radius: 16px; overflow: hidden; border-collapse: collapse; }
.copy-table th, .copy-table td { padding: 12px 16px; font-weight: 400; border-bottom: 1px solid var(--if-line); vertical-align: top; }
.copy-table tr:nth-child(even) { background: #fcfbf9; }
.copy-table a { word-break: break-all; }

/* ---------- New invoice ---------- */
.if-new { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
.if-new-left { position: sticky; top: 24px; }
.if-new:has(.invoice-table-section[style*="block"]) .if-new-placeholder { display: none; }
.if-new-placeholder { border: 2px dashed #ddd6cc; border-radius: var(--if-radius); }
.invoice-table-section { display: none; }
.if-qty { max-width: 120px; }

.invoice-table { width: 100%; margin: 0; }
.invoice-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--if-muted); font-weight: 600; border: none !important; padding: 10px 8px !important; }
.invoice-table td { vertical-align: middle !important; border-top: 1px solid var(--if-line) !important; padding: 10px 8px !important; }
.invoice-table td .form-control { height: 38px; max-width: 120px; }
.invoice-table button { border: none !important; background: #f4f1ed !important; color: var(--if-ink); border-radius: 50%; width: 32px; height: 32px; margin-left: 4px; }
.invoice-table button:hover { background: var(--if-coral) !important; color: #fff; }
.invoice-table button i, .invoice-table button img { pointer-events: none; }
.intableprice { font-weight: 600; }

.if-pay-row { position: relative; }
.if-pay-row .if-pay-btns { position: absolute; right: -6px; top: 26px; display: flex; gap: 4px; }
.if-pay-row .if-pay-btns button { border: none; width: 34px; height: 34px; border-radius: 50%; background: var(--if-ink); color: #fff; }
.if-pay-row .if-pay-btns button.remove-p-item-btn { background: #f4f1ed; color: var(--if-ink); }
.if-pay-row .if-pay-btns button i { pointer-events: none; }

.if-warning { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: 14px; background: #fff4e3; color: #8a5a12; }

/* ---------- Overview ---------- */
.if-ov { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.if-total { border-radius: 22px; padding: 26px; background: var(--if-ink); color: #fff; margin-bottom: 22px; }
.if-total small { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--if-sun); }
.if-total strong { display: block; font-size: 36px; font-weight: 700; margin-top: 4px; }
.if-actions { display: flex; flex-direction: column; gap: 10px; }
.if-actions .if-btn { justify-content: flex-start; }
.if-dl { margin: 0; }
.if-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--if-line); }
.if-dl dt { font-weight: 400; color: var(--if-muted); }
.if-dl dd { font-weight: 600; text-align: right; }
.if-lines { list-style: none; padding: 0; margin: 0; }
.if-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--if-line); }
.if-lines li span:last-child { color: var(--if-muted); white-space: nowrap; }
.if-pdf { width: 100%; height: 900px; border: 0; border-radius: 14px; background: #f0ece6; }
.if-refund-box { margin-top: 16px; padding: 16px; border-radius: 14px; background: #ffeef1; color: #8c2a3c; }
.if-refund-box a { color: var(--if-coral-d); font-weight: 600; }
.if-refund-box textarea { width: 100%; border: 0; border-radius: 10px; padding: 10px; margin-top: 6px; }

/* ---------- Products ---------- */
.if-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.if-search { position: relative; flex: 1; min-width: 240px; }
.if-search .fa { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--if-muted); }
.if-search input { padding-left: 46px; border-radius: 99px; max-width: none; background: #fff; }
.if-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.if-prod { position: relative; background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 1px 0 var(--if-line), 0 18px 40px -32px rgba(28, 29, 43, .4); }
.if-prod-thumb { width: 100%; height: 90px; border-radius: 14px; margin-bottom: 14px; background: linear-gradient(135deg, #ffe0e6, #fff1dc); display: flex; align-items: center; justify-content: center; color: var(--if-coral); font-size: 28px; }
.if-prod:nth-child(3n+2) .if-prod-thumb { background: linear-gradient(135deg, #e3e6ff, #f3e8ff); color: #6a5acd; }
.if-prod:nth-child(3n+3) .if-prod-thumb { background: linear-gradient(135deg, #dcf6ee, #e9f4ff); color: #1f9c7f; }
.if-prod-body label { display: block; margin: 0; }
.if-prod-name { font-size: 15px; font-weight: 600; word-break: break-word; }
.if-prod-code { font-size: 12px; color: var(--if-muted); font-weight: 400; }
.if-prod-price { font-size: 18px; font-weight: 700; margin-top: 8px !important; color: var(--if-coral-d); }
.if-prod-actions { position: absolute; top: 28px; right: 28px; display: flex; gap: 6px; }
.if-prod-actions button { border: none; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--if-ink); box-shadow: 0 4px 10px rgba(0, 0, 0, .08); }
.if-prod-actions button:hover { background: var(--if-ink); color: #fff; }
.if-prod-actions button i { pointer-events: none; }

/* ---------- Reports ---------- */
.if-pills { display: inline-flex; gap: 6px; padding: 5px; background: #fff; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--if-line); }
.if-pills button { border: 0; background: transparent; padding: 9px 18px; border-radius: 99px; font-weight: 500; color: var(--if-ink); }
.if-pills button:hover { background: var(--if-ink); color: #fff; }
.if-reports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.if-report table { width: 100%; }
.if-report th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--if-muted); font-weight: 600; padding: 8px 6px; border-bottom: 1.5px solid var(--if-line); }
.if-report td { padding: 10px 6px; border-bottom: 1px solid var(--if-line); }
.if-report-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.if-report-head h3 { margin: 0; font-size: 16px; }
.if-csv { font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 99px; background: #dff7f0; color: #148a6d; }
.if-csv:hover { background: #148a6d; color: #fff; }
.if-report-empty { color: var(--if-muted); display: flex; align-items: center; gap: 10px; }

/* ---------- Auth ---------- */
.if-auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.if-auth-art {
	position: relative; overflow: hidden; padding: 60px; color: #fff;
	background: radial-gradient(circle at 20% 80%, rgba(255, 179, 71, .5), transparent 45%), linear-gradient(150deg, var(--if-ink) 10%, #4a2c4f 70%, var(--if-coral-d) 140%);
	display: flex; flex-direction: column; justify-content: space-between;
}
.if-auth-art h2 { font-size: 38px; font-weight: 300; max-width: 420px; line-height: 1.2; }
.if-auth-art h2 b { font-weight: 700; color: var(--if-sun); }
.if-auth-art p { color: #e2dcea; max-width: 380px; }
.if-auth-art .if-frames { right: 40px; top: auto; bottom: 60px; transform: none; opacity: .9; }
.if-auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--if-paper); }
.if-auth-box { width: 100%; max-width: 380px; }
.if-auth-box h1 { font-size: 30px; margin: 0 0 6px; }
.if-auth-box > p { color: var(--if-muted); margin-bottom: 28px; }
.if-auth-alt { margin-top: 22px; text-align: center; color: var(--if-muted); }
.if-auth-alt a { font-weight: 600; }
.if-drop { display: block; width: 100%; padding: 40px 20px; border-radius: 18px; border: 2px dashed #d9d3cb; background: #fff; text-align: center; color: var(--if-muted); cursor: pointer; }
.if-drop:hover { border-color: var(--if-coral); color: var(--if-coral-d); }
.if-drop .fa { display: block; font-size: 34px; margin-bottom: 10px; color: var(--if-coral); }

/* ---------- Loader ---------- */
#simple-loader { position: fixed; inset: 0; display: none; z-index: 10000; background: rgba(28, 29, 43, .35); }
#simple-loader .if-spinner { position: fixed; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .3); border-top-color: var(--if-coral); animation: if-spin .8s linear infinite; }
@keyframes if-spin { to { transform: rotate(360deg); } }

.ui-autocomplete { background: #fff; border: 0; border-radius: 12px; box-shadow: 0 18px 40px rgba(28, 29, 43, .18); max-height: 240px; overflow-y: auto; overflow-x: hidden; z-index: 1000 !important; padding: 6px; }
.ui-autocomplete .ui-menu-item-wrapper { padding: 8px 12px; border-radius: 8px; }
.ui-autocomplete .ui-state-active { background: var(--if-coral) !important; border: 0 !important; margin: 0 !important; color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	.if-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.if-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.if-frames { display: none; }
}

@media (max-width: 991px) {
	.if-side { transform: translateX(-100%); }
	.if-side.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .3); }
	.if-mobilebar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1020; padding: 12px 18px; background: var(--if-ink); color: #fff; }
	.if-mobilebar .if-brand { padding: 0; }
	.if-mobilebar button { border: 0; background: var(--if-ink-2); color: #fff; width: 40px; height: 40px; border-radius: 12px; }
	.if-main { margin-left: 0; padding: 24px 18px 50px; }
	.if-new, .if-ov, .if-reports { grid-template-columns: minmax(0, 1fr); }
	.if-new-left { position: static; }
	.if-auth { grid-template-columns: 1fr; }
	.if-auth-art { min-height: 240px; padding: 34px; }
	.if-auth-art h2 { font-size: 28px; }
	.if-hero { padding: 36px 26px; }
	.if-hero h1 { font-size: 30px; }
}

@media (max-width: 575px) {
	.if-tiles, .if-filters { grid-template-columns: minmax(0, 1fr); }
	.if-span-2 { grid-column: auto; }
	.if-head h1 { font-size: 24px; }
}
