/* ============================================================
   8ledger — my.8ledger.app  |  Master Stylesheet
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
  --gold: #C9A03D;
  --gold-light: #E8D48B;
  --gold-dark: #A07E2E;
  --blue: #2C5F8A;
  --blue-dark: #1E3F5C;
  --blue-light: #3A7AB5;
  --jade: #4A8B71;
  --jade-light: #6BAF91;
  --jade-dark: #357A5C;
  --bg: #F5F6FA;
  --bg-dark: #E8EAF0;
  --white: #FFFFFF;
  --text: #2D3748;
  --text-light: #718096;
  --text-muted: #A0AEC0;
  --border: #E2E8F0;
  --danger: #E53E3E;
  --danger-light: #FED7D7;
  --success: #38A169;
  --success-light: #C6F6D5;
  --warning: #DD6B20;
  --warning-light: #FEEBC8;
  --sidebar-width: 260px;
  --topbar-height: 60px;
}

/* ----- Animations ----- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

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

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

/* ----- Reset / Base ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--gold-dark); }

img, svg { vertical-align: middle; }

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.hidden { display: none !important; }

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--bg-dark);
}

/* ============================================================
   LOGIN PAGE (#auth-gate)
   ============================================================ */
#auth-gate {
  min-height: 100vh;
  background: var(--white);
}

#login-wrapper {
  display: flex;
  min-height: 100vh;
}

/* --- Left branding panel --- */
#login-branding {
  flex: 0 0 48%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

#login-branding::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  right: -200px;
  bottom: -200px;
}

#login-branding-inner {
  max-width: 480px;
  position: relative;
  z-index: 1;
}

#login-logo {
  width: 200px;
  height: 48px;
  margin-bottom: 32px;
}

#login-tagline {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
}

#login-subtitle {
  font-size: 1rem;
  line-height: 1.7;
  opacity: .85;
  margin-bottom: 36px;
}

#login-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#login-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .95rem;
}
.icon-feature {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Right login panel --- */
#login-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  position: relative;
  background: var(--white);
}

/* Language toggle – login page */
#login-lang-toggle {
  position: absolute;
  top: 20px;
  right: 24px;
}
#login-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-light);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: all 0.2s ease;
}
#login-lang-btn:hover {
  border-color: var(--gold);
}
.lang-option { cursor: pointer; transition: color 0.2s ease; }
.lang-option.active { color: var(--gold); font-weight: 600; }
.lang-divider { color: var(--border); user-select: none; }

/* Form container */
#login-form-container {
  width: 100%;
  max-width: 400px;
}

#login-header {
  text-align: center;
  margin-bottom: 32px;
}
#login-form-logo {
  width: 180px;
  height: 48px;
  margin-bottom: 20px;
}
#login-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
#login-header p {
  font-size: .9rem;
  color: var(--text-light);
}

/* Error */
#login-error {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .85rem;
  margin-bottom: 16px;
  animation: shake 0.5s ease;
}
#login-error.hidden { display: none !important; }
.icon-error { width: 18px; height: 18px; flex-shrink: 0; color: var(--danger); }

/* Form elements */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.input-wrapper input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-wrapper input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,160,61,.15);
}

.password-toggle {
  position: absolute;
  right: 10px;
  padding: 4px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.password-toggle:hover { color: var(--gold); }
.icon-eye { width: 20px; height: 20px; }

/* Remember / Forgot row */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: .85rem;
}

/* Checkbox */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--text);
}
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--gold);
  border-color: var(--gold);
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 1px;
}
.checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(201,160,61,.15);
}

#forgot-password-link {
  color: var(--gold);
  font-weight: 500;
}

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 20px;
  background: var(--gold);
  color: var(--white);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn-primary:hover { background: var(--gold-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary svg { width: 18px; height: 18px; }

/* Secondary button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-secondary svg { width: 18px; height: 18px; }

.btn-sm {
  padding: 6px 14px;
  font-size: .8rem;
}

/* Divider */
#login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  font-size: .8rem;
  color: var(--text-muted);
}
#login-divider::before,
#login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Google SSO */
#google-sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
#google-sso-btn:hover { border-color: var(--text-muted); background: var(--bg); }
.icon-google { width: 20px; height: 20px; }

/* Footer link */
#login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: .85rem;
  color: var(--text-light);
}
#login-footer a {
  color: var(--gold);
  font-weight: 600;
  margin-left: 4px;
}

