/* ================= CLIENT-SIDE STYLES ================= */

.client-screen {
  min-height: 100vh;
  padding: 0;
}

.hidden {
  display: none !important;
}

/* ================= LOGIN SCREEN ================= */
#screen-login {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 60%, #10b981 200%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.15), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1), transparent 50%);
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* Brand */
.client-brand {
  text-align: center;
  margin-bottom: 24px;
}

.client-brand-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.4);
}

.client-brand-logo svg {
  width: 34px;
  height: 34px;
}

.client-brand-name {
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.6px;
  margin-bottom: 4px;
}

.client-brand-tagline {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-weight: 500;
}

/* Login Card */
.login-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.login-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Form */
.client-form-group {
  margin-bottom: 16px;
}

.client-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.client-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.client-form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: #0f172a;
  background: #fafbfc;
  transition: all 0.2s ease;
}

.client-form-input::placeholder {
  color: #94a3b8;
}

.client-form-input:focus {
  outline: none;
  border-color: #10b981;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.key-input {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  font-family: "SF Mono", Monaco, "Courier New", monospace;
}

.client-form-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.4;
}

/* Primary Button */
.client-btn-primary {
  width: 100%;
  padding: 15px 20px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.client-btn-primary:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.client-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.client-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Messages */
.client-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  display: none;
  line-height: 1.5;
}

.client-msg.show {
  display: block;
}

.client-msg.error {
  background: #fee2e2;
  color: #dc2626;
}

.client-msg.success {
  background: #d1fae5;
  color: #059669;
}

.client-msg.info {
  background: #dbeafe;
  color: #2563eb;
}

/* ================= SUPPORT CARD ================= */
.support-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(10px);
  margin-bottom: 16px;
}

.support-title {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.support-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 14px;
  line-height: 1.5;
}

.support-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.support-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.support-whatsapp:hover {
  background: #1eaa55;
  transform: translateY(-1px);
}

.support-email {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.support-email:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.support-contact-info {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-family: "SF Mono", Monaco, monospace;
  letter-spacing: 0.3px;
}

/* Footer */
.client-footer-text {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  letter-spacing: 0.3px;
}

.client-footer-text strong {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

/* ================= SETUP SCREEN ================= */
#screen-setup {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 60%, #10b981 200%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.setup-container {
  width: 100%;
  max-width: 520px;
  padding: 20px 0;
}

.setup-header {
  text-align: center;
  margin-bottom: 24px;
}

.setup-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
}

.setup-title {
  font-size: 26px;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.setup-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.setup-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.setup-logout-btn {
  display: block;
  margin: 20px auto 0;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.setup-logout-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* ================= CLIENT HEADER ================= */
.client-header {
  background: #0f172a;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.client-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.client-header-hello {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.client-header-name {
  font-size: 15px;
  font-weight: 700;
  color: white;
}

.client-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.client-icon-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ================= CLIENT MAIN ================= */
.client-main {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.dashboard-placeholder {
  text-align: center;
  padding: 20px 0;
}

.placeholder-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
}

.dashboard-placeholder h1 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.dashboard-placeholder p {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px;
}

.placeholder-info {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  text-align: left;
  border-left: 4px solid #10b981;
  max-width: 480px;
  margin: 0 auto;
}

.placeholder-info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}

.placeholder-info-row:last-child {
  border-bottom: none;
}

.placeholder-info-row span {
  color: #64748b;
  font-weight: 500;
}

.placeholder-info-row strong {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.placeholder-note {
  font-size: 13px !important;
  color: #94a3b8 !important;
  margin-top: 20px !important;
  font-style: italic;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 480px) {
  #screen-login {
    padding: 16px;
    align-items: flex-start;
    padding-top: 32px;
  }

  .client-brand-name { font-size: 26px; }
  .login-card { padding: 24px 20px; }
  .login-title { font-size: 20px; }
  .key-input { font-size: 16px; letter-spacing: 2px; }
  
  .support-actions {
    grid-template-columns: 1fr;
  }

  .client-form-row {
    grid-template-columns: 1fr;
  }

  .setup-card { padding: 24px 20px; }
  .setup-title { font-size: 22px; }
}

/* ================= SIDEBAR LAYOUT ================= */

/* Override previous dashboard styles */
#screen-dashboard {
  display: flex !important;
  min-height: 100vh;
  background: #f1f5f9;
}

#screen-dashboard.hidden {
  display: none !important;
}

