:root {
	--sidebar-w: 260px;
	--sidebar-w-md: 220px;
	--sidebar-w-sm: 190px;
	--header-h: clamp(64px, 10vh, 84px);
	--header-h-md: clamp(60px, 9.5vh, 76px);
	--header-h-sm: clamp(56px, 9vh, 68px);
	--navy: #101c32;
	--navy-hover: #1a2944;
	--blue: #2d6cdf;
	--blue-dark: #2459c7;
	--border: #e5e9f0;
	--text: #172033;
	--text-muted: #667085;
	--text-faint: #98a2b3;
	--bg: #f5f7fb;
}
* {
	box-sizing: border-box;
}
html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}
body {
	overflow: hidden;
	background: var(--bg);
	color: var(--text);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}
img {
	display: block;
	max-width: 100%;
	height: auto;
}
a {
	color: inherit;
}
button,
input,
select,
textarea {
	font: inherit;
}
button,
.btn {
	cursor: pointer;
}
/* SIDEBAR */
.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--sidebar-w);
	padding: 26px 16px;
	background: var(--navy);
	color: #fff;
	overflow: hidden;
	z-index: 3000;
}
.brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0 0 36px;
	text-align: center;
}
.company-logo {
	display: block;
	width: 165px;
	max-width: 100%;
	max-height: 65px;
	object-fit: contain;
}
.brand small {
	display: block;
	margin-top: 8px;
	color: #98a2b3;
	font-size: 12px;
	line-height: 1.3;
}
.sidebar nav {
	display: flex;
	flex-direction: column;
	width: 100%;
}
.sidebar nav a {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 45px;
	margin: 4px 0;
	padding: 11px 15px;
	border-radius: 8px;
	color: #c3cad5;
	text-decoration: none;
	font-size: 14px;
	transition: background .2s ease,
        color .2s ease,
        transform .15s ease;
}
.sidebar nav a:hover {
	background: var(--navy-hover);
	color: #fff;
}
.sidebar nav a:active {
	transform: scale(.98);
}
.sidebar nav a.active,
.sidebar nav a[aria-current="page"] {
	background: linear-gradient(
        90deg,
        #1769e0,
        #2d7ff2
    );
	color: #fff;
	box-shadow: 0 5px 14px rgba(45, 111, 230, .25);
}
/* HEADER */
.top {
	position: fixed;
	top: 0;
	right: 0;
	left: var(--sidebar-w);
	height: var(--header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 15px 34px;
	background: rgba(255, 255, 255, .98);
	border-bottom: 1px solid #eaecf0;
	box-shadow: 0 2px 10px rgba(16, 24, 40, .05);
	backdrop-filter: blur(8px);
	z-index: 2500;
}
.top > div:first-child {
	min-width: 0;
}
.top h1 {
	margin: 0 0 3px;
	color: var(--text);
	font-size: clamp(20px, 2.7vh, 27px);
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.top p {
	margin: 0;
	color: var(--text-muted);
	font-size: clamp(12px, 1.4vh, 14px);
}
.avatar {
	display: grid;
	place-items: center;
	width: clamp(36px, 4.5vh, 42px);
	height: clamp(36px, 4.5vh, 42px);
	flex: 0 0 clamp(36px, 4.5vh, 42px);
	border-radius: 50%;
	background: #e8edff;
	color: #2457d6;
	font-size: clamp(13px, 1.5vh, 15px);
	font-weight: 700;
}
/* MAIN CONTENT */
.main {
	position: fixed;
	top: var(--header-h);
	right: 0;
	bottom: 0;
	left: var(--sidebar-w);
	display: flex;
	flex-direction: column;
	gap: clamp(10px, 1.6vh, 16px);
	padding: clamp(14px, 2.2vh, 24px)
        34px;
	overflow-y: auto;
	overflow-x: hidden;
}
/* GENERAL PANELS */
.panel,
.dashboard-panel {
	min-width: 0;
	padding: clamp(12px, 1.8vh, 20px);
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 14px;
	box-shadow: 0 2px 8px rgba(16, 24, 40, .035);
}
.panel {
	margin-top: 16px;
}
.panel-heading {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: clamp(6px, 1.2vh, 16px);
}
.panel-heading > div {
	min-width: 0;
}
.panel-heading h2 {
	margin: 0 0 4px;
	color: var(--text);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}
.panel-heading p {
	margin: 0;
	color: var(--text-muted);
	font-size: 13px;
}

/* DASHBOARD SUMMARY CARDS */
.dashboard-cards {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(10px, 1.4vh, 16px);
}
.dashboard-card {
	min-width: 0;
	padding: clamp(14px, 1.8vh, 18px);
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 14px;
	box-shadow: 0 2px 8px rgba(16, 24, 40, .035);
	transition: transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}
.dashboard-card:hover {
	transform: translateY(-2px);
	border-color: #d7deea;
	box-shadow: 0 8px 22px rgba(16, 24, 40, .08);
}
.dashboard-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(32px, 4.5vh, 42px);
	height: clamp(32px, 4.5vh, 42px);
	margin-bottom: clamp(6px, 1.2vh, 12px);
	border-radius: 10px;
	font-size: clamp(15px, 2vh, 19px);
	line-height: 1;
}
.quotation-icon {
	background: #eaf2ff;
	color: #2864d7;
}
.approved-icon {
	background: #e7f7ee;
	color: #12a15b;
}
.invoice-icon {
	background: #eeeaff;
	color: #7257d8;
}
.outstanding-icon {
	background: #fff2df;
	color: #d98219;
}
.dashboard-card-content {
	min-width: 0;
}
.dashboard-card-content span {
	display: block;
	margin-bottom: 4px;
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 600;
}
.dashboard-card-content strong {
	display: block;
	margin: 0 0 5px;
	color: var(--text);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dashboard-card-content small {
	display: block;
	color: var(--text-faint);
	font-size: 11px;
	line-height: 1.4;
}
/* DASHBOARD CHART GRID */
.dashboard-chart-grid {
	flex: 1 1 auto;
	min-height: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(10px, 1.4vh, 16px);
}
.dashboard-panel {
	height: 100%;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
/* DONUT CHART */
.chart-area {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(14px, 2vh, 28px);
}
.donut-wrapper {
	position: relative;
	height: 100%;
	max-height: 170px;
	width: auto;
	aspect-ratio: 1 / 1;
	flex: 0 0 auto;
}
.donut-wrapper canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}
.donut-center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 55%;
	text-align: center;
	pointer-events: none;
}
.donut-center strong {
	display: block;
	color: var(--text);
	font-size: clamp(15px, 2.4vh, 24px);
	font-weight: 700;
	line-height: 1.1;
}
.donut-center span {
	display: block;
	margin-top: 4px;
	color: var(--text-muted);
	font-size: clamp(9px, 1.1vh, 11px);
}
.chart-legend {
	display: flex;
	flex-direction: column;
	gap: clamp(6px, 1vh, 12px);
	min-width: 110px;
}
.legend-item {
	display: grid;
	grid-template-columns: 9px 1fr auto;
	align-items: center;
	column-gap: 8px;
	font-size: 12px;
}
.legend-item span:not(.legend-dot) {
	color: var(--text-muted);
}
.legend-item strong {
	color: var(--text);
	font-size: 12px;
}
.legend-dot {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
}
.approved-dot {
	background: #12b76a;
}
.pending-dot {
	background: #e4e7ec;
}
.paid-dot {
	background: #2d5bff;
}
.unpaid-dot {
	background: #e4e7ec;
}
/* QUICK ACTIONS */
.quick-panel {
	flex: 0 0 auto;
	height: auto;
}
.quick-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: clamp(6px, .9vh, 10px);
}
.quick-actions .btn {
	flex: 0 0 auto;
	min-height: clamp(32px, 4.5vh, 40px);
	padding: clamp(6px, .9vh, 9px)
        clamp(10px, 1vw, 16px);
	font-size: clamp(11px, 1.1vh, 13px);
}
/* BUTTONS */
button,
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 9px 16px;
	background: #fff;
	color: #344054;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	transition: background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .12s ease,
        box-shadow .2s ease;
}
button:hover,
.btn:hover {
	background: #f2f4f7;
	border-color: #98a2b3;
	color: var(--text);
}
button:active,
.btn:active {
	transform: scale(.98);
}
.btn.primary,
.primary {
	background: var(--blue);
	color: #fff;
	border-color: var(--blue);
}