/* ============================================================
   FORGOT PASSWORD MODAL
   ============================================================ */
/* (shared .modal styling below covers this) */

/* ============================================================
   MODALS (.modal)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal.hidden { display: none !important; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: slideIn 0.3s ease;
  z-index: 1;
}
.modal-content.modal-lg {
  max-width: 700px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }

.modal-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  padding-right: 36px;
}
.modal-content > p {
  font-size: .9rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.modal-content .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.modal-content .form-actions .btn-primary,
.modal-content .form-actions .btn-secondary {
  width: auto;
}

/* ============================================================
   TOPBAR (#topbar)
   ============================================================ */
#topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 5000;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

#topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

#sidebar-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s ease;
}
#sidebar-toggle:hover { background: var(--bg); }
#sidebar-toggle svg { width: 20px; height: 20px; }

#topbar-logo {
  display: none;
}
#topbar-logo svg { height: 28px; width: auto; }

/* Search */
#topbar-center { flex: 1; max-width: 480px; margin: 0 24px; }

#global-search {
  position: relative;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
}
#search-input {
  width: 100%;
  padding: 8px 14px 8px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .85rem;
  color: var(--text);
  background: var(--bg);
  transition: all 0.2s ease;
}
#search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,160,61,.12);
  background: var(--white);
}

/* Right actions */
#topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .78rem;
  color: var(--text-light);
  transition: all 0.2s ease;
  position: relative;
}
.topbar-btn:hover { background: var(--bg); color: var(--gold); }
.topbar-btn svg { width: 20px; height: 20px; }

/* Language toggle (topbar) */
#app-lang-btn {
  border: 1px solid var(--border);
  border-radius: 20px;
}
#app-lang-btn .lang-option.active { color: var(--gold); font-weight: 600; }

/* Notification bell & badge */
#notifications-btn { position: relative; }
.badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: translate(4px, -4px);
}

/* User dropdown */
#user-menu { position: relative; }

#user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}
#user-menu-btn:hover { background: var(--bg); }

#user-avatar,
#dropdown-avatar,
#sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}

#user-display-name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
}

.chevron-down {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
#user-menu-btn[aria-expanded="true"] .chevron-down {
  transform: rotate(180deg);
}

/* Dropdown menu */
.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.1);
  min-width: 240px;
  z-index: 6000;
  animation: slideIn 0.2s ease;
  overflow: hidden;
}
.dropdown.hidden { display: none !important; }

#dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
#dropdown-user-details {
  display: flex;
  flex-direction: column;
}
#dropdown-user-name {
  font-weight: 600;
  font-size: .85rem;
  color: var(--text);
}
#dropdown-user-email {
  font-size: .75rem;
  color: var(--text-muted);
}

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: .85rem;
  color: var(--text);
  transition: background 0.15s ease;
}
.dropdown-item:hover { background: var(--bg); color: var(--gold); }
.dropdown-item svg { width: 18px; height: 18px; }

/* ============================================================
   SIDEBAR (#sidebar)
   ============================================================ */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 6000;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

/* User card */
#sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
#sidebar-avatar { width: 40px; height: 40px; font-size: .85rem; }
#sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#sidebar-user-name {
  font-weight: 600;
  font-size: .85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#sidebar-user-role {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* Navigation */
#sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-group {
  margin-bottom: 4px;
}
.nav-group-label {
  display: block;
  padding: 14px 20px 6px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
}

.nav-list { display: flex; flex-direction: column; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: .85rem;
  color: var(--text-light);
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}
.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-item:hover {
  background: var(--bg);
  color: var(--text);
}
.nav-item.active {
  border-left-color: var(--gold);
  color: var(--gold);
  background: rgba(201,160,61,.06);
  font-weight: 600;
}

/* NEW badge */
.nav-badge-new {
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--white);
  margin-left: auto;
  letter-spacing: .3px;
}

/* Bottom section */
#sidebar-bottom {
  border-top: 1px solid var(--border);
  padding: 8px 0;
}

/* Sidebar overlay (mobile) */
#sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 5500;
  transition: opacity 0.3s ease;
}
#sidebar-overlay.hidden { display: none !important; }

