:root {
	--dgf-bg: #f3f4f6;
	--dgf-panel: #ffffff;
	--dgf-text: #15171a;
	--dgf-muted: #69707d;
	--dgf-line: #dfe3e8;
	--dgf-dark: #0f1115;
	--dgf-accent: #6cff7d;
	--dgf-danger: #d63638;
	--dgf-warning: #b26200;
}

body[class*="dgf-"] #wpcontent,
body.toplevel_page_dgf-dashboard #wpcontent { background: var(--dgf-bg); }

.dgf-wrap { margin: 0 20px 40px 2px; color: var(--dgf-text); max-width: none; }
.dgf-wrap * { box-sizing: border-box; }

.dgf-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 30px;
	padding: 34px 38px;
	margin: 0 -20px 28px -2px;
	background: var(--dgf-dark);
	color: #fff;
	border-bottom: 4px solid var(--dgf-accent);
}
.dgf-brand { display: inline-block; margin-bottom: 22px; font-size: 12px; letter-spacing: .22em; color: #aab0ba; font-weight: 700; }
.dgf-brand b { color: var(--dgf-accent); }
.dgf-header h1 { margin: 0; color: #fff; font-size: clamp(30px, 3vw, 48px); line-height: 1; font-weight: 750; letter-spacing: -.04em; }
.dgf-header p { margin: 12px 0 0; color: #aeb4bd; font-size: 15px; }
.dgf-header .button-hero { min-height: 46px; display: inline-flex; align-items: center; padding: 0 22px; background: var(--dgf-accent); border-color: var(--dgf-accent); color: #0a0d0c; font-weight: 700; border-radius: 0; }
.dgf-header .button-hero:hover,
.dgf-header .button-hero:focus { background: #91ff9d; border-color: #91ff9d; color: #000; }

.dgf-kicker { display: block; margin-bottom: 6px; color: #727a86; font-size: 10px; line-height: 1.2; font-weight: 800; letter-spacing: .18em; }
.dgf-panel {
	background: var(--dgf-panel);
	border: 1px solid var(--dgf-line);
	padding: 26px;
	box-shadow: 0 8px 30px rgba(18, 25, 38, .04);
	border-radius: 0;
}
.dgf-panel h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.dgf-panel-narrow { max-width: 1080px; }
.dgf-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dgf-panel-head .button { border-radius: 0; }

.dgf-stats { display: grid; grid-template-columns: repeat(5, minmax(155px, 1fr)); gap: 14px; margin-bottom: 20px; }
.dgf-stat { display: flex; gap: 16px; align-items: center; min-height: 108px; padding: 20px; background: #fff; border: 1px solid var(--dgf-line); border-top: 3px solid var(--dgf-dark); }
.dgf-stat > .dashicons { width: 38px; height: 38px; font-size: 38px; color: #8b929d; }
.dgf-stat strong { display: block; font-size: 25px; line-height: 1.15; letter-spacing: -.04em; }
.dgf-stat small { display: block; margin-top: 5px; color: var(--dgf-muted); }
.dgf-stat.danger { border-top-color: var(--dgf-danger); background: #fff8f8; }
.dgf-stat.danger > .dashicons { color: var(--dgf-danger); }

.dgf-grid { display: grid; gap: 20px; }
.dgf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dgf-grid-main-side { grid-template-columns: minmax(0, 1.8fr) minmax(320px, .8fr); align-items: start; }
.dgf-side-stack { display: grid; gap: 20px; }

.dgf-list { border-top: 1px solid var(--dgf-line); }
.dgf-list-row { min-height: 68px; display: flex; align-items: center; gap: 14px; padding: 13px 5px; border-bottom: 1px solid var(--dgf-line); color: var(--dgf-text); text-decoration: none; }
.dgf-list-row-link:hover { background: #f7f8fa; color: var(--dgf-text); }
.dgf-list-row.is-overdue { border-left: 3px solid var(--dgf-danger); padding-left: 10px; }
.dgf-list-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; background: #f0f2f4; }
.dgf-list-main { flex: 1; min-width: 0; }
.dgf-list-main strong { display: block; font-size: 14px; }
.dgf-meta { margin-top: 4px; color: var(--dgf-muted); font-size: 12px; line-height: 1.45; }
.dgf-action-link { font-weight: 700; text-decoration: none; }

.dgf-empty { min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--dgf-muted); }
.dgf-empty .dashicons { width: 34px; height: 34px; margin-bottom: 10px; font-size: 34px; color: #9aa2ad; }
.dgf-empty strong { color: var(--dgf-text); }
.dgf-empty p { margin: 6px 0 0; }

.dgf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px; margin-bottom: 14px; background: #fff; border: 1px solid var(--dgf-line); }
.dgf-toolbar form { display: flex; gap: 8px; flex: 1; }
.dgf-toolbar input[type="search"] { width: min(520px, 100%); min-height: 38px; border-radius: 0; }
.dgf-toolbar .button { min-height: 38px; border-radius: 0; }
.dgf-counter { color: var(--dgf-muted); font-size: 12px; }

.dgf-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--dgf-line); }
.dgf-table { border: 0; box-shadow: none; }
.dgf-table thead th { padding: 15px 12px; background: #111419; color: #fff; border-bottom: 0; font-weight: 650; }
.dgf-table tbody td { padding: 15px 12px; vertical-align: middle; }
.dgf-table tbody tr:hover td { background: #fafbfc; }
.dgf-table a { text-decoration: none; }
.dgf-actions { text-align: right; white-space: nowrap; }
.dgf-row-overdue td:first-child { border-left: 4px solid var(--dgf-danger); }

.dgf-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; background: #edf0f3; color: #3b424d; font-size: 11px; font-weight: 750; line-height: 1.2; border-radius: 0; }
.dgf-badge.status-care,
.dgf-badge.is-success,
.dgf-badge.stage-won { background: #dff8e3; color: #146b22; }
.dgf-badge.status-inactive,
.dgf-badge.status-former,
.dgf-badge.stage-lost { background: #eceef1; color: #666e79; }
.dgf-badge.is-warning,
.dgf-badge.priority-high { background: #fff0d8; color: #8a4a00; }
.dgf-badge.priority-urgent { background: #ffe1e1; color: #a41719; }
.dgf-badge.stage-offer_sent,
.dgf-badge.stage-waiting { background: #e8e3ff; color: #4b35a8; }

.dgf-form-section { margin: 6px 0 18px; padding-top: 16px; border-top: 1px solid var(--dgf-line); }
.dgf-form-section:first-child { padding-top: 0; border-top: 0; }
.dgf-fields { display: grid; gap: 18px; }
.dgf-fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dgf-field { display: flex; flex-direction: column; gap: 7px; }
.dgf-field > span { color: #3e4651; font-size: 12px; font-weight: 700; }
.dgf-field input,
.dgf-field select,
.dgf-field textarea,
.dgf-note-form textarea { width: 100%; min-height: 42px; border: 1px solid #cbd0d7; border-radius: 0; box-shadow: none; }
.dgf-field input:focus,
.dgf-field select:focus,
.dgf-field textarea:focus,
.dgf-note-form textarea:focus { border-color: #15171a; box-shadow: 0 0 0 1px #15171a; }
.dgf-field textarea { resize: vertical; }
.dgf-field-full { margin-top: 18px; }
.dgf-check { display: flex; gap: 9px; align-items: center; margin: 20px 0; font-weight: 650; }
.dgf-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--dgf-line); }
.dgf-form-actions .button { border-radius: 0; }
.dgf-form-actions .button-primary { background: #111419; border-color: #111419; }
.dgf-form-actions .button-primary:hover { background: #2c3138; border-color: #2c3138; }
.dgf-delete { margin-left: auto !important; color: var(--dgf-danger) !important; }

.dgf-mini-list { display: grid; border-top: 1px solid var(--dgf-line); }
.dgf-mini-list a { display: flex; flex-direction: column; padding: 12px 2px; border-bottom: 1px solid var(--dgf-line); text-decoration: none; }
.dgf-mini-list a:hover { background: #f7f8fa; }
.dgf-mini-list strong { color: var(--dgf-text); }
.dgf-mini-list span { margin-top: 3px; color: var(--dgf-muted); font-size: 12px; }
.dgf-muted { color: var(--dgf-muted); }
.dgf-note-form { display: grid; gap: 8px; margin-bottom: 20px; }
.dgf-note-form .button { justify-self: start; border-radius: 0; }
.dgf-timeline { border-left: 1px solid var(--dgf-line); margin-left: 7px; padding-left: 20px; }
.dgf-timeline-item { position: relative; padding: 0 0 20px; }
.dgf-timeline-item .dgf-dot { position: absolute; left: -25px; top: 4px; width: 9px; height: 9px; background: var(--dgf-dark); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--dgf-dark); }
.dgf-timeline-item strong { display: block; font-size: 12px; line-height: 1.45; }
.dgf-timeline-item small { display: block; margin-top: 5px; color: var(--dgf-muted); }

.dgf-kanban-wrap { overflow: hidden; }
.dgf-kanban { display: flex; gap: 14px; overflow-x: auto; padding: 0 0 25px; align-items: flex-start; }
.dgf-kanban-column { min-width: 285px; width: 285px; background: #e9ebee; border-top: 3px solid #20242a; }
.dgf-kanban-column > header { min-height: 86px; display: flex; justify-content: space-between; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--dgf-line); border-top: 0; }
.dgf-kanban-column h3 { margin: 0 0 5px; font-size: 14px; }
.dgf-kanban-column header span { color: var(--dgf-muted); font-size: 11px; }
.dgf-kanban-column header > strong { font-size: 12px; white-space: nowrap; }
.dgf-kanban-list { min-height: 180px; padding: 10px; }
.dgf-kanban-card { margin-bottom: 10px; padding: 14px; background: #fff; border: 1px solid #d4d8de; cursor: grab; box-shadow: 0 3px 12px rgba(20, 27, 39, .05); }
.dgf-kanban-card.ui-sortable-helper { transform: rotate(1deg); box-shadow: 0 12px 35px rgba(15, 20, 30, .18); }
.dgf-kanban-card.is-saving { opacity: .55; }
.dgf-kanban-card > a { display: block; color: var(--dgf-text); text-decoration: none; }
.dgf-kanban-card > a strong { display: block; line-height: 1.35; }
.dgf-company { display: block; margin-top: 5px; color: var(--dgf-muted); font-size: 12px; }
.dgf-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eceef1; }
.dgf-card-foot b { font-size: 12px; }
.dgf-next { display: flex; gap: 7px; align-items: flex-start; margin-top: 12px; color: #4c5562; font-size: 11px; line-height: 1.4; }
.dgf-next .dashicons { width: 14px; height: 14px; font-size: 14px; }
.dgf-next small { display: block; color: #878e98; }
.dgf-kanban-placeholder { height: 92px; margin-bottom: 10px; border: 2px dashed #9da4ae; background: rgba(255,255,255,.45); }

@media (max-width: 1300px) {
	.dgf-stats { grid-template-columns: repeat(3, minmax(155px, 1fr)); }
	.dgf-grid-main-side { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.dgf-grid-2, .dgf-fields-2 { grid-template-columns: 1fr; }
	.dgf-stats { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
	.dgf-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
	.dgf-wrap { margin-right: 10px; }
	.dgf-header { margin-right: -10px; padding: 26px 22px; }
	.dgf-stats { grid-template-columns: 1fr; }
	.dgf-toolbar { align-items: stretch; flex-direction: column; }
	.dgf-toolbar form { flex-direction: column; }
	.dgf-form-actions { align-items: stretch; flex-direction: column; }
	.dgf-delete { margin-left: 0 !important; }
}
