@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Condensed:wght@600;700&display=swap');

:root{
  --nfs-navy: #18233f;
  --nfs-teal: #15b3ad;
  --nfs-purple: #6e63b6;
  --nfs-indigo: #6366f1;
  --nfs-sky: #38bdf8;
  --nfs-emerald: #10b981;
  --nfs-amber: #f59e0b;
  --nfs-rose: #ef4444;
  --nfs-primary: var(--nfs-teal);
  --nfs-bg: #f6f7fb;
  --nfs-border: #e4e7ec;
  --nfs-danger: #e5484d;
  --nfs-font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --nfs-font-display: "IBM Plex Sans Condensed", "Segoe UI", sans-serif;
  --nfs-radius-lg: 18px;
  --nfs-radius-md: 12px;
  --nfs-shadow-soft: 0 10px 30px rgba(16,24,40,.08);
}

body{
  background: var(--nfs-bg);
  font-family: var(--nfs-font-body);
  color: #101828;
}

.navbar-brand{
  font-weight: 700;
}

.btn-primary{
  background: linear-gradient(135deg, var(--nfs-teal), #0e8e88);
  border: 0;
  box-shadow: 0 12px 24px rgba(14,142,136,.2);
}

.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(14,142,136,.25);
}

.btn-primary:focus{
  box-shadow: 0 0 0 .2rem rgba(22,179,173,.2);
}

.text-nfs-teal{ color: var(--nfs-teal) !important; }
.text-nfs-navy{ color: var(--nfs-navy) !important; }

.card{
  border: 0;
  border-radius: var(--nfs-radius-lg);
  box-shadow: var(--nfs-shadow-soft);
}

.card .card-body:not(.p-0){
  padding: 18px 20px;
}

.modal-content{
  border-radius: 20px;
  border: 1px solid #e4e7ec;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
}

.modal-header{
  border-bottom: 0;
  padding: 18px 22px 6px;
  background: linear-gradient(120deg, rgba(21,179,173,.12), rgba(99,102,241,.12));
}

.modal-title{
  font-family: var(--nfs-font-display);
  font-size: 1.05rem;
  color: #0f172a;
}

.modal-body{
  padding: 16px 22px 20px;
}

.modal-footer{
  border-top: 0;
  padding: 10px 22px 20px;
  background: #f8fafc;
}