/* ============================================================
   CONTENT AREA (#content)
   ============================================================ */
#content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 24px 32px;
  background: var(--bg);
  min-height: calc(100vh - var(--topbar-height));
  animation: fadeIn 0.3s ease;
}

/* Pages */
.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-date {
  font-size: .85rem;
  color: var(--text-muted);
}

/* ============================================================
   CARDS (.card)
   ============================================================ */
.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.card-link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--gold);
}

.card-body {
  padding: 20px 24px;
}

.card-toolbar {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================================
   STAT CARDS (.stat-card)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s ease;
}
.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(201,160,61,.1);
}
.stat-icon svg { width: 24px; height: 24px; }

.stat-revenue .stat-icon { background: rgba(201,160,61,.1); }
.stat-outstanding .stat-icon { background: rgba(44,95,138,.1); }
.stat-expenses .stat-icon { background: rgba(74,139,113,.1); }
.stat-gst .stat-icon { background: rgba(221,107,32,.1); }

.stat-info {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

/* ============================================================
   DASHBOARD GRID
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Chart placeholder */
.chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: .85rem;
  gap: 12px;
}
.chart-placeholder svg { width: 40px; height: 40px; opacity: .5; }

/* Deadline list */
.deadline-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text);
}
.deadline-list li:last-child { border-bottom: none; }

/* Quick actions */
.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  transition: all 0.2s ease;
}
.quick-action-btn svg { width: 24px; height: 24px; }
.quick-action-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,160,61,.03);
}

/* ============================================================
   TABLES (.data-table)
   ============================================================ */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th {
  padding: 10px 14px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  background: var(--bg);
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
.data-table tbody td {
  padding: 12px 14px;
  font-size: .85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(201,160,61,.03); }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-active, .status-paid, .status-delivered, .status-approved, .status-validated, .status-supported {
  background: var(--success-light);
  color: var(--success);
}
.status-suspended, .status-failed, .status-overdue, .status-error {
  background: var(--danger-light);
  color: var(--danger);
}
.status-pending, .status-draft, .status-processing {
  background: var(--warning-light);
  color: var(--warning);
}
.status-sent {
  background: rgba(44,95,138,.1);
  color: var(--blue);
}

/* Role badges */
.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
}
.role-admin { background: var(--danger-light); color: var(--danger); }
.role-user { background: rgba(44,95,138,.1); color: var(--blue); }
.role-accountant { background: rgba(74,139,113,.1); color: var(--jade); }
.role-reseller { background: rgba(128,90,213,.1); color: #805AD5; }

/* Plan badges */
.plan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  background: rgba(201,160,61,.1);
  color: var(--gold-dark);
}

/* Package badge (C5) */
.badge-package {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border-radius: 6px;
  background: var(--blue);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

/* Table action buttons */
.table-actions {
  display: flex;
  gap: 6px;
}
.btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.btn-icon:hover { background: var(--bg); color: var(--gold); }
.btn-icon svg { width: 16px; height: 16px; }

/* Direction arrows (Peppol log) */
.direction-in { color: var(--success); font-weight: 700; }
.direction-out { color: var(--blue); font-weight: 700; }

/* Filter group */
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-group select,
.filter-group input[type="date"] {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .8rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s ease;
}
.filter-group select:focus,
.filter-group input[type="date"]:focus {
  outline: none;
  border-color: var(--gold);
}

/* ============================================================
   TABS (.tabs)
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
  overflow-x: auto;
}
.tab {
  padding: 10px 20px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.tab:hover { color: var(--gold); }
.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

.tab-panel { display: none; animation: fadeIn 0.2s ease; }
.tab-panel.active { display: block; }

/* ============================================================
   FORMS (general)
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="date"],
input[type="month"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,160,61,.12);
}

textarea { resize: vertical; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolyline points='2,4 6,8 10,4' fill='none' stroke='%23718096' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.form-actions .btn-primary,
.form-actions .btn-secondary {
  width: auto;
}

.form-actions-inline {
  display: flex;
  align-items: flex-end;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 4px;
}

/* Text helper */
.text-muted { color: var(--text-muted); font-size: .85rem; }

/* ============================================================
   VALIDATION PANEL (Peppol Schematron)
   ============================================================ */
.validation-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  background: var(--bg);
}
.validation-panel.hidden { display: none !important; }
.validation-panel h4 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.validation-panel ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.validation-panel li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-family: 'Courier New', Consolas, monospace;
}
.validation-pass { color: var(--success); }
.validation-fail { color: var(--danger); }

