/*
Theme Name: Ziretek Invoice App Theme
Theme URI: https://ziretek.com/
Author: Ziretek
Author URI: https://ziretek.com/
Description: Official presentation-only companion theme for Ziretek Invoice Suite, styled as a quiet Zoho-style SaaS workspace.
Version: 0.2.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: ziretek-invoice-suite
*/

:root {
	--zis-app-bg: var(--wp--preset--color--app-background, #f5f7fb);
	--zis-app-surface: var(--wp--preset--color--surface, #ffffff);
	--zis-app-surface-muted: var(--wp--preset--color--surface-muted, #f8fafc);
	--zis-app-border: var(--wp--preset--color--border, #d9e1ec);
	--zis-app-border-soft: var(--wp--custom--ziretek-invoice-app--border--soft, #e8edf4);
	--zis-app-text: var(--wp--preset--color--text, #152033);
	--zis-app-muted: var(--wp--preset--color--muted, #5e6f86);
	--zis-app-primary: var(--wp--preset--color--primary, #1463d8);
	--zis-app-primary-dark: #0f4fac;
	--zis-app-accent: var(--wp--preset--color--accent, #12a594);
	--zis-app-success: var(--wp--preset--color--success, #138a45);
	--zis-app-warning: var(--wp--preset--color--warning, #a76700);
	--zis-app-danger: var(--wp--preset--color--danger, #b42318);
	--zis-app-radius: var(--wp--custom--ziretek-invoice-app--card--radius, 8px);
	--zis-app-shadow: var(--wp--custom--ziretek-invoice-app--card--shadow, 0 1px 2px rgba(21, 32, 51, 0.08));
	--zis-app-button-bg: var(--zis-app-primary);
	--zis-app-button-border: var(--zis-app-primary);
	--zis-app-button-text: #ffffff;
	--zis-app-content-width: var(--wp--style--global--wide-size, 1320px);
	--zis-app-sidebar-width: var(--wp--custom--ziretek-invoice-app--sidebar--width, 248px);
}

html {
	background: var(--zis-app-bg);
}

body {
	background: var(--zis-app-bg);
	color: var(--zis-app-text);
	font-family: var(--wp--preset--font-family--system-sans, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: var(--wp--preset--font-size--base, 15px);
	line-height: 1.55;
	margin: 0;
}

a {
	color: var(--zis-app-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover,
a:focus {
	color: var(--zis-app-primary-dark);
}

button,
input,
select,
textarea {
	font: inherit;
}

img {
	height: auto;
	max-width: 100%;
}

.site-main,
.zis-app-main {
	margin: 0 auto;
	max-width: var(--zis-app-content-width);
	padding: var(--wp--preset--spacing--regular, 16px);
}

.zis-app-shell {
	background: var(--zis-app-bg);
	min-height: 100vh;
}

.zis-app-header {
	align-items: center;
	background: var(--zis-app-surface);
	border-bottom: 1px solid var(--zis-app-border);
	box-shadow: var(--zis-app-shadow);
	display: flex;
	gap: 18px;
	justify-content: space-between;
	min-height: 64px;
	padding: 0 var(--wp--preset--spacing--regular, 16px);
	position: sticky;
	top: 0;
	z-index: 20;
}

.zis-app-brand {
	align-items: center;
	color: var(--zis-app-text);
	display: flex;
	gap: 10px;
	min-width: 0;
	text-decoration: none;
}

.zis-app-brand-mark {
	align-items: center;
	background: var(--zis-app-primary);
	border-radius: 6px;
	color: #ffffff;
	display: inline-flex;
	font-weight: 700;
	height: 34px;
	justify-content: center;
	width: 34px;
}

.zis-app-brand-logo {
	display: block;
	max-height: 38px;
	max-width: 180px;
	width: auto;
}

.zis-app-brand-logo-wrap img {
	display: block;
	max-height: 38px;
	max-width: 180px;
	width: auto;
}

.zis-app-brand-name {
	color: var(--zis-app-text);
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
}

.zis-app-layout {
	display: block;
	min-height: calc(100vh - 65px);
}

.zis-app-sidebar {
	background: #172033;
	color: #dbe5f1;
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding: 10px 12px;
}

.zis-app-sidebar .menu {
	display: contents;
	list-style: none;
	margin: 0;
	padding: 0;
}

.zis-app-sidebar a {
	align-items: center;
	border-radius: 6px;
	color: #dbe5f1;
	display: flex;
	gap: 10px;
	padding: 9px 10px;
	text-decoration: none;
	white-space: nowrap;
}

.zis-app-sidebar a:hover,
.zis-app-sidebar a:focus {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

.zis-app-content {
	min-width: 0;
	padding: var(--wp--preset--spacing--regular, 16px);
}

.zis-app-panel,
.wp-block-group.zis-app-panel,
.zis-app-card,
.wp-block-group.zis-app-card,
.wp-block-group.is-style-zis-card {
	background: var(--zis-app-surface);
	border: 1px solid var(--zis-app-border);
	border-radius: var(--zis-app-radius);
	box-shadow: var(--zis-app-shadow);
	padding: var(--wp--custom--ziretek-invoice-app--card--padding, 20px);
}

.zis-app-toolbar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	margin-bottom: 18px;
}

.zis-app-kicker {
	color: var(--zis-app-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.zis-app-page-title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0;
}

.zis-app-muted {
	color: var(--zis-app-muted);
}

.button,
.wp-block-button__link,
.zis-app-button {
	border: 1px solid var(--zis-app-button-border);
	border-radius: var(--wp--custom--ziretek-invoice-app--button--radius, 6px);
	font-weight: 600;
}

.wp-block-button__link,
.zis-app-button {
	background: var(--zis-app-button-bg);
	color: var(--zis-app-button-text);
	padding: var(--wp--custom--ziretek-invoice-app--button--padding, 9px 14px);
	text-decoration: none;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus,
.zis-app-button:hover,
.zis-app-button:focus {
	background: var(--zis-app-primary-dark);
	border-color: var(--zis-app-primary-dark);
	color: #ffffff;
}

.zis-app-button.is-secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
	background: var(--zis-app-surface);
	border-color: var(--zis-app-border);
	color: var(--zis-app-text);
}

.wp-block-button.is-style-zis-soft .wp-block-button__link {
	background: #eaf2ff;
	border-color: #eaf2ff;
	color: var(--zis-app-primary);
}

.wp-block-button.is-style-zis-outline .wp-block-button__link {
	background: var(--zis-app-surface);
	border-color: var(--zis-app-primary);
	color: var(--zis-app-primary);
}

.zis-app-icon {
	align-items: center;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	display: inline-flex;
	height: 24px;
	justify-content: center;
	width: 24px;
}

.zis-app-icon::before {
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.zis-app-icon-grid::before {
	content: "D";
}

.zis-app-icon-user::before {
	content: "C";
}

.zis-app-icon-box::before {
	content: "P";
}

.zis-app-icon-document::before {
	content: "I";
}

.zis-app-icon-quote::before {
	content: "Q";
}

.zis-app-icon-chart::before {
	content: "R";
}

.zis-app-icon-settings::before {
	content: "S";
}

.zis-app-utility-nav .menu {
	align-items: center;
	display: flex;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.zis-app-utility-nav a {
	border-radius: 6px;
	color: var(--zis-app-muted);
	display: inline-flex;
	padding: 7px 9px;
	text-decoration: none;
}

.zis-app-utility-nav a:hover,
.zis-app-utility-nav a:focus {
	background: var(--zis-app-surface-muted);
	color: var(--zis-app-text);
}

table {
	background: var(--zis-app-surface);
	border-collapse: collapse;
	border: 1px solid var(--zis-app-border);
	border-radius: var(--zis-app-radius);
	overflow: hidden;
	width: 100%;
}

th,
td {
	border-bottom: 1px solid var(--zis-app-border-soft);
	padding: 10px 12px;
	text-align: left;
	vertical-align: top;
}

th {
	background: var(--zis-app-surface-muted);
	color: var(--zis-app-muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="tel"],
select,
textarea {
	background: #ffffff;
	border: 1px solid var(--zis-app-border);
	border-radius: 6px;
	color: var(--zis-app-text);
	min-height: 38px;
	padding: 8px 10px;
	width: 100%;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--zis-app-primary);
	box-shadow: 0 0 0 3px rgba(20, 99, 216, 0.14);
	outline: 0;
}

.zis-status-pill {
	border-radius: 999px;
	display: inline-flex;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 6px 9px;
}

.zis-status-pill.is-success {
	background: #e7f6ed;
	color: var(--zis-app-success);
}

.zis-status-pill.is-warning {
	background: #fff4df;
	color: var(--zis-app-warning);
}

.zis-status-pill.is-danger {
	background: #feeceb;
	color: var(--zis-app-danger);
}

.zis-app-footer {
	align-items: center;
	background: var(--zis-app-surface);
	border-top: 1px solid var(--zis-app-border);
	color: var(--zis-app-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	padding: 16px 24px;
}

.zis-app-footer p {
	margin: 0;
}

@media (min-width: 901px) {
	.zis-app-header {
		padding: 0 var(--wp--preset--spacing--large, 32px);
	}

	.zis-app-layout {
		display: grid;
		grid-template-columns: var(--zis-app-sidebar-width) minmax(0, 1fr);
	}

	.zis-app-sidebar {
		border-right: 1px solid #111827;
		display: block;
		overflow-x: visible;
		padding: 18px 14px;
	}

	.zis-app-sidebar .menu {
		display: block;
	}

	.zis-app-sidebar .menu li + li {
		margin-top: 4px;
	}

	.zis-app-sidebar a {
		white-space: normal;
	}

	.zis-app-content {
		padding: var(--wp--preset--spacing--large, 32px);
	}
}

@media (max-width: 900px) {
	.zis-app-header {
		padding: 0 16px;
	}

	.zis-app-sidebar {
		border-right: 0;
		padding: 10px 12px;
	}

	.zis-app-sidebar a {
		white-space: nowrap;
	}

	.zis-app-content,
	.site-main,
	.zis-app-main {
		padding: 16px;
	}
}