.btn{
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-sm{
  padding: 6px 10px;
}

.btn-xs{
  padding: 4px 8px;
  font-size: .75rem;
  border-radius: 8px;
}

.btn-icon{
  width: 30px;
  height: 30px;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon.btn-xs{
  width: 28px;
  height: 28px;
}

.btn-icon svg{
  width: 14px;
  height: 14px;
}

.btn-icon svg *{
  stroke: currentColor;
  fill: none;
}

.btn-outline-secondary{
  background: #ffffff;
  border-color: #e4e7ec;
  color: #344054;
}

.btn-outline-secondary:hover{
  background: #f8fafc;
  border-color: #d0d5dd;
  color: #1d2939;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15,23,42,.12);
}

.btn-outline-secondary:focus{
  box-shadow: 0 0 0 .2rem rgba(22,179,173,.18);
}

.btn-outline-danger{
  background: #ffffff;
  border-color: rgba(229,72,77,.35);
  color: #b42318;
}

.btn-outline-danger:hover{
  background: rgba(229,72,77,.08);
  border-color: rgba(229,72,77,.55);
  color: #a10f15;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(229,72,77,.12);
}

.btn-outline-danger:focus{
  box-shadow: 0 0 0 .2rem rgba(229,72,77,.2);
}

.form-label{
  font-weight: 600;
  color: #344054;
  font-size: .9rem;
}

.form-control,
.form-select{
  border-radius: var(--nfs-radius-md);
  border-color: var(--nfs-border);
  background: #f8fafc;
}

.form-control::placeholder{
  color: #98a2b3;
}

.form-control:focus,
.form-select:focus{
  border-color: rgba(22,179,173,.55);
  box-shadow: 0 0 0 .25rem rgba(22,179,173,.18);
}

.table thead th{
  font-size: .85rem;
  color: #475467;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f8fafc;
  border-bottom: 0;
}

.table > :not(caption) > * > *{
  padding: 12px 14px;
}

.table-hover tbody tr:hover{
  background-color: #f4fbfb;
}

.table-responsive{
  border-radius: var(--nfs-radius-lg);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.nav-pills .nav-link{
  border-radius: 999px;
  font-weight: 600;
  color: #344054;
}

.nav-pills .nav-link.active{
  background: rgba(21,179,173,.12);
  color: #0e8e88;
}

.page-header{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.page-title{
  font-family: var(--nfs-font-display);
  font-size: 1.15rem;
  margin: 0;
}

.page-subtitle{
  font-size: .85rem;
  color: #667085;
  margin-top: 4px;
}

.stat-card{
  background: #ffffff;
  border-radius: var(--nfs-radius-lg);
  box-shadow: var(--nfs-shadow-soft);
  padding: 16px 18px;
  height: 100%;
}

.stat-title{
  font-size: .85rem;
  color: #667085;
  margin-bottom: 6px;
}

.stat-value{
  font-family: var(--nfs-font-display);
  font-size: 1.2rem;
  color: #101828;
}

.mini-card{
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid #eef2f6;
}

.mini-label{
  font-size: .78rem;
  color: #667085;
}

.mini-value{
  font-weight: 700;
  color: #101828;
}

.chart-card{
  min-height: 320px;
}

.chart-title{
  font-weight: 700;
  font-size: .95rem;
}

.chart-legend{
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.legend-item{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: #475467;
}

.legend-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.list-compact{
  display: grid;
  gap: 10px;
}

.list-compact .list-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.list-compact .list-title{
  font-weight: 600;
  color: #101828;
}

.list-compact .list-sub{
  font-size: .8rem;
  color: #667085;
}

.todo-list{
  display: grid;
  gap: 12px;
}

.todo-item{
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #eef2f6;
  background: #ffffff;
}

.todo-check{
  display: flex;
  align-items: flex-start;
}

.todo-toggle-btn{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
  color: #98a2b3;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.todo-toggle-btn:hover{
  border-color: rgba(21,179,173,.45);
  color: #0e8e88;
  background: rgba(21,179,173,.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15,23,42,.12);
}

.todo-toggle-btn.is-done{
  background: rgba(21,179,173,.16);
  border-color: rgba(21,179,173,.45);
  color: #0e8e88;
}

.todo-main{
  display: grid;
  gap: 6px;
}

.todo-title{
  font-weight: 700;
  color: #101828;
}

.todo-title.todo-done{
  text-decoration: line-through;
  color: #98a2b3;
}

.todo-desc{
  font-size: .85rem;
  color: #667085;
}

.todo-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.todo-badge{
  font-size: .75rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
}

.todo-badge-daily{
  background: rgba(21,179,173,.15);
  color: #0e8e88;
}

.todo-badge-important{
  background: rgba(239,68,68,.12);
  color: #b91c1c;
}

.todo-actions{
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

@media (max-width: 767px){
  .todo-item{
    grid-template-columns: 1fr;
  }
  .todo-actions{
    justify-content: flex-start;
  }
}

.status-badge{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.badge-success{
  background: rgba(16,185,129,.12);
  color: #047857;
}

.badge-warning{
  background: rgba(245,158,11,.15);
  color: #b45309;
}

.badge-danger{
  background: rgba(239,68,68,.15);
  color: #b91c1c;
}

/* App layout */
.app-page{
  background:
    radial-gradient(1200px 680px at 6% -12%, rgba(21,179,173,.08), transparent 60%),
    radial-gradient(900px 520px at 95% 6%, rgba(99,102,241,.08), transparent 60%),
    #f4f6fb;
  color: #101828;
}

.app-shell{
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.app-sidebar{
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #1a2444, #0f172a);
  color: #dfe7ff;
  padding: 22px 18px;
  border-right: 1px solid rgba(148,163,184,.18);
  box-shadow: 20px 0 40px rgba(15,23,42,.18);
}

.app-sidebar::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(240px 180px at 12% 4%, rgba(21,179,173,.22), transparent 60%),
    radial-gradient(220px 180px at 92% 12%, rgba(99,102,241,.2), transparent 60%);
  opacity: .9;
  pointer-events: none;
}

.sidebar-inner{
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  position: relative;
  z-index: 1;
}

.sidebar-brand{
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(15,23,42,.45);
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.brand-title{
  font-family: var(--nfs-font-display);
  font-size: 1.1rem;
  color: var(--nfs-navy);
  letter-spacing: .4px;
}

.brand-sub{
  font-size: .85rem;
  color: #667085;
}

.sidebar-brand .brand-lockup{
  justify-content: flex-start;
}

.app-sidebar .brand-title{
  color: #ffffff;
}

.app-sidebar .brand-sub{
  color: rgba(223,231,255,.7);
}

.app-sidebar .brand-mark{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(15,23,42,.35);
}

.sidebar-nav{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15,23,42,.35);
  border: 1px solid rgba(148,163,184,.16);
}

.sidebar-group{
  display: grid;
  gap: 6px;
}

.sidebar-subnav{
  display: grid;
  gap: 4px;
  padding: 4px 6px 4px 14px;
  margin-left: 10px;
  border-left: 1px solid rgba(148,163,184,.2);
}

.sidebar-sublink{
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  color: rgba(223,231,255,.75);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .2px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.sidebar-sublink:hover{
  background: rgba(255,255,255,.1);
  color: #ffffff;
  transform: translateX(1px);
}

.sidebar-sublink.active{
  background: rgba(21,179,173,.24);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(21,179,173,.35);
}

.sidebar-link{
  display: flex;
  align-items: center;
  position: relative;
  padding: 10px 12px 10px 18px;
  border-radius: 12px;
  color: rgba(223,231,255,.85);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .2px;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.sidebar-link::before{
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.sidebar-link:hover{
  background: rgba(255,255,255,.1);
  color: #ffffff;
  transform: translateX(1px);
}

.sidebar-link:hover::before{
  opacity: 1;
  background: rgba(21,179,173,.6);
}

.sidebar-link.active{
  background: linear-gradient(90deg, rgba(21,179,173,.24), rgba(21,179,173,.06));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(21,179,173,.35), 0 8px 16px rgba(15,23,42,.18);
}

.sidebar-link.active::before{
  opacity: 1;
  background: var(--nfs-teal);
}

.sidebar-footer{
  margin-top: auto;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15,23,42,.4);
  border: 1px solid rgba(148,163,184,.18);
}

.sidebar-footer .btn{
  border-radius: 12px;
  border-color: rgba(255,255,255,.35);
  color: #ffffff;
}

.app-main{
  padding: 28px 28px 40px;
}

.app-content{
  max-width: 1200px;
  margin: 0 auto;
}

.app-topbar{
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--nfs-radius-lg);
  box-shadow: var(--nfs-shadow-soft);
}

.app-topbar-title{
  font-family: var(--nfs-font-display);
  font-size: 1.05rem;
  color: var(--nfs-navy);
}

.app-sidebar .offcanvas-header{
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148,163,184,.2);
}

.app-sidebar .offcanvas-header .brand-lockup{
  justify-content: flex-start;
}

.app-sidebar .offcanvas-header .brand-title{
  font-size: 1rem;
}

/* Dashboard */
.dashboard-page{
  display: grid;
  gap: 18px;
}

.dashboard-page .page-header{
  background: linear-gradient(120deg, rgba(21,179,173,.12), rgba(99,102,241,.12));
  border: 1px solid rgba(148,163,184,.35);
  border-radius: var(--nfs-radius-lg);
  padding: 14px 18px;
  box-shadow: var(--nfs-shadow-soft);
}

.dashboard-page .stat-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(160deg, #ffffff, rgba(248,250,252,.7));
}

.dashboard-page .stat-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: var(--stat-accent, var(--nfs-teal));
}

.dashboard-page .stat-card::after{
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--stat-soft, rgba(21,179,173,.14));
}

.dashboard-page .stat-title{
  font-weight: 600;
}

.dashboard-page .stat-value{
  color: var(--stat-accent, #101828);
}

.stat-card--teal{
  --stat-accent: var(--nfs-teal);
  --stat-soft: rgba(21,179,173,.18);
}

.stat-card--indigo{
  --stat-accent: var(--nfs-indigo);
  --stat-soft: rgba(99,102,241,.18);
}

.stat-card--emerald{
  --stat-accent: var(--nfs-emerald);
  --stat-soft: rgba(16,185,129,.18);
}

.stat-card--amber{
  --stat-accent: var(--nfs-amber);
  --stat-soft: rgba(245,158,11,.18);
}

.stat-card--sky{
  --stat-accent: var(--nfs-sky);
  --stat-soft: rgba(56,189,248,.2);
}

.stat-card--rose{
  --stat-accent: var(--nfs-rose);
  --stat-soft: rgba(239,68,68,.18);
}

.dashboard-page .mini-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(160deg, #ffffff, rgba(248,250,252,.7));
}

.dashboard-page .mini-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mini-accent, var(--nfs-teal));
}

.dashboard-page .mini-value{
  color: var(--mini-accent, #101828);
}

.mini-card--teal{ --mini-accent: var(--nfs-teal); }
.mini-card--sky{ --mini-accent: var(--nfs-sky); }
.mini-card--indigo{ --mini-accent: var(--nfs-indigo); }
.mini-card--amber{ --mini-accent: var(--nfs-amber); }
.mini-card--rose{ --mini-accent: var(--nfs-rose); }
.mini-card--emerald{ --mini-accent: var(--nfs-emerald); }

.dashboard-page .chart-card{
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(180deg, #ffffff, rgba(248,250,252,.7));
}

/* Contacts */
.contacts-page{
  display: grid;
  gap: 16px;
}

.contacts-header{
  background: linear-gradient(120deg, rgba(21,179,173,.12), rgba(99,102,241,.1));
  border: 1px solid rgba(148,163,184,.35);
  border-radius: var(--nfs-radius-lg);
  padding: 14px 18px;
  box-shadow: var(--nfs-shadow-soft);
}

.contacts-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.contacts-search{
  flex: 1 1 320px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--nfs-radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--nfs-shadow-soft);
}

.contacts-search-main{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contacts-search .form-control{
  flex: 1 1 240px;
}

.contacts-search-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: .8rem;
  color: #667085;
}

.contacts-pill{
  background: rgba(99,102,241,.12);
  color: #4338ca;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.contacts-count{
  font-weight: 600;
}

.contacts-summary{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contacts-page .mini-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(160deg, #ffffff, rgba(248,250,252,.7));
  min-width: 110px;
}

.contacts-page .mini-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mini-accent, var(--nfs-teal));
}

.contacts-page .mini-value{
  color: var(--mini-accent, #101828);
}

.contact-table{
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.contact-table .table thead th{
  background: #f4f6fb;
}

.contact-main{
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-avatar{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(140deg, var(--nfs-indigo), var(--nfs-teal));
  box-shadow: 0 10px 16px rgba(99,102,241,.18);
}

.contact-name{
  font-weight: 600;
  color: #101828;
}

.contact-sub{
  font-size: .8rem;
  color: #667085;
}

.contact-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contact-link{
  color: #0e8e88;
  text-decoration: none;
  font-weight: 600;
}

.contact-link:hover{
  color: #0b6f6b;
  text-decoration: underline;
}

.contact-pill{
  background: rgba(15,23,42,.08);
  color: #334155;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.contact-notes{
  color: #475467;
  font-size: .85rem;
  max-width: 260px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.contact-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-badge{
  background: rgba(21,179,173,.12);
  color: #0e8e88;
  border: 1px solid rgba(21,179,173,.25);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.contact-badge-muted{
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

/* Entries */
.entries-page{
  display: grid;
  gap: 16px;
}

.entries-header{
  background: linear-gradient(120deg, rgba(21,179,173,.12), rgba(99,102,241,.1));
  border: 1px solid rgba(148,163,184,.35);
  border-radius: var(--nfs-radius-lg);
  padding: 14px 18px;
  box-shadow: var(--nfs-shadow-soft);
}

.entries-summary{
  margin-top: 2px;
}

.entries-summary-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(160deg, #ffffff, rgba(248,250,252,.7));
}

.entries-summary-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--summary-accent, var(--nfs-teal));
}

.entries-summary-card--open{
  --summary-accent: var(--nfs-amber);
}

.entries-summary-card--paid{
  --summary-accent: var(--nfs-emerald);
}

.entries-overview{
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: var(--nfs-shadow-soft);
}

.entries-overview-head{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.entries-overview-title{
  font-weight: 600;
  color: #101828;
}

.entries-overview-active-kind{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-size: .85rem;
  color: #475467;
}

.entries-overview .table thead th{
  background: #f8fafc;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
}

.entries-overview-kind{
  font-weight: 600;
  color: #0f172a;
}

.entries-overview-amount{
  font-weight: 600;
}

.entries-overview-amount--total{
  color: #0f172a;
}

.entries-overview-amount--open{
  color: var(--nfs-amber);
}

.entries-overview-amount--paid{
  color: var(--nfs-emerald);
}

.entries-overview-active td{
  background: rgba(15, 118, 110, .08);
}

.entries-overview-active td:first-child{
  box-shadow: inset 3px 0 0 var(--nfs-teal);
}

.entries-filters{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--nfs-radius-lg);
  padding: 12px;
  box-shadow: var(--nfs-shadow-soft);
  align-items: center;
}

.entries-table{
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.entries-table .table thead th{
  background: #f4f6fb;
}

.entry-contact{
  display: grid;
  gap: 2px;
}

.entry-contact-name{
  font-weight: 600;
  color: #101828;
}

.entry-contact-sub{
  font-size: .8rem;
  color: #667085;
}

.entry-amount{
  font-weight: 700;
}

.entry-amount--income{
  color: var(--nfs-emerald);
}

.entry-amount--expense{
  color: var(--nfs-amber);
}

.entry-amount--receivable{
  color: var(--nfs-teal);
}

.entry-amount--payable{
  color: var(--nfs-rose);
}

.entries-yearly{
  border: 1px solid #e5e7eb;
}

.entries-income{
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: var(--nfs-shadow-soft);
}

.entries-income-head{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.entries-income-metrics{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.entries-trend-form{
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.entries-trend-note{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: rgba(148,163,184,.12);
  color: #475467;
  border: 1px solid rgba(148,163,184,.2);
}

.entries-trend-note--up{
  background: rgba(16,185,129,.18);
  color: #047857;
  border-color: rgba(16,185,129,.35);
}

.entries-trend-note--down{
  background: rgba(245,158,11,.18);
  color: #b45309;
  border-color: rgba(245,158,11,.35);
}

.entries-trend-note--flat{
  background: rgba(148,163,184,.12);
  color: #475467;
  border-color: rgba(148,163,184,.2);
}

.entries-income-chart{
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(226,232,240,.9);
  border-radius: var(--nfs-radius-lg);
  background: linear-gradient(180deg, #ffffff, rgba(248,250,252,.7));
}

.entries-income-chart .chart-title{
  margin-bottom: 8px;
}

.entries-income .mini-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(160deg, #ffffff, rgba(248,250,252,.7));
}

.entries-income .mini-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mini-accent, var(--nfs-emerald));
}

.entries-income .mini-value{
  color: var(--mini-accent, #101828);
}

/* Services */
.services-page{
  display: grid;
  gap: 16px;
}

.services-header{
  background: linear-gradient(120deg, rgba(21,179,173,.12), rgba(99,102,241,.1));
  border: 1px solid rgba(148,163,184,.35);
  border-radius: var(--nfs-radius-lg);
  padding: 14px 18px;
  box-shadow: var(--nfs-shadow-soft);
}

.services-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.services-filters{
  flex: 1 1 360px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--nfs-radius-lg);
  padding: 12px;
  box-shadow: var(--nfs-shadow-soft);
}

.services-filter-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: .8rem;
  color: #667085;
}

.services-pill{
  background: rgba(21,179,173,.12);
  color: #0e8e88;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.services-summary{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.services-page .mini-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(160deg, #ffffff, rgba(248,250,252,.7));
  min-width: 110px;
}

.services-page .mini-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mini-accent, var(--nfs-teal));
}

.services-page .mini-value{
  color: var(--mini-accent, #101828);
}

.services-table{
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.services-table .table thead th{
  background: #f4f6fb;
}

.service-main{
  display: grid;
  gap: 6px;
}

.service-type{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  width: fit-content;
}

.service-type--domain{
  background: rgba(21,179,173,.15);
  color: #0e8e88;
}

.service-type--hosting{
  background: rgba(99,102,241,.12);
  color: #4338ca;
}

.service-title{
  font-weight: 600;
  color: #101828;
}

.service-company{
  font-weight: 500;
  color: #334155;
}

.service-dates{
  display: grid;
  gap: 4px;
  font-size: .85rem;
  color: #475467;
}

.service-date-label{
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #98a2b3;
  margin-right: 6px;
}

.service-expiry--soon{
  color: #b45309;
  font-weight: 600;
}

.service-expiry--overdue{
  color: #b91c1c;
  font-weight: 700;
}

.service-amount{
  font-weight: 700;
}

.service-amount--paid{
  color: var(--nfs-emerald);
}

.service-amount--unpaid{
  color: #0f172a;
}

/* Notes */
.notes-page{
  display: grid;
  gap: 16px;
}

.notes-header{
  background: linear-gradient(120deg, rgba(21,179,173,.12), rgba(99,102,241,.1));
  border: 1px solid rgba(148,163,184,.35);
  border-radius: var(--nfs-radius-lg);
  padding: 14px 18px;
  box-shadow: var(--nfs-shadow-soft);
}

.notes-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.notes-search{
  flex: 1 1 320px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--nfs-radius-lg);
  padding: 12px;
  box-shadow: var(--nfs-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-search-main{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notes-search .form-control{
  flex: 1 1 240px;
}

.notes-search-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: .8rem;
  color: #667085;
}

.notes-pill{
  background: rgba(99,102,241,.12);
  color: #4338ca;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.notes-count{
  font-weight: 600;
}

.notes-summary{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notes-page .mini-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(160deg, #ffffff, rgba(248,250,252,.7));
  min-width: 110px;
}

.notes-page .mini-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mini-accent, var(--nfs-teal));
}

.notes-page .mini-value{
  color: var(--mini-accent, #101828);
}

.note-empty{
  border: 1px solid #e5e7eb;
}

.note-card{
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff, rgba(248,250,252,.7));
}

.note-card--pinned{
  border-color: rgba(245,158,11,.35);
  box-shadow: 0 18px 40px rgba(245,158,11,.15);
}

.note-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.note-title{
  font-weight: 600;
  color: #101828;
}

.note-badge{
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(245,158,11,.15);
  color: #b45309;
}

.note-body{
  margin-top: 10px;
  white-space: pre-wrap;
  color: #475467;
  font-size: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-footer{
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.note-meta{
  font-size: .8rem;
  color: #667085;
}

.note-actions{
  display: flex;
  align-items: center;
  gap: 6px;
}

.notes-bulk{
  margin: 8px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(226,232,240,.9);
  border-radius: var(--nfs-radius-lg);
  background: #f8fafc;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notes-select-all{
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: #334155;
}

.notes-bulk-actions{
  display: flex;
  align-items: center;
  gap: 12px;
}

.notes-bulk-count{
  font-size: .85rem;
  color: #667085;
}

.note-title-group{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.note-select{
  margin: 0;
  padding-top: 2px;
}

.note-card--selected{
  border-color: rgba(37,99,235,.4);
  box-shadow: 0 16px 30px rgba(37,99,235,.12);
}

/* Tasks */
.tasks-page{
  display: grid;
  gap: 16px;
}

.tasks-header{
  background: linear-gradient(120deg, rgba(21,179,173,.12), rgba(99,102,241,.1));
  border: 1px solid rgba(148,163,184,.35);
  border-radius: var(--nfs-radius-lg);
  padding: 14px 18px;
  box-shadow: var(--nfs-shadow-soft);
}

.tasks-tabs{
  margin: 0;
}

.tasks-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.tasks-search{
  flex: 1 1 320px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--nfs-radius-lg);
  padding: 12px;
  box-shadow: var(--nfs-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tasks-search-main{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tasks-search .form-control{
  flex: 1 1 240px;
}

.tasks-search-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: .8rem;
  color: #667085;
}

.tasks-pill{
  background: rgba(99,102,241,.12);
  color: #4338ca;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.tasks-summary{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tasks-page .mini-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(160deg, #ffffff, rgba(248,250,252,.7));
  min-width: 110px;
}

.tasks-page .mini-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mini-accent, var(--nfs-teal));
}

.tasks-page .mini-value{
  color: var(--mini-accent, #101828);
}

.tasks-card{
  border: 1px solid #e5e7eb;
}

.todo-badge-soon{
  background: rgba(245,158,11,.16);
  color: #b45309;
}

.todo-badge-overdue{
  background: rgba(239,68,68,.16);
  color: #b91c1c;
}

.tasks-footnote{
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .8rem;
  color: #667085;
}

.tasks-footnote-item{
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* Reports */
.reports-page{
  display: grid;
  gap: 16px;
}

.reports-header{
  background: linear-gradient(120deg, rgba(21,179,173,.12), rgba(99,102,241,.1));
  border: 1px solid rgba(148,163,184,.35);
  border-radius: var(--nfs-radius-lg);
  padding: 14px 18px;
  box-shadow: var(--nfs-shadow-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.reports-header-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.reports-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
}

.reports-chip--positive{
  background: rgba(16,185,129,.16);
  color: #047857;
}

.reports-chip--negative{
  background: rgba(239,68,68,.16);
  color: #b91c1c;
}

.reports-chip--muted{
  background: rgba(15,23,42,.08);
  color: #334155;
}

.reports-filters{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--nfs-radius-lg);
  padding: 12px;
  box-shadow: var(--nfs-shadow-soft);
}

.reports-stats .stat-card{
  border: 1px solid rgba(226,232,240,.9);
}

.reports-open-balance{
  display: grid;
  gap: 10px;
}

.reports-open-list{
  display: grid;
  gap: 6px;
}

.reports-open-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: #475467;
}

.reports-open-item strong{
  font-weight: 700;
}

.reports-open-item--teal strong{
  color: var(--nfs-teal);
}

.reports-open-item--rose strong{
  color: var(--nfs-rose);
}

.reports-mini{
  margin-top: 2px;
}

.reports-charts{
  margin-top: 2px;
}

.reports-chart-card{
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(180deg, #ffffff, rgba(248,250,252,.7));
}

.reports-chart-meta{
  font-size: .75rem;
  color: #667085;
  background: rgba(15,23,42,.06);
  padding: 4px 10px;
  border-radius: 999px;
}

.reports-side-card{
  border: 1px solid rgba(226,232,240,.9);
  background: #ffffff;
}

.reports-top-list .list-item{
  padding: 6px 0;
}

.reports-project-net--positive{
  color: #047857;
}

.reports-project-net--negative{
  color: #b91c1c;
}

.reports-manual-card{
  border: 1px solid rgba(226,232,240,.9);
  background: linear-gradient(180deg, #ffffff, rgba(248,250,252,.7));
}

.reports-table{
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.reports-table .table thead th{
  background: #f4f6fb;
}

.reports-net-positive{
  color: #047857;
  font-weight: 700;
}

.reports-net-negative{
  color: #b91c1c;
  font-weight: 700;
}

/* Login */
.auth-page{
  background:
    radial-gradient(900px 520px at 8% 8%, rgba(22,179,173,.22), transparent 55%),
    radial-gradient(800px 480px at 92% 12%, rgba(110,99,182,.18), transparent 55%),
    linear-gradient(160deg, #f9fafb, var(--nfs-bg) 55%);
  min-height: 100vh;
}

.auth-shell{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-panel{
  width: min(460px, 92vw);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 24px;
  padding: 32px 28px;
  border: 1px solid rgba(226,232,240,.9);
  box-shadow:
    0 30px 80px rgba(15,23,42,.14),
    0 10px 20px rgba(15,23,42,.08);
  position: relative;
  overflow: hidden;
  animation: auth-rise .6s ease-out;
}

.auth-panel::before{
  content: "";
  position: absolute;
  top: -140px;
  right: -120px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(22,179,173,.35), transparent 60%);
  opacity: .9;
}

.auth-panel::after{
  content: "";
  position: absolute;
  bottom: -140px;
  left: -120px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(110,99,182,.25), transparent 60%);
  opacity: .9;
}

.auth-brand{
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
  justify-items: center;
}

.brand-lockup{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.brand-mark{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--nfs-font-display);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: .6px;
  background: linear-gradient(140deg, var(--nfs-teal), var(--nfs-indigo));
  box-shadow: 0 12px 22px rgba(21,179,173,.25);
}

.brand-text{
  display: grid;
  gap: 2px;
  text-align: left;
}

.brand-lockup img{
  height: 40px;
  width: auto;
}

.auth-subtitle{
  color: #475467;
  font-size: .95rem;
}

.auth-form{
  position: relative;
  z-index: 1;
  margin-top: 10px;
}

.auth-input{
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.auth-btn{
  background: linear-gradient(135deg, var(--nfs-teal), #0e8e88);
  border: 0;
  box-shadow: 0 12px 24px rgba(14,142,136,.2);
}

.auth-meta{
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.auth-pill{
  font-size: .75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(21,179,173,.12);
  color: #0e8e88;
  border: 1px solid rgba(21,179,173,.25);
}

.auth-footer{
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-size: .85rem;
  color: #98a2b3;
}

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

@media (max-width: 991px){
  .app-shell{
    grid-template-columns: 1fr;
  }

  .app-sidebar{
    --bs-offcanvas-width: 280px;
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100vh;
    border-radius: 0;
    padding: 0;
  }

  .app-sidebar .sidebar-inner{
    padding: 18px 16px 22px;
  }

  .app-main{
    padding: 20px 16px 32px;
  }

  .app-topbar{
    display: flex;
  }
}

@media (max-width: 767px){
  .app-main{
    padding: 16px 12px 28px;
  }

  .app-topbar{
    gap: 10px;
  }

  .page-header{
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header .d-flex{
    width: 100%;
    flex-wrap: wrap;
  }

  .table > :not(caption) > * > *{
    padding: 10px 10px;
  }

  .table thead th{
    font-size: .72rem;
  }

  .contacts-toolbar,
  .services-toolbar,
  .notes-toolbar,
  .tasks-toolbar{
    flex-direction: column;
  }

  .contacts-summary,
  .services-summary,
  .notes-summary,
  .tasks-summary{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contacts-search,
  .services-filters,
  .notes-search,
  .tasks-search{
    width: 100%;
  }

  .notes-bulk{
    flex-direction: column;
    align-items: flex-start;
  }

  .note-footer{
    flex-direction: column;
    align-items: flex-start;
  }

  .list-compact .list-item{
    flex-direction: column;
    align-items: flex-start;
  }

  .entries-income-head{
    flex-direction: column;
    align-items: flex-start;
  }

  .entries-trend-form{
    width: 100%;
  }

  .tasks-tabs{
    flex-wrap: wrap;
  }

  .reports-header-meta{
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 575px){
  .app-topbar-title{
    flex: 1 1 100%;
    font-size: 1rem;
  }

  .app-topbar form{
    width: 100%;
  }

  .app-topbar form .btn{
    width: 100%;
  }

  .entries-filters .col-6{
    flex: 0 0 100%;
    max-width: 100%;
  }

  .modal-dialog{
    margin: 12px;
    max-width: calc(100% - 24px);
  }
}