/* Schematron summary */
#schematron-summary {
  font-family: 'Courier New', Consolas, monospace;
  font-size: .82rem;
}

/* ============================================================
   REPORTS GRID
   ============================================================ */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.report-card {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.report-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(201,160,61,.12);
}
.report-card .card-body {
  text-align: center;
  padding: 32px 20px;
}
.report-icon { width: 40px; height: 40px; margin-bottom: 12px; }
.report-card h3 { font-size: .95rem; font-weight: 600; margin-bottom: 6px; }
.report-card p { font-size: .8rem; color: var(--text-light); }

/* ============================================================
   HELP GRID
   ============================================================ */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.help-card {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.help-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(201,160,61,.12);
}
.help-card .card-body {
  text-align: center;
  padding: 32px 20px;
}
.help-icon { width: 36px; height: 36px; margin-bottom: 12px; }
.help-card h3 { font-size: .95rem; font-weight: 600; margin-bottom: 6px; }
.help-card p { font-size: .8rem; color: var(--text-light); }

#help-search { margin-bottom: 0; }
#help-search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: .95rem;
}

/* ============================================================
   SETTINGS GRID
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

/* ============================================================
   STATUS DOTS
   ============================================================ */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-dot-active { background: var(--success); animation: pulse 2s infinite; }
.status-dot-error { background: var(--danger); }
.status-dot-pending { background: var(--warning); animation: pulse 2s infinite; }

/* ============================================================
   TOAST NOTIFICATIONS (#toast-container)
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  border-left: 4px solid var(--blue);
  animation: slideInRight 0.35s ease;
  font-size: .85rem;
  color: var(--text);
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-info    { border-left-color: var(--blue); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-dismiss { animation: slideOutRight 0.3s ease forwards; }

.toast-close {
  margin-left: auto;
  color: var(--text-muted);
  padding: 0;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.toast-close:hover { color: var(--text); }

/* ============================================================
   C5 / PEPPOL SPECIFIC
   ============================================================ */
/* Progress steps */
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
  text-align: center;
}
.progress-step::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.progress-step:last-child::after { display: none; }
.progress-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  z-index: 1;
}
.progress-step.completed .progress-step-circle {
  background: var(--success);
  color: var(--white);
}
.progress-step.active .progress-step-circle {
  background: var(--gold);
  color: var(--white);
}
.progress-step-label {
  font-size: .7rem;
  color: var(--text-muted);
}

/* ============================================================
   BILLING / PLAN
   ============================================================ */
#billing-current-plan {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE – Tablet (768–1024)
   ============================================================ */
@media (max-width: 1024px) {
  #sidebar {
    width: 72px;
    overflow: visible;
  }
  #sidebar .nav-item span,
  #sidebar .nav-group-label,
  #sidebar .nav-badge-new,
  #sidebar-user-info,
  #sidebar-bottom .nav-item span {
    display: none;
  }
  #sidebar .nav-item {
    justify-content: center;
    padding: 12px 0;
    border-left: none;
  }
  #sidebar .nav-item.active {
    border-left: none;
    border-right: 3px solid var(--gold);
  }
  #sidebar-user-card {
    justify-content: center;
    padding: 16px 0;
  }
  #sidebar-bottom .nav-item { justify-content: center; padding: 12px 0; }

  #topbar { left: 72px; }
  #content { margin-left: 72px; }

  .dashboard-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE – Mobile (< 768)
   ============================================================ */
