/* ── My Account - Usage page ─────────────────────────────────────────────── */

.sm-usage-section {
	margin-bottom: 36px;
}

.sm-usage-section__title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 16px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e0e0e0;
}

.sm-usage-note {
	font-size: .85em;
	color: #777;
	margin: -8px 0 16px;
}

/* ── Messages ── */

.sm-usage-msg {
	padding: 10px 14px;
	border-radius: 6px;
	font-size: .9rem;
	margin: 0;
}

.sm-usage-msg--error {
	background: #fdecea;
	color: #b00020;
}

/* ── Line selector row (summary) ── */

.sm-usage-label {
	display: block;
	font-size: .85rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: #333;
}

.sm-usage-line-select__row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.sm-usage-select {
	flex: 1;
	min-width: 200px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: .9rem;
	background: #fff;
}

.sm-usage-input {
	width: 100%;
	height: 42px;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: .9rem;
	background: #fff;
	box-sizing: border-box;
}

/* ── Summary result ── */

.sm-usage-summary {
	margin-top: 20px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 20px;
}

.sm-usage-summary__block {
	margin-bottom: 20px;
}

.sm-usage-summary__label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 8px;
}

.sm-usage-summary__icon {
	width: 24px;
	height: 24px;
}

.sm-usage-summary__amount {
	margin: 0 0 8px;
}

.sm-usage-summary__used {
	font-size: 1.6rem;
	font-weight: 700;
	color: #7b2cbf;
}

.sm-usage-summary__bar-wrap {
	position: relative;
}

.sm-usage-summary__bar {
	height: 10px;
	background: #7b2cbf;
	border-radius: 6px;
	width: 100%;
	background: linear-gradient(90deg, #7b2cbf 0%, #c084fc 100%);
}

.sm-usage-summary__bar-label {
	font-size: .8rem;
	color: #666;
	margin: 4px 0 0;
}

.sm-usage-summary__stats {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.sm-usage-summary__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	min-width: 80px;
	background: #f8f8f8;
	border-radius: 8px;
	padding: 12px 8px;
	text-align: center;
	gap: 4px;
}

.sm-usage-summary__stat-icon {
	font-size: 1.2rem;
	line-height: 1;
}

.sm-usage-summary__stat-icon--voice { color: #2563eb; }
.sm-usage-summary__stat-icon--sms   { color: #16a34a; }

.sm-usage-summary__stat-label {
	font-size: .7rem;
	color: #888;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.sm-usage-summary__stat-value {
	font-size: .95rem;
	font-weight: 700;
}

.sm-usage-summary__note {
	font-size: .78rem;
	color: #aaa;
	margin: 14px 0 0;
	text-align: center;
}

/* ── History form ── */

.sm-usage-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sm-usage-form__field {
	display: flex;
	flex-direction: column;
}

.sm-usage-form__row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.sm-usage-form__row .sm-usage-form__field {
	flex: 1;
	min-width: 140px;
}

.sm-usage-form__actions {
	display: flex;
}

/* ── History table ── */

.sm-usage-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .85rem;
	margin-top: 16px;
}

.sm-usage-table th {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 2px solid #e0e0e0;
	color: #555;
	font-weight: 600;
	white-space: nowrap;
}

.sm-usage-table td {
	padding: 7px 10px;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: middle;
}

.sm-usage-table tr:last-child td {
	border-bottom: none;
}

.sm-usage-table tr:hover td {
	background: #fafafa;
}

/* ── Usage type badges ── */

.sm-usage-type {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: .72rem;
	font-weight: 600;
	background: #e0e0e0;
	color: #444;
	white-space: nowrap;
}

.sm-usage-type--data    { background: #ede9fe; color: #5b21b6; }
.sm-usage-type--sms-mt,
.sm-usage-type--sms-mo  { background: #dcfce7; color: #15803d; }
.sm-usage-type--voice   { background: #dbeafe; color: #1d4ed8; }
.sm-usage-type--mms-mt,
.sm-usage-type--mms-mo  { background: #fef9c3; color: #854d0e; }

/* ── Responsive ── */

@media (max-width: 600px) {
	.sm-usage-line-select__row {
		flex-direction: column;
		align-items: stretch;
	}

	.sm-usage-form__row {
		flex-direction: column;
	}

	.sm-usage-summary__stats {
		gap: 10px;
	}

	.sm-usage-table th:nth-child(4),
	.sm-usage-table td:nth-child(4) {
		display: none;
	}
}