/* ================= SIDEBAR (Desktop) ================= */
.sidebar {
  width: 260px;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.sidebar-brand {
  min-width: 0;
  flex: 1;
}

.sidebar-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.sidebar-brand-tagline {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.sidebar-nav-item.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.sidebar-user-info {
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.sidebar-logout {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: none;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ================= MOBILE HEADER ================= */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #0f172a;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 90;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.mobile-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-header-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.mobile-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* ================= MOBILE SIDEBAR OVERLAY ================= */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ================= MAIN CONTENT ================= */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.content-section {
  display: none;
  max-width: 1100px;
  margin: 0 auto;
}

.content-section.active {
  display: block;
  animation: fadeInContent 0.3s ease;
}

@keyframes fadeInContent {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= SECTION HEADER ================= */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* ================= BUTTONS ================= */
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-add:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

/* ================= SEARCH BOX ================= */
.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #0f172a;
  background: white;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* ================= CUSTOMERS LIST ================= */
.customers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-item {
  background: white;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.customer-item:hover {
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.customer-item-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.customer-item-info {
  flex: 1;
  min-width: 0;
}

.customer-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-item-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-item-id {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 11px;
  color: #10b981;
  background: #ecfdf5;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.customer-item-arrow {
  color: #cbd5e1;
  flex-shrink: 0;
}

/* ================= EMPTY STATE ================= */
.empty-state {
  background: white;
  padding: 60px 24px;
  border-radius: 16px;
  text-align: center;
  border: 1px dashed #cbd5e1;
}

.empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.empty-state p {
  color: #64748b;
  font-size: 14px;
}

/* ================= COMING SOON ================= */
.coming-soon-card {
  background: white;
  padding: 60px 24px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border: 1px dashed #cbd5e1;
}

.coming-soon-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.coming-soon-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.coming-soon-card p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.coming-soon-note {
  margin-top: 12px;
  font-size: 12px !important;
  color: #94a3b8 !important;
  font-style: italic;
}

/* ================= SUPPORT PAGE ================= */
.support-page-card {
  background: white;
  padding: 40px 24px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.support-page-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.support-page-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.support-page-card > p {
  color: #64748b;
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.support-page-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 20px;
}

.support-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.support-page-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.support-page-whatsapp:hover {
  background: #1eaa55;
  transform: translateY(-1px);
}

.support-page-email {
  background: #f1f5f9;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
}

.support-page-email:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.support-page-contact {
  padding: 14px;
  background: #f8fafc;
  border-radius: 10px;
  max-width: 480px;
  margin: 0 auto;
}

.support-page-contact p {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  font-family: "SF Mono", Monaco, monospace;
  letter-spacing: 0.3px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-header {
    display: flex;
  }

  .mobile-sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 76px 16px 24px;
  }

  .section-title {
    font-size: 20px;
  }

  .support-page-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .btn-add {
    width: 100%;
    justify-content: center;
  }

  .customer-item {
    padding: 14px;
    gap: 12px;
  }

  .customer-item-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .section-title {
    font-size: 18px;
  }

  .section-subtitle {
    font-size: 13px;
  }
}

/* ================= CUSTOMER ITEM ================= */
.customer-item {
  background: white;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.customer-item:hover {
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.customer-item-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.customer-item-info {
  flex: 1;
  min-width: 0;
}

.customer-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-item-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-item-id {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 10px;
  color: #10b981;
  background: #ecfdf5;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  font-weight: 700;
}

.customer-item-arrow {
  color: #cbd5e1;
  flex-shrink: 0;
}

.customer-item-arrow svg {
  width: 18px;
  height: 18px;
}

/* ================= CUSTOMER DETAIL SCREEN ================= */
#screen-customer-detail {
  background: #f1f5f9;
  min-height: 100vh;
  padding-bottom: 40px;
}

#screen-customer-detail.hidden {
  display: none !important;
}

.detail-header {
  background: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.detail-back-btn,
.detail-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  border: none;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.detail-back-btn:hover,
.detail-menu-btn:hover {
  background: #e2e8f0;
}

.detail-header-info {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.detail-header-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-header-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-main {
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;
}

/* ================= BALANCE CARD PLACEHOLDER ================= */
.balance-card-placeholder {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 32px 24px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  position: relative;
  overflow: hidden;
}

.balance-card-placeholder::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent 70%);
  border-radius: 50%;
}

.balance-placeholder-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  position: relative;
}

.balance-placeholder-amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  position: relative;
}

.balance-placeholder-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  position: relative;
}

/* ================= CUSTOMER DETAIL INFO CARD ================= */
.detail-info-card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.detail-info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}

.detail-info-row:last-child {
  border-bottom: none;
}

.detail-info-label {
  color: #64748b;
  font-weight: 500;
  flex-shrink: 0;
}

.detail-info-value {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.detail-info-value.mono {
  font-family: "SF Mono", Monaco, monospace;
  color: #10b981;
  letter-spacing: 1px;
}

/* ================= MODAL ================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal.hidden {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeInModal 0.2s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  animation: slideUpModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-content-small {
  max-width: 400px;
  border-radius: 20px;
  margin: auto;
  max-height: auto;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body .client-form-group {
  margin-bottom: 16px;
}

.modal-body .client-form-input {
  font-size: 16px;
}

.modal-body .client-form-input.mono {
  font-family: "SF Mono", Monaco, monospace;
  letter-spacing: 1.5px;
  color: #10b981;
  font-weight: 700;
  background: #ecfdf5;
  border-color: #d1fae5;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.btn-primary-modal,
.btn-secondary-modal {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.btn-primary-modal {
  background: #10b981;
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary-modal:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
}

.btn-primary-modal:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary-modal {
  background: #f1f5f9;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
}

.btn-secondary-modal:hover {
  background: #e2e8f0;
}

/* ================= CUSTOMER MENU MODAL ================= */
.modal-menu {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.modal-menu-item:hover {
  background: #f1f5f9;
}

.modal-menu-item svg {
  flex-shrink: 0;
  color: #64748b;
}

.modal-menu-danger {
  color: #dc2626;
}

.modal-menu-danger svg {
  color: #dc2626;
}

.modal-menu-danger:hover {
  background: #fee2e2;
}

/* ================= RESPONSIVE ================= */
@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: 20px;
  }
  
  .modal-content {
    border-radius: 20px;
    max-height: 85vh;
  }
}

@media (max-width: 480px) {
  .customer-item {
    padding: 14px;
    gap: 12px;
  }

  .customer-item-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .customer-item-name {
    font-size: 14px;
  }

  .detail-main {
    padding: 16px;
  }

  .balance-placeholder-amount {
    font-size: 34px;
  }

  .modal-footer {
    padding: 14px 20px;
  }

  .modal-footer .btn-primary-modal,
  .modal-footer .btn-secondary-modal {
    flex: 1;
    min-width: 0;
  }
}

/* ================= BALANCE CARD LIVE ================= */
.balance-card-live {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 24px;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  position: relative;
  overflow: hidden;
}

.balance-card-live::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent 70%);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.balance-card-live.balance-due {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
}
.balance-card-live.balance-due::before {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.4), transparent 70%);
}