@media (max-width: 767px) {
  #sidebar {
    width: var(--sidebar-width);
    transform: translateX(-100%);
  }
  #sidebar.open {
    transform: translateX(0);
  }
  /* Restore full sidebar labels on mobile when open */
  #sidebar.open .nav-item span,
  #sidebar.open .nav-group-label,
  #sidebar.open .nav-badge-new,
  #sidebar.open #sidebar-user-info,
  #sidebar.open #sidebar-bottom .nav-item span {
    display: inline;
  }
  #sidebar.open .nav-item {
    justify-content: flex-start;
    padding: 10px 20px;
    border-left: 3px solid transparent;
    border-right: none;
  }
  #sidebar.open .nav-item.active {
    border-left-color: var(--gold);
  }
  #sidebar.open #sidebar-user-card {
    justify-content: flex-start;
    padding: 16px 20px;
  }
  #sidebar.open #sidebar-bottom .nav-item {
    justify-content: flex-start;
    padding: 10px 20px;
  }

  #topbar { left: 0; }
  #content { margin-left: 0; padding: 16px; }

  #sidebar-toggle { display: flex; }
  #topbar-logo { display: block; }

  #topbar-center { display: none; }
  #user-display-name { display: none; }

  /* Login */
  #login-wrapper { flex-direction: column; }
  #login-branding {
    flex: 0 0 auto;
    padding: 40px 24px;
    min-height: auto;
  }
  #login-tagline { font-size: 1.4rem; }
  #login-panel { padding: 32px 20px; }

  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .quick-actions-grid { grid-template-columns: 1fr 1fr; }
  .form-row-grid { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }

  .tabs { gap: 0; }
  .tab { padding: 10px 12px; font-size: .78rem; }

  .modal-content { padding: 20px; border-radius: 12px; }
  .modal-content.modal-lg { max-width: 95%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: 1fr; }

  #login-branding { display: none; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  #sidebar,
  #topbar,
  #sidebar-overlay,
  #toast-container,
  .btn-primary,
  .btn-secondary,
  .modal { display: none !important; }

  #content {
    margin: 0;
    padding: 0;
    background: var(--white);
    box-shadow: none;
  }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }

  body { color: #000; }
}

/* ===== Invoice Modal Styles ===== */
.modal-overlay { position:fixed; inset:0; z-index:9000; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.45); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); }
.modal-box { position:relative; background:var(--white); border-radius:16px; padding:0; width:90%; max-width:500px; max-height:90vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,.2); animation:slideIn 0.3s ease; }
.modal-lg { max-width: 900px; width: 95%; }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid var(--border); }
.modal-header h2 { font-size:1.2rem; font-weight:700; color:var(--text); }
.modal-body { padding:24px; }
.modal-footer { display:flex; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--border); }
.modal-footer .btn-primary, .modal-footer .btn-secondary { width:auto; }
.form-section { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: none; }
.form-section h3 { font-size: 14px; font-weight: 600; color: var(--gold); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.input-readonly { opacity: 0.7; cursor: not-allowed; }
.input-sm { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 5px 7px; color: var(--text); font-size: 12px; font-family: inherit; width: 100%; box-sizing: border-box; }
.input-sm:focus { outline: none; border-color: var(--gold); }
.input-num { text-align: right; }

/* Invoice Totals */
.invoice-totals { max-width: 320px; margin-left: auto; }
.totals-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--text-light); }
.totals-grand { border-top: 2px solid var(--gold); margin-top: 6px; padding-top: 10px; font-size: 16px; font-weight: 700; color: var(--gold); }

/* Tracking Badges */
.badge-jade { position:static; transform:none; display:inline-flex; align-items:center; padding:3px 10px; border-radius:20px; font-size:.72rem; font-weight:600; min-width:unset; height:auto; background: rgba(74,139,113,0.15); color: var(--jade); border: 1px solid rgba(74,139,113,0.3); }
.badge-blue { position:static; transform:none; display:inline-flex; align-items:center; padding:3px 10px; border-radius:20px; font-size:.72rem; font-weight:600; min-width:unset; height:auto; background: rgba(44,95,138,0.15); color: var(--blue-light); border: 1px solid rgba(44,95,138,0.3); }
.badge-muted { position:static; transform:none; display:inline-flex; align-items:center; padding:3px 10px; border-radius:20px; font-size:.72rem; font-weight:600; min-width:unset; height:auto; background: rgba(148,163,184,0.1); color: var(--text-muted); border: 1px solid rgba(148,163,184,0.15); }

/* Action Button Icons */
.btn-action.btn-icon { padding: 5px 7px !important; min-width: unset !important; }
.btn-action.btn-icon svg { display: block; }