.btn.primary:hover,
.primary:hover {
	background: var(--blue-dark);
	border-color: var(--blue-dark);
	color: #fff;
	box-shadow: 0 4px 12px rgba(45, 108, 223, .20);
}
/* FLASH MESSAGE */
.flash {
	margin-bottom: 16px;
	padding: 11px 14px;
	background: #e7f6ec;
	color: #16733b;
	border: 1px solid #ccebd7;
	border-radius: 8px;
}
/* GENERAL CARDS */
.cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}
.card {
	min-width: 0;
	padding: 18px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(16, 24, 40, .035);
}
.card span {
	display: block;
	margin-bottom: 5px;
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 600;
}
.card strong {
	display: block;
	margin-bottom: 6px;
	color: var(--text);
	font-size: 21px;
}
/*  TWO COLUMN LAYOUT */
.grid2 {
	display: grid;
    /*
       Desktop:
       Add Client | Client Master
    */
	grid-template-columns: minmax(0, 1.55fr)
        minmax(320px, 1fr);
	gap: 20px;
	width: 100%;
	align-items: stretch;
	margin-top: 16px;
}
.grid2 .panel {
	width: 100%;
	min-width: 0;
	margin-top: 0;
}
/* FORMS */
.formgrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
.formgrid label {
	display: block;
	min-width: 0;
	color: #344054;
	font-size: 13px;
	font-weight: 500;
}
.formgrid label > * {
	margin-top: 7px;
}
.full {
	grid-column: 1 / -1;
}
.input,
input,
select,
textarea {
	width: 100%;
	min-width: 0;
	padding: 10px 12px;
	background: #fff;
	color: var(--text);
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	outline: none;
	transition: border-color .2s ease,
        box-shadow .2s ease;
}
.input::placeholder,
input::placeholder,
textarea::placeholder {
	color: var(--text-faint);
}
.input:focus,
input:focus,
select:focus,
textarea:focus {
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(45, 108, 223, .10);
}
textarea {
	min-height: 100px;
	resize: vertical;
}
.actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}
/* CLIENT PAGE */

/* Client Master */
.clientgrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	width: 100%;
}
.client {
	min-width: 0;
	padding: 15px;
	background: #fff;
	border: 1px solid #eaecf0;
	border-radius: 9px;
	overflow: hidden;
	transition: box-shadow .2s ease,
        border-color .2s ease,
        transform .18s ease;
}
.client:hover {
	transform: translateY(-2px);
	border-color: #d0d5dd;
	box-shadow: 0 6px 18px rgba(16, 24, 40, .07);
}

.client b {
	display: block;
	margin-bottom: 14px;
	color: var(--text);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.client p {
	margin: 0 0 10px;
	color: #344054;
	font-size: 13px;
	line-height: 1.5;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.client small {
	display: block;
	color: var(--text-muted);
	font-size: 12px;
	line-height: 1.6;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.client-separator {
	display: inline-block;
	margin: 0 5px;
	color: #98a2b3;
}


/* =========================================================
   CLIENT EDIT / DELETE BUTTONS
   ========================================================= */

.client-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 15px;
	padding-top: 12px;
	border-top: 1px solid #eaecf0;
}

.client-edit-btn,
.client-delete-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 6px 11px;
	border-radius: 7px;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}


/* Edit */

.client-edit-btn {
	background: #eef4ff;
	color: #2864d7;
	border: 1px solid #d9e5ff;
}

.client-edit-btn:hover {
	background: #e1ebff;
	color: #2459c7;
	border-color: #c6d9ff;
}


/* Delete */

.client-delete-form {
	margin: 0;
	padding: 0;
}

.client-delete-btn {
	background: #fff1f1;
	color: #c62828;
	border: 1px solid #ffd5d5;
}

.client-delete-btn:hover {
	background: #ffe3e3;
	color: #a61b1b;
	border-color: #ffc1c1;
}


/* Empty client state */

.client-empty {
	grid-column: 1 / -1;
	padding: 30px 15px;
	text-align: center;
	color: var(--text-faint);
	font-size: 13px;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	min-width: 0;
}

.toolbar form {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.toolbar input {
	flex: 1;
	min-width: 0;
}


/* =========================================================
   TABLE
   ========================================================= */

.table {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	border-radius: 8px;
	-webkit-overflow-scrolling: touch;
}

table {
	width: 100%;
	min-width: 700px;
	border-collapse: collapse;
}

th,
td {
	padding: 13px;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid #eaecf0;
	white-space: nowrap;
}

th {
	background: #f8fafc;
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 600;
}

td {
	color: #344054;
}

tr:hover td {
	background: #fafbfc;
}

tr:last-child td {
	border-bottom: none;
}


/* =========================================================
   BADGES
   ========================================================= */

.badge {
	display: inline-block;
	padding: 5px 9px;
	border-radius: 20px;
	background: #eef2f6;
	color: #475467;
	font-size: 11px;
	font-weight: 700;
}

.good {
	background: #e7f6ec;
	color: #16733b;
}

.warn {
	background: #fff4df;
	color: #9a6700;
}

.bad {
	background: #fff0f0;
	color: #b42318;
}

/* =========================================================
   ACTIVITY LOG
   Modern Admin Audit Dashboard
   ========================================================= */


/* =========================================================
   PAGE
   ========================================================= */

.activity-page {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    box-sizing: border-box;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.activity-page-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}


.activity-heading-row {
    display: flex;

    align-items: center;

    gap: 12px;
}


.activity-heading-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eef4ff;

    color: #2563eb;

    border: 1px solid #dbe7ff;

    border-radius: 10px;

    font-size: 20px;
    font-weight: 700;
}


.activity-page-header h1 {
    margin: 0;

    color: #101828;

    font-size: 22px;

    font-weight: 700;

    line-height: 1.25;
}


.activity-page-header p {
    margin: 4px 0 0;

    color: #667085;

    font-size: 13px;

    line-height: 1.4;
}


/* =========================================================
   TOTAL BADGE
   ========================================================= */

.activity-total-badge {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 7px 11px;

    background: #f8fafc;

    border: 1px solid #e4e7ec;

    border-radius: 7px;

    color: #475467;

    font-size: 12px;

    font-weight: 600;

    white-space: nowrap;
}


.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #12b76a;
}


/* =========================================================
   SUMMARY CARDS
   ========================================================= */

.activity-stats {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 18px;
}


.activity-stat-card {
    min-width: 0;

    display: flex;

    align-items: center;

    gap: 11px;

    padding: 14px;

    background: #ffffff;

    border: 1px solid #e4e7ec;

    border-radius: 9px;

    box-sizing: border-box;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}


.activity-stat-card:hover {
    border-color: #d0d5dd;

    box-shadow:
        0 2px 7px rgba(16, 24, 40, .05);
}


/* =========================================================
   STAT ICONS
   ========================================================= */

.stat-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    font-size: 16px;

    font-weight: 700;
}


.stat-icon-all {
    background: #f2f4f7;

    color: #475467;
}


.stat-icon-created {
    background: #ecfdf3;

    color: #039855;
}


.stat-icon-updated {
    background: #eff8ff;

    color: #1570ef;
}


.stat-icon-deleted {
    background: #fef3f2;

    color: #d92d20;
}


.stat-icon-email {
    background: #f4f3ff;

    color: #6941c6;
}


/* =========================================================
   STAT CONTENT
   ========================================================= */

.stat-content {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 2px;
}


.stat-label {
    color: #667085;

    font-size: 11px;

    font-weight: 500;

    white-space: nowrap;
}


.stat-content strong {
    color: #101828;

    font-size: 19px;

    font-weight: 700;

    line-height: 1.2;
}


/* =========================================================
   MAIN ACTIVITY CARD
   ========================================================= */

.activity-card {
    width: 100%;

    background: #ffffff;

    border: 1px solid #e4e7ec;

    border-radius: 10px;

    overflow: hidden;

    box-sizing: border-box;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.activity-toolbar {
    min-height: 68px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;

    padding: 13px 17px;

    border-bottom: 1px solid #eaecf0;

    box-sizing: border-box;
}


.activity-toolbar-title {
    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;
}


.activity-toolbar-title h2 {
    margin: 0;

    color: #1d2939;

    font-size: 14px;

    font-weight: 700;
}


.activity-toolbar-title span {
    padding: 3px 7px;

    color: #667085;

    background: #f2f4f7;

    border-radius: 4px;

    font-size: 10px;

    font-weight: 600;
}


.activity-tools {
    display: flex;

    align-items: center;

    gap: 8px;
}


/* =========================================================
   SEARCH
   ========================================================= */

.activity-search {
    width: 220px;

    height: 34px;

    position: relative;

    display: flex;

    align-items: center;
}


.activity-search .search-icon {
    position: absolute;

    left: 10px;

    color: #98a2b3;

    font-size: 17px;

    line-height: 1;

    pointer-events: none;
}


.activity-search input {
    width: 100%;
    height: 100%;

    padding: 0 10px 0 31px;

    color: #344054;

    background: #ffffff;

    border: 1px solid #d0d5dd;

    border-radius: 6px;

    outline: none;

    font-family: inherit;

    font-size: 11px;

    box-sizing: border-box;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}


.activity-search input::placeholder {
    color: #98a2b3;
}


.activity-search input:focus {
    border-color: #84adff;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, .08);
}


/* =========================================================
   FILTER
   ========================================================= */

#activityFilter {
    height: 34px;

    min-width: 125px;

    padding: 0 28px 0 10px;

    color: #344054;

    background-color: #ffffff;

    border: 1px solid #d0d5dd;

    border-radius: 6px;

    outline: none;

    font-family: inherit;

    font-size: 11px;

    cursor: pointer;
}