.balance-card-live.balance-advance {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
}

.balance-card-live.balance-settled {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

.balance-live-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
}

.balance-live-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.balance-live-amount {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
  line-height: 1.1;
}

.balance-live-status {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.balance-live-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.balance-live-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.balance-live-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.balance-live-detail-item span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.balance-live-detail-item strong {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

/* ================= DETAIL ACTIONS ================= */
.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-action-primary {
  background: #10b981;
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.detail-action-primary:hover {
  background: #059669;
  transform: translateY(-1px);
}

.detail-action-secondary {
  background: white;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
}

.detail-action-secondary:hover {
  background: #f8fafc;
  border-color: #10b981;
  transform: translateY(-1px);
}

/* ================= ENTRIES SECTION ================= */
.entries-section {
  margin-top: 24px;
}

.entries-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.entries-section-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.entries-count {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 20px;
}

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
  position: relative;
}

.entry-item:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.entry-item.entry-payment {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.entry-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 16px;
  color: white;
}

.entry-item-icon.entry-item-icon-item {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  font-size: 20px;
}

.entry-item-icon.entry-item-icon-payment {
  background: linear-gradient(135deg, #10b981, #059669);
  font-size: 18px;
}

.entry-item-info {
  flex: 1;
  min-width: 0;
}

.entry-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-item-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.entry-item-meta-sep {
  color: #cbd5e1;
}

.entry-item-amount {
  font-size: 15px;
  font-weight: 800;
  color: #dc2626;
  white-space: nowrap;
  flex-shrink: 0;
}

.entry-item-amount.entry-item-amount-payment {
  color: #059669;
}

.entry-item-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  line-height: 1;
}

.entry-item:hover .entry-item-delete {
  opacity: 1;
}

.entry-item-delete:hover {
  background: #dc2626;
  color: white;
}

@media (max-width: 768px) {
  .entry-item-delete {
    opacity: 1;
  }
}

.empty-state-small {
  background: white;
  padding: 32px 20px;
  border-radius: 14px;
  text-align: center;
  border: 1px dashed #cbd5e1;
}

.empty-state-small p {
  color: #64748b;
  font-size: 14px;
}

/* ================= UNIT SELECTOR ================= */
.unit-selector,
.payment-method-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.unit-btn,
.payment-method-btn {
  padding: 9px 16px;
  border: 1.5px solid #e2e8f0;
  background: white;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.unit-btn:hover,
.payment-method-btn:hover {
  border-color: #10b981;
  color: #10b981;
}

.unit-btn.active,
.payment-method-btn.active {
  background: #10b981;
  border-color: #10b981;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* ================= TOTAL PREVIEW ================= */
.total-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #ecfdf5;
  border-radius: 12px;
  margin: 16px 0;
  border: 1.5px dashed #10b981;
}

.total-preview span {
  font-size: 13px;
  font-weight: 700;
  color: #047857;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.total-preview strong {
  font-size: 22px;
  font-weight: 800;
  color: #047857;
  letter-spacing: -0.5px;
}

/* ================= PAYMENT BALANCE DISPLAY ================= */
.payment-balance-display {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 20px;
  border-radius: 14px;
  text-align: center;
  margin-bottom: 20px;
}

.payment-balance-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.payment-balance-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ================= ITEM SUGGESTIONS ================= */
.item-suggestions {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.item-suggestions.show {
  display: flex;
}

.item-suggestion-chip {
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.item-suggestion-chip:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
}

/* ================= ENTRY CLICKABLE ================= */
.entry-item {
  cursor: pointer;
}

.entry-item:active {
  transform: scale(0.99);
}

/* Prevent delete button from triggering entry click */
.entry-item-delete {
  z-index: 2;
}

/* ================= EDIT MODAL BUTTONS ================= */
.btn-danger-modal {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
  background: #fee2e2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}

.btn-danger-modal:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

/* ================= QUICK QUANTITY BUMPS ================= */
.quick-qty-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.quick-qty-btn {
  flex: 1;
  min-width: 60px;
  padding: 10px 14px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-qty-btn:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
}

.quick-qty-btn:active {
  transform: scale(0.97);
}

.quick-qty-btn.quick-qty-primary {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.quick-qty-btn.quick-qty-primary:hover {
  background: #059669;
  border-color: #059669;
  color: white;
}

/* ================= EDIT ENTRY META ================= */
.edit-entry-meta {
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  border-left: 3px solid #3b82f6;
}

.edit-entry-meta p {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.edit-entry-meta p:last-child {
  margin-bottom: 0;
}

.edit-entry-meta strong {
  color: #0f172a;
  font-weight: 700;
}

/* ================= RESPONSIVE FOR EDIT ================= */
@media (max-width: 480px) {
  .modal-footer {
    flex-direction: row;
  }
  
  .btn-danger-modal {
    flex: 0 0 auto;
    min-width: 90px;
  }
  
  .btn-primary-modal {
    flex: 1;
  }
  
  .quick-qty-btn {
    font-size: 13px;
    padding: 9px 12px;
  }
}

/* ================= MAIN TABS (Active / Closed) ================= */
.main-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.main-tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.main-tab:hover {
  color: #0f172a;
}

.main-tab.active {
  background: white;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* ================= KHATA VIEWS ================= */
.khata-view {
  animation: fadeInContent 0.3s ease;
}

.khata-view.hidden {
  display: none;
}

/* ================= CLOSE KHATA SECTION ================= */
.close-khata-section {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #10b981;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.close-khata-section.hidden {
  display: none;
}

.close-khata-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  width: 100%;
  max-width: 320px;
}

.close-khata-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.close-khata-hint {
  font-size: 12px;
  color: #047857;
  margin-top: 10px;
  font-weight: 600;
}

/* ================= INNER TABS (Items / Payments) ================= */
.inner-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 16px;
}

.inner-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  height: 48px;
  min-height: 48px;
}

.inner-tab span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inner-tab svg {
  flex-shrink: 0;
}

.inner-tab:hover {
  border-color: #10b981;
  color: #10b981;
}

.inner-tab.active {
  background: #10b981;
  border-color: #10b981;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.inner-tab svg {
  flex-shrink: 0;
}

.inner-table-view {
  animation: fadeInContent 0.3s ease;
}

.inner-table-view.hidden {
  display: none;
}

/* ================= TABLE STYLES ================= */
.table-wrapper {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.data-table th {
  padding: 12px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table th.col-amount,
.data-table td.col-amount {
  text-align: right;
}

.data-table th.col-center,
.data-table td.col-center {
  text-align: center;
}

.data-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr.row-payment:hover {
  background: #f0fdf4;
}

.data-table td {
  padding: 14px 10px;
  color: #0f172a;
  font-weight: 500;
  vertical-align: middle;
}

.data-table td.cell-item-name {
  font-weight: 700;
  max-width: 160px;
}

.data-table td.cell-item-name .item-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table td.cell-item-name .item-date {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 2px;
}

.data-table td.cell-qty {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
}

.data-table td.cell-amount {
  font-weight: 800;
  color: #dc2626;
  white-space: nowrap;
  font-size: 14px;
}

.data-table td.cell-amount-payment {
  color: #059669;
}

/* Table footer (total row) */
.data-table tfoot {
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}

.data-table tfoot td {
  padding: 14px 10px;
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tfoot td.cell-amount {
  color: #dc2626;
  font-size: 16px;
}

.data-table tfoot td.cell-amount-payment {
  color: #059669;
  font-size: 16px;
}

/* ================= MOBILE TABLE ================= */
@media (max-width: 480px) {
  .data-table {
    font-size: 12px;
  }
  
  .data-table th {
    padding: 10px 8px;
    font-size: 10px;
  }
  
  .data-table td {
    padding: 12px 8px;
  }
  
  .data-table th.col-date,
  .data-table td.col-date {
    display: none;
  }
  
  .data-table td.cell-item-name {
    max-width: 100px;
  }
  
  .inner-tab {
    font-size: 12px;
    padding: 10px 8px;
  }
}

/* ================= CLOSED CYCLE CARD ================= */
.closed-cycle-card {
  background: white;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.closed-cycle-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.closed-cycle-dates {
  flex: 1;
  min-width: 0;
}

.closed-cycle-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.closed-cycle-range {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.closed-cycle-badge {
  padding: 4px 10px;
  background: #d1fae5;
  color: #059669;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.closed-cycle-badge.badge-advance {
  background: #dbeafe;
  color: #2563eb;
}

.closed-cycle-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.closed-cycle-stat {
  background: #f8fafc;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
}

.closed-cycle-stat-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.closed-cycle-stat-value {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  font-family: "SF Mono", Monaco, monospace;
}

.closed-cycle-stat-value.stat-red {
  color: #dc2626;
}

.closed-cycle-stat-value.stat-green {
  color: #059669;
}

.closed-cycle-toggle {
  width: 100%;
  padding: 10px;
  background: #f1f5f9;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.closed-cycle-toggle:hover {
  background: #e2e8f0;
}

.closed-cycle-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.closed-cycle-details.hidden {
  display: none;
}

.closed-cycle-details-section {
  margin-bottom: 16px;
}

.closed-cycle-details-section:last-child {
  margin-bottom: 0;
}

.closed-cycle-details-title {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.closed-cycle-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.closed-cycle-details-table th {
  padding: 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  border-bottom: 1px solid #f1f5f9;
}

.closed-cycle-details-table th.col-amount {
  text-align: right;
}

.closed-cycle-details-table td {
  padding: 8px;
  border-bottom: 1px solid #f8fafc;
  color: #0f172a;
  font-weight: 500;
}

.closed-cycle-details-table td.col-amount {
  text-align: right;
  font-weight: 700;
  font-family: "SF Mono", Monaco, monospace;
}

.closed-cycle-details-table tbody tr:last-child td {
  border-bottom: none;
}

/* ================= SHARE BILL SECTION ================= */
.share-bill-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.share-bill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-bill-btn svg {
  flex-shrink: 0;
}

.share-bill-pdf {
  background: #0f172a;
  color: white;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.share-bill-pdf:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.share-bill-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.share-bill-whatsapp:hover {
  background: #1eaa55;
  transform: translateY(-1px);
}

.share-bill-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ================= MINI DASHBOARD ================= */
.mini-dashboard {
  margin-top: 24px;
}

.mini-dashboard-header {
  margin-bottom: 16px;
}

.mini-dashboard-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Quick Stats */
.mini-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.mini-stat-card {
  background: white;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.mini-stat-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.mini-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.mini-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  font-family: "SF Mono", Monaco, monospace;
}

.mini-stat-value.stat-red {
  color: #dc2626;
}

.mini-stat-value.stat-green {
  color: #059669;
}

/* Mini Sections */
.mini-section {
  margin-bottom: 24px;
}

.mini-section-title {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Top Items List */
.top-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-item-row {
  background: white;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.top-item-row:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-color: #10b981;
}

.top-item-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.top-item-rank.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}

.top-item-rank.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: white;
}

.top-item-rank.rank-3 {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
}

.top-item-info {
  flex: 1;
  min-width: 0;
}

.top-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-item-meta {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.top-item-amount {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  font-family: "SF Mono", Monaco, monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Monthly Chart (Bar Chart) */
.monthly-chart {
  background: white;
  border-radius: 14px;
  padding: 20px 16px 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-height: 180px;
}

.chart-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chart-bar-value {
  font-size: 10px;
  font-weight: 800;
  color: #0f172a;
  font-family: "SF Mono", Monaco, monospace;
  white-space: nowrap;
}

.chart-bar {
  width: 100%;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.chart-bar-wrapper:hover .chart-bar {
  filter: brightness(1.1);
  transform: scaleY(1.02);
  transform-origin: bottom;
}

.chart-bar-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.mini-empty {
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 480px) {
  .share-bill-btn {
    font-size: 12px;
    padding: 13px 10px;
  }
  
  .mini-stat-value {
    font-size: 16px;
  }
  
  .chart-bar-value {
    font-size: 9px;
  }
  
  .chart-bar-label {
    font-size: 9px;
  }
  
  .monthly-chart {
    padding: 16px 12px 12px;
    min-height: 150px;
  }
}

/* ================= CLOSED CYCLE ACTIONS ================= */
.closed-cycle-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.closed-cycle-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 10px;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.closed-cycle-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.closed-cycle-pdf {
  background: #0f172a;
  color: white;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.closed-cycle-pdf:hover:not(:disabled) {
  background: #1e293b;
  transform: translateY(-1px);
}

.closed-cycle-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.closed-cycle-whatsapp:hover:not(:disabled) {
  background: #1eaa55;
  transform: translateY(-1px);
}

.closed-cycle-action-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .closed-cycle-action-btn {
    font-size: 11px;
    padding: 10px 8px;
  }
}

/* ================= DASHBOARD STYLES ================= */

/* Refresh button */
.btn-refresh {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-refresh:hover {
  background: #e2e8f0;
  color: #10b981;
  border-color: #10b981;
}

.btn-refresh:active svg {
  animation: spin 0.6s linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-action-primary {
  background: #10b981;
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.quick-action-primary:hover {
  background: #059669;
  transform: translateY(-1px);
}

.quick-action-secondary {
  background: white;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
}

.quick-action-secondary:hover {
  background: #f8fafc;
  border-color: #10b981;
  transform: translateY(-1px);
}

/* Dashboard sections */
.dash-section {
  margin-bottom: 24px;
}

.dash-section-title {
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

/* Today's Cards */
.today-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.today-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.today-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.today-sales {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.today-payments {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.today-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.today-card-body {
  flex: 1;
  min-width: 0;
  position: relative;
}

.today-card-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.today-card-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
  font-family: "SF Mono", Monaco, monospace;
}

.today-card-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

/* Dashboard Stats Grid */
.dash-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dash-stat-card {
  background: white;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-stat-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
  border-color: #10b981;
}

.dash-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.dash-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-stat-icon-blue {
  background: #dbeafe;
  color: #2563eb;
}

.dash-stat-icon-red {
  background: #fee2e2;
  color: #dc2626;
}

.dash-stat-icon-green {
  background: #d1fae5;
  color: #059669;
}

.dash-stat-icon-teal {
  background: #ccfbf1;
  color: #0d9488;
}

.dash-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  font-family: "SF Mono", Monaco, monospace;
}

.dash-stat-danger .dash-stat-value {
  color: #dc2626;
}

.dash-stat-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* Dashboard Chart */
.dash-chart {
  background: white;
  border-radius: 14px;
  padding: 20px 16px 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-height: 200px;
}

/* Dashboard List */
.dash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-list-row {
  background: white;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-list-row:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-color: #10b981;
  transform: translateY(-1px);
}

.dash-list-rank {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.dash-list-rank.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}

.dash-list-rank.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: white;
}

.dash-list-rank.rank-3 {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
}

.dash-list-info {
  flex: 1;
  min-width: 0;
}

.dash-list-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-list-meta {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.dash-list-value {
  font-size: 14px;
  font-weight: 800;
  color: #dc2626;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: "SF Mono", Monaco, monospace;
}

.dash-list-value.value-green {
  color: #059669;
}

.dash-list-value.value-dark {
  color: #0f172a;
}

.dash-empty {
  background: white;
  padding: 30px 20px;
  border-radius: 14px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  color: #94a3b8;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 480px) {
  .today-grid {
    grid-template-columns: 1fr;
  }

  .dash-stats-grid {
    grid-template-columns: 1fr;
  }

  .today-card-value {
    font-size: 18px;
  }

  .dash-stat-value {
    font-size: 18px;
  }

  .quick-action-btn {
    font-size: 12px;
    padding: 12px 10px;
  }
}

/* ================= TOTAL SALES CARD ================= */
.dash-stat-total {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border-color: #c4b5fd;
}

.dash-stat-total .dash-stat-label {
  color: #6d28d9;
}

.dash-stat-total .dash-stat-value {
  color: #5b21b6;
}

.dash-stat-total .dash-stat-sub {
  color: #7c3aed;
}

.dash-stat-icon-purple {
  background: #ddd6fe;
  color: #7c3aed;
}

/* ================= CUSTOMER FILTER TABS ================= */
.cust-filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cust-filter-tabs::-webkit-scrollbar {
  display: none;
}

.cust-filter-tab {
  padding: 8px 16px;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cust-filter-tab:hover {
  border-color: #10b981;
  color: #10b981;
}

.cust-filter-tab.active {
  background: #10b981;
  border-color: #10b981;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* ================= CUSTOMER TABLE ================= */
.cust-table-wrapper {
  background: white;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.cust-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.cust-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.cust-table th {
  padding: 10px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.cust-table th.col-amount,
.cust-table td.col-amount {
  text-align: right;
}

.cust-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cust-table tbody tr:hover {
  background: #f8fafc;
}

.cust-table tbody tr:last-child {
  border-bottom: none;
}

.cust-table td {
  padding: 12px 8px;
  color: #0f172a;
  font-weight: 500;
  vertical-align: middle;
}

.cust-table td.cell-name {
  font-weight: 700;
  max-width: 130px;
}

.cust-table td.cell-name .name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-table td.cell-name .id {
  display: block;
  font-size: 10px;
  color: #10b981;
  font-weight: 700;
  font-family: "SF Mono", Monaco, monospace;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.cust-table td.cell-amount {
  font-weight: 800;
  white-space: nowrap;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 13px;
}

.cust-table td.cell-amount.amount-due {
  color: #dc2626;
}

.cust-table td.cell-amount.amount-paid {
  color: #059669;
}

.cust-table td.cell-amount.amount-advance {
  color: #2563eb;
}

/* Status Badge */
.cust-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.status-due {
  background: #fee2e2;
  color: #dc2626;
}

.status-paid {
  background: #d1fae5;
  color: #059669;
}

.status-advance {
  background: #dbeafe;
  color: #2563eb;
}

/* ================= SCROLLABLE RECENT ACTIVITY ================= */
.dash-list-scrollable {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.dash-list-scrollable::-webkit-scrollbar {
  width: 6px;
}

.dash-list-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.dash-list-scrollable::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.dash-list-scrollable::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ================= TOP BUYERS (rank colors) ================= */
.dash-list-value.value-blue {
  color: #2563eb;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 480px) {
  .cust-table {
    font-size: 11px;
  }

  .cust-table th {
    padding: 8px 6px;
    font-size: 9px;
  }

  .cust-table td {
    padding: 10px 6px;
  }

  .cust-table td.cell-name {
    max-width: 90px;
  }

  .cust-table td.cell-amount {
    font-size: 12px;
  }

  .cust-filter-tab {
    padding: 7px 12px;
    font-size: 11px;
  }

  .dash-list-scrollable {
    max-height: 350px;
  }
}

/* ================= REPORTS SECTION ================= */

/* Date Filter Card */
.date-filter-card {
  background: white;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 16px;
}

.date-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.date-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-filter-label {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-filter-input {
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: #0f172a;
  background: #fafbfc;
  transition: all 0.2s ease;
}

.date-filter-input:focus {
  outline: none;
  border-color: #10b981;
  background: white;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.date-quick-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.date-quick-filters::-webkit-scrollbar {
  display: none;
}

.date-quick-btn {
  padding: 7px 14px;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.date-quick-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.date-quick-btn.active {
  background: #10b981;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* Report Tabs */
.report-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.report-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.report-tab:hover {
  border-color: #10b981;
  color: #10b981;
}

.report-tab.active {
  background: #10b981;
  border-color: #10b981;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.report-tab svg {
  flex-shrink: 0;
}

/* Report Actions */
.report-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.report-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.report-action-pdf {
  background: #0f172a;
  color: white;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.report-action-pdf:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.report-action-pdf:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Report Content */
.report-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Report Summary Cards */
.report-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.report-summary-card {
  background: white;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.report-summary-label {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.report-summary-value {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  font-family: "SF Mono", Monaco, monospace;
}

.report-summary-value.value-red {
  color: #dc2626;
}

.report-summary-value.value-green {
  color: #059669;
}

.report-summary-value.value-blue {
  color: #2563eb;
}

/* Report Table */
.report-table-wrapper {
  background: white;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.report-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.report-table th {
  padding: 11px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.report-table th.col-amount,
.report-table td.col-amount {
  text-align: right;
}

.report-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.report-table tbody tr:hover {
  background: #f8fafc;
}

.report-table tbody tr.clickable {
  cursor: pointer;
}

.report-table tbody tr:last-child {
  border-bottom: none;
}

.report-table td {
  padding: 12px 10px;
  color: #0f172a;
  font-weight: 500;
  vertical-align: middle;
}

.report-table td.cell-name {
  font-weight: 700;
  max-width: 140px;
}

.report-table td.cell-name .name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-table td.cell-name .sub {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 2px;
}

.report-table td.cell-amount {
  font-weight: 800;
  white-space: nowrap;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 13px;
  color: #0f172a;
}

.report-table td.cell-amount.amount-red {
  color: #dc2626;
}

.report-table td.cell-amount.amount-green {
  color: #059669;
}

.report-table tfoot {
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}

.report-table tfoot td {
  padding: 14px 10px;
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.report-table tfoot td.cell-amount {
  color: #dc2626;
  font-size: 16px;
}

.report-table tfoot td.cell-amount.amount-green {
  color: #059669;
}

/* Rank badge in reports */
.report-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.report-rank.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}

.report-rank.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: white;
}

.report-rank.rank-3 {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
}

/* Responsive */
@media (max-width: 480px) {
  .report-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-tab {
    padding: 10px 6px;
    font-size: 10px;
  }

  .date-filter-row {
    grid-template-columns: 1fr;
  }

  .report-table {
    font-size: 11px;
  }

  .report-table th {
    padding: 9px 6px;
    font-size: 9px;
  }

  .report-table td {
    padding: 10px 6px;
  }

  .report-table td.cell-name {
    max-width: 100px;
  }

  .report-table td.cell-amount {
    font-size: 12px;
  }

  .report-summary-value {
    font-size: 16px;
  }
}

/* ================= ENTRIES SECTION ================= */

.entries-filters-card {
  background: white;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entries-filters-card .search-box {
  margin-bottom: 0;
}

/* Type Filter Tabs */
.entries-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.entries-type-tab {
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.entries-type-tab:hover {
  color: #0f172a;
}

.entries-type-tab.active {
  background: white;
  color: #10b981;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Filter Groups */
.entries-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entries-filter-label {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.entries-filter-input,
.entries-filter-select {
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: #0f172a;
  background: #fafbfc;
  transition: all 0.2s ease;
  width: 100%;
}

.entries-filter-input:focus,
.entries-filter-select:focus {
  outline: none;
  border-color: #10b981;
  background: white;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.entries-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Reset Button */
.entries-reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.entries-reset-btn:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

/* Entries Summary */
.entries-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.entries-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entries-summary-label {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.entries-summary-value {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  font-family: "SF Mono", Monaco, monospace;
}

.entries-summary-value.value-red {
  color: #dc2626;
}

.entries-summary-value.value-green {
  color: #059669;
}

/* Load More */
.entries-load-more-wrapper {
  text-align: center;
  margin-top: 16px;
}

.entries-load-more-wrapper.hidden {
  display: none;
}

.entries-load-more-btn {
  padding: 12px 32px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.entries-load-more-btn:hover {
  background: #10b981;
  border-color: #10b981;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Entry Type Badge */
.entry-type-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.entry-type-item {
  background: #dbeafe;
  color: #2563eb;
}

.entry-type-payment {
  background: #d1fae5;
  color: #059669;
}

/* Responsive */
@media (max-width: 480px) {
  .entries-type-tab {
    font-size: 12px;
    padding: 9px 8px;
  }

  .entries-date-row {
    grid-template-columns: 1fr;
  }

  .entries-summary-row {
    flex-direction: column;
    gap: 8px;
  }

  .entries-summary-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ================= SETTINGS SECTION ================= */

.settings-group {
  margin-bottom: 24px;
}

.settings-group-title {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.settings-group-title-danger {
  color: #dc2626;
}

.settings-card {
  background: white;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  padding: 16px;
}

.settings-card-danger {
  border-color: #fecaca;
  background: #fef2f2;
}

/* Logo Section */
.settings-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.settings-logo-preview {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.settings-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-logo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.settings-upload-btn,
.settings-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid;
}

.settings-upload-btn {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.settings-upload-btn:hover {
  background: #059669;
  border-color: #059669;
}

.settings-remove-btn {
  background: white;
  color: #dc2626;
  border-color: #fecaca;
}

.settings-remove-btn:hover {
  background: #fee2e2;
}

/* Fields */
.settings-field {
  margin-bottom: 14px;
}

.settings-field:last-child {
  margin-bottom: 0;
}

.settings-field-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.settings-field-input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fafbfc;
  transition: all 0.2s ease;
}

.settings-field-input:focus {
  outline: none;
  border-color: #10b981;
  background: white;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.settings-field-input.mono {
  font-family: "SF Mono", Monaco, monospace;
  letter-spacing: 0.5px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-row:last-child {
  margin-bottom: 0;
}

.settings-row .settings-field {
  margin-bottom: 0;
}

.settings-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
}

.settings-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 14px 0;
}

/* Toggle Row */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-toggle-info {
  flex: 1;
  min-width: 0;
}

.settings-toggle-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.settings-toggle-desc {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.4;
}

/* Toggle Switch */
.settings-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 26px;
  transition: 0.3s;
}

.settings-toggle-slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.settings-toggle input:checked + .settings-toggle-slider {
  background: #10b981;
}

.settings-toggle input:checked + .settings-toggle-slider:before {
  transform: translateX(20px);
}

/* Action Row */
.settings-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.settings-action-row:hover {
  background: #f8fafc;
  padding-left: 4px;
  padding-right: 4px;
  margin-left: -4px;
  margin-right: -4px;
}

.settings-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-action-icon-blue { background: #dbeafe; color: #2563eb; }
.settings-action-icon-green { background: #d1fae5; color: #059669; }
.settings-action-icon-purple { background: #ede9fe; color: #7c3aed; }
.settings-action-icon-teal { background: #ccfbf1; color: #0d9488; }
.settings-action-icon-yellow { background: #fef3c7; color: #d97706; }
.settings-action-icon-red { background: #fee2e2; color: #dc2626; }
.settings-action-icon-whatsapp { background: #dcfce7; color: #16a34a; }

.settings-action-info {
  flex: 1;
  min-width: 0;
}

.settings-action-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.settings-action-title-danger {
  color: #dc2626;
}

.settings-action-desc {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.4;
}

.settings-action-desc.mono {
  font-family: "SF Mono", Monaco, monospace;
  color: #10b981;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.settings-action-arrow {
  color: #cbd5e1;
  flex-shrink: 0;
}

/* Info Row */
.settings-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

/* Copy Button */
.settings-copy-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.settings-copy-btn:hover {
  background: #10b981;
  color: white;
}

.settings-copy-btn:active {
  transform: scale(0.95);
}

/* Badge */
.settings-badge {
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
}

/* About Rows */
.settings-about-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.settings-about-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}

.settings-about-value {
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

/* Floating Save Button */
.settings-save-wrapper {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  margin-top: 20px;
  display: none;
}

.settings-save-wrapper.visible {
  display: block;
}

.settings-save-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.settings-save-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.5);
}

.settings-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.settings-save-btn.saved {
  background: #0f172a;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
  .settings-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .settings-logo-preview {
    width: 70px;
    height: 70px;
  }

  .settings-action-icon {
    width: 34px;
    height: 34px;
  }

  .settings-about-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .settings-about-value {
    text-align: left;
  }
}

/* ================= DARK MODE ================= */

body.dark-mode {
  background: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .main-content {
  background: #0f172a;
}

body.dark-mode .section-title {
  color: #f1f5f9;
}

body.dark-mode .section-subtitle {
  color: #94a3b8;
}

body.dark-mode .settings-card,
body.dark-mode .dash-stat-card,
body.dark-mode .today-card,
body.dark-mode .customer-item,
body.dark-mode .dash-list-row,
body.dark-mode .report-table-wrapper,
body.dark-mode .report-summary-card,
body.dark-mode .date-filter-card,
body.dark-mode .entries-filters-card,
body.dark-mode .balance-card-placeholder {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .settings-field-input,
body.dark-mode .date-filter-input,
body.dark-mode .entries-filter-input,
body.dark-mode .entries-filter-select,
body.dark-mode .search-input,
body.dark-mode .client-form-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .settings-field-input:focus,
body.dark-mode .date-filter-input:focus,
body.dark-mode .entries-filter-input:focus,
body.dark-mode .search-input:focus {
  background: #1e293b;
}

body.dark-mode .settings-action-row:hover {
  background: #334155;
}

body.dark-mode .dash-stat-value,
body.dark-mode .dash-list-name,
body.dark-mode .settings-action-title,
body.dark-mode .settings-toggle-title,
body.dark-mode .settings-about-value,
body.dark-mode .report-table td,
body.dark-mode .report-summary-value,
body.dark-mode .customer-item-name,
body.dark-mode .mini-stat-value,
body.dark-mode .mini-section-title {
  color: #f1f5f9;
}

body.dark-mode .settings-group-title,
body.dark-mode .dash-section-title,
body.dark-mode .settings-field-label,
body.dark-mode .report-summary-label,
body.dark-mode .report-table th {
  color: #94a3b8;
}

body.dark-mode .report-table thead,
body.dark-mode .report-table tfoot {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .report-table tbody tr:hover {
  background: #334155;
}

body.dark-mode .settings-divider {
  background: #334155;
}

body.dark-mode .date-quick-btn,
body.dark-mode .report-tab,
body.dark-mode .entries-type-tab,
body.dark-mode .cust-filter-tab,
body.dark-mode .unit-btn,
body.dark-mode .payment-method-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .entries-type-tabs {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .entries-type-tab.active {
  background: #334155;
  color: #10b981;
}

body.dark-mode .modal-content {
  background: #1e293b;
}

body.dark-mode .modal-header {
  border-color: #334155;
}

body.dark-mode .modal-footer {
  border-color: #334155;
}

body.dark-mode .modal-title {
  color: #f1f5f9;
}

body.dark-mode .modal-close {
  background: #334155;
  color: #94a3b8;
}

/* ================= LOADING TOAST ================= */
.loading-toast-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.loading-toast-text {
  white-space: nowrap;
}

/* ================= TOAST ANIMATIONS ================= */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ================= PWA STYLES ================= */

/* Install prompt banner */
.pwa-install-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 16px 18px;
  border-radius: 16px;
  font-family: Inter, sans-serif;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: slideUpBanner 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 500px;
  margin: 0 auto;
}

@keyframes slideUpBanner {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pwa-install-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-install-icon svg {
  width: 28px;
  height: 28px;
}

.pwa-install-content {
  flex: 1;
  min-width: 0;
}

.pwa-install-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

.pwa-install-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  line-height: 1.3;
}

.pwa-install-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-install-btn {
  padding: 9px 16px;
  background: white;
  color: #10b981;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pwa-install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pwa-install-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pwa-install-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Offline indicator */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #dc2626;
  color: white;
  padding: 8px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-family: Inter, sans-serif;
  z-index: 99999;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.offline-indicator.show {
  transform: translateY(0);
}

/* Update banner */
.sw-update-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: #0f172a;
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.4);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideUpBanner 0.4s ease;
  max-width: 500px;
  margin: 0 auto;
}

.sw-update-text {
  flex: 1;
  min-width: 0;
}

.sw-update-btn {
  padding: 8px 16px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sw-update-btn:hover {
  background: #059669;
}

/* Responsive */
@media (max-width: 480px) {
  .pwa-install-banner {
    padding: 14px 16px;
    gap: 10px;
  }

  .pwa-install-icon {
    width: 40px;
    height: 40px;
  }

  .pwa-install-icon svg {
    width: 24px;
    height: 24px;
  }

  .pwa-install-title {
    font-size: 13px;
  }

  .pwa-install-desc {
    font-size: 10px;
  }

  .pwa-install-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}