

:root {
  
  --primary-color: #0071e3; 
  --primary-hover: #0077ed;
  --success-color: #34c759; 
  --success-hover: #2ec052;
  --danger-color: #ff3b30; 
  --warning-color: #ff9500; 
  
  
  --glass-bg: rgba(255, 255, 255, 0.35);
  --glass-bg-hover: rgba(255, 255, 255, 0.48);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-focus: rgba(0, 113, 227, 0.3);
  --text-primary: #1d1d1f; 
  --text-secondary: #86868b; 
  --shadow-color: rgba(31, 38, 135, 0.06);
  
  
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background-color: #f5f7fa;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}



.mesh-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #f4f6fc 0%, #e8ecf7 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.65;
  mix-blend-mode: multiply;
  animation: float 25s infinite ease-in-out;
}

.blob-1 {
  top: -10%;
  left: 10%;
  width: 400px;
  height: 400px;
  background: linear-gradient(180deg, #ffc3a0 0%, #ffafbd 100%);
  animation-duration: 20s;
}

.blob-2 {
  bottom: 5%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: linear-gradient(180deg, #c2e9fb 0%, #a1c4fd 100%);
  animation-duration: 28s;
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 45%;
  width: 350px;
  height: 350px;
  background: linear-gradient(180deg, #e0c3fc 0%, #8ec5fc 100%);
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(60px, -40px) scale(1.15) rotate(120deg); }
  66% { transform: translate(-40px, 50px) scale(0.9) rotate(240deg); }
  100% { transform: translate(0, 0) scale(1) rotate(360deg); }
}



.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 var(--shadow-color), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}


.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}


::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}



.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.25);
}

.btn-success {
  background: var(--success-color);
  color: white;
}
.btn-success:hover {
  background: var(--success-hover);
  box-shadow: 0 6px 16px rgba(52, 199, 89, 0.25);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.6);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  transform: scale(1.05);
}
.btn-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
#btn-logout {
  color: var(--danger-color);
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.15);
  margin-left: 8px;
  border-radius: 12px;
}
#btn-logout:hover {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

.btn-clear-text {
  background: transparent;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn-clear-text:hover {
  opacity: 0.8;
}


.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.25s ease;
}

.input-wrapper input {
  padding-left: 42px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 4px var(--glass-border-focus);
}

.form-row {
  display: flex;
  gap: 16px;
}
.form-row .col {
  flex: 1;
}



.view-container {
  display: none;
  opacity: 0;
  width: 100%;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
}

.view-container.active {
  display: flex;
  animation: viewTransition 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewTransition {
  from { opacity: 0; transform: scale(0.98) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}



.login-card {
  width: 100%;
  max-width: 400px;
  padding: 40px;
  text-align: center;
}

.brand-logo {
  max-height: 64px;
  object-fit: contain;
  margin-bottom: 20px;
}

.login-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.error-message {
  color: var(--danger-color);
  font-size: 0.85rem;
  margin-top: 15px;
  font-weight: 500;
  min-height: 20px;
}



#app-view {
  width: 100vw;
  min-height: 100vh;
  padding: 24px;
  display: none; 
}

#app-view.active {
  display: block;
}

.app-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 48px);
}


.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}


.app-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.header-logo {
  height: 48px;
  width: auto;
}

.header-brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.header-brand .subtext {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}


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

