#td-admin-wrap {
	max-width: 1100px;
	margin: 20px auto;
	color: #fff;
}

.td-admin-stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 25px;
}

.stat-card {
	text-align: center;
	padding: 20px;
}

.stat-value {
	font-size: 26px;
	font-weight: 800;
	color: #0a2463;
	margin-top: 10px;
}

.chart-container {
	height: 420px;
	margin-bottom: 30px;
	position: relative;
	overflow: visible;
	padding: 12px 12px 26px;
}

.td-chart-note {
	margin-top: 10px;
	font-size: 12px;
	color: rgba(255,255,255,0.65);
}


.td-chart-filters{
	display:flex;
	align-items:flex-end;
	gap:12px;
	flex-wrap:wrap;
	margin:10px 0 12px;

	position: relative;
	z-index: 5;
}
.td-chart-filters label{
	font-size:12px;
	color:rgba(255,255,255,0.7);
	display:flex;
	flex-direction:column;
	gap:6px;
}
.td-chart-filters select,
.td-chart-filters input[type="date"],
.td-chart-filters input[type="month"],
.td-chart-filters input[type="week"],
.td-chart-filters input[type="number"]{
	background:#111;
	border:1px solid #444;
	color:#fff;
	border-radius:10px;
	padding:10px 12px;
	min-width:160px;
}
.td-chart-period{
	display:none;
	min-width:160px;
}
.td-chart-period.is-visible{
	display:flex;
	flex-direction:column;
	gap:6px;
}
.td-chart-custom{
	display:none;
	align-items:flex-end;
	gap:10px;
}
.td-chart-custom.is-visible{
	display:flex;
}
#td-chart-apply{
	background:#2a2a2a;
	border:1px solid rgba(255,255,255,0.14);
	color:#fff;
	border-radius:10px;
	padding:10px 14px;
	cursor:pointer;
	font-weight:800;
}
#td-chart-apply:hover{
	background:rgba(10,36,99,0.18);
	border-color:rgba(10,36,99,0.45);
}
.td-quote-item {
	margin-bottom: 10px;
	border-left: 5px solid #444;
	transition: opacity 0.15s ease;
	width: 100%;
	box-sizing: border-box;
}

#td-admin-quotes-list{
	width:100%;
	box-sizing:border-box;
}

.td-quote-item.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.quote-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 20px;
	cursor: pointer;
	gap: 12px;
}

.q-date {
	min-width: 90px;
	color: #bbb;
	font-size: 12px;
}
.q-id {
	min-width: 55px;
	font-weight: 800;
	color: rgba(255,255,255,0.7);
	font-size: 12px;
	letter-spacing: 0.4px;
	padding: 4px 10px;
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 999px;
}


.q-name {
	flex: 1;
	font-weight: 700;
}

/* Státusz badge */
.q-status-badge {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.4px;
	white-space: nowrap;
}

/* Státusz select */
.q-status-select-wrap {
	cursor: default;
}

.q-status-select {
	background: #111;
	border: 1px solid #444;
	color: #fff;
	padding: 6px 8px;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
}

.q-status-select:focus {
	outline: none;
	border-color: #777;
}

/* TÖRLÉS X: PIROS, nem gomb */
.q-delete-x {
	color: #ff4d4d;
	font-size: 20px;
	line-height: 1;
	padding: 2px 6px;
	border-radius: 6px;
	cursor: pointer;
	user-select: none;
}

.q-delete-x:hover {
	color: #fff;
	background: rgba(255, 77, 77, 0.22);
}

