@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-deep: #0b0e14;
  --bg-page: #0b0e14;
  --bg-card: #151b23;
  --bg-accent: #1e293b;
  --accent-green: #00f59b;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border: #222c3a;
  --danger: #ef4444;
  --warning: #f59e0b;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-main);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background-color: var(--bg-deep);
  height: 70px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1;
}

.nav-right {
  display: flex;
  gap: 20px;
}

.nav-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent-green);
  background: rgba(0, 245, 155, 0.1);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-green);
  text-decoration: none;
  cursor: pointer;
}

.nav-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 10;
}

.nav-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 16px 10px 36px;
  color: white;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.nav-search-input:focus {
  border-color: var(--accent-green);
  background: #1a222e;
  box-shadow: 0 0 0 4px rgba(0, 245, 155, 0.1);
}

.nav-search-input::placeholder {
  color: #475569;
}

/* Country Filter */
.country-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.country-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.country-filter-btn.active {
  background: var(--accent-green);
  color: #0b0e14;
  border-color: var(--accent-green);
  font-weight: 700;
}

/* Hero & Grid */
.hero {
  padding: 40px 0;
}

.hero h1 {
  margin: 0 0 8px;
}

.hero p {
  color: var(--text-secondary);
  margin: 0;
}

.country-section {
  margin-bottom: 50px;
}

.country-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.country-flag {
  font-size: 24px;
}

.country-title {
  font-size: 20px;
  font-weight: 800;
  color: white;
  margin: 0;
  letter-spacing: -0.5px;
}

.country-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 155, 0.3);
}

.card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background-color: #05070a;
}

.card-image img {
  width: 100%;
  height: 100%;
  display: block;
}

.photo-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  backdrop-filter: blur(4px);
}

.status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--danger);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.card-content {
  padding: 20px;
}

.main-price {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
}

.installment-price {
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-top: 4px;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  margin: 12px 0 4px;
  text-transform: uppercase;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.feature-item {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Sold */
.card-sold {
  opacity: 0.8;
  filter: grayscale(1);
  pointer-events: none;
  position: relative;
}

.card-sold::after {
  content: 'VENDIDO';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 40px;
  font-weight: 900;
  color: #ff4d4d;
  border: 4px solid #ff4d4d;
  padding: 10px 20px;
  z-index: 10;
}

/* Detail View */
.detail-view {
  padding: 30px 0;
}

.back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 30px;
  transition: all 0.2s;
}

.back-btn:hover {
  color: white;
  border-color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
}

.detail-image-gallery {
  aspect-ratio: 4 / 3;
  width: 100%;
  max-height: 520px;
  /* Cap for desktop */
  object-fit: contain;
  /* Combined with background black to handle aspect ratio caps */
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #000;
  position: relative;
}

.detail-image-gallery img {
  width: 100%;
  height: 100%;
  display: block;
}

.detail-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.detail-card h2 {
  margin-top: 0;
  font-size: 18px;
}

.sidebar-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--border);
}

.sidebar-title {
  font-size: 24px;
  margin: 0;
}

.sidebar-main-price {
  font-size: 32px;
  font-weight: 800;
  display: block;
}

.sticker-card {
  position: sticky;
  top: 100px;
}