#activityFilter:focus {
    border-color: #84adff;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, .08);
}


/* =========================================================
   TABLE WRAPPER
   ========================================================= */

.activity-table-wrapper {
    width: 100%;

    overflow-x: auto;

    scrollbar-width: thin;
}


/* =========================================================
   TABLE
   ========================================================= */

.activity-table {
    width: 100%;

    min-width: 760px;

    border-collapse: collapse;

    table-layout: fixed;
}


.activity-table thead {
    background: #f9fafb;
}


.activity-table th {
    height: 38px;

    padding: 0 17px;

    color: #667085;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: .04em;

    text-align: left;

    white-space: nowrap;

    border-bottom: 1px solid #eaecf0;
}


.activity-table th:nth-child(1) {
    width: 43%;
}


.activity-table th:nth-child(2) {
    width: 20%;
}


.activity-table th:nth-child(3) {
    width: 17%;
}


.activity-table th:nth-child(4) {
    width: 20%;
}


/* =========================================================
   TABLE ROW
   ========================================================= */

.activity-table tbody tr {
    height: 64px;

    border-bottom: 1px solid #f0f2f5;

    transition:
        background .12s ease;
}


.activity-table tbody tr:last-child {
    border-bottom: none;
}


.activity-table tbody tr:hover {
    background: #fafbfc;
}


.activity-table td {
    padding: 10px 17px;

    vertical-align: middle;

    color: #475467;

    font-size: 11px;
}


/* =========================================================
   ACTIVITY CELL
   ========================================================= */

.activity-main {
    min-width: 0;

    display: flex;

    align-items: center;

    gap: 10px;
}


.activity-type-icon {
    width: 31px;
    height: 31px;

    flex: 0 0 31px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 7px;

    font-size: 14px;

    font-weight: 700;
}


.activity-type-icon.created {
    color: #039855;

    background: #ecfdf3;
}


.activity-type-icon.updated {
    color: #2563eb;

    background: #eff6ff;
}


.activity-type-icon.deleted {
    color: #d92d20;

    background: #fef3f2;
}


.activity-type-icon.email {
    color: #6941c6;

    background: #f4f3ff;
}


.activity-type-icon.default {
    color: #667085;

    background: #f2f4f7;
}


.activity-info {
    min-width: 0;
}


