/* Design System - Zinc/Shadcn Inspired Theme */

:root {
  /* Light Theme Variables */
  --font-sans: 'DM Sans', 'Noto Sans Thai', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --background: #fafafa;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;
  --primary: #2563eb;
  --primary-foreground: #f8fafc;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --destructive: #ef4444;
  --destructive-foreground: #f8fafc;
  
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #3b82f6;
  
  --success: #10b981;
  --success-foreground: #ffffff;
  --warning: #f59e0b;
  --warning-foreground: #ffffff;
  
  --radius: 0.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  --sidebar-width: 260px;
  --transition-speed: 0.2s;
}

body.dark-mode {
  /* Dark Theme Variables */
  --background: #09090b;
  --card: #0c0c0f;
  --card-foreground: #fafafa;
  --popover: #0c0c0f;
  --popover-foreground: #fafafa;
  --primary: #3b82f6;
  --primary-foreground: #09090b;
  --secondary: #1e1e24;
  --secondary-foreground: #fafafa;
  --muted: #1e1e24;
  --muted-foreground: #a1a1aa;
  --accent: #1e1e24;
  --accent-foreground: #fafafa;
  --destructive: #f87171;
  --destructive-foreground: #09090b;
  
  --border: #1e1e24;
  --input: #1e1e24;
  --ring: #60a5fa;

  --success: #34d399;
  --warning: #fbbf24;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--card-foreground);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* App Container */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling (Glassmorphism look) */
.sidebar {
  width: var(--sidebar-width);
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 40;
  transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.sidebar-header .logo {
  background-color: var(--secondary);
  color: var(--primary);
  width: 80px;
  height: 80px;
  padding: 0.75rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-header .logo:has(img) {
  padding: 4px;
  background-color: var(--card);
  border: 1px solid var(--border);
}

.sidebar-header .app-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar-header h1 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: normal;
  max-width: 220px;
  line-height: 1.3;
}

.sidebar-header span {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.sidebar-nav {
  flex: 1;
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition-speed) ease;
}

.nav-link:hover {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

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

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.host-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  padding: 0 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-indicator.offline {
  background-color: var(--destructive);
  box-shadow: 0 0 8px var(--destructive);
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-speed) ease;
}

.main-header {
  height: 64px;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.menu-toggle-btn {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--muted-foreground);
  border-radius: var(--radius);
}

.menu-toggle-btn:hover {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.header-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.date-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.850rem;
  font-weight: 500;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.5rem 0.850rem;
  border-radius: 50px;
  border: 1px solid var(--border);
}

.content-container {
  padding: 2rem;
  flex: 1;
}

/* Loading Spinner */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Typography & Content Layouts */
h3.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Button UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  white-space: nowrap;
}

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

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--border);
}

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

.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-success {
  background-color: var(--success);
  color: var(--success-foreground);
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-icon-text {
  width: 100%;
  justify-content: flex-start;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary);
  padding: 0;
  text-decoration: underline;
}

/* Card-Based Layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title i {
  color: var(--primary);
}

.card-value {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.card-desc {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Dashboard Charts/Visualizations Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-panel {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.dashboard-panel-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Charts Wrapper */
.chart-container {
  position: relative;
  height: 280px;
  width: 100%;
}

/* Tables Styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table-custom th {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.table-custom td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--card-foreground);
}

.table-custom tbody tr:hover {
  background-color: var(--secondary);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge-primary {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--destructive);
}

.badge-secondary {
  background-color: rgba(113, 113, 122, 0.1);
  color: var(--muted-foreground);
}

/* Room Grid Section */
.floor-section {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.floor-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary);
}

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

.room-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  transition: all var(--transition-speed) ease;
}

.room-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.room-card.occupied {
  border-left: 4px solid var(--primary);
}

.room-card.available {
  border-left: 4px solid var(--success);
}

.room-card.maintenance {
  border-left: 4px solid var(--warning);
}

.room-number {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.room-type-badge {
  font-size: 0.7rem;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.125rem 0.350rem;
  border-radius: var(--radius);
  align-self: flex-start;
  font-weight: 600;
}

.room-rent {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
}

.room-tenant {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.room-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.room-actions button {
  flex: 1;
}

/* Control Row Filter panel */
.filter-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group select,
.filter-group input {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  font-size: 0.875rem;
}

.search-input {
  flex: 1;
  max-width: 350px;
}

/* Modal Styling using HTML5 dialog */
.modal-dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--card);
  color: var(--card-foreground);
  width: 90%;
  max-width: 500px;
  margin: auto;
  box-shadow: var(--shadow-lg);
  padding: 0;
  overflow: auto;
  max-height: 90vh;
}

.modal-dialog.modal-lg {
  max-width: 800px;
}

.modal-dialog.modal-xl {
  max-width: 900px;
}

.modal-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: var(--radius);
}

.btn-close-modal:hover {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: var(--secondary);
}

/* Forms CSS */
form {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.850rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--card-foreground);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition-speed) ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ring);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Alerts Component */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.alert-info {
  background-color: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--primary);
}

