html, body { min-height: 100%; }
body { background: #f5f5f5; color: #333; }
[hidden] { display: none !important; }
.text-center { text-align: center; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.input-block-wrap { display: flex; }
.input-block-wrap .add-on { height: 20px; }
.input-block-wrap input { flex: 1; width: auto; border-radius: 0 4px 4px 0; }

/* Login construído com container, row, span4, offset4, well e forms do Bootstrap 2.3.2. */
.login-page {
  min-height: 100vh;
  padding: 8vh 0 40px;
  background: #2c3e50;
  background: linear-gradient(135deg, #1f2f3f 0%, #34495e 100%);
}
.login-box { border: 0; box-shadow: 0 5px 20px rgba(0,0,0,.35); }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand h1 { margin: 0; font-size: 25px; line-height: 30px; }
.login-brand small { color: #777; }
.brand-icon {
  display: inline-block; padding: 11px 10px; border-radius: 4px;
  color: #fff; background: #0088cc; font-size: 16px; font-weight: bold;
}
.password-wrap { position: relative; }
.password-wrap input { padding-right: 75px; }
.password-toggle { position: absolute; top: 4px; right: 4px; }
.login-help { margin-bottom: 0; font-size: 11px; }

/* Estrutura administrativa baseada em navbar, row-fluid, spans, wells e nav-list. */
.app-container { padding-top: 60px; }
.navbar .brand strong { color: #49afcd; }
.navbar-text { padding: 10px 12px 10px 15px; color: #bbb; }
.sidebar-nav { padding: 8px 0; }
.sidebar-nav .nav-list > li > a { cursor: pointer; }
.system-status strong, .system-status small { display: block; margin-top: 5px; }
.system-status small { color: #777; }
.main-panel { min-height: calc(100vh - 80px); }
.page-header { margin: 0 0 20px; padding-bottom: 8px; }
.page-header h2 { margin: 0; font-size: 27px; }
.page-header h2 small { font-size: 14px; }
.well-title { min-height: 28px; margin-bottom: 12px; border-bottom: 1px solid #ddd; }
.well-title h4 { margin-top: 0; }

.metrics-row { margin-bottom: 20px; }
.metric-box { min-height: 100px; margin-bottom: 0; position: relative; }
.metric-box > i { float: right; margin-top: 7px; opacity: .2; font-size: 30px; }
.metric-box span, .metric-box strong, .metric-box small { display: block; }
.metric-box span { color: #777; text-transform: uppercase; font-size: 10px; font-weight: bold; }
.metric-box strong { margin: 8px 0 4px; color: #0088cc; font-size: 30px; line-height: 30px; }
.metric-box small { color: #999; }

.recent-item {
  display: table; width: 100%; padding: 8px 0; box-sizing: border-box;
  border-top: 1px solid #ddd;
}
.recent-item:first-child { border-top: 0; }
.recent-item > * { display: table-cell; vertical-align: middle; }
.product-thumb { width: 48px; height: 48px; object-fit: contain; border: 1px solid #ddd; background: #fff; }
.product-placeholder { text-align: center; color: #aaa; }
.recent-main { width: 100%; padding: 0 10px; }
.recent-main strong, .recent-main small { display: block; }
.recent-main small { color: #888; }
.price { padding-right: 10px; white-space: nowrap; font-weight: bold; }
.status-pill { display: inline-block; padding: 2px 6px; border-radius: 3px; white-space: nowrap; font-size: 9px; font-weight: bold; }
.status-pill.online { color: #fff; background: #468847; }
.status-pill.missing { color: #fff; background: #f89406; }
.flow-table td { vertical-align: middle; }
.flow-table strong, .flow-table small { display: block; }
.flow-table small { color: #888; }

.json-editor {
  min-height: 480px; resize: vertical; box-sizing: border-box;
  color: #d6e5f5; background: #1b2631; border-color: #101820;
  font: 12px/1.6 Monaco, Menlo, Consolas, monospace;
}
.json-editor:focus { border-color: #0088cc; box-shadow: 0 0 6px rgba(0,136,204,.5); }
.editor-status { min-height: 20px; margin-top: 8px; }
.validation-message.valid { color: #468847; font-weight: bold; }
.validation-message.invalid { color: #b94a48; font-weight: bold; }
#processFeedback { margin-top: 12px; }

.filters-row { margin-bottom: 0; }
.filters-row input, .filters-row select { margin-bottom: 0; }
.product-table { min-width: 950px; background: #fff; }
.product-table th { background: #eee; font-size: 11px; text-transform: uppercase; }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 270px; }
.product-cell strong, .product-cell small { display: block; }
.product-cell small { color: #888; }
.category-badge { display: inline-block; padding: 2px 5px; color: #fff; background: #3a87ad; border-radius: 3px; }
.old-price { display: block; color: #999; font-size: 11px; text-decoration: line-through; }
.new-price { font-weight: bold; }
.affiliate-link { display: inline-block; max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pagination-bar { min-height: 32px; padding: 10px 0; }

.secret-field { font-family: Monaco, Menlo, Consolas, monospace; font-size: 11px; }
.form-horizontal .form-actions #configUpdated { margin-left: 10px; }
.alert-stack { position: fixed; z-index: 3000; top: 55px; right: 20px; width: 380px; }
.alert-stack .alert { box-shadow: 0 3px 12px rgba(0,0,0,.2); }

/* Modal operado em JavaScript puro, com visual nativo do Bootstrap 2.3.2. */
.modal.show { display: block; top: 8%; opacity: 1; }
.modal-backdrop-custom {
  position: fixed; inset: 0; z-index: 1040; background: #000; opacity: .6;
}
.modal-body { max-height: 65vh; }
.detail-grid { display: flex; gap: 20px; }
.detail-image { width: 150px; height: 150px; flex: 0 0 150px; object-fit: contain; border: 1px solid #ddd; background: #fff; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; }
.detail-list small, .detail-list strong { display: block; }
.detail-list small { color: #888; text-transform: uppercase; font-size: 9px; }
.detail-list strong { overflow-wrap: anywhere; }
.grid-column-span-2 { grid-column: 1 / -1; }
.spinner-border {
  display: inline-block; width: 12px; height: 12px; margin-right: 5px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sidebar-backdrop { display: none; }
@media (max-width: 767px) {
  .login-page { padding: 25px 12px; }
  .app-container { padding-top: 55px; }
  .sidebar { display: none; }
  .sidebar.open { display: block; position: fixed; z-index: 1050; top: 51px; left: 0; width: 250px; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 50px 0 0; z-index: 1045; background: rgba(0,0,0,.55); }
  .navbar .pull-right { float: right; }
  .navbar-text { display: none !important; }
  .metric-box { margin-bottom: 10px; }
  .detail-grid { display: block; }
  .detail-image { display: block; margin: 0 auto 15px; }
  .detail-list { grid-template-columns: 1fr; }
  .grid-column-span-2 { grid-column: auto; }
  .alert-stack { right: 10px; left: 10px; width: auto; }
}
