/* Zefiro2 UI Overhaul — plain CSS, no build step */

/* ═══════════════════════════════════════════════════════════
   Base typography override
   ═══════════════════════════════════════════════════════════ */

.customer-card,
.tab-content,
.tab-nav {
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   Customer Card
   ═══════════════════════════════════════════════════════════ */

.customer-card {
  background: #fff;
  border: 1px solid #d8dce0;
  border-radius: 8px;
  padding: 20px 24px 16px;
  margin-bottom: 0;
}

.customer-card-header {
  display: table;
  width: 100%;
  margin-bottom: 16px;
}

.customer-card-header h2 {
  display: table-cell;
  vertical-align: middle;
  font-size: 1.8em;
  font-weight: bold;
  color: #2c3e50;
  margin: 0;
}

.customer-actions {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
  white-space: nowrap;
}

.settings-link {
  display: inline-block;
  font-size: 1.8em;
  color: #8e9a9f;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  vertical-align: middle;
  transition: color 0.2s, background 0.2s;
}

.settings-link:hover {
  color: #2c3e50;
  background: #eef1f3;
}

/* stat grid */

.customer-stats {
  display: table;
  width: 100%;
  border-collapse: separate;
  border-spacing: 8px 0;
  margin: 0 -8px 12px;
}

.stat-box {
  display: table-cell;
  background: #f7f9fa;
  border: 1px solid #e8ecef;
  border-radius: 6px;
  padding: 12px 14px;
  text-align: center;
  vertical-align: top;
}

.stat-label {
  display: block;
  font-size: 0.95em;
  font-weight: 600;
  color: #8e9a9f;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 1.3em;
  font-weight: bold;
  color: #2c3e50;
}

.stat-value.positive_balance {
  color: #27ae60;
}

.stat-value.under_credit_limit_balance {
  color: #e67e22;
}

.stat-value.negative_balance {
  color: #e74c3c;
}

/* action bar (period selector + downloads) */

.action-bar {
  display: table;
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid #eef1f3;
}

.period-selector {
  display: table-cell;
  vertical-align: middle;
}

.period-btn {
  display: inline-block;
  padding: 7px 18px;
  margin-right: 4px;
  font-size: 1em;
  font-weight: 600;
  color: #666;
  background: #f0f2f4;
  border: 1px solid #d8dce0;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s;
}

.period-btn:hover {
  background: #e4e8eb;
  color: #333;
}

.period-btn.active {
  background: #2c3e50;
  color: #fff;
  border-color: #2c3e50;
}

.download-bar {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

.download-label {
  font-size: 0.95em;
  color: #8e9a9f;
  margin-right: 8px;
}

.dl-link {
  display: inline-block;
  padding: 5px 12px;
  margin: 0 2px;
  font-size: 0.95em;
  font-weight: 600;
  color: #3498db;
  background: #eaf2fa;
  border: 1px solid #bed8ec;
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.15s;
}

.dl-link:hover {
  background: #3498db;
  color: #fff;
}

.updated-at {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
  font-size: 0.9em;
  color: #8e9a9f;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   Tab Navigation
   ═══════════════════════════════════════════════════════════ */

.tab-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 2px solid #d8dce0;
  overflow: hidden;
}

.tab-nav li {
  display: block;
  float: left;
  margin-bottom: -2px;
}

.tab-nav a {
  display: inline-block;
  padding: 12px 22px;
  font-size: 1.1em;
  font-weight: 600;
  color: #8e9a9f;
  text-decoration: none;
  border: 2px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, background 0.15s;
}

.tab-nav a:hover {
  color: #2c3e50;
  background: #f7f9fa;
}

.tab-nav li.active a {
  color: #2c3e50;
  background: #fff;
  border-color: #d8dce0;
  border-bottom: 2px solid #fff;
}

/* tab icons */

.tab-nav .tab-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 1em;
  margin-right: 4px;
  vertical-align: middle;
}

.icon-keypad {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border: 1.5px solid #8e9a9f;
  border-radius: 3px;
  font-size: 13px;
  font-weight: bold;
  color: #8e9a9f;
  background: #f7f9fa;
  vertical-align: middle;
  margin-right: 2px;
}

.tab-nav li.active .icon-keypad {
  border-color: #2c3e50;
  color: #2c3e50;
  background: #fff;
}

/* ═══════════════════════════════════════════════════════════
   Tab Content
   ═══════════════════════════════════════════════════════════ */

.tab-content {
  display: none;
  padding: 16px 0;
}

.tab-content.active {
  display: block;
}

.tab-header {
  display: table;
  width: 100%;
  margin-bottom: 12px;
}

.tab-header h3 {
  display: table-cell;
  vertical-align: middle;
  margin: 0;
  font-size: 1.5em;
  color: #2c3e50;
}

.tab-header .tab-actions {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
}

.btn-add {
  display: inline-block;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: 600;
  color: #fff;
  background: #27ae60;
  border: 1px solid #219a52;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-add:hover {
  background: #219a52;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   Tables (.z-table)
   ═══════════════════════════════════════════════════════════ */

table.z-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 1.05em;
}

table.z-table thead th {
  background: #eef1f3;
  padding: 10px 12px;
  border-bottom: 2px solid #d0d5d8;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.04em;
  color: #6b7b8d;
}

table.z-table tbody tr {
  border-bottom: 1px solid #eef1f3;
  transition: background 0.1s;
}

table.z-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

table.z-table tbody tr:hover {
  background: #e8f4fd;
}

table.z-table td {
  padding: 8px 12px;
}

table.z-table .text-right {
  text-align: right;
}

table.z-table .text-left {
  text-align: left;
}

table.z-table .text-center {
  text-align: center;
}

table.z-table .num {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 1em;
}

table.z-table tfoot .total-row {
  border-top: 2px solid #d0d5d8;
  background: #f7f9fa;
  font-weight: bold;
}

table.z-table tfoot .total-row td {
  padding: 10px 12px;
}

table.z-table tr.low-traffic td {
  opacity: 0.65;
}

.table-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  background: #ccc;
}

