/**
 * POS System - Main Styles
 * Includes authentication, navigation, and all module styles
 */

:root {
  --color-primary: #1E3A5F;
  --color-accent:  #2E86AB;
  --color-bg:      #EBF5FB;
  --color-white:   #FFFFFF;
  --color-error:   #C0392B;
  --radius:        12px;
  --shadow:        0 4px 24px rgba(30,58,95,0.10);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
  color: #333;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 30px;
  text-align: center;
}

.login-card h1 {
  color: var(--color-primary);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: var(--color-white);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-group input::placeholder {
  color: #999;
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--color-primary);
}

.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  margin-top: 10px;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46, 134, 171, 0.3);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.error-box {
  background-color: #fdf2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: var(--color-error);
  font-size: 14px;
  display: none;
  text-align: left;
}

.error-box.show {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid var(--color-white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

.btn-primary.loading .spinner {
  display: inline-block;
}

.btn-primary.loading .btn-text {
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 480px) {
  .login-wrapper {
    padding: 10px;
  }
  
  .login-card {
    padding: 30px 20px;
  }
  
  .login-card h1 {
    font-size: 24px;
  }
  
  .form-group input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* ========================================
   MASTER DATA MODULE STYLES
   ======================================== */

/* Layout Styles */
body.app-layout {
  display: flex;
  background-color: #f8f9fa;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 240px;
  background-color: var(--color-primary);
  color: var(--color-white);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.user-info {
  font-size: 12px;
  opacity: 0.8;
}

.sidebar .nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: var(--color-white);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: var(--color-accent);
}

.nav-icon {
  margin-right: 12px;
  font-size: 16px;
}

.nav-label {
  font-size: 14px;
  font-weight: 500;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 20px;
  min-height: 100vh;
}

/* Top Navigation */
.top-nav {
  background-color: var(--color-white);
  box-shadow: var(--shadow);
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand h1 {
  color: var(--color-primary);
  font-size: 24px;
  font-weight: 600;
}

.top-nav .nav-menu {
  display: flex;
  gap: 20px;
  align-items: center;
}

.top-nav .nav-item {
  color: #333;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.top-nav .nav-item:hover {
  background-color: var(--color-bg);
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #333;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dropdown-toggle:hover {
  background-color: var(--color-bg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
  display: none;
  z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: var(--color-bg);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-name {
  font-weight: 600;
  color: #333;
}

.user-role {
  font-size: 12px;
  color: #666;
  background-color: var(--color-bg);
  padding: 4px 8px;
  border-radius: 12px;
}

.logout-btn {
  color: var(--color-error);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: rgba(192, 57, 43, 0.1);
}

/* Page Header */
.page-header {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-primary);
}

.page-actions {
  display: flex;
  gap: 12px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Data Tables */
.data-table {
  width: 100%;
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.data-table th {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid #e1e8ed;
  font-size: 14px;
}

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

.data-table tbody tr:hover {
  background-color: var(--color-bg);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
}

.badge-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.badge-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

.badge-secondary {
  background-color: #e2e3e5;
  color: #383d41;
}

.badge-warning {
  background-color: #fff3cd;
  color: #856404;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

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

.btn-primary:hover {
  background-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

.btn-secondary {
  background-color: #6c757d;
  color: var(--color-white);
}

.btn-secondary:hover {
  background-color: #5a6268;
}

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

.btn-danger:hover {
  background-color: #a93226;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: var(--radius);
  color: var(--color-white);
  font-weight: 500;
  z-index: 2000;
  animation: slideInRight 0.3s ease;
  max-width: 400px;
}

.toast-success {
  background-color: #28a745;
}

.toast-error {
  background-color: var(--color-error);
}

.toast-info {
  background-color: #17a2b8;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.page-btn {
  padding: 8px 12px;
  border: 1px solid #e1e8ed;
  background-color: var(--color-white);
  color: #333;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.page-btn:hover {
  background-color: var(--color-bg);
  border-color: var(--color-primary);
}

.page-btn.active {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Search and Filters */
.filter-bar {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
}

.filter-select {
  min-width: 150px;
}

/* Item Photos */
.item-photo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.photo-placeholder {
  width: 40px;
  height: 40px;
  background-color: #e1e8ed;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 12px;
}

/* Form Layouts */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e1e8ed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .page-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .data-table {
    overflow-x: auto;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 8px;
  }
  
  .top-nav {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }
  
  .page-header {
    padding: 16px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .data-table th,
  .data-table td {
    padding: 12px 8px;
    font-size: 12px;
  }
}

/* ── Sales Module Styles ───────────────────────────────────── */

/* Filter Bar */
.filter-bar {
  background: var(--color-white);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.filter-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: end;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.search-input {
  min-width: 300px;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.summary-label {
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-success { background: #d4edda; color: #155724; }
.badge-secondary { background: #e2e3e5; color: #383d41; }

.voided-row {
  opacity: 0.6;
  background: #f8f9fa;
}

/* ── POS Create Form ───────────────────────────────────── */
.form-section {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.form-section h2 {
  margin: 0 0 20px 0;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 8px;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-primary);
}

.form-control, textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-control:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-control.error, textarea.error {
  border-color: var(--color-error);
}

.error-message {
  color: var(--color-error);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

.search-input-group {
  display: flex;
  gap: 8px;
}

.search-input-group input {
  flex: 1;
}

/* Item Search */
.item-search-wrapper {
  position: relative;
}

.item-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.item-dropdown-row {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.item-dropdown-row:hover {
  background: var(--color-bg);
}

.item-dropdown-row.out-of-stock {
  opacity: 0.45;
  cursor: not-allowed;
}

.item-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  background: #ddd;
}

.item-info {
  flex: 1;
}

.item-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.item-details {
  font-size: 0.8rem;
  color: #666;
}

/* Cart Table */
.cart-section {
  margin-top: 20px;
}

.cart-section h3 {
  margin-bottom: 16px;
  color: var(--color-primary);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.cart-table th {
  background: var(--color-primary);
  color: white;
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
}

.cart-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e0e0e0;
}

.cart-qty-input {
  width: 70px;
  text-align: center;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cart-remove {
  color: var(--color-error);
  cursor: pointer;
  font-size: 18px;
  background: none;
  border: none;
  padding: 0;
}

.cart-remove:hover {
  color: #a02622;
}

/* Totals Panel */
.totals-panel {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

.totals-row.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  border-top: 2px solid var(--color-accent);
  margin-top: 8px;
  padding-top: 10px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── Invoice View ───────────────────────────────────── */
.invoice-card {
  background: white;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.invoice-header h2 {
  margin: 0;
  color: var(--color-primary);
}

.invoice-header p {
  margin: 4px 0 0 0;
  color: #666;
}

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

.invoice-number {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.invoice-date {
  color: #666;
}

.invoice-divider {
  height: 2px;
  background: var(--color-accent);
  margin: 20px 0;
}

.invoice-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.meta-section h3 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #666;
}

.meta-content {
  font-size: 0.9rem;
}

.status-section {
  text-align: center;
  margin: 20px 0;
}

.status-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.paid { background: #d4edda; color: #155724; }
.status-badge.partial { background: #fff3cd; color: #856404; }
.status-badge.unpaid { background: #f8d7da; color: #721c24; }
.status-badge.void { background: #e2e3e5; color: #383d41; }
.status-badge.voided { background: #6c757d; color: white; }

/* Items Table */
.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.items-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.items-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
}

.items-table tfoot td {
  font-weight: 600;
  background: #f8f9fa;
}

.items-table .total-row td {
  font-size: 1.1rem;
  color: var(--color-primary);
  border-top: 2px solid var(--color-accent);
}

/* Payment Summary */
.payment-summary {
  display: grid;
  gap: 8px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.payment-row.total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  border-top: 1px solid #dee2e6;
  padding-top: 12px;
  margin-top: 8px;
}

/* Payments Table */
.payments-table {
  width: 100%;
  border-collapse: collapse;
}

.payments-table th {
  background: #f8f9fa;
  padding: 8px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid #dee2e6;
}

.payments-table td {
  padding: 8px;
  border-bottom: 1px solid #f8f9fa;
}

/* Notes */
.notes-content {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  white-space: pre-wrap;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* Print Styles */
@media print {
  .sidebar, .topbar, .action-buttons, .no-print { 
    display: none !important; 
  }
  
  .invoice-card { 
    box-shadow: none; 
    padding: 0; 
    margin: 0;
  }
  
  body { 
    background: white; 
  }
  
  .form-section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-actions {
    margin-left: 0;
    margin-top: 12px;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
  }
  
  .invoice-header {
    flex-direction: column;
    text-align: center;
  }
  
  .invoice-info {
    text-align: center;
    margin-top: 16px;
  }
  
  .invoice-meta {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}