.sidebar-subtitle {
  color: #94a3b8;
  font-size: 14px;
  margin-top: 5px;
  margin-bottom: 20px;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.sidebar-installment-info {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 15px;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-installment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.sidebar-installment-row span {
  color: #94a3b8;
}

.sidebar-installment-row strong {
  color: white;
  font-size: 16px;
}

.highlight-row {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
  padding-top: 12px;
}

.highlight-row span {
  color: var(--accent-green);
  font-weight: 700;
}

.highlight-row strong {
  color: var(--accent-green);
  font-size: 18px;
}

.cash-price-badge {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  text-align: center;
  padding: 15px;
  border-radius: 12px;
  margin: 20px 0;
  font-style: italic;
  font-size: 14px;
}

.disclaimer-text {
  font-size: 11px;
  color: #475569;
  text-align: center;
  margin-top: 15px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s;
}

.spec-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.spec-icon {
  font-size: 24px;
}

.spec-item div {
  display: flex;
  flex-direction: column;
}

.spec-item small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.spec-item strong {
  color: white;
  font-size: 14px;
}

.description-text {
  color: #cdd5e0;
  line-height: 1.8;
  font-size: 15px;
  white-space: pre-line;
}

.costs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.cost-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cost-icon {
  font-size: 24px;
  background: rgba(255, 255, 255, 0.05);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cost-header {
  color: #64748b;
  font-size: 12px;
  margin: 0 0 4px;
}

.cost-value {
  color: white;
  font-weight: 700;
  margin: 0;
}

/* Admin */
.admin-header {
  padding: 40px 0 20px;
}

.admin-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.cta-button-header {
  background: var(--accent-green);
  color: var(--bg-deep);
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(0, 245, 155, 0.2);
}

.cta-button-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 245, 155, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  background: #111821;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid #1e293b;
}

.stat-label {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.stat-icon.red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.pink {
  color: #ff4d94;
}

.orange {
  color: #f59e0b;
}

.inventory-table-container {
  background: #111821;
  border-radius: 20px;
  border: 1px solid #1e293b;
  overflow: hidden;
  margin-top: 30px;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
}

.inventory-table th {
  text-align: left;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
  font-size: 12px;
}

.inventory-table td {
  padding: 15px 20px;
  border-top: 1px solid #1e293b;
}

.table-vehicle-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-thumb {
  width: 50px;
  height: 35px;
  border-radius: 4px;
  object-fit: cover;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.vendido {
  background: rgba(239, 68, 68, 0.1);
  color: #ff6b6b;
}

.status-pill.disponivel {
  background: rgba(0, 245, 155, 0.1);
  color: #00f59b;
}

.status-pill.reservado {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.actions-cell {
  display: flex;
  gap: 8px;
}

.actions-cell button {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.actions-cell button:hover {
  background: #334155;
  color: white;
}

.actions-cell .delete-btn {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ff6b6b;
}

.actions-cell .delete-btn:hover {
  background: #ef4444;
  color: white;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  background: #0f1217;
  border-radius: 24px;
  padding: 30px;
  width: 100%;
  max-width: 800px;
  border: 1px solid #1e293b;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 2px;
  opacity: 0.8;
}

.form-grid input,
.form-grid select,
.vehicle-form textarea {
  background: #0b0e14;
  border: 1px solid #1e293b;
  padding: 14px;
  border-radius: 12px;
  color: white;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s;
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: var(--accent-green);
  outline: none;
  background: #111821;
  box-shadow: 0 0 0 4px rgba(0, 245, 155, 0.1);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 35px;
  padding-top: 25px;
  border-top: 1px solid #1e293b;
}

.cta-button {
  width: auto;
  min-width: 200px;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(135deg, #00f59b 0%, #00d2ff 100%);
  color: #0b0e14;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 245, 155, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 245, 155, 0.4);
  filter: brightness(1.1);
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1e293b;
  color: #94a3b8;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

/* Financeiro */
.financeiro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 35px;
  padding-bottom: 80px;
}

.fin-card {
  background: #0f1217;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.fin-card:hover {
  transform: translateY(-5px);
}

.fin-card-header {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.customer-badge {
  background: rgba(15, 18, 23, 0.8);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.customer-initial {
  background: var(--accent-green);
  color: #0b0e14;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
}

.customer-name,
.customer-name-btn {
  color: white;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.customer-name-btn:hover {
  color: var(--accent-green);
  text-decoration: underline;
}

.edit-fin-btn {
  background: rgba(15, 18, 23, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.edit-fin-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.fin-card-image {
  height: 220px;
  position: relative;
}

.fin-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, #0f1217, transparent);
}

.fin-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fin-info-section {
  padding: 20px 24px 24px;
}

.fin-vehicle-name {
  font-size: 22px;
  font-weight: 800;
  color: white;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
}

.fin-vehicle-specs {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fin-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.fin-stat-box {
  background: rgba(22, 28, 36, 0.5);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.fin-stat-title {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fin-stat-title small {
  color: #475569;
  font-weight: 600;
  margin-left: 4px;
}

.fin-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.fin-stat-value.green {
  color: var(--accent-green);
}

.fin-stat-value.white {
  color: white;
  font-size: 24px;
}

.fin-stat-value.red {
  color: #ff4d6d;
  font-size: 24px;
}

.fin-stat-value small {
  font-size: 14px;
  color: #475569;
  margin-left: 2px;
}

.fin-stat-day {
  display: block;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.6;
  margin-top: 4px;
  text-transform: uppercase;
}

.fin-stat-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fin-stat-remain {
  color: #3b82f6;
  font-size: 10px;
  font-weight: 800;
}

.fin-stat-box.status-on-time {
  border-color: rgba(0, 245, 155, 0.3) !important;
  background: rgba(0, 245, 155, 0.03) !important;
}

.fin-stat-box.status-on-time .fin-stat-value,
.fin-stat-box.status-on-time .fin-stat-day {
  color: var(--accent-green) !important;
}

.fin-stat-box.status-today {
  border-color: rgba(245, 158, 11, 0.5) !important;
  background: rgba(245, 158, 11, 0.05) !important;
}

.fin-stat-box.status-today .fin-stat-value,
.fin-stat-box.status-today .fin-stat-day {
  color: #f59e0b !important;
}

.fin-stat-box.status-overdue {
  border-color: rgba(255, 77, 109, 0.5) !important;
  background: rgba(255, 77, 109, 0.05) !important;
}

.fin-stat-box.status-overdue .fin-stat-value,
.fin-stat-box.status-overdue .fin-stat-day {
  color: #ff4d6d !important;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  background: var(--accent-green);
  transition: width 0.5s ease;
}

.supplier-card .progress-bar {
  background: #ef4444;
}

.fin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.fin-action-btn {
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fin-action-btn.pay {
  background: var(--accent-green);
  color: #0b0e14;
}

.fin-action-btn.pay:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(0, 245, 155, 0.2);
}

.fin-action-btn.nudge {
  background: rgba(0, 245, 155, 0.05);
  border: 1px solid rgba(0, 245, 155, 0.2);
  color: var(--accent-green);
}

.fin-action-btn.nudge:hover {
  background: rgba(0, 245, 155, 0.1);
}

.fin-action-btn.trade {
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.fin-details-btn {
  width: 100%;
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  font-size: 12px;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.fin-details-btn:hover {
  background: white;
  color: #0b0e14;
}

.delete-customer-btn {
  display: block;
  width: fit-content;
  margin: 15px auto 0;
  background: none;
  border: none;
  color: #ef4444;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.delete-customer-btn:hover {
  opacity: 1;
}

/* Finance Tabs */
.fin-period-toggle {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.fin-period-toggle button {
  background: none;
  border: none;
  color: #64748b;
  padding: 6px 16px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fin-period-toggle button.active {
  background: var(--accent-green);
  color: #0b0e14;
  box-shadow: 0 4px 12px rgba(0, 245, 155, 0.2);
}

.fin-tab-toggle {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px;
  border-radius: 12px;
  margin-right: 20px;
}

.fin-tab-toggle button {
  background: none;
  border: none;
  color: #64748b;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.fin-tab-toggle button.active {
  background: var(--accent-green);
  color: #0b0e14;
}

.fin-summary-strip {
  margin-top: 20px;
  margin-bottom: 30px;
}

.stat-card.inflow {
  border-left: 4px solid var(--accent-green);
}

.stat-card.outflow {
  border-left: 4px solid #ef4444;
}

.stat-card.net {
  border-left: 4px solid #a855f7;
}

.stat-card .red {
  color: #ef4444;
}

.stat-number.highlight {
  color: #a855f7;
}

.supplier-card .customer-badge.supplier {
  background: rgba(239, 68, 68, 0.1);
}

.supplier-card .customer-badge.supplier .customer-initial {
  background: #ef4444;
}

/* Client Details Modal */
.client-details-modal {
  max-width: 500px;
}

.client-details-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.client-avatar {
  width: 60px;
  height: 60px;
  background: var(--accent-green);
  color: #0b0e14;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
}

.client-details-header h2 {
  margin: 0;
  font-size: 24px;
}

.client-details-header p {
  margin: 4px 0 0;
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.client-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-info-item label {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.detail-info-item p {
  margin: 0;
  font-weight: 600;
  color: white;
}

.client-notes {
  margin-top: 25px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.client-notes label {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.client-notes p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
}

.status-label-detail {
  color: var(--accent-green) !important;
}

/* Loading */
.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  opacity: 0;
  animation: loaderFadeIn 0.3s ease forwards;
  animation-delay: 0.6s;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 245, 155, 0.1);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderFadeIn {
  to {
    opacity: 1;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden;
    /* Prevent horizontal scroll bugs */
  }

  .container {
    padding: 0 16px;
  }

  /* Navbar Mobile - Simplified & Premium */
  .navbar {
    height: 64px;
  }

  .navbar-content {
    gap: 12px;
  }

  .logo {
    font-size: 20px;
    flex-shrink: 0;
  }

  .nav-search-wrapper {
    max-width: none;
    flex: 1;
  }

  .nav-search-input {
    padding: 8px 12px 8px 34px;
    font-size: 13px;
    border-radius: 12px;
    /* More modern than pill on mobile */
  }

  /* Country Filter Mobile - Snap Scroll */
  .country-filter-bar {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 0 12px;
    margin: 0 -16px 20px;
    padding-left: 16px;
    gap: 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .country-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .country-filter-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Section Headers Mobile */
  .country-header {
    margin-bottom: 16px;
    padding-bottom: 8px;
  }

  .country-title {
    font-size: 18px;
  }

  /* Product Grid Mobile - Pure 1 Column */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card {
    border-radius: 20px;
  }

  .card-image {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .card-content {
    padding: 16px;
  }

  .main-price {
    font-size: 24px;
  }

  /* Detail View Mobile - Full Width Stack */
  .detail-view {
    padding: 0;
  }

  .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* The "Reduced" Photo look */
  .detail-image-gallery {
    aspect-ratio: 4 / 3;
    width: calc(100% - 32px);
    margin: 16px auto;
    border-radius: 24px;
    max-height: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  }

  .detail-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0px;
    /* Seamless stack */
    padding: 24px 16px;
  }

  .specs-card {
    background: #0d1117;
    /* Slight variation for spec card */
  }

  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .spec-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 12px;
  }

  .detail-sidebar {
    padding: 24px 16px 40px;
  }

  .sticker-card {
    position: static;
    border-radius: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
  }

  .sidebar-main-price {
    font-size: 30px;
  }

  .hero {
    padding: 32px 0 20px;
  }

  .hero h1 {
    font-size: 26px;
    text-align: center;
    letter-spacing: -1px;
    margin-bottom: 12px;
  }

  .hero p {
    font-size: 15px;
    text-align: center;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
  }

  /* Hide Desktop specific things */
  .desktop-hide {
    display: none !important;
  }

  /* Feature Grid Mobile - Clean 2-column layout */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-top: 12px;
  }

  .feature-item {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* Badge Refinements Mobile */
  .photo-badge,
  .status-badge {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 6px;
  }

  .photo-badge {
    bottom: 8px;
    left: 8px;
  }

  .status-badge {
    top: 8px;
    right: 8px;
  }

  /* Search Icon Mobile Padding */
  .search-icon {
    left: 12px;
    width: 14px;
    height: 14px;
  }

  /* Hide slider arrows on mobile - favor swiping */
  .slider-nav {
    display: none !important;
  }
}

/* File input */
.file-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Upload Thumbnails */
.upload-thumbs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.upload-thumb {
  position: relative;
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-thumb {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Upload Progress */
.upload-progress {
  position: relative;
  width: 100%;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  margin-top: 12px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), #00d2ff);
  border-radius: 14px;
  transition: width 0.3s ease;
  min-width: 0;
}

.upload-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Card Mini Carousel */
.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 3;
  backdrop-filter: blur(4px);
}

.card-image:hover .card-arrow {
  opacity: 1;
}

.card-arrow:hover {
  background: rgba(0, 245, 155, 0.4);
}

.card-arrow-left {
  left: 8px;
}

.card-arrow-right {
  right: 8px;
}

.card-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 3;
}

.card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.2s;
}

.card-dot.active {
  background: var(--accent-green);
  transform: scale(1.4);
}

/* Photo Carousel */
.carousel {
  margin-bottom: 30px;
}

.carousel-viewport {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  background-color: #05070a;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
  z-index: 5;
}

.carousel-arrow:hover {
  background: rgba(0, 245, 155, 0.3);
}

.carousel-arrow.left {
  left: 12px;
}

.carousel-arrow.right {
  right: 12px;
}

.carousel-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  z-index: 5;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.carousel-dot.active {
  background: var(--accent-green);
  transform: scale(1.3);
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* ========== LOGIN SCREEN ========== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060810;
  overflow: hidden;
}

.login-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 245, 155, 0.08) 0%, rgba(0, 245, 155, 0.02) 40%, transparent 70%);
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

.login-card {
  position: relative;
  z-index: 2;
  background: rgba(15, 18, 23, 0.85);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  padding: 50px 44px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: cardSlideIn 0.5s ease-out;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-logo {
  font-size: 40px;
  font-weight: 900;
  color: var(--accent-green);
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.login-subtitle {
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0 0 40px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0 18px;
  transition: all 0.3s;
}

.login-input-wrapper svg {
  color: #334155;
  flex-shrink: 0;
}

.login-input-wrapper:focus-within {
  border-color: var(--accent-green);
  background: rgba(0, 245, 155, 0.03);
  box-shadow: 0 0 0 4px rgba(0, 245, 155, 0.08), 0 0 30px rgba(0, 245, 155, 0.05);
}

.login-input-wrapper:focus-within svg {
  color: var(--accent-green);
}

.login-input {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 0;
  color: white;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.login-input::placeholder {
  color: #334155;
}

.login-error {
  color: #ff4d6d;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0 0;
  text-align: left;
}

.login-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #00f59b 0%, #00d2ff 100%);
  color: #0b0e14;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  box-shadow: 0 4px 20px rgba(0, 245, 155, 0.2);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 245, 155, 0.35);
  filter: brightness(1.05);
}

.login-btn:active {
  transform: translateY(0);
}

.login-footer {
  color: #1e293b;
  font-size: 11px;
  font-weight: 600;
  margin: 30px 0 0;
  letter-spacing: 1px;
}

/* Shake animation */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  50%,
  90% {
    transform: translateX(-6px);
  }

  30%,
  70% {
    transform: translateX(6px);
  }
}

.shake {
  animation: shake 0.4s ease-in-out;
}

/* Custom Slider & Zoom UI */
.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.slider-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slider-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  scroll-snap-align: start;
  overflow: hidden;
  /* Prevent scale bleed */
}

.slider-slide img {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.zoom-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .zoom-btn {
    padding: 6px 12px;
    font-size: 9px;
    bottom: 10px;
    right: 10px;
  }
}

.zoom-btn i[role="img"] {
  color: #38bdf8;
  /* Blue magnifying glass highlight */
  font-style: normal;
  font-size: 14px;
  text-shadow: 0 0 5px rgba(56, 189, 248, 0.5);
  display: inline-block;
}

.zoom-btn i {
  color: #38bdf8;
  /* Blue magnifying glass highlight */
  font-style: normal;
  font-size: 14px;
}

.zoom-btn:hover {
  background: var(--accent-green);
  color: #000;
  border-color: var(--accent-green);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 245, 155, 0.3);
}

.zoom-btn:hover i {
  color: #000;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.2s;
  opacity: 0;
  /* Hidden by default, show on hover */
}

.slider-container:hover .slider-nav {
  opacity: 1;
}

.slider-nav:hover {
  background: var(--accent-green);
  color: black;
}

.slider-prev {
  left: 8px;
}

.slider-next {
  right: 8px;
}

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 11;
}

.slider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.slider-dot.active {
  background: var(--accent-green);
  transform: scale(1.4);
  box-shadow: 0 0 10px var(--accent-green);
}

@media (max-width: 768px) {
  .slider-dots {
    bottom: 8px;
    gap: 4px;
  }

  .slider-dot {
    width: 4px;
    height: 4px;
  }
}

/* Zoom Modal */
.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.zoom-overlay.active {
  display: flex;
}

.zoom-overlay img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile Sticky CTA */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: block;
  }

  /* Ensure content doesn't get hidden under sticky button */
  body {
    padding-bottom: 80px;
  }
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}