:root {
  --bg-color: #070913;
  --card-bg: #0f1322;
  --card-border: #1a2035;
  --table-header-bg: #141a2e;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --purple-primary: #7c3aed;
  --purple-hover: #6d28d9;
  --purple-glow: rgba(124, 58, 237, 0.35);
  
  --copy-btn-bg: #271a48;
  --copy-btn-border: #4c2889;
  --copy-btn-text: #c084fc;
  --copy-btn-hover: #3b2571;
  
  --delete-btn-bg: #3f1522;
  --delete-btn-border: #6d2036;
  --delete-btn-text: #f87171;
  --delete-btn-hover: #541c2e;

  --total-text: #a855f7;
  --dashed-border: #1e2846;
  --dashed-hover-bg: #141c33;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

.app-container {
  width: 100%;
  max-width: 1250px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header Section */
.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.accent-bar {
  width: 4px;
  height: 32px;
  background: linear-gradient(180deg, #9333ea 0%, #7c3aed 100%);
  border-radius: 4px;
  box-shadow: 0 0 12px var(--purple-glow);
}

.main-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--purple-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--purple-glow);
}

.btn-primary:hover {
  background-color: var(--purple-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
  background-color: #1a2238;
  color: #e2e8f0;
  border: 1px solid #2d3748;
}

.btn-secondary:hover {
  background-color: #242f4c;
  border-color: #4a5568;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid #334155;
}

.btn-outline:hover {
  background: #1e293b;
  color: #ffffff;
}

/* Table Card */
.table-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table thead th {
  background-color: var(--table-header-bg);
  color: #8896ab;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #161c30;
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody td {
  padding: 18px 20px;
  font-size: 14px;
  color: #cbd5e1;
  vertical-align: middle;
}

.col-number {
  font-weight: 700;
  color: #ffffff;
}

.col-name {
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

.col-membership {
  font-family: monospace;
  font-size: 13.5px;
  color: #94a3b8;
}

.col-service {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #e2e8f0;
}

.col-amount {
  font-weight: 600;
  color: #ffffff;
}

/* Editable cells (Click to edit) */
.editable-cell {
  outline: none;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editable-cell:hover {
  background-color: rgba(124, 58, 237, 0.15);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.4);
}

.editable-cell:focus {
  background-color: #0b0e1b;
  box-shadow: inset 0 0 0 1.5px #a855f7;
  color: #ffffff;
  cursor: text;
}

/* Action Buttons inside Table */
.action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-action-edit {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-edit:hover {
  background-color: #0369a1;
  color: #ffffff;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.btn-action-copy {
  background-color: var(--copy-btn-bg);
  border: 1px solid var(--copy-btn-border);
  color: var(--copy-btn-text);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-copy:hover {
  background-color: var(--copy-btn-hover);
  color: #e9d5ff;
  border-color: #7e22ce;
  transform: translateY(-1px);
}

.btn-action-delete {
  background-color: var(--delete-btn-bg);
  border: 1px solid var(--delete-btn-border);
  color: var(--delete-btn-text);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-delete:hover {
  background-color: var(--delete-btn-hover);
  color: #fca5a5;
  border-color: #b91c1c;
  transform: translateY(-1px);
}

/* Yellow Total Row matching screenshot */
.excel-total-row {
  background-color: #ffff00 !important;
  color: #000000 !important;
  font-weight: 800;
  border-top: 2px solid #000000;
  border-bottom: 2px solid #000000;
}

.excel-total-row td {
  padding: 12px 20px !important;
  color: #000000 !important;
  font-weight: 800 !important;
  border: 1px solid #000000 !important;
  vertical-align: middle;
}

.excel-total-label {
  font-size: 15px;
  font-weight: 800 !important;
  color: #000000 !important;
  text-align: left;
  letter-spacing: -0.2px;
}

.excel-total-amount {
  font-size: 15px;
  font-weight: 800 !important;
  color: #000000 !important;
  text-align: right;
  letter-spacing: 0.2px;
}

.excel-total-empty {
  background-color: #ffff00 !important;
}

/* Total Row Container */
.total-row-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background-color: rgba(15, 19, 34, 0.95);
  border-top: 1px solid var(--card-border);
}

.total-label {
  font-size: 16px;
  font-weight: 700;
  color: #9333ea;
}

.total-value {
  font-size: 17px;
  font-weight: 700;
  color: #a855f7;
  letter-spacing: 0.5px;
  margin-right: 170px;
}

/* Paste Dashed Action Area */
.paste-action-container {
  width: 100%;
}

.paste-dashed-btn {
  width: 100%;
  background-color: transparent;
  border: 1.5px dashed var(--dashed-border);
  border-radius: 8px;
  padding: 14px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.paste-dashed-btn:hover {
  background-color: var(--dashed-hover-bg);
  border-color: #43527a;
  color: #f1f5f9;
}

.paste-dashed-btn.active-copied {
  border-color: #9333ea;
  background-color: rgba(147, 51, 234, 0.08);
  color: #e9d5ff;
}

.paste-dashed-btn.active-copied:hover {
  background-color: rgba(147, 51, 234, 0.16);
  border-color: #a855f7;
}

.plus-icon {
  font-size: 16px;
  font-weight: 700;
}

.copied-indicator {
  background: #7c3aed;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.badge-hidden {
  display: none;
}

/* Footer Section */
.footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.storage-info {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot-live {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

.export-btn {
  padding: 12px 24px;
  font-size: 14.5px;
  border-radius: 8px;
  font-weight: 600;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.show {
  display: flex;
  opacity: 1;
}

.modal-box {
  background-color: #12182b;
  border: 1px solid #283352;
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-20px);
  transition: transform 0.2s ease;
}

.modal-backdrop.show .modal-box {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #ffffff;
}

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

.form-row {
  display: flex;
  gap: 14px;
}

.form-row .form-group {
  flex: 1;
}

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

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: #94a3b8;
}

.form-group input {
  background-color: #0b0e1b;
  border: 1px solid #232c47;
  border-radius: 6px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #1e253e;
  border: 1px solid #3d4a73;
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .total-value {
    margin-right: 0;
  }
  .form-row {
    flex-direction: column;
  }
}
