/**
 * Panel "Mi Hosting" en Mi Cuenta.
 * Paleta: primario #cc6600, secundario #161617, acento #646466.
 */

.chm-card {
	border: 1px solid #e6e6e8;
	border-radius: 10px;
	padding: 22px;
	margin-bottom: 22px;
	background: #fff;
}

.chm-card-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: wrap;
	border-bottom: 1px solid #f0f0f1;
	padding-bottom: 16px;
	margin-bottom: 18px;
}

.chm-card-head h3 {
	margin: 0 0 4px;
	font-size: 20px;
	color: #161617;
	word-break: break-all;
}

.chm-user {
	font-size: 13px;
	color: #646466;
}

.chm-card code {
	background: #f4f4f5;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 13px;
}

/* Insignia de estado */
.chm-badge {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 99px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}
.chm-badge.is-active { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; }
.chm-badge.is-suspended { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.chm-badge.is-unknown { background: #f4f4f5; color: #646466; border: 1px solid #e0e0e2; }

/* Barras de uso */
.chm-bars { margin-bottom: 20px; }
.chm-bar-row { margin-bottom: 16px; }

.chm-bar-top {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 6px;
	font-size: 13px;
}
.chm-bar-label { font-weight: 700; color: #161617; }
.chm-bar-value { color: #646466; }

.chm-bar {
	height: 8px;
	background: #eeeef0;
	border-radius: 99px;
	overflow: hidden;
}
.chm-bar-fill {
	display: block;
	height: 100%;
	border-radius: 99px;
	transition: width .3s ease;
}
.chm-bar-fill.lvl-ok { background: #cc6600; }
.chm-bar-fill.lvl-warn { background: #f79009; }
.chm-bar-fill.lvl-critical { background: #d92d20; }

.chm-bar-warn {
	margin: 6px 0 0;
	font-size: 12px;
	color: #b42318;
	font-weight: 600;
}

/* Metadatos */
.chm-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin: 0 0 20px;
}
.chm-meta div { margin: 0; }
.chm-meta dt {
	font-size: 12px;
	color: #646466;
	text-transform: uppercase;
	letter-spacing: .4px;
	margin-bottom: 4px;
}
.chm-meta dd {
	margin: 0;
	font-size: 14px;
	color: #161617;
	line-height: 1.6;
}

/* Acciones */
.chm-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.chm-btn-primary,
.chm-btn-ghost {
	display: inline-block;
	padding: 11px 22px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	transition: background .2s ease, color .2s ease;
}

.chm-btn-primary { background: #cc6600; color: #fff; }
.chm-btn-primary:hover { background: #b35a00; color: #fff; }

.chm-btn-ghost { background: transparent; color: #161617; border: 1px solid #d5d5d7; }
.chm-btn-ghost:hover { background: #f4f4f5; color: #161617; }

.chm-btn-primary:focus-visible,
.chm-btn-ghost:focus-visible {
	outline: 2px solid #cc6600;
	outline-offset: 2px;
}

/* Avisos tras una acción */
.chm-notice {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 18px;
	font-size: 14px;
	font-weight: 600;
}
.chm-notice.is-success { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; }
.chm-notice.is-error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }

/* Autogestión: acordeones */
.chm-selfservice { margin-top: 22px; border-top: 1px solid #f0f0f1; padding-top: 6px; }

.chm-panel { border-bottom: 1px solid #f0f0f1; }
.chm-panel:last-child { border-bottom: 0; }

.chm-panel > summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 15px 2px;
	font-weight: 700;
	font-size: 15px;
	color: #161617;
	list-style: none;
}
.chm-panel > summary::-webkit-details-marker { display: none; }

.chm-panel > summary::after {
	content: "＋";
	color: #cc6600;
	font-weight: 700;
	margin-left: auto;
	order: 3;
}
.chm-panel[open] > summary::after { content: "－"; }

.chm-panel > summary:focus-visible {
	outline: 2px solid #cc6600;
	outline-offset: 2px;
	border-radius: 4px;
}

.chm-count {
	background: #f4f4f5;
	color: #646466;
	border-radius: 99px;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 700;
}

.chm-panel-body { padding: 4px 2px 20px; }

.chm-muted { color: #646466; font-size: 13.5px; }

/* Listas de correos / subdominios */
.chm-list { list-style: none; margin: 0 0 18px; padding: 0; }
.chm-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	background: #fafafa;
	border: 1px solid #f0f0f1;
	border-radius: 6px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}
.chm-list form { margin: 0; }

.chm-link-danger {
	background: none;
	border: 0;
	color: #b42318;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 4px;
}
.chm-link-danger:hover { background: #fef3f2; }
.chm-link-danger:focus-visible { outline: 2px solid #b42318; outline-offset: 1px; }

/* Formularios de autogestión */
.chm-form { margin: 0; }
.chm-field { margin-bottom: 14px; }
.chm-field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.chm-field input,
.chm-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d5d7;
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 14px;
}
.chm-field input:focus,
.chm-field textarea:focus {
	outline: 2px solid #cc6600;
	outline-offset: 1px;
	border-color: #cc6600;
}
.chm-field small { display: block; margin-top: 5px; font-size: 12px; }

.chm-input-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chm-input-group input { flex: 1 1 160px; width: auto; }
.chm-input-group span { color: #646466; font-size: 14px; white-space: nowrap; }

/* Medidor de fuerza reutilizable (también usado en la página de definición) */
.chm-pw-block label { display: block; font-weight: 700; font-size: 13.5px; margin: 12px 0 6px; }
.chm-pw-block label:first-child { margin-top: 0; }
.chm-pw-block input[type="password"],
.chm-pw-block input[type="text"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d5d7;
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 14px;
}
.chm-pw-block input:focus { outline: 2px solid #cc6600; outline-offset: 1px; border-color: #cc6600; }

.chm-meter { height: 7px; background: #e6e6e8; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.chm-meter-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: #c9c9cc; transition: width .25s ease, background-color .25s ease; }
.chm-meter-fill.lvl-1 { background: #d92d20; }
.chm-meter-fill.lvl-2 { background: #f79009; }
.chm-meter-fill.lvl-3 { background: #eaaa08; }
.chm-meter-fill.lvl-4 { background: #84caa6; }
.chm-meter-fill.lvl-5 { background: #12b76a; }
.chm-meter-label { margin: 6px 0 0; font-size: 12px; font-weight: 700; color: #646466; }

.chm-reqs { list-style: none; padding: 0; margin: 12px 0 4px; font-size: 12.5px; color: #646466; }
.chm-reqs li { padding: 3px 0; display: flex; align-items: center; gap: 8px; }
.chm-reqs li.is-ok { color: #05603a; }
.chm-mark { display: inline-block; width: 14px; text-align: center; font-weight: bold; }

.chm-match { margin: 6px 0 0; font-size: 12.5px; min-height: 16px; }
.chm-match.is-ok { color: #05603a; }
.chm-match.is-bad { color: #b42318; }

.chm-toggle { margin: 14px 0 0; }
.chm-inline { display: flex; align-items: center; gap: 8px; font-weight: normal !important; font-size: 13px; color: #646466; margin: 0 !important; }
.chm-inline input { width: auto !important; }

.chm-btn-primary:disabled { background: #c9c9cc; cursor: not-allowed; }

/* ---------- Tickets de soporte (cliente) ---------- */
.chm-tickets-title { margin: 0 0 14px; font-size: 20px; color: #161617; }

.chm-tickets-table { width: 100%; border-collapse: collapse; margin-bottom: 26px; }
.chm-tickets-table th,
.chm-tickets-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #f0f0f1; font-size: 14px; }
.chm-tickets-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #646466; }
.chm-tickets-table a { color: #cc6600; font-weight: 600; text-decoration: none; }
.chm-tickets-table a:hover { text-decoration: underline; }

.chm-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chm-dot { display: inline-block; width: 8px; height: 8px; background: #cc6600; border-radius: 50%; margin-left: 6px; vertical-align: middle; }

.chm-ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chm-ticket-head h3 { margin: 0; font-size: 19px; color: #161617; }

.chm-thread { margin: 18px 0; }
.chm-msg { border: 1px solid #e6e6e8; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.chm-msg.is-mine { background: #fff; border-left: 3px solid #c9c9cc; }
.chm-msg.is-staff { background: #fffaf3; border-left: 3px solid #cc6600; }
.chm-msg-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: #646466; margin-bottom: 6px; }
.chm-msg-meta strong { color: #161617; }
.chm-msg-body { font-size: 14.5px; line-height: 1.6; }
.chm-msg-body p { margin: 0 0 8px; }
.chm-msg-files { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.chm-file { font-size: 13px; color: #cc6600; text-decoration: none; background: #f4f4f5; padding: 5px 10px; border-radius: 6px; }
.chm-file:hover { background: #efe6dc; }

.chm-reply-form { margin-top: 16px; }
.chm-new-ticket { margin-top: 24px; }
.chm-row2 { display: flex; gap: 14px; flex-wrap: wrap; }
.chm-row2 .chm-field { flex: 1 1 200px; }
.chm-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #d5d5d7; border-radius: 6px; box-sizing: border-box; font-size: 14px; }
.chm-form select { width: 100%; padding: 10px 12px; border: 1px solid #d5d5d7; border-radius: 6px; box-sizing: border-box; font-size: 14px; }
.chm-form input[type="file"] { font-size: 13px; }

/* Estado vacío */
.chm-empty {
	text-align: center;
	padding: 48px 24px;
	border: 1px dashed #d5d5d7;
	border-radius: 10px;
	background: #fafafa;
}
.chm-empty h3 { margin: 0 0 8px; color: #161617; font-size: 20px; }
.chm-empty p { color: #646466; margin: 0 0 22px; }

.chm-alert {
	background: #fef3f2;
	color: #b42318;
	border: 1px solid #fecdca;
	padding: 12px 14px;
	border-radius: 6px;
	font-size: 14px;
}

@media (max-width: 600px) {
	.chm-card { padding: 16px; }
	.chm-actions a { flex: 1 1 100%; text-align: center; }
}
