:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-muted: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #18181b;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --brand: #e85d04;
  --brand-hover: #d35000;
  --brand-soft: #fff4ed;
  --brand-border: #fed7aa;

  --green: #15803d;
  --green-soft: #f0fdf4;
  --green-border: #bbf7d0;

  --red: #dc2626;
  --red-soft: #fef2f2;
  --red-border: #fecaca;

  --amber: #b45309;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;

  --blue: #1d4ed8;
  --blue-soft: #eff6ff;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.16);
  --sidebar-w: 260px;
}

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

html, body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* SPLASH */
.splash-screen {
  position: fixed;
  inset: 0;
  background: #111214;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.splash-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.splash-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-dark {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* LOGIN SCREEN */
.login-screen {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(232, 93, 4, 0.14), transparent 45%),
    linear-gradient(180deg, #14161a 0%, #1d2026 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo {
  height: 54px;
  max-width: 240px;
  object-fit: contain;
  margin-bottom: 12px;
}
.login-subtitle {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.login-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* APP SHELL */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: #14161a;
  color: #f4f4f5;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  z-index: 40;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}
.brand-emblem {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f97316;
  line-height: 1.2;
}
.brand-sub {
  font-size: 11.5px;
  color: #a1a1aa;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #d4d4d8;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}
.nav-item.active {
  background: rgba(232, 93, 4, 0.18);
  color: #fb923c;
  font-weight: 600;
}

.sidebar-quick {
  padding: 12px 4px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.user-meta {
  flex: 1;
  min-width: 0;
}
.user-fullname {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 11px;
  color: #a1a1aa;
}
.sidebar-user .btn-icon-ghost {
  color: #a1a1aa;
}
.sidebar-user .btn-icon-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* MAIN AREA */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 26px 28px 48px;
  max-width: 1360px;
}

/* MOBILE HEADER & BOTTOM NAV */
.mobile-header, .mobile-bottom-nav {
  display: none;
}

/* PAGE HEADER */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}
.page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.page-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}
.btn-lg {
  padding: 12px 20px;
  font-size: 14.5px;
}
.btn-block {
  width: 100%;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
}
.btn-success {
  background: var(--green);
  color: #fff;
}
.btn-success:hover:not(:disabled) {
  background: #166534;
}
.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}
.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  background: var(--surface-muted);
  border-color: #9ca3af;
}
.btn-outline-light {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}
.btn-icon-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-icon-ghost:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

/* KPI GRID */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.kpi-value {
  font-size: 21px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.kpi-value.text-green { color: var(--green); }
.kpi-value.text-red { color: var(--red); }
.kpi-value.text-brand { color: var(--brand); }
.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* CARDS & FILTER BAR */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 18px;
}
.filter-bar input, .filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.filter-bar input:focus, .filter-bar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.12);
}
.filter-search {
  flex: 1;
  min-width: 190px;
}

/* PROJECT CARDS GRID */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}
.project-card:hover {
  border-color: var(--brand-border);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.project-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.project-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.project-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  background: var(--surface-muted);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.pstat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.pstat-val {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}
.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-orange { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-border); }
.badge-green { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-border); }
.badge-red { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-border); }
.badge-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-border); }
.badge-gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* SUBTABS (Project Detail) */
.subtabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #e5e7eb;
  border-radius: 10px;
  margin-bottom: 18px;
}
.subtab-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.subtab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* DIARY FEED */
.diary-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.diary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.diary-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.diary-meta-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.diary-date {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 8px;
}
.diary-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.diary-author strong {
  color: var(--text);
}
.diary-content {
  font-size: 14.5px;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.65;
  margin-bottom: 14px;
}
.diary-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.diary-photo-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f1f5f9;
  cursor: zoom-in;
  position: relative;
}
.diary-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.diary-photo-thumb:hover img {
  transform: scale(1.04);
}
.diary-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* FINANCE TABLE / LIST */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.data-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13.5px;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover {
  background: #fafafa;
}
.amount-thu {
  color: var(--green);
  font-weight: 700;
  white-space: nowrap;
}
.amount-chi {
  color: var(--red);
  font-weight: 700;
  white-space: nowrap;
}
.tx-receipt-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
.tx-receipt-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* FORMS & MODAL */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.14);
}
.form-group textarea {
  resize: vertical;
  min-height: 105px;
}
.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-password-wrap input {
  padding-right: 42px;
}
.input-password-wrap .btn-icon-ghost {
  position: absolute;
  right: 5px;
}
.alert-error {
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  color: var(--red);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}
.alert-info {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: #9a3412;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
}

/* TYPE SWITCHER (THU / CHI) */
.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.type-btn {
  padding: 11px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.type-btn.active-thu {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.type-btn.active-chi {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

/* QUICK CATEGORY CHIPS */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.12s;
}
.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

/* PHOTO UPLOAD DROPZONE */
.photo-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  background: var(--surface-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.photo-dropzone:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.photo-dropzone input[type="file"] {
  display: none;
}
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
}
.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}

/* LIGHTBOX */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-body {
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox-body img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #e4e4e7;
  font-size: 13px;
}
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 46px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-state h3 {
  color: var(--text);
  font-size: 16px;
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 13.5px;
  margin-bottom: 16px;
}

/* TOAST */
.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #18181b;
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInToast 0.2s ease;
}
.toast.toast-success { border-left: 4px solid #22c55e; }
.toast.toast-error { border-left: 4px solid #ef4444; }
@keyframes fadeInToast {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ACCOUNT LAYOUT */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}
.user-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.user-list-item:last-child { border-bottom: none; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    padding: 0 14px;
    background: #14161a;
    color: #fff;
    z-index: 40;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .brand-emblem-sm {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }
  .brand-name-sm {
    font-size: 13.5px;
    font-weight: 800;
    color: #f97316;
    line-height: 1.15;
  }
  .brand-sub-sm {
    font-size: 11px;
    color: #d4d4d8;
  }

  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 40;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
  }
  .bnav-item.active {
    color: var(--brand);
  }

  .main-content {
    margin-left: 0;
    padding: 72px 14px 84px;
  }
  .page-title { font-size: 19px; }
  .kpi-grid, .kpi-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-value { font-size: 17px; }
  .project-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-dialog { border-radius: 18px 18px 0 0; max-height: 92vh; }
}