/* Share Link Box */
.share-link-box { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.share-link-field { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; color: var(--text); font-size: 13px; font-family: monospace; }
.share-options { display: flex; flex-direction: column; gap: 8px; }

/* View Invoice Layout */
.view-inv-header { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 16px; }
.view-inv-meta { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.view-inv-meta strong { color: var(--text-light); margin-right: 6px; }
.view-inv-client h4 { color: var(--gold); font-size: 13px; margin-bottom: 6px; text-transform: uppercase; }
.peppol-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: rgba(74,139,113,0.1); border-radius: 4px; color: var(--jade); font-size: 13px; }

/* Responsive */
@media (max-width: 768px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .view-inv-header { grid-template-columns: 1fr; }
  .modal-box.modal-lg { width: 100%; max-width: 100%; margin: 0; border-radius: 0; max-height: 100vh; }
}

/* ============================================
   EXPENSES ENHANCEMENTS
   ============================================ */
.receipt-upload-zone {
  border: 2px dashed rgba(201,160,61,0.4);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(201,160,61,0.03);
}
.receipt-upload-zone:hover, .receipt-upload-zone.drag-over {
  border-color: #C9A03D;
  background: rgba(201,160,61,0.08);
}
.upload-hint {
  font-size: 12px;
  color: #8899a6;
  margin-top: 4px;
}
.receipt-file-tag {
  display: inline-block;
  background: rgba(74,139,113,0.15);
  color: #4A8B71;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  margin-right: 8px;
}
.filter-group {
  display: flex;
  gap: 8px;
}
.filter-select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e1e8ed;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
}
.filter-select option {
  background: #1a2332;
  color: #e1e8ed;
}

/* ============================================
   INVOICE PREVIEW / DOWNLOAD MODAL
   ============================================ */
.invoice-preview {
  background: #ffffff;
  color: #1a1a1a;
  padding: 40px;
  font-family: 'Segoe UI', Arial, sans-serif;
  max-height: 70vh;
  overflow-y: auto;
}
.inv-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #C9A03D;
}
.inv-preview-logo {
  font-size: 28px;
  font-weight: bold;
  color: #2C5F8A;
}
.inv-preview-logo span { color: #C9A03D; }
.inv-preview-title {
  text-align: right;
}
.inv-preview-title h2 {
  color: #2C5F8A;
  font-size: 24px;
  margin: 0 0 4px 0;
}
.inv-preview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.inv-preview-meta h4 {
  color: #2C5F8A;
  margin: 0 0 6px 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.inv-preview-meta p {
  margin: 2px 0;
  font-size: 14px;
  color: #333;
}
.inv-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.inv-preview-table th {
  background: #2C5F8A;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.inv-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  color: #333;
}
.inv-preview-table tr:nth-child(even) td {
  background: #f8f9fa;
}
.inv-preview-totals {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.inv-preview-totals table {
  width: 280px;
}
.inv-preview-totals td {
  padding: 6px 12px;
  font-size: 14px;
}
.inv-preview-totals .total-row td {
  font-weight: bold;
  font-size: 16px;
  border-top: 2px solid #2C5F8A;
  color: #2C5F8A;
  padding-top: 10px;
}
.inv-preview-footer {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid #ddd;
  font-size: 12px;
  color: #777;
  text-align: center;
}
.inv-preview-peppol {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  margin-top: 4px;
}

/* Share modal QR placeholder */
.qr-placeholder {
  width: 120px;
  height: 120px;
  border: 2px solid #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto;
  background: #fff;
  color: #999;
  font-size: 11px;
}
.share-send-email {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.share-send-email .form-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.share-send-email input {
  flex: 1;
}

/* Suppliers-specific */
.supplier-category-tag {
  display: inline-block;
  background: rgba(44,95,138,0.15);
  color: #5b9bd5;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}

/* View expense detail layout */
.expense-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.expense-detail-grid .detail-item {
  margin-bottom: 8px;
}
.expense-detail-grid .detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8899a6;
  margin-bottom: 2px;
}
.expense-detail-grid .detail-value {
  font-size: 15px;
  color: #e1e8ed;
}
.expense-detail-grid .detail-full {
  grid-column: 1 / -1;
}

@media print {
  body * { visibility: hidden; }
  #download-invoice-content, #download-invoice-content * { visibility: visible; }
  #download-invoice-content { position: absolute; left: 0; top: 0; width: 100%; }
  .modal-overlay { position: static !important; background: none !important; }
  .modal-box { box-shadow: none !important; max-height: none !important; }
  .modal-footer { display: none !important; }
}