/* Border-left státusz színek */
.status-new { border-left-color: #3498db; }
.status-sent { border-left-color: #f1c40f; }
.status-accepted { border-left-color: #2ecc71; }
.status-rejected { border-left-color: #e74c3c; }
.status-no_response { border-left-color: #95a5a6; }
.status-handed_to_courier { border-left-color: #9b59b6; }
.status-completed { border-left-color: #0a2463; }

/* Badge színek */
.badge-new { background: rgba(52, 152, 219, 0.18); color: #8fd0ff; border: 1px solid rgba(52, 152, 219, 0.35); }
.badge-sent { background: rgba(241, 196, 15, 0.18); color: #ffe58a; border: 1px solid rgba(241, 196, 15, 0.35); }
.badge-accepted { background: rgba(46, 204, 113, 0.18); color: #7cf2b0; border: 1px solid rgba(46, 204, 113, 0.35); }
.badge-rejected { background: rgba(231, 76, 60, 0.18); color: #ff9a90; border: 1px solid rgba(231, 76, 60, 0.35); }
.badge-no_response { background: rgba(149, 165, 166, 0.18); color: #d6e0e0; border: 1px solid rgba(149, 165, 166, 0.35); }
.badge-handed_to_courier { background: rgba(155, 89, 182, 0.18); color: #d7a6ff; border: 1px solid rgba(155, 89, 182, 0.35); }
.badge-completed { background: rgba(10, 36, 99, 0.22); color: #9bb3ff; border: 1px solid rgba(10, 36, 99, 0.45); }

/* --- KALKULÁTOR (a kép stílusához) --- */
.td-offer-calculator {
	margin-top: 18px;
	background: #1c1c1c;
	border-radius: 16px;
	padding: 18px;
	border: 1px solid #2a2a2a;
	box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.calc-title {
	font-size: 13px;
	color: rgba(255,255,255,0.75);
	margin-bottom: 10px;
}

.calc-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pill {
	background: #2a2a2a;
	border: 1px solid rgba(255,255,255,0.10);
	color: rgba(255,255,255,0.75);
	padding: 10px 16px;
	border-radius: 12px;
	cursor: pointer;
	font-weight: 800;
	transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.pill.is-active {
	background: #0a2463;
	border-color: rgba(10, 36, 99, 0.9);
	color: #fff;
}

.calc-model-card {
	margin-top: 18px;
	background: #151515;
	border-radius: 16px;
	padding: 18px;
	border: 1px solid #232323;
}

.calc-model-header {
	font-size: 20px;
	font-weight: 800;
	margin-bottom: 10px;
}

.calc-model-grid {
	display: grid;
	gap: 12px;
}

.calc-model-row{
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	padding-top: 6px;
}

.calc-row-head{
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: -4px;
}

.calc-row-title{
	font-weight: 800;
	color: rgba(255,255,255,0.9);
	font-size: 14px;
}

.calc-row-delete{
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: rgba(0,0,0,0.28);
	border: 1px solid rgba(255,77,77,0.45);
	color: #ff4d4d;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	user-select: none;
}
.calc-row-delete:hover{
	background: rgba(255,77,77,0.18);
	border-color: rgba(255,77,77,0.75);
	color: #ffffff;
}

.calc-field label {
	display: block;
	color: rgba(255,255,255,0.6);
	font-size: 12px;
	margin-bottom: 6px;
}

.calc-field input {
	width: 100%;
	background: #2a2a2a;
	border: 1px solid #343434;
	color: #fff;
	border-radius: 12px;
	padding: 12px;
	font-size: 16px;
}

.calc-add-model {
	margin-top: 14px;
	background: #2a2a2a;
	border: 1px solid #343434;
	color: #fff;
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
	font-weight: 800;
}

.calc-actions {
	margin-top: 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.calc-btn-primary {
	background: #0a2463;
	border: none;
	color: #fff;
	border-radius: 12px;
	padding: 12px 18px;
	cursor: pointer;
	font-weight: 900;
}

.calc-btn-outline {
	background: transparent;
	border: 1px solid rgba(10, 36, 99, 0.85);
	color: #9bb3ff;
	border-radius: 12px;
	padding: 12px 18px;
	cursor: pointer;
	font-weight: 900;
}

.calc-save-state {
	color: rgba(255,255,255,0.7);
	font-size: 12px;
}

.calc-summary {
	margin-top: 16px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.sum-col {
	background: #151515;
	border: 1px solid #232323;
	border-radius: 16px;
	padding: 14px;
}

.sum-label {
	color: rgba(255,255,255,0.6);
	font-size: 12px;
	margin-bottom: 6px;
}

.sum-value {
	font-size: 20px;
	font-weight: 900;
	color: #0a2463;
}

.sum-sub {
	margin-top: 6px;
	font-size: 12px;
	color: rgba(255,255,255,0.6);
}

.calc-hint {
	margin-top: 10px;
	font-size: 12px;
	color: rgba(255,255,255,0.6);
}

@media (max-width: 900px) {
	.calc-model-row { grid-template-columns: repeat(2, 1fr); }
	.calc-summary { grid-template-columns: 1fr; }
}

.calc-btn-outline:hover {
	background: rgba(10, 36, 99, 0.18);
}

.pill:hover {
	transform: translateY(-1px);
	border-color: rgba(255,255,255,0.18);
}

/* ------------------------------------------------------------------
   FORCE calculator styles to override theme/Elementor button defaults
   ------------------------------------------------------------------ */
#td-admin-wrap .td-offer-calculator button,
#td-admin-wrap .td-offer-calculator input {
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
}

#td-admin-wrap .td-offer-calculator .pill {
    background: #2a2a2a !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    color: rgba(255,255,255,0.75) !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

#td-admin-wrap .td-offer-calculator .pill.is-active {
    background: #0a2463 !important;
    border-color: rgba(10, 36, 99, 0.90) !important;
    color: #ffffff !important;
}

#td-admin-wrap .td-offer-calculator .calc-add-model {
    background: #2a2a2a !important;
    border: 1px solid #343434 !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}

#td-admin-wrap .td-offer-calculator .calc-btn-primary {
    background: #0a2463 !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
}

#td-admin-wrap .td-offer-calculator .calc-btn-outline {
    background: transparent !important;
    border: 1px solid rgba(10, 36, 99, 0.85) !important;
    color: #9bb3ff !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
}

#td-admin-wrap .td-offer-calculator .calc-field input {
    background: #2a2a2a !important;
    border: 1px solid #343434 !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 12px !important;
    font-size: 16px !important;
}
#td-admin-wrap .td-offer-calculator .calc-field input:focus {
    border-color: rgba(10, 36, 99, 0.85) !important;
}


#revenueChart {
	width: 100% !important;
	height: 320px !important;
	display: block;
}


/* --- Ajánlat részletek: menőbb megjelenítés --- */
.td-detail-grid{
	display:grid;
	grid-template-columns: 1fr 1fr;
	gap:16px;
	margin-top: 6px;
}
.td-detail-card{
	background:#151515;
	border:1px solid #232323;
	border-radius: 16px;
	padding: 16px;
}
.td-detail-card-title{
	font-size: 14px;
	font-weight: 900;
	color: rgba(255,255,255,0.9);
	margin-bottom: 12px;
	letter-spacing: 0.3px;
}
.td-detail-list{
	display:flex;
	flex-direction:column;
	gap:10px;
}
.td-detail-row{
	display:flex;
	justify-content:space-between;
	gap:12px;
	padding: 10px 12px;
	background:#1c1c1c;
	border:1px solid #232323;
	border-radius: 12px;
}
.td-detail-label{
	color: rgba(255,255,255,0.55);
	font-size: 12px;
	font-weight: 700;
}
.td-detail-value{
	color: rgba(255,255,255,0.92);
	font-size: 13px;
	font-weight: 800;
	text-align: right;
	word-break: break-word;
}
.td-link{
	color:#9bb3ff;
	text-decoration:none;
}
.td-link:hover{
	text-decoration: underline;
}
.td-note{
	margin-top: 12px;
	padding: 12px;
	background: rgba(10,36,99,0.12);
	border: 1px solid rgba(10,36,99,0.35);
	border-radius: 12px;
}
.td-note-title{
	font-size: 12px;
	font-weight: 900;
	color: rgba(255,255,255,0.85);
	margin-bottom: 6px;
}
.td-note-text{
	font-size: 12px;
	color: rgba(255,255,255,0.75);
	line-height: 1.45;
}
.td-model-list{
	display:flex;
	flex-direction:column;
	gap:12px;
}
.td-model-card{
	background:#1c1c1c;
	border:1px solid #232323;
	border-radius: 14px;
	padding: 12px;
}
.td-model-top{
	display:flex;
	align-items:flex-start;
	justify-content:space-between;
	gap:10px;
	margin-bottom: 10px;
}
.td-model-title{
	font-weight: 900;
	font-size: 13px;
	color: rgba(255,255,255,0.9);
}
.td-model-meta{
	display:grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}
.td-meta-item{
	padding: 10px 12px;
	background:#151515;
	border:1px solid #232323;
	border-radius: 12px;
}
.td-meta-label{
	display:block;
	font-size: 11px;
	color: rgba(255,255,255,0.55);
	font-weight: 700;
	margin-bottom: 5px;
}
.td-meta-value{
	display:block;
	font-size: 13px;
	font-weight: 900;
	color: rgba(255,255,255,0.92);
}
.td-btn-download{
	display:inline-block;
	padding: 8px 10px;
	border-radius: 12px;
	background: rgba(10,36,99,0.22);
	border: 1px solid rgba(10,36,99,0.45);
	color: #9bb3ff;
	text-decoration:none;
	font-size: 12px;
	font-weight: 900;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}
.td-btn-download:hover{
	background: rgba(10,36,99,0.35);
	border-color: rgba(10,36,99,0.65);
	color: #ffffff;
}
.td-small-hint{
	margin-top: 10px;
	font-size: 11px;
	color: rgba(255,255,255,0.55);
}
@media (max-width: 900px){
	.td-detail-grid{ grid-template-columns: 1fr; }
}

/* --- Mobile optimization (admin) --- */
@media (max-width: 900px){
	.td-admin-stats-grid{ grid-template-columns: 1fr; }
	.chart-container{ height: auto; padding: 12px 10px 22px; }
	#revenueChart{ height: 280px !important; }
	.quote-header{ flex-wrap: wrap; align-items: center; }
	.q-name{ flex: 1 1 100%; order: 3; }
	.q-id{ order: 1; }
	.q-date{ order: 2; }
	.q-status-badge{ order: 4; }
	.q-status-select-wrap{ order: 5; width: 100%; }
	.q-status-select{ width: 100%; }
	.q-delete-x{ order: 6; margin-left: auto; }

	.td-offer-calculator{ padding: 16px; }
	.calc-model-row{ grid-template-columns: repeat(2, 1fr); }
	.calc-actions{ flex-direction: column; align-items: stretch; }
	.calc-actions button{ width: 100%; }
	.calc-note{ width: 100%; }
}

@media (max-width: 520px){
	#td-admin-wrap{ margin: 12px auto; }
	.quote-header{ padding: 14px 14px; }
	.q-id, .q-date{ min-width: auto; }
	.calc-model-row{ grid-template-columns: 1fr; }
	.td-stl-canvas{ height: 360px; }

	/* Details in opened quote: stack rows for narrow screens */
	.td-detail-row{ flex-direction: column; align-items: flex-start; }
	.td-detail-value{ text-align: left; width: 100%; }
	.td-model-meta{ grid-template-columns: 1fr; }
}


/* --- Fájl megtekintés (STL viewer) --- */
.td-file-actions{
	display:flex;
	align-items:center;
	gap:10px;
	flex-wrap:wrap;
}
.td-btn-view{
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
	width: auto;
	height: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #9bb3ff;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	text-decoration: none;
}
.td-btn-view:hover{
	color: #ffffff;
	filter: drop-shadow(0 0 10px rgba(10,36,99,0.55));
}

.td-stl-viewer{
	margin-top: 12px;
	background: #151515;
	border: 1px solid #232323;
	border-radius: 14px;
	overflow: hidden;
	width: 100%;
}
.td-stl-viewer-header{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:10px;
	padding: 10px 12px;
	background: rgba(255,255,255,0.03);
	border-bottom: 1px solid #232323;
	font-weight: 900;
	font-size: 12px;
	color: rgba(255,255,255,0.85);
}
.td-stl-close{
	cursor:pointer;
	color:#ff4d4d;
	font-size: 18px;
	padding: 2px 8px;
	border-radius: 8px;
}
.td-stl-close:hover{
	background: rgba(255,77,77,0.18);
	color:#fff;
}
.td-stl-canvas{
	width: 100%;
	height: 460px;
}

@media (max-width: 900px){
	.td-stl-canvas{ height: 360px; }
}

/* --- Kalkulátor megjegyzés mező --- */
.calc-actions{
	gap: 12px;
	flex-wrap: wrap;
}
.calc-note{
	flex: 1 1 320px;
	min-width: 240px;
	background: #2a2a2a !important;
	border: 1px solid #343434 !important;
	color: #ffffff !important;
	border-radius: 12px !important;
	padding: 12px !important;
	font-size: 14px !important;
	resize: vertical;
}
.calc-note:focus{
	border-color: rgba(10, 36, 99, 0.85) !important;
	outline: none !important;
}


/* --- v2.3.2.10 mobile overflow fixes (quote details) --- */
@media (max-width: 768px){
  /* Prevent horizontal overflow inside expanded quote */
  .td-quote-item .quote-body,
  .td-quote-item .td-detail-grid,
  .td-quote-item .td-detail-card,
  .td-quote-item .td-detail-list,
  .td-quote-item .td-model-list,
  .td-quote-item .td-model-item{
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .td-quote-item .quote-body{
    overflow-x: hidden;
  }

  /* Stack the two detail cards and avoid cards hanging out of viewport */
  .td-detail-grid{
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Make label/value rows wrap nicely on small screens */
  .td-detail-row{
    display: block !important;
  }
  .td-detail-label{
    display:block !important;
    margin-bottom: 6px;
  }
  .td-detail-value{
    display:block !important;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  /* Long file names / buttons */
  .td-file-pill,
  .td-model-file,
  .td-model-download,
  .td-model-view-btn{
    max-width: 100%;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
}


/* --- File name ellipsis override (mobile-safe) --- */
.td-file-actions{ min-width:0; width:100%; }
.td-btn-download{ flex: 1 1 auto; min-width: 0; }
.td-file-name{ display:inline-block; max-width: 260px; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 520px){
	.td-file-name{ max-width: 160px; }
	.td-model-top{ flex-direction: column; align-items: flex-start; }
	.td-file-actions{ width: 100%; }
}


/* Custom range: from/to side-by-side */
.td-chart-custom{ flex-wrap:wrap; }
.td-chart-custom label{ flex:1 1 160px; }


/* Végösszeg kártya - Fizetve gomb */
.td-mark-paid{margin-top:10px;width:100%;border:1px solid rgba(10,36,99,.55);background:rgba(10,36,99,.22);color:#fff;border-radius:10px;padding:10px 12px;font-weight:800;cursor:pointer;}
.td-mark-paid:hover{background:rgba(10,36,99,.32);}
.sum-col-total .sum-sub{margin-top:6px;}

/* Status badge colors */
.td-quote-item.status-paid .status-badge{background:rgba(26,127,55,.18);border-color:rgba(26,127,55,.45);}
.td-quote-item.status-in_production .status-badge{background:rgba(255,193,7,.14);border-color:rgba(255,193,7,.35);}


/* Added status badge colors */
.badge-paid{background:rgba(26,127,55,.18);border-color:rgba(26,127,55,.45);}
.badge-in_production{background:rgba(255,193,7,.14);border-color:rgba(255,193,7,.35);}


/* Calculator material selector full row */
.calc-field-material{grid-column:1/-1;}


/* Fix badge styles for paid & in_production */
.q-status-badge.badge-paid{
	background: rgba(26,127,55,0.18);
	color: #7cf2b0;
	border: 1px solid rgba(26,127,55,0.45);
}
.q-status-badge.badge-in_production{
	background: rgba(255,193,7,0.18);
	color: #ffe58a;
	border: 1px solid rgba(255,193,7,0.35);
}

/* Follow up státusz */
.badge-followup_sent{background:rgba(106,90,205,.16);border-color:rgba(106,90,205,.38);}
.q-status-badge.badge-followup_sent{
	background: rgba(106,90,205,0.16);
	color: #cbbfff;
	border: 1px solid rgba(106,90,205,0.38);
}

/* Új verzió érhető el státusz (szürke) */
.q-status-badge.badge-revision_available{
	background: rgba(255,255,255,0.06);
	color: rgba(255,255,255,0.82);
	border: 1px solid rgba(255,255,255,0.18);
}

/* Általános log badge */
.q-status-badge.badge-info{
	background: rgba(255,255,255,0.06);
	color: rgba(255,255,255,0.85);
	border: 1px solid rgba(255,255,255,0.12);
}

/* Log blokk */
.td-quote-logs{margin-top:18px;padding:14px 14px 12px;border:1px solid rgba(255,255,255,0.08);border-radius:14px;background:rgba(255,255,255,0.03);}
.td-quote-logs-title{font-weight:900;color:#fff;margin-bottom:10px;font-size:14px;letter-spacing:.2px;}
.td-quote-logs-list{display:flex;flex-direction:column;gap:8px;}
.td-log-item{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.td-log-time{font-size:12px;color:rgba(255,255,255,0.65);}
.td-log-empty{font-size:13px;color:rgba(255,255,255,0.65);}