/* ═══════════════════════════════════════════════════════════
   Toggle Low-Traffic Link
   ═══════════════════════════════════════════════════════════ */

a.toggle-traffic {
  display: inline-block;
  margin: 4px 0 16px;
  padding: 8px 16px;
  background: #f7f9fa;
  border: 1px solid #d8dce0;
  border-radius: 4px;
  color: #6b7b8d;
  font-size: 0.95em;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

a.toggle-traffic:hover {
  background: #eef1f3;
  color: #2c3e50;
}

/* ═══════════════════════════════════════════════════════════
   CDR Search Form (inside tab)
   ═══════════════════════════════════════════════════════════ */

.tab-content form.cdr_search,
#center_area form.cdr_search {
  margin-bottom: 16px;
}

.tab-content form.cdr_search fieldset.inputs,
#center_area form.cdr_search fieldset.inputs {
  padding: 12px 0;
}

.tab-content form.cdr_search label,
#center_area form.cdr_search label {
  font-size: 1.1em;
  margin-right: 8px;
}

.tab-content form.cdr_search select,
#center_area form.cdr_search select {
  font-size: 1em;
  padding: 4px 8px;
}

.tab-content form.cdr_search button,
#center_area form.cdr_search button {
  margin-left: 0;
  margin-top: 8px;
}

/* date presets */

.date-presets {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f3;
}

.presets-label {
  font-size: 0.95em;
  font-weight: 600;
  color: #8e9a9f;
  margin-right: 8px;
}

.preset-btn {
  display: inline-block;
  padding: 5px 14px;
  margin-right: 4px;
  font-size: 0.95em;
  font-weight: 600;
  color: #666;
  background: #f0f2f4;
  border: 1px solid #d8dce0;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.preset-btn:hover {
  background: #e4e8eb;
  color: #333;
}

.preset-btn.active {
  background: #2c3e50;
  color: #fff;
  border-color: #2c3e50;
}

/* date fields row */

.date-fields {
  overflow: hidden;
  margin-bottom: 12px;
  padding: 8px 0;
}

.date-field {
  float: left;
  margin-right: 16px;
  margin-bottom: 8px;
}

.date-field label {
  display: block;
  font-size: 0.95em;
  font-weight: 600;
  color: #6b7b8d;
  margin-bottom: 4px;
}

.date-field select {
  display: inline;
  margin: 0 1px;
  width: auto;
  font-size: 1em;
  padding: 3px 6px;
}

.date-field input[type="text"] {
  display: inline;
  width: 140px;
  font-size: 1em;
  padding: 3px 6px;
  border: 1px solid #d1eaf0;
}

.date-field-actions {
  padding-top: 22px;
}

.cdr-pagination {
  margin: 12px 0;
  text-align: center;
}

.cdr-pagination .page {
  display: inline-block;
  padding: 4px 10px;
  margin: 0 2px;
  font-size: 1em;
}

.cdr-pagination .current {
  font-weight: bold;
  color: #2c3e50;
}

.cdr-pagination a {
  color: #3498db;
  text-decoration: none;
}

.cdr-pagination a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   Invoice tab
   ═══════════════════════════════════════════════════════════ */

.invoice-see-all {
  margin-top: 12px;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   Chart Area
   ═══════════════════════════════════════════════════════════ */

#chart_area {
  margin-bottom: 16px;
  padding: 12px 0;
}

.chart-tabs {
  display: inline-block;
  margin-right: 16px;
}

.chart-tab {
  display: inline-block;
  padding: 5px 14px;
  margin-right: 2px;
  font-size: 0.95em;
  font-weight: 600;
  color: #666;
  background: #f0f2f4;
  border: 1px solid #d8dce0;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.chart-tab:hover {
  background: #e4e8eb;
  color: #333;
}

.chart-tab.active {
  background: #2c3e50;
  color: #fff;
  border-color: #2c3e50;
}

.chart-header {
  display: inline-block;
  margin-right: 16px;
}

.chart-header span {
  font-size: 1em;
  font-weight: 600;
  color: #2c3e50;
}

.chart-nav {
  display: inline-block;
}

.chart-nav a {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 2px;
  font-size: 0.9em;
  font-weight: 600;
  color: #3498db;
  text-decoration: none;
  transition: color 0.15s;
}

.chart-nav a:hover {
  color: #2c3e50;
}

.chart-container {
  width: 100%;
  height: 220px;
  margin-top: 8px;
}

.chart-container .legend table {
  right: -130px !important;
  width: 120px;
  position: absolute;
}

.chart-container .legend td.legendColorBox {
  width: 20px !important;
  padding: 0;
}

/* ── Outbound table rows as chart legend ────────────────── */

table.outbound-table tbody tr.data-row,
table.devices-table tbody tr.data-row {
  cursor: pointer;
}

table.outbound-table tbody tr.data-row:hover,
table.devices-table tbody tr.data-row:hover {
  background: #dce9f5;
}

table.outbound-table tbody tr.chart-hidden,
table.devices-table tbody tr.chart-hidden {
  opacity: 0.4;
}

table.outbound-table tbody tr.chart-hidden td,
table.devices-table tbody tr.chart-hidden td {
  text-decoration: line-through;
}

/* ═══════════════════════════════════════════════════════════
   Responsive helpers (within 950px Blueprint)
   ═══════════════════════════════════════════════════════════ */

div#center_area {
  padding-bottom: 2em;
}