/* Checkout Modal Summary Styling */
.checkout-summary {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkout-calculation {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background-color: var(--secondary);
}

.checkout-calculation h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.calc-row.divider {
  border-bottom: 1px solid var(--border);
  margin: 0.75rem 0;
}

.total-refund {
  font-weight: 700;
  font-size: 1rem;
}

.text-success { color: var(--success); }
.text-danger { color: var(--destructive); }

.payment-summary {
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.total-amount-large {
  font-size: 1.25rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--primary);
}

/* Invoice Print Styles */
.invoice-print-container {
  padding: 2.5rem;
  background-color: #ffffff;
  color: #000000;
  line-height: 1.5;
}

.invoice-print-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #000000;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.invoice-print-header .logo-area h2 {
  font-size: 1.5rem;
  font-weight: 800;
}

.invoice-print-header .logo-area p {
  font-size: 0.850rem;
  color: #3f3f46;
}

.invoice-print-header .meta-area {
  text-align: right;
  font-size: 0.9rem;
}

.invoice-print-header .meta-area h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.invoice-print-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.invoice-print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.invoice-print-table th {
  border-top: 1px solid #000000;
  border-bottom: 1px solid #000000;
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
}

.invoice-print-table td {
  border-bottom: 1px dotted #e4e4e7;
  padding: 0.75rem 0.5rem;
  font-size: 0.9rem;
}

.invoice-print-table tr.total-row td {
  border-top: 1px solid #000000;
  border-bottom: 2px double #000000;
  font-weight: 700;
  font-size: 1rem;
}

.invoice-print-footer {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  font-size: 0.850rem;
}

.payment-instructions {
  border: 1px solid #e4e4e7;
  padding: 1rem;
  border-radius: var(--radius);
}

.payment-instructions h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.signatures {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 3rem;
  text-align: center;
}

/* Maintenance List Custom Styling */
.maint-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.maint-item {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.maint-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.maint-item-room {
  font-size: 1rem;
  font-weight: 700;
}

.maint-item-issue {
  font-size: 0.925rem;
  color: var(--card-foreground);
}

.maint-item-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  align-items: center;
}

.maint-item-actions {
  display: flex;
  gap: 0.5rem;
}

/* Responsive UI */
@media (max-width: 768px) {
  body {
    padding-top: 0;
  }
  
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .sidebar.collapsed {
    display: none;
  }
  
  .sidebar-header {
    margin-bottom: 1rem;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .main-header {
    padding: 0 1rem;
  }
  
  .menu-toggle-btn {
    display: flex;
  }
  
  .content-container {
    padding: 1rem;
  }
}

/* Login Screen Styles */
.login-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, var(--background) 0%, var(--secondary) 90%);
  z-index: 100000;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--primary-foreground);
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.login-logo i, 
.login-logo svg {
  width: 28px;
  height: 28px;
}

.login-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--card-foreground);
}

.login-card p {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

#btn-logout:hover {
  background-color: rgba(239, 68, 68, 0.1) !important;
  border-radius: 4px;
}

/* Printing styling */
@media print {
  html, body {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  @page {
    size: A4 portrait;
    margin: 1.2cm 1.5cm;
  }
  
  .sidebar,
  .main-header,
  .no-print,
  .btn,
  .header-actions,
  .content-container,
  dialog::backdrop {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  
  dialog.modal-dialog {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #ffffff !important;
    overflow: visible !important;
    max-height: none !important;
  }
  
  .invoice-print-container {
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    width: 100% !important;
    max-height: 100% !important;
    page-break-inside: avoid !important;
  }

  .invoice-print-header {
    padding-bottom: 0.75rem !important;
    margin-bottom: 1rem !important;
    border-bottom: 1.5px solid #000000 !important;
  }

  .invoice-print-header .logo-area h2 {
    font-size: 1.3rem !important;
  }

  .invoice-print-header .meta-area h3 {
    font-size: 1.15rem !important;
  }

  .invoice-print-details {
    margin-bottom: 1rem !important;
    gap: 1rem !important;
  }

  .invoice-print-table {
    margin-bottom: 1.25rem !important;
  }

  .invoice-print-table th,
  .invoice-print-table td {
    padding: 0.5rem 0.25rem !important;
    font-size: 11px !important;
  }

  .invoice-print-table tr.total-row td {
    font-size: 12px !important;
  }

  .invoice-print-footer {
    gap: 1.5rem !important;
  }

  .payment-instructions {
    padding: 0.75rem !important;
    font-size: 11px !important;
  }

  .signatures {
    gap: 2rem !important;
    font-size: 11px !important;
  }
}

/* Custom logo upload styling */
#settings-logo-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--secondary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  overflow: hidden;
  border: 1px solid var(--border);
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Custom verification modal backdrop */
.custom-confirm-modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Finance module styling */
.finance-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.finance-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.finance-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.finance-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--card-foreground);
}

.finance-card-subtitle {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.finance-columns-layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 992px) {
  .finance-columns-layout {
    grid-template-columns: 1fr;
  }
}

.finance-chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