.activity-name {
    overflow: hidden;

    color: #344054;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.35;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.activity-description {
    max-width: 500px;

    margin-top: 2px;

    overflow: hidden;

    color: #98a2b3;

    font-size: 10px;

    line-height: 1.35;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   USER
   ========================================================= */

.activity-user-cell {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    max-width: 100%;
}


.activity-avatar {
    width: 25px;
    height: 25px;

    flex: 0 0 25px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #f2f4f7;

    color: #475467;

    border-radius: 50%;

    font-size: 9px;

    font-weight: 700;
}


.activity-user-cell span {
    overflow: hidden;

    color: #475467;

    font-size: 11px;

    font-weight: 500;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   DOCUMENT
   ========================================================= */

.document-badge {
    display: inline-flex;

    align-items: center;

    max-width: 100%;

    padding: 4px 7px;

    overflow: hidden;

    color: #475467;

    background: #f8fafc;

    border: 1px solid #e4e7ec;

    border-radius: 5px;

    font-size: 9px;

    font-weight: 600;

    line-height: 1.2;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.no-document {
    color: #c0c5ce;

    font-size: 13px;
}


/* =========================================================
   DATE
   ========================================================= */

.activity-date-cell {
    display: flex;

    align-items: center;
}


.date-main {
    color: #667085;

    font-size: 10px;

    line-height: 1.3;

    white-space: nowrap;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.activity-pagination {
    min-height: 62px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 12px 17px;

    background: #ffffff;

    border-top: 1px solid #eaecf0;

    box-sizing: border-box;
}


/* =========================================================
   PAGINATION INFO
   ========================================================= */

.pagination-info {
    color: #667085;

    font-size: 10px;

    line-height: 1.4;

    white-space: nowrap;
}


.pagination-info strong {
    color: #344054;

    font-weight: 600;
}


/* =========================================================
   PAGINATION CONTROLS
   ========================================================= */

.pagination-controls {
    display: flex;

    align-items: center;

    gap: 5px;
}


/* =========================================================
   PREVIOUS / NEXT
   ========================================================= */

.pagination-btn {
    height: 30px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 5px;

    min-width: 67px;

    padding: 0 9px;

    color: #475467;

    background: #ffffff;

    border: 1px solid #d0d5dd;

    border-radius: 6px;

    font-size: 10px;

    font-weight: 600;

    text-decoration: none;

    box-sizing: border-box;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}


.pagination-btn:hover {
    background: #f9fafb;

    border-color: #bfc5ce;

    color: #344054;
}


.pagination-btn.disabled {
    color: #c4c8cf;

    background: #f9fafb;

    border-color: #eaecf0;

    cursor: not-allowed;

    pointer-events: none;
}


/* =========================================================
   PAGE NUMBERS
   ========================================================= */

.pagination-numbers {
    display: flex;

    align-items: center;

    gap: 3px;
}


.pagination-number {
    width: 30px;
    height: 30px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    color: #475467;

    background: #ffffff;

    border: 1px solid transparent;

    border-radius: 6px;

    font-size: 10px;

    font-weight: 600;

    text-decoration: none;

    box-sizing: border-box;

    transition:
        background .15s ease,
        color .15s ease,
        border-color .15s ease;
}


.pagination-number:hover {
    background: #f2f4f7;

    color: #344054;
}


.pagination-number.active {
    color: #ffffff;

    background: #2563eb;

    border-color: #2563eb;
}


.pagination-dots {
    width: 24px;
    height: 30px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    color: #98a2b3;

    font-size: 10px;
}


/* =========================================================
   EMPTY
   ========================================================= */

.activity-empty {
    padding: 70px 20px;

    text-align: center;
}


.empty-circle {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 auto 10px;

    color: #2563eb;

    background: #eef4ff;

    border-radius: 50%;

    font-size: 18px;

    font-weight: 700;
}


.activity-empty h3 {
    margin: 0 0 5px;

    color: #344054;

    font-size: 14px;

    font-weight: 600;
}


.activity-empty p {
    margin: 0;

    color: #98a2b3;

    font-size: 11px;
}


/* =========================================================
   NO SEARCH RESULTS
   ========================================================= */

.activity-no-results {
    padding: 55px 20px;

    text-align: center;
}


.no-results-icon {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 auto 9px;

    color: #667085;

    background: #f2f4f7;

    border-radius: 50%;

    font-size: 17px;
}


.activity-no-results h3 {
    margin: 0 0 4px;

    color: #344054;

    font-size: 13px;
}


.activity-no-results p {
    margin: 0;

    color: #98a2b3;

    font-size: 11px;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1200px) {

    .activity-page {
        max-width: 1400px;
    }

    .activity-page-header {
        margin-bottom: 24px;
    }

    .activity-stats {
        gap: 14px;
    }

    .activity-stat-card {
        padding: 15px;
    }

}


/* =========================================================
   LAPTOP
   ========================================================= */

@media (max-width: 1100px) {

    .activity-stats {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .activity-table {
        min-width: 720px;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .activity-page-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }


    .activity-total-badge {
        align-self: flex-start;
    }


    .activity-toolbar {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }


    .activity-toolbar-title {
        width: 100%;
    }


    .activity-tools {
        width: 100%;
    }


    .activity-search {
        flex: 1;

        width: auto;
    }


    .activity-pagination {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }


    .pagination-controls {
        width: 100%;

        justify-content: space-between;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .activity-page-header {
        margin-bottom: 16px;
    }


    .activity-heading-icon {
        width: 37px;
        height: 37px;

        flex-basis: 37px;

        border-radius: 8px;

        font-size: 17px;
    }


    .activity-page-header h1 {
        font-size: 18px;
    }


    .activity-page-header p {
        font-size: 11px;
    }


    /* STAT CARDS */

    .activity-stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;

        margin-bottom: 12px;
    }


    .activity-stat-card {
        padding: 11px;

        gap: 8px;
    }


    .stat-icon {
        width: 29px;
        height: 29px;

        flex-basis: 29px;

        font-size: 13px;
    }


    .stat-label {
        font-size: 9px;
    }


    .stat-content strong {
        font-size: 16px;
    }


    /* TOOLBAR */

    .activity-toolbar {
        padding: 12px;
    }


    .activity-tools {
        flex-direction: column;

        align-items: stretch;
    }


    .activity-search {
        width: 100%;
    }


    #activityFilter {
        width: 100%;
    }


    /* TABLE */

    .activity-table th,
    .activity-table td {
        padding-left: 12px;

        padding-right: 12px;
    }


    /* PAGINATION */

    .activity-pagination {
        padding: 12px;
    }


    .pagination-info {
        font-size: 9px;
    }


    .pagination-btn {
        height: 29px;

        padding: 0 7px;

        font-size: 9px;
    }


    .pagination-number {
        width: 28px;
        height: 29px;

        font-size: 9px;
    }


    .pagination-dots {
        width: 17px;

        font-size: 9px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .activity-page {
        width: 100%;
    }


    .activity-total-badge {
        font-size: 10px;
    }


    .activity-stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .activity-stat-card {
        padding: 9px;
    }


    .stat-content strong {
        font-size: 15px;
    }


    .pagination-prev,
    .pagination-next {
        min-width: 30px;
    }


    .pagination-prev span,
    .pagination-next span {
        display: none;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .pagination-controls {
        gap: 2px;
    }


    .pagination-number {
        width: 26px;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .activity-log-panel {
        padding: 18px;
    }


    .activity-item {
        grid-template-columns: 38px minmax(0, 1fr);

        gap: 10px;

        padding: 10px;
    }


    .activity-marker {
        width: 34px;
        height: 34px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .activity-log-panel {
        padding: 14px;
    }


    .activity-log-header {
        align-items: flex-start;

        gap: 10px;

        margin-bottom: 15px;
        padding-bottom: 13px;
    }


    .activity-title {
        gap: 9px;
    }


    .activity-main-icon {
        width: 35px;
        height: 35px;

        flex: 0 0 35px;

        border-radius: 8px;

        font-size: 15px;
    }


    .activity-title h2 {
        font-size: 16px;
    }


    .activity-title p {
        font-size: 10px;
    }


    .activity-count {
        padding: 6px 8px;

        font-size: 9px;

        white-space: nowrap;
    }


    .activity-item {
        grid-template-columns: 32px minmax(0, 1fr);

        gap: 9px;

        padding: 9px;
    }


    .activity-marker {
        width: 30px;
        height: 30px;

        font-size: 11px;

        border-radius: 7px;
    }


    .activity-action {
        font-size: 11px;
    }


    .activity-document {
        font-size: 8px;

        padding: 2px 5px;
    }


    .activity-details {
        font-size: 10px;
    }


    .activity-meta {
        font-size: 9px;
    }


    .user-avatar {
        width: 18px;
        height: 18px;

        font-size: 7px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .activity-log-panel {
        padding: 11px;
    }


    .activity-log-header {
        gap: 7px;
    }


    .activity-main-icon {
        width: 31px;
        height: 31px;

        flex-basis: 31px;

        font-size: 13px;
    }


    .activity-title h2 {
        font-size: 15px;
    }


    .activity-title p {
        font-size: 9px;
    }


    .activity-count {
        padding: 5px 6px;

        font-size: 8px;
    }


    .activity-item {
        grid-template-columns: 29px minmax(0, 1fr);

        gap: 8px;

        padding: 8px;
    }


    .activity-marker {
        width: 28px;
        height: 28px;

        font-size: 10px;
    }


    .activity-action {
        font-size: 10px;
    }


    .activity-details {
        font-size: 9px;
    }

}


/* =========================================================
   TABLET / SMALL LAPTOP
   ========================================================= */

@media (max-width: 1200px) {

	:root {
		--sidebar-w: var(--sidebar-w-md);
		--header-h: var(--header-h-md);
	}

	.top,
    .main {
		padding-left: 26px;
		padding-right: 26px;
	}

	.main {
		padding-top: 20px;
	}


    /* Dashboard */

	.dashboard-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 13px;
	}

	.cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.dashboard-chart-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 13px;
	}

	.dashboard-panel {
		padding: 16px;
	}

	.chart-area {
		gap: 18px;
	}

	.donut-wrapper {
		width: 145px;
		height: 145px;
		flex-basis: 145px;
	}


    /* Client */

	.grid2 {
		grid-template-columns: minmax(0, 1.45fr)
            minmax(290px, 1fr);
		gap: 16px;
	}

	.clientgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.client {
		padding: 14px;
	}
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

	:root {
		--sidebar-w: var(--sidebar-w-sm);
	}

	.sidebar {
		padding: 20px 10px;
	}

	.company-logo {
		width: 135px;
	}

	.sidebar nav a {
		padding: 10px 12px;
		font-size: 13px;
	}

	.top {
		height: 72px;
		padding: 12px 18px;
	}

	.top h1 {
		font-size: 22px;
	}

	.main {
		padding: 18px;
	}


    /* Dashboard */

	.dashboard-cards {
		gap: 10px;
	}

	.dashboard-card {
		padding: 13px;
	}

	.dashboard-card-icon {
		width: 36px;
		height: 36px;
		margin-bottom: 8px;
		font-size: 16px;
	}

	.dashboard-card-content strong {
		font-size: 18px;
	}

	.dashboard-chart-grid {
		gap: 10px;
	}

	.dashboard-panel {
		padding: 14px;
	}

	.panel-heading {
		margin-bottom: 10px;
	}

	.panel-heading h2 {
		font-size: 15px;
	}

	.panel-heading p {
		font-size: 11px;
	}

	.chart-area {
		flex-direction: column;
		gap: 10px;
		min-height: 0;
	}

	.donut-wrapper {
		width: 120px;
		height: 120px;
		flex-basis: 120px;
	}

	.donut-center strong {
		font-size: 18px;
	}

	.chart-legend {
		width: 100%;
		min-width: 0;
		gap: 6px;
	}

	.legend-item,
    .legend-item strong {
		font-size: 10px;
	}

	.quick-panel {
		margin-top: 12px;
	}

	.quick-actions {
		gap: 6px;
	}

	.btn {
		min-height: 34px;
		padding: 7px 10px;
		font-size: 11px;
	}


    /* =====================================================
       CLIENT - TABLET
       ===================================================== */

	.grid2 {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.grid2 .panel {
		width: 100%;
	}

	.clientgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.formgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.activity-panel {
		display: none;
	}
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    /* Header */

	.top {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		width: 100%;
		height: 64px;
		padding: 8px 11px;
		z-index: 4000;
		background: #fff;
		border-bottom: 1px solid #eaecf0;
		box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
	}

	.top h1 {
		max-width: calc(100vw - 65px);
		margin-bottom: 1px;
		font-size: 19px;
	}

	.top p {
		max-width: calc(100vw - 70px);
		font-size: 10px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.avatar {
		width: 34px;
		height: 34px;
		flex-basis: 34px;
		font-size: 12px;
	}


    /* Sidebar */

	.sidebar {
		position: fixed;
		top: 64px;
		left: 0;
		right: 0;
		bottom: auto;
		width: 100%;
		height: 52px;
		padding: 0 7px;
		z-index: 3500;
		display: flex;
		align-items: center;
		background: var(--navy);
		overflow: hidden;
	}

	.brand {
		display: none;
	}

	.sidebar nav {
		display: flex;
		flex-direction: row;
		align-items: center;
		width: 100%;
		height: 100%;
		gap: 4px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.sidebar nav::-webkit-scrollbar {
		display: none;
	}

	.sidebar nav a {
		flex: 0 0 auto;
		width: auto;
		min-height: 34px;
		margin: 0;
		padding: 7px 9px;
		border-radius: 7px;
		font-size: 11px;
		white-space: nowrap;
	}


    /* Main */

	.main {
		position: fixed;
		top: 116px;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		padding: 10px;
		overflow-y: auto;
	}


    /* Dashboard */

	.dashboard-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		margin-bottom: 8px;
	}

	.dashboard-card {
		padding: 12px;
		border-radius: 10px;
	}

	.dashboard-card-icon {
		width: 30px;
		height: 30px;
		margin-bottom: 6px;
		border-radius: 8px;
		font-size: 14px;
	}

	.dashboard-card-content span {
		margin-bottom: 2px;
		font-size: 9px;
	}

	.dashboard-card-content strong {
		margin-bottom: 2px;
		font-size: 16px;
	}

	.dashboard-card-content small {
		font-size: 8px;
	}

	.dashboard-chart-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.dashboard-panel {
		padding: 10px;
		border-radius: 10px;
	}

	.panel-heading {
		gap: 5px;
		margin-bottom: 6px;
	}

	.panel-heading h2 {
		font-size: 12px;
	}

	.panel-heading p {
		font-size: 8px;
		line-height: 1.3;
	}

	.chart-area {
		flex-direction: column;
		gap: 6px;
		min-height: 0;
	}

	.donut-wrapper {
		width: 105px;
		height: 105px;
		flex-basis: 105px;
	}

	.donut-center {
		width: 65px;
	}

	.donut-center strong {
		font-size: 16px;
	}

	.donut-center span {
		margin-top: 2px;
		font-size: 8px;
	}

	.chart-legend {
		width: 100%;
		min-width: 0;
		gap: 4px;
	}

	.legend-item {
		grid-template-columns: 6px 1fr auto;
		column-gap: 4px;
		font-size: 8px;
	}

	.legend-item strong {
		font-size: 8px;
	}

	.legend-dot {
		width: 6px;
		height: 6px;
	}


    /* Quick actions */

	.quick-panel {
		margin-top: 8px;
		padding: 10px;
	}

	.quick-panel .panel-heading {
		margin-bottom: 5px;
	}

	.quick-actions {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 5px;
	}

	.quick-actions .btn {
		width: 100%;
		min-height: 32px;
		padding: 5px 4px;
		font-size: 9px;
		text-align: center;
	}


    /* General */

	.activity-panel {
		display: none;
	}

	.cards {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.card {
		padding: 13px;
	}


    /* =====================================================
       CLIENT PAGE - MOBILE
       ===================================================== */

	.grid2 {
		grid-template-columns: 1fr;
		gap: 10px;
		margin-top: 10px;
	}

	.grid2 .panel {
		width: 100%;
		padding: 14px;
	}

	.grid2 .panel h2 {
		margin-bottom: 18px;
		font-size: 20px;
	}

	.clientgrid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.client {
		padding: 14px;
	}

	.client b {
		margin-bottom: 12px;
		font-size: 15px;
	}

	.client p {
		margin-bottom: 8px;
		font-size: 12px;
	}

	.client small {
		font-size: 11px;
	}

	.client-actions {
		gap: 6px;
		margin-top: 12px;
		padding-top: 10px;
	}

	.client-edit-btn,
    .client-delete-btn {
		min-height: 31px;
		padding: 6px 10px;
		font-size: 10px;
	}


    /* Form */

	.formgrid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.full {
		grid-column: auto;
	}

	.grid2 .formgrid input {
		height: 44px;
	}

	.grid2 .formgrid textarea {
		min-height: 110px;
	}


    /* Toolbar */

	.toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 7px;
	}

	.toolbar form {
		width: 100%;
		flex-direction: column;
		gap: 7px;
	}

	.toolbar button,
    .toolbar .btn {
		width: 100%;
	}


    /* Actions */

	.actions {
		flex-direction: column;
		align-items: stretch;
		gap: 7px;
	}

	.actions button,
    .actions .btn {
		width: 100%;
	}


    /* Table */

	table {
		min-width: 650px;
	}

	th,
    td {
		padding: 9px;
		font-size: 11px;
	}

	.flash {
		padding: 9px 11px;
		font-size: 12px;
	}
}


/*  VERY SMALL MOBILE */

@media (max-width: 400px) {

	.top {
		height: 60px;
		padding: 8px 9px;
	}

	.top h1 {
		font-size: 17px;
	}

	.top p {
		font-size: 9px;
	}

	.avatar {
		width: 32px;
		height: 32px;
		flex-basis: 32px;
	}

	.sidebar {
		top: 60px;
		height: 48px;
		padding: 0 6px;
	}

	.sidebar nav a {
		min-height: 32px;
		padding: 6px 8px;
		font-size: 10px;
	}

	.main {
		top: 108px;
		padding: 8px;
	}


    /* Dashboard */

	.dashboard-cards {
		gap: 5px;
	}

	.dashboard-card {
		padding: 8px;
	}

	.dashboard-card-icon {
		width: 27px;
		height: 27px;
		margin-bottom: 5px;
		font-size: 12px;
	}

	.dashboard-card-content span {
		font-size: 8px;
	}

	.dashboard-card-content strong {
		font-size: 13px;
	}

	.dashboard-card-content small {
		font-size: 7px;
	}

	.dashboard-chart-grid {
		gap: 5px;
	}

	.dashboard-panel {
		padding: 7px;
	}

	.panel-heading h2 {
		font-size: 10px;
	}

	.panel-heading p {
		font-size: 7px;
	}

	.donut-wrapper {
		width: 88px;
		height: 88px;
		flex-basis: 88px;
	}

	.donut-center {
		width: 55px;
	}

	.donut-center strong {
		font-size: 14px;
	}

	.donut-center span {
		font-size: 7px;
	}

	.legend-item,
    .legend-item strong {
		font-size: 7px;
	}

	.quick-panel {
		padding: 7px;
	}

	.quick-actions {
		gap: 4px;
	}

	.quick-actions .btn {
		min-height: 27px;
		padding: 4px 3px;
		font-size: 7px;
	}


    /* Client */

	.grid2 .panel {
		padding: 12px;
	}

	.grid2 .panel h2 {
		font-size: 18px;
		margin-bottom: 16px;
	}

	.client {
		padding: 12px;
	}

	.client b {
		font-size: 14px;
	}

	.client p,
    .client small {
		font-size: 11px;
	}
}


/* EXTRA SMALL DEVICES */

@media (max-width: 320px) {

	.top h1 {
		font-size: 16px;
	}

	.top p {
		display: none;
	}

	.sidebar nav a {
		padding: 6px 7px;
		font-size: 9px;
	}

	.main {
		padding-left: 7px;
		padding-right: 7px;
	}

	.dashboard-card-content strong {
		font-size: 12px;
	}

	.donut-wrapper {
		width: 80px;
		height: 80px;
		flex-basis: 80px;
	}

	.donut-center strong {
		font-size: 13px;
	}

    /* Client */

	.grid2 .panel {
		padding: 10px;
	}

	.grid2 .panel h2 {
		font-size: 17px;
	}

	.client {
		padding: 10px;
	}

	.client-actions {
		gap: 5px;
	}

	.client-edit-btn,
    .client-delete-btn {
		padding: 5px 8px;
		font-size: 9px;
	}
}

/* =========================================================
   QUOTATIONS PAGE - IMPROVED TOOLBAR
   Added after the existing responsive rules so these styles
   take priority on the Quotations page.
   ========================================================= */

.toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin-bottom: 16px;
	min-width: 0;
}

.toolbar form {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
}

/* Search box */
.toolbar form input[name="q"] {
	flex: 1 1 auto;
	width: 100%;
	min-width: 220px;
	height: 42px;
	padding: 0 14px;
	background: #ffffff;
	color: #172033;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	outline: none;
	font-size: 13px;
	transition: border-color .2s ease,
        box-shadow .2s ease;
}

.toolbar form input[name="q"]::placeholder {
	color: #98a2b3;
}

.toolbar form input[name="q"]:hover {
	border-color: #98a2b3;
}

.toolbar form input[name="q"]:focus {
	border-color: #2d6cdf;
	box-shadow: 0 0 0 3px rgba(45, 108, 223, .10);
}

/* Status dropdown */
.toolbar form select[name="status"] {
	width: 160px;
	min-width: 150px;
	height: 42px;
	padding: 0 12px;
	background: #ffffff;
	color: #344054;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	outline: none;
	cursor: pointer;
	font-size: 13px;
	transition: border-color .2s ease,
        box-shadow .2s ease;
}

.toolbar form select[name="status"]:hover {
	border-color: #98a2b3;
}

.toolbar form select[name="status"]:focus {
	border-color: #2d6cdf;
	box-shadow: 0 0 0 3px rgba(45, 108, 223, .10);
}

/* Filter button */
.toolbar form button {
	height: 42px;
	min-width: 82px;
	padding: 0 16px;
	background: #101c32;
	color: #ffffff;
	border: 1px solid #101c32;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s ease,
        border-color .2s ease,
        transform .12s ease;
}

.toolbar form button:hover {
	background: #1a2944;
	border-color: #1a2944;
	color: #ffffff;
}

.toolbar form button:active {
	transform: scale(.98);
}

/* Right-side toolbar links */
.toolbar > .btn {
	flex: 0 0 auto;
	height: 42px;
	min-height: 42px;
	padding: 0 15px;
}

/* New quotation */
.toolbar > .btn.primary {
	background: #2d6cdf;
	color: #ffffff;
	border-color: #2d6cdf;
}

.toolbar > .btn.primary:hover {
	background: #2459c7;
	border-color: #2459c7;
	color: #ffffff;
}

/* CSV */
.toolbar > .btn:not(.primary) {
	background: #ffffff;
	color: #344054;
	border-color: #d0d5dd;
}

.toolbar > .btn:not(.primary):hover {
	background: #f8fafc;
	color: #172033;
	border-color: #98a2b3;
}


/* QUOTATIONS SUMMARY */

.panel > p.muted {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
	color: #667085;
	font-size: 13px;
	line-height: 1.5;
}


/* QUOTATIONS TABLE */

.panel .table {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	border: 1px solid #eaecf0;
	border-radius: 10px;
	background: #ffffff;
	-webkit-overflow-scrolling: touch;
}

.panel .table table {
	width: 100%;
	min-width: 850px;
	border-collapse: collapse;
}

.panel .table th {
	padding: 12px 13px;
	background: #f8fafc;
	color: #667085;
	border-bottom: 1px solid #eaecf0;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
	white-space: nowrap;
}

.panel .table td {
	padding: 12px 13px;
	color: #344054;
	background: #ffffff;
	border-bottom: 1px solid #eaecf0;
	font-size: 13px;
	white-space: nowrap;
}

.panel .table tr:hover td {
	background: #f9fbff;
}

.panel .table tr:last-child td {
	border-bottom: none;
}

/* Quotation number */
.panel .table td b {
	color: #172033;
	font-weight: 700;
}

/* Client email */
.panel .table td small {
	display: inline-block;
	margin-top: 2px;
	color: #98a2b3;
	font-size: 11px;
}

/* Action buttons inside quotation table */
.panel .table td .btn {
	min-height: 32px;
	padding: 6px 10px;
	border-radius: 7px;
	font-size: 11px;
	font-weight: 600;
}

/* REQUIRED FIELD STAR */

.required-star {
	color: #d92d20;
	font-weight: 700;
	margin-left: 3px;
}

/* QUOTATION STATUS PAGE */

.quotation-status-panel {
	max-width: 900px;
	margin: 0 auto;
}


/* TOP BAR */

.status-topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding-bottom: 18px;
	margin-bottom: 24px;
	border-bottom: 1px solid #eaecf0;
}

.status-heading {
	display: flex;
	align-items: center;
	gap: 13px;
}

.status-icon {
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	border-radius: 10px;
	background: #eef4ff;
	color: #175cd3;
	font-size: 19px;
	font-weight: 700;
}

.status-heading h2 {
	margin: 0 0 4px;
	color: var(--text);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
}

.status-heading p {
	margin: 0;
	color: var(--text-muted);
	font-size: 13px;
}


/* CLOSE BUTTON */

.quotation-status-panel .close-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 0 0 auto;
	min-height: 36px;
	padding: 7px 12px;
	background: #fff;
	color: #667085;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	transition: background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .12s ease;
}

.quotation-status-panel .close-btn:hover {
	background: #fff1f1;
	color: #b42318;
	border-color: #f3b4b4;
}

.quotation-status-panel .close-btn:active {
	transform: scale(.97);
}

.quotation-status-panel .close-btn:first-letter {
	font-size: 20px;
	line-height: 1;
}


/* QUOTATION INFORMATION */

.quotation-status-card {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 28px;
}

.quotation-info {
	min-height: 86px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 16px 18px;
	background: #f8fafc;
	border: 1px solid #eaecf0;
	border-radius: 10px;
}

.info-label {
	margin-bottom: 7px;
	color: #667085;
	font-size: 12px;
	font-weight: 600;
}

.quotation-number {
	color: var(--text);
	font-size: 16px;
	font-weight: 700;
}


/* STATUS BADGE */

.status-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.status-good {
	background: #ecfdf3;
	color: #027a48;
}

.status-bad {
	background: #fef3f2;
	color: #b42318;
}

.status-warning {
	background: #fffaeb;
	color: #b54708;
}


/* FORM */

.status-form {
	padding-top: 4px;
}

.status-field {
	display: flex;
	flex-direction: column;
}

.status-field label {
	margin-bottom: 7px;
	color: var(--text);
	font-size: 13px;
	font-weight: 600;
}

.status-field select {
	width: 100%;
	min-height: 44px;
	padding: 10px 13px;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	color: var(--text);
	font-size: 13px;
	outline: none;
	transition: border-color .2s ease,
        box-shadow .2s ease;
}

.status-field select:hover {
	border-color: #98a2b3;
}

.status-field select:focus {
	border-color: #84adff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.status-field small {
	margin-top: 6px;
	color: #98a2b3;
	font-size: 11px;
}


/* ACTION BUTTONS */

.status-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 26px;
	padding-top: 18px;
	border-top: 1px solid #eaecf0;
}

.status-actions .btn,
.status-actions button {
	min-height: 40px;
}


/* TABLET */

@media (max-width: 700px) {

	.quotation-status-panel {
		max-width: 100%;
	}

	.quotation-status-card {
		grid-template-columns: 1fr;
	}
}


/*  MOBILE */

@media (max-width: 600px) {

	.status-topbar {
		align-items: center;
		gap: 10px;
		padding-bottom: 14px;
		margin-bottom: 18px;
	}

	.status-heading {
		gap: 10px;
	}

	.status-icon {
		width: 36px;
		height: 36px;
		flex-basis: 36px;
		border-radius: 8px;
		font-size: 16px;
	}

	.status-heading h2 {
		font-size: 16px;
	}

	.status-heading p {
		font-size: 11px;
	}

	.quotation-status-panel .close-btn {
		min-height: 34px;
		padding: 6px 9px;
		font-size: 11px;
	}

	.quotation-status-panel .close-btn span {
		display: none;
	}

	.quotation-status-panel .close-btn:first-letter {
		font-size: 20px;
	}

	.quotation-status-card {
		gap: 10px;
		margin-bottom: 20px;
	}

	.quotation-info {
		min-height: 76px;
		padding: 13px 14px;
	}

	.quotation-number {
		font-size: 14px;
	}

	.status-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		margin-top: 20px;
		padding-top: 14px;
	}

	.status-actions .btn,
    .status-actions button {
		width: 100%;
	}
}


/* SMALL MOBILE */

@media (max-width: 400px) {

	.status-topbar {
		gap: 7px;
		margin-bottom: 14px;
		padding-bottom: 11px;
	}

	.status-heading {
		gap: 8px;
	}

	.status-icon {
		width: 32px;
		height: 32px;
		flex-basis: 32px;
		border-radius: 7px;
		font-size: 14px;
	}

	.status-heading h2 {
		font-size: 15px;
	}

	.status-heading p {
		font-size: 10px;
	}

	.quotation-status-panel .close-btn {
		width: 32px;
		min-height: 32px;
		padding: 4px;
		border-radius: 7px;
	}

	.quotation-status-panel .close-btn:first-letter {
		font-size: 19px;
	}

	.quotation-info {
		min-height: 70px;
		padding: 11px 12px;
	}

	.info-label {
		font-size: 11px;
	}

	.quotation-number {
		font-size: 13px;
	}

	.status-field label {
		font-size: 12px;
	}

	.status-field select {
		min-height: 42px;
		padding: 9px 11px;
		font-size: 12px;
	}
}
/*  QUOTATIONS - SMALL LAPTOP */

@media (max-width: 1100px) {

	.toolbar {
		gap: 8px;
	}

	.toolbar form {
		gap: 8px;
	}

	.toolbar form input[name="q"] {
		min-width: 170px;
	}

	.toolbar form select[name="status"] {
		width: 140px;
		min-width: 140px;
	}

	.toolbar > .btn {
		padding: 0 12px;
		font-size: 12px;
	}
}


/* QUOTATIONS - TABLET*/

@media (max-width: 800px) {

	.toolbar {
		flex-wrap: wrap;
	}

	.toolbar form {
		flex: 1 1 100%;
		width: 100%;
	}

	.toolbar form input[name="q"] {
		min-width: 0;
	}

	.toolbar > .btn {
		flex: 1 1 0;
	}
}


/* QUOTATIONS - MOBILE */

@media (max-width: 600px) {

	.toolbar {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.toolbar form {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 8px;
	}

	.toolbar form input[name="q"],
    .toolbar form select[name="status"],
    .toolbar form button {
		width: 100%;
		min-width: 0;
		height: 42px;
	}

	.toolbar > .btn {
		width: 100%;
		min-height: 42px;
		height: 42px;
		flex: 0 0 auto;
	}

	.panel > p.muted {
		flex-wrap: wrap;
		line-height: 1.5;
	}

	.panel .table {
		border-radius: 8px;
	}

	.panel .table table {
		min-width: 850px;
	}
}


/* QUOTATIONS - VERY SMALL MOBILE */

@media (max-width: 400px) {

	.toolbar {
		gap: 6px;
	}

	.toolbar form {
		gap: 6px;
	}

	.toolbar form input[name="q"],
    .toolbar form select[name="status"],
    .toolbar form button,
    .toolbar > .btn {
		height: 40px;
		min-height: 40px;
		font-size: 11px;
	}

	.toolbar form input[name="q"] {
		padding: 0 11px;
	}

	.toolbar form select[name="status"] {
		padding: 0 10px;
	}

	.toolbar form button,
    .toolbar > .btn {
		padding-left: 10px;
		padding-right: 10px;
	}
}


/* QUOTATION FORM TOP BAR */

.quotation-form-panel {
	position: relative;
}

.form-topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid #eaecf0;
}

.form-topbar h2 {
	margin: 0 0 4px;
	color: var(--text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.form-topbar p {
	margin: 0;
	color: var(--text-muted);
	font-size: 13px;
}


/* CLOSE BUTTON */

.close-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 0 0 auto;
	min-height: 36px;
	padding: 7px 12px;
	background: #ffffff;
	color: #667085;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	transition: background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .12s ease;
}

.close-btn:hover {
	background: #fff1f1;
	color: #b42318;
	border-color: #f3b4b4;
}

.close-btn:active {
	transform: scale(.97);
}

.close-btn:first-letter {
	font-size: 20px;
	line-height: 1;
}


/* QUOTATION FORM ACTIONS */

.quotation-form-panel .actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid #eaecf0;
}

.quotation-form-panel .actions .btn,
.quotation-form-panel .actions button {
	min-height: 40px;
}


/* QUOTATION FORM - MOBILE */

@media (max-width: 600px) {

	.form-topbar {
		align-items: center;
		gap: 10px;
		margin-bottom: 16px;
		padding-bottom: 12px;
	}

	.form-topbar h2 {
		font-size: 16px;
	}

	.form-topbar p {
		font-size: 11px;
	}

	.close-btn {
		min-height: 34px;
		padding: 6px 9px;
		font-size: 11px;
	}

	.close-btn span {
		display: none;
	}

	.close-btn:first-letter {
		font-size: 20px;
	}

	.quotation-form-panel .actions {
		flex-direction: column;
		align-items: stretch;
		gap: 7px;
	}

	.quotation-form-panel .actions .btn,
    .quotation-form-panel .actions button {
		width: 100%;
	}
}
/* QUOTATION FORM - VERY SMALL MOBILE */

@media (max-width: 400px) {

	.form-topbar {
		gap: 7px;
		margin-bottom: 13px;
		padding-bottom: 10px;
	}

	.form-topbar h2 {
		font-size: 15px;
	}

	.form-topbar p {
		font-size: 10px;
	}

	.close-btn {
		min-height: 32px;
		width: 32px;
		padding: 4px;
		border-radius: 7px;
	}

	.close-btn:first-letter {
		font-size: 19px;
	}
}
/* =========================================================
   PAYMENT TRACKING PAGE
   ========================================================= */

.payment-tracking-panel {
    max-width: 900px;
    margin: 0 auto;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.payment-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
    padding-bottom: 18px;

    border-bottom: 1px solid #eaecf0;
}


.payment-heading {
    display: flex;
    align-items: center;

    gap: 13px;
}


.payment-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #eef4ff;
    color: #175cd3;

    font-size: 18px;
    font-weight: 700;
}


.payment-heading h2 {
    margin: 0 0 4px;

    color: var(--text);

    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}


.payment-heading p {
    margin: 0;

    color: var(--text-muted);

    font-size: 13px;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.payment-tracking-panel .close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    flex: 0 0 auto;

    min-height: 36px;

    padding: 7px 12px;

    background: #fff;
    color: #667085;

    border: 1px solid #d0d5dd;
    border-radius: 8px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .12s ease;
}


.payment-tracking-panel .close-btn:hover {
    background: #fff1f1;

    color: #b42318;

    border-color: #f3b4b4;
}


.payment-tracking-panel .close-btn:active {
    transform: scale(.97);
}


.payment-tracking-panel .close-btn:first-letter {
    font-size: 20px;
    line-height: 1;
}


/* =========================================================
   PAYMENT SUMMARY
   ========================================================= */

.payment-summary {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;

    margin-bottom: 28px;
}


.payment-summary-card {
    min-height: 95px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 17px 19px;

    background: #f8fafc;

    border: 1px solid #eaecf0;

    border-radius: 10px;
}


.payment-summary-label {
    margin-bottom: 7px;

    color: #667085;

    font-size: 12px;
    font-weight: 600;
}


.payment-summary-card strong {
    color: var(--text);

    font-size: 18px;
    font-weight: 700;
}


.payment-summary-card .balance-amount {
    color: #175cd3;
}


/* =========================================================
   PAYMENT FORM
   ========================================================= */

.payment-form {
    padding-top: 2px;
}


.payment-form .formgrid {
    margin-top: 0;
}


/* =========================================================
   REQUIRED STAR
   ========================================================= */

.payment-form .required-star {
    color: #d92d20;

    font-weight: 700;

    margin-left: 3px;
}


/* =========================================================
   PAYMENT INPUTS
   ========================================================= */

.payment-form input,
.payment-form select {
    width: 100%;
}


.payment-form input:focus,
.payment-form select:focus {
    outline: none;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.payment-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 26px;
    padding-top: 18px;

    border-top: 1px solid #eaecf0;
}


.payment-actions .btn,
.payment-actions button {
    min-height: 40px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 700px) {

    .payment-tracking-panel {
        max-width: 100%;
    }

    .payment-summary {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .payment-topbar {
        align-items: center;

        gap: 10px;

        margin-bottom: 18px;
        padding-bottom: 14px;
    }


    .payment-heading {
        gap: 10px;
    }


    .payment-icon {
        width: 36px;
        height: 36px;

        flex-basis: 36px;

        border-radius: 8px;

        font-size: 16px;
    }


    .payment-heading h2 {
        font-size: 16px;
    }


    .payment-heading p {
        font-size: 11px;
    }


    .payment-tracking-panel .close-btn {
        min-height: 34px;

        padding: 6px 9px;

        font-size: 11px;
    }


    .payment-tracking-panel .close-btn span {
        display: none;
    }


    .payment-tracking-panel .close-btn:first-letter {
        font-size: 20px;
    }


    .payment-summary {
        gap: 10px;

        margin-bottom: 20px;
    }


    .payment-summary-card {
        min-height: 78px;

        padding: 13px 14px;
    }


    .payment-summary-card strong {
        font-size: 16px;
    }


    .payment-actions {
        flex-direction: column;

        align-items: stretch;

        gap: 8px;

        margin-top: 20px;
        padding-top: 14px;
    }


    .payment-actions .btn,
    .payment-actions button {
        width: 100%;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .payment-topbar {
        gap: 7px;

        margin-bottom: 14px;
        padding-bottom: 11px;
    }


    .payment-heading {
        gap: 8px;
    }


    .payment-icon {
        width: 32px;
        height: 32px;

        flex-basis: 32px;

        border-radius: 7px;

        font-size: 14px;
    }


    .payment-heading h2 {
        font-size: 15px;
    }


    .payment-heading p {
        font-size: 10px;
    }


    .payment-tracking-panel .close-btn {
        width: 32px;
        min-height: 32px;

        padding: 4px;

        border-radius: 7px;
    }


    .payment-tracking-panel .close-btn:first-letter {
        font-size: 19px;
    }


    .payment-summary-card {
        min-height: 70px;

        padding: 11px 12px;
    }


    .payment-summary-label {
        font-size: 11px;
    }


    .payment-summary-card strong {
        font-size: 14px;
    }

}
/* =========================================================
   AUTOMATION SETTINGS
   ========================================================= */

.automation-settings-panel {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    box-sizing: border-box;
}

/* =========================================================
   HEADER
   ========================================================= */

.automation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 20px;
    padding-bottom: 16px;

    border-bottom: 1px solid #eaecf0;
}

.automation-title {
    display: flex;
    align-items: center;
    gap: 11px;

    margin: 0;
}

.automation-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eff6ff;
    color: #2563eb;

    border-radius: 8px;

    font-size: 18px;
    line-height: 1;
}

.automation-title h2 {
    margin: 0 0 3px;

    color: #101828;

    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}

.automation-title .muted {
    margin: 0;

    color: #667085;

    font-size: 13px;
    line-height: 1.4;
}

.automation-count {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;
    padding: 5px 10px;

    background: #f8fafc;
    color: #475467;

    border: 1px solid #e4e7ec;
    border-radius: 6px;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;
}

/* =========================================================
   INFORMATION BOX
   ========================================================= */

.automation-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-bottom: 18px;
    padding: 12px 14px;

    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 7px;

    box-sizing: border-box;
}

.automation-info-icon {
    width: 19px;
    height: 19px;
    min-width: 19px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 1px;

    background: #2563eb;
    color: #ffffff;

    border-radius: 50%;

    font-size: 11px;
    font-weight: 700;
}

.automation-info strong {
    display: block;

    margin-bottom: 2px;

    color: #344054;

    font-size: 13px;
    font-weight: 700;
}

.automation-info p {
    margin: 0;

    color: #667085;

    font-size: 13px;
    line-height: 1.45;
}

/* =========================================================
   RULE LIST
   ========================================================= */

.automation-rules {
    display: flex;
    flex-direction: column;
    gap: 9px;

    width: 100%;
}

/* =========================================================
   SINGLE RULE
   ========================================================= */

.automation-rule {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 265px;
    align-items: center;

    width: 100%;
    min-height: 92px;

    padding: 14px 16px;

    background: #ffffff;

    border: 1px solid #e4e7ec;
    border-radius: 7px;

    box-sizing: border-box;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.automation-rule:hover {
    background: #fcfcfd;
    border-color: #d0d5dd;
}

/* =========================================================
   RULE MAIN
   ========================================================= */

.rule-main {
    min-width: 0;
    padding-right: 22px;
}

.rule-type {
    display: inline-flex;
    align-items: center;

    margin-bottom: 6px;
    padding: 3px 7px;

    background: #f2f4f7;
    color: #475467;

    border-radius: 4px;

    font-size: 10px;
    line-height: 1.3;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.rule-content {
    min-width: 0;
}

.rule-content h3 {
    margin: 0 0 3px;

    color: #101828;

    font-size: 15px;
    line-height: 1.35;
    font-weight: 650;

    word-break: break-word;
}

.rule-content p {
    margin: 0;

    color: #667085;

    font-size: 13px;
    line-height: 1.4;

    word-break: break-word;
}

/* =========================================================
   RULE SETTINGS
   ========================================================= */

.rule-settings {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 22px;

    min-width: 0;
}

/* =========================================================
   DAYS
   ========================================================= */

.rule-days,
.rule-status {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rule-days > label,
.rule-status > label:first-child {
    color: #475467;

    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}

/* Days input */

.days-input {
    display: flex;
    align-items: center;

    width: 115px;
    height: 36px;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #d0d5dd;
    border-radius: 6px;

    box-sizing: border-box;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.days-input:focus-within {
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.days-input input {
    width: 65px;
    height: 100%;

    padding: 5px 7px;

    color: #101828;
    background: transparent;

    border: 0;
    outline: none;

    font-family: inherit;

    font-size: 13px;
    font-weight: 600;

    text-align: center;

    box-sizing: border-box;
}

.days-input input::-webkit-inner-spin-button,
.days-input input::-webkit-outer-spin-button {
    opacity: 1;
}

.days-input span {
    color: #667085;

    font-size: 12px;
    font-weight: 500;

    white-space: nowrap;
}

/* =========================================================
   STATUS
   ========================================================= */

.rule-status {
    min-width: 110px;
}

.status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 36px;
    width: fit-content;

    cursor: pointer;
    user-select: none;
}

.status-toggle input {
    position: absolute;

    width: 1px;
    height: 1px;

    margin: -1px;
    padding: 0;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}

/* Toggle track */

.toggle-track {
    position: relative;

    width: 38px;
    height: 22px;
    min-width: 38px;

    background: #d0d5dd;

    border-radius: 20px;

    transition: background-color 0.18s ease;
}

/* Toggle thumb */

.toggle-thumb {
    position: absolute;

    top: 3px;
    left: 3px;

    width: 16px;
    height: 16px;

    background: #ffffff;

    border-radius: 50%;

    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.25);

    transition: transform 0.18s ease;
}

/* Enabled */

.status-toggle input:checked + .toggle-track {
    background: #2563eb;
}

.status-toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(16px);
}

/* Keyboard focus */

.status-toggle input:focus-visible + .toggle-track {
    outline: 3px solid rgba(37, 99, 235, 0.12);
    outline-offset: 2px;
}

/* Status text */

.toggle-text {
    color: #667085;

    font-size: 13px;
    line-height: 1;
    font-weight: 600;

    white-space: nowrap;
}

.toggle-on {
    display: none;
    color: #2563eb;
}

.toggle-off {
    display: inline;
    color: #667085;
}

.status-toggle input:checked ~ .toggle-text .toggle-on {
    display: inline;
}

.status-toggle input:checked ~ .toggle-text .toggle-off {
    display: none;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.automation-empty {
    width: 100%;

    padding: 30px 18px;

    color: #667085;

    background: #f9fafb;

    border: 1px dashed #d0d5dd;
    border-radius: 7px;

    font-size: 13px;

    text-align: center;

    box-sizing: border-box;
}

/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.automation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 9px;

    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid #eaecf0;
}

.automation-actions .btn,
.automation-actions button {
    min-height: 38px;

    padding: 7px 15px;

    border-radius: 6px;

    font-family: inherit;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .automation-settings-panel {
        padding: 20px;
    }

    .automation-rule {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .rule-main {
        padding-right: 0;
    }

    .rule-settings {
        justify-content: flex-start;

        padding-top: 13px;

        border-top: 1px solid #eaecf0;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .automation-settings-panel {
        padding: 16px;
        border-radius: 8px;
    }

    .automation-header {
        align-items: flex-start;
        gap: 12px;
    }

    .automation-title {
        gap: 9px;
    }

    .automation-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;

        font-size: 17px;
    }

    .automation-title h2 {
        font-size: 17px;
    }

    .automation-title .muted {
        font-size: 12px;
    }

    .automation-count {
        padding: 5px 8px;
        font-size: 12px;
    }

    .automation-info {
        padding: 11px 12px;
    }

    .automation-info strong,
    .automation-info p {
        font-size: 12px;
    }

    .automation-rule {
        padding: 14px;
    }

    .rule-content h3 {
        font-size: 14px;
    }

    .rule-content p {
        font-size: 12px;
    }

    .rule-settings {
        justify-content: space-between;
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .automation-settings-panel {
        padding: 13px;
    }

    .automation-header {
        flex-direction: column;
    }

    .automation-count {
        align-self: flex-start;
    }

    .automation-rule {
        padding: 12px;
    }

    .rule-settings {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .days-input {
        width: 130px;
    }

    .automation-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .automation-actions .btn,
    .automation-actions button {
        width: 100%;
    }
}

/* =========================================================
   DASHBOARD DATE FILTER (small popover)
   ========================================================= */

.dash-filter {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}

.dash-filter .dash-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-size: 12px;
    font-weight: 600;
}

.dash-filter .dash-filter-toggle.is-active {
    border-color: var(--blue, #2d5bff);
    color: var(--blue, #2d5bff);
}

.dash-filter .dash-filter-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
}

.dash-filter .dash-filter-pop[hidden] {
    display: none;
}

.dash-filter .dash-filter-pop label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    color: #667085;
}

.dash-filter .dash-filter-pop input[type="date"] {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 12px;
    color: #101828;
}

.dash-filter .dash-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-filter .dash-filter-pop .dash-filter-apply {
    flex: 1;
    min-height: 28px;
    height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: var(--blue, #2d5bff);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.dash-filter .dash-filter-pop .dash-filter-apply:hover {
    background: var(--blue, #2d5bff);
    filter: brightness(.92);
    color: #fff;
}

.dash-filter .dash-filter-reset {
    font-size: 12px;
    color: #667085;
    text-decoration: none;
}

.dash-filter .dash-filter-reset:hover {
    color: #101828;
    text-decoration: underline;
}