/* ==========================================
   Ativos Resumo Page Styles
   ========================================== */

/* Container */
.resumo-container {
  max-width: 1320px;
}

/* Header Section */
.resumo-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 24px;
  border-radius: 12px;
  background: #111;
  border: 1px solid #222;
  padding: 16px 20px;
  gap: 24px;
  flex-wrap: wrap;
}

.resumo-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.resumo-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.resumo-logo-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
}

.resumo-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

/* Navigation Tabs */
.resumo-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resumo-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #bfbfbf;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.resumo-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.resumo-tab.active {
  background: #4bcd95;
  border-color: #4bcd95;
  color: #08090a;
}

.resumo-tab.active:hover {
  background: #3ab882;
  color: #08090a;
}

.resumo-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Company Info */
.resumo-company-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.resumo-company-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.resumo-ticker-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticker-pill {
  padding: 4px 12px;
  border-radius: 6px;
  background: #252629;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #bfbfbf;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ticker-pill:hover {
  background: #333;
  color: #fff;
  text-decoration: none;
}

.ticker-pill.active {
  background: #4bcd95;
  border-color: #4bcd95;
  color: #08090a;
}

/* Title Row */
.resumo-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.resumo-page-title {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

/* Search Box */
.resumo-search-box {
  display: flex;
  align-items: center;
  background: #151619;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  min-width: 200px;
}

.resumo-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
}

.resumo-search-box input::placeholder {
  color: #757575;
}

.resumo-search-box button {
  background: transparent;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  color: #757575;
  transition: color 0.2s ease;
}

.resumo-search-box button:hover {
  color: #fff;
}

/* Cards Grid */
.resumo-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 992px) {
  .resumo-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .resumo-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Styles */
.resumo-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
}

.resumo-card-header {
  background: transparent;
  color: #4bcd95;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 16px 20px 12px;
  text-align: center;
  text-transform: uppercase;
  border-bottom: 1px solid #222;
}

.resumo-card-body {
  padding: 8px 0;
}

.resumo-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.resumo-card-row:last-child {
  border-bottom: none;
}

.resumo-label {
  color: #bfbfbf;
  font-size: 14px;
  font-weight: 400;
}

.resumo-value {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 6px;
}

.resumo-value-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.resumo-value .date-label {
  color: #757575;
  font-size: 11px;
  font-weight: 400;
}

/* Value Colors */
.resumo-value-positive {
  color: #4bcd95 !important;
}

.resumo-value-negative {
  color: #ff6b6b !important;
}

/* Arrows */
.arrow-up {
  color: #4bcd95;
  font-size: 10px;
}

.arrow-down {
  color: #ff6b6b;
  font-size: 10px;
}

/* Ticker Badge */
.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: #252629;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.ticker-badge-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

/* Divider */
.resumo-divider {
  height: 1px;
  background: #333;
  margin: 12px 20px;
}

/* Card Subheader */
.resumo-card-subheader {
  color: #4bcd95;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 20px;
  text-transform: uppercase;
}

/* Responsive Header */
@media (max-width: 992px) {
  .resumo-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .resumo-header-right {
    width: 100%;
    justify-content: flex-start;
  }
  
  .resumo-company-info {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .resumo-logo-tabs {
    flex-wrap: wrap;
  }
  
  .resumo-tabs {
    flex-wrap: wrap;
  }
  
  .resumo-tab {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .resumo-page-title {
    font-size: 22px;
  }
  
  .resumo-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .resumo-search-box {
    width: 100%;
  }
}

/* Alert styling */
.resumo-container .alert-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #ffc107;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  justify-content: center;
  align-items: center;
}

.resumo-container .alert-warning p {
  width: 100%;
  display: flex;
  margin: 0;
}

.resumo-container .alert-warning code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.resumo-container .alert-warning strong {
  color: #fff;
}

/* ==========================================
   2-Column and 1-Column Grid Layouts
   ========================================== */

.resumo-cards-grid-2col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-top: 20px;
}

.resumo-cards-grid-1col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* ==========================================
   DEMONSTRATIVO DE RESULTADOS (DRE) Styles
   ========================================== */

.resumo-card-dre .resumo-card-body {
  padding: 0;
}

.dre-header-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dre-header-col {
  font-size: 11px;
  font-weight: 600;
  color: #4bcd95;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dre-header-center {
  text-align: center;
}

.dre-data-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.2s ease;
}

.dre-data-row:last-child {
  border-bottom: none;
}

.dre-data-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.dre-value-col {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.dre-value-col:last-child {
  border-right: none;
}

.dre-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}

.dre-value-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.dre-value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.dre-change {
  font-size: 11px;
  font-weight: 500;
}

/* ==========================================
   GOVERNANÇA Card Styles
   ========================================== */

.resumo-card-governanca .resumo-card-body {
  padding: 16px 20px;
}

.resumo-governanca-body {
  display: flex;
  justify-content: center;
}

.governanca-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.governanca-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.governanca-item:last-child {
  border-right: none;
}

.governanca-label {
  font-size: 13px;
  color: #999;
}

.governanca-value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.governanca-value-highlight {
  color: #4bcd95;
}

/* ==========================================
   Responsive Styles for New Sections
   ========================================== */

@media (max-width: 992px) {
  .resumo-cards-grid-2col {
    grid-template-columns: 1fr;
  }
  
  .dre-header-row,
  .dre-data-row {
    gap: 0;
  }
  
  .dre-header-col {
    font-size: 10px;
  }
  
  .dre-label {
    font-size: 12px;
  }
  
  .dre-value {
    font-size: 13px;
  }
  
  .dre-change {
    font-size: 10px;
  }
  
  .dre-value-col {
    padding: 12px 14px;
  }
}

@media (max-width: 768px) {
  .governanca-grid {
    flex-direction: column;
    gap: 16px;
  }
  
  .governanca-item {
    padding: 12px 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    justify-content: space-between;
  }
  
  .governanca-item:last-child {
    border-bottom: none;
  }
  
  .dre-header-row {
    display: none;
  }
  
  .dre-data-row {
    grid-template-columns: 1fr;
  }
  
  .dre-value-col {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  .dre-value-col:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .resumo-cards-grid-2col,
  .resumo-cards-grid-1col {
    margin-top: 16px;
    gap: 16px;
  }
  
  .governanca-item {
    gap: 8px;
    padding: 10px 0;
  }
  
  .governanca-label {
    font-size: 12px;
  }
  
  .governanca-value {
    font-size: 13px;
  }
}