.time-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-color);
  box-shadow: 0 0 8px var(--success-color);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.timezone-lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-left: 1px solid rgba(0,0,0,0.1);
  padding-left: 8px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-details {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-details span:first-child {
  font-size: 0.9rem;
  font-weight: 600;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.badge.admin { color: #0071e3; }
.badge.moderator { color: #5856d6; }
.badge.cashier { color: #ff9500; }


.navigation-tabs {
  padding: 6px;
  display: flex;
  gap: 8px;
  border-radius: var(--radius-md);
}

.tab-link {
  flex: 1;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  transition: transform 0.25s ease;
}

.tab-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.tab-link.active {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.tab-link.active svg {
  transform: scale(1.1);
}


.subviews-container {
  flex: 1;
  position: relative;
  min-height: 480px;
}

.subview-pane {
  display: none;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  animation: viewTransition 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.subview-pane.active {
  display: flex;
}



.sales-controls {
  padding: 14px 20px;
  display: flex;
  gap: 16px;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-box input {
  padding-left: 44px;
  background: rgba(255, 255, 255, 0.5);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}


.products-grid-container {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
  padding-bottom: 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}


.product-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  text-align: left;
  position: relative;
  overflow: hidden;
  height: 290px;
}

.product-image-container {
  width: 100%;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  margin-bottom: 12px;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image-container img {
  transform: scale(1.08);
}

.price-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-card h4 {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-stock {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-stock.out-of-stock {
  color: var(--danger-color);
}

.product-stock.low-stock {
  color: var(--warning-color);
}


.btn-quick-add {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 8px rgba(0, 113, 227, 0.2);
}

.btn-quick-add:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
}

.btn-quick-add svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}



.tab-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tab-header-actions h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.table-container {
  flex: 1;
  overflow: auto;
  border-radius: var(--radius-lg);
  max-height: calc(100vh - 280px);
}

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

.data-table th,
.data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
}

.data-table th {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.data-table tbody tr {
  transition: background-color 0.2s ease;
}

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

.table-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: rgba(255,255,255,0.4);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.role-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.role-badge.admin {
  background: rgba(0, 113, 227, 0.1);
  color: var(--primary-color);
}
.role-badge.moderator {
  background: rgba(88, 86, 214, 0.1);
  color: #5856d6;
}
.role-badge.cashier {
  background: rgba(255, 149, 0, 0.1);
  color: var(--warning-color);
}

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



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

.stat-card {
  padding: 24px;
  text-align: left;
}

.stat-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-card p {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.stat-card span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}



.pos-cart-sidebar {
  display: flex;
  flex-direction: column;
  padding: 24px;
  height: 100%;
}

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

.cart-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  margin-bottom: 20px;
}


.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.cart-item-row:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255,255,255,0.7);
}

.cart-item-details {
  flex: 1;
  text-align: left;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border-radius: 10px;
  transition: background-color 0.2s;
}
.qty-btn:hover {
  background: white;
}

.qty-val {
  font-size: 0.85rem;
  font-weight: 700;
  width: 16px;
  text-align: center;
}

.cart-item-subtotal {
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
  min-width: 60px;
}


.empty-cart-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  text-align: center;
  padding: 40px 20px;
}

.empty-cart-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: rgba(0, 0, 0, 0.15);
}

.empty-cart-state p {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.empty-cart-state span {
  font-size: 0.8rem;
}


.cart-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.total-line {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.05);
  padding-top: 10px;
}



.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-card {
  width: 100%;
  max-width: 480px;
  padding: 30px;
  position: relative;
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.close-modal-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.close-modal-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.close-modal-btn svg {
  width: 18px;
  height: 18px;
}


.image-mode-toggle {
  display: flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.toggle-option {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-option.active {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.image-input-container {
  width: 100%;
  min-height: 50px;
}

#img-file-wrapper input[type="file"] {
  display: none;
}

.file-dummy {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}
.file-dummy:hover {
  background: rgba(255,255,255,0.4);
}
.file-dummy.has-file {
  border-color: var(--success-color);
  color: var(--success-color);
}

.file-dummy span {
  font-size: 0.85rem;
  font-weight: 500;
}

.help-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hidden {
  display: none !important;
}



.receipt-modal-card {
  max-width: 820px;
  width: 100%;
}

.receipt-screen-preview {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  background: #f1f3f7;
  padding: 20px;
}


.letter-invoice-sheet {
  background: white;
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  color: #333333;
  text-align: left;
  font-size: 10pt;
  line-height: 1.4;
}

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

.invoice-company {
  display: flex;
  gap: 16px;
  align-items: center;
}

.invoice-logo {
  height: 54px;
  width: auto;
}

.invoice-company h2 {
  font-size: 16pt;
  font-weight: 800;
  color: #111111;
  line-height: 1;
}

.invoice-company-sub {
  font-size: 9pt;
  color: #666666;
  font-weight: 600;
}

.invoice-company-dir {
  font-size: 8pt;
  color: #888888;
}

.invoice-details-box {
  text-align: right;
}

.invoice-title {
  font-size: 14pt;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.invoice-meta-item {
  font-size: 9pt;
}

.invoice-divider {
  border: none;
  border-top: 2px solid #333333;
  margin: 15px 0;
}

.invoice-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 9pt;
  margin-bottom: 25px;
  color: #555555;
}

.text-right {
  text-align: right;
}


.invoice-products-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.invoice-products-table th,
.invoice-products-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eeeeee;
  font-size: 9.5pt;
}

.invoice-products-table th {
  background-color: #f7f9fc;
  font-weight: 700;
  color: #111111;
  text-align: left;
  border-bottom: 2px solid #cccccc;
}

.invoice-totals-block {
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-bottom: 40px;
}

.invoice-total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 9.5pt;
  color: #555555;
}

.invoice-total-row.grand-total {
  font-size: 12pt;
  font-weight: 800;
  color: #111111;
  border-top: 1px solid #333333;
  padding-top: 8px;
  margin-top: 4px;
}


.invoice-signatures {
  display: flex;
  justify-content: flex-end;
  margin-top: 60px;
  margin-bottom: 20px;
}

.signature-box {
  width: 250px;
  text-align: center;
}

.signature-line {
  border-bottom: 1px solid #333333;
  margin-bottom: 8px;
  height: 40px;
}

.signature-box span {
  font-size: 8.5pt;
  font-weight: 600;
  color: #666666;
}

.invoice-footer-message {
  text-align: center;
  font-size: 8pt;
  color: #888888;
  border-top: 1px solid #eeeeee;
  padding-top: 15px;
}

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



@media print {
  
  @page {
    size: letter;
    margin: 15mm;
  }

  
  #login-view,
  #app-view,
  .modal-overlay:not(#receipt-modal),
  .modal-header,
  .modal-footer-actions {
    display: none !important;
  }

  
  #receipt-modal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: white !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #receipt-modal .receipt-modal-card {
    background: white !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #receipt-modal .receipt-screen-preview {
    background: white !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    max-height: none !important;
    display: block !important;
  }

  #receipt-letter-invoice {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }
}
