/* header css start */

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

html,
body {
  height: 100%;
  /* overflow: hidden; */
  background-color: #eceffd;
  /* prevent body scroll */
  font-family: "Poppins", sans-serif;
}

.btn-light-custom{
  width: 192px;
}

nav{
  background-color: #ffffff;
  box-shadow: 0px 0px 10px #4058A7;
  /* box-shadow: 0px 2px 8px rgba(100, 100, 255, 0.1); */
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Navbar container */
.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  position: relative;
}

/* Logo */
.navbar-logo img {
  height: 45px;
}

/* Tabs */
.nav-tabs {
  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0px 2px 8px rgba(100, 100, 255, 0.1);
  border-radius: 50px;
  padding: 8px 20px;
}

.nav-tabs .nav-link {
  border: none;
  color: #9aa1d0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 30px;
  transition: 0.3s ease;
}

.nav-tabs .nav-link.active {
  /* background-color: #eef1ff; */
  color: #4455cc;
  font-weight: 600;
}

.nav-tabs .nav-link:hover {
  color: #4455cc;
  /* background-color: #f1f3ff; */
}

/* Profile button */
.profile-btn {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50px;
  padding: 6px 14px;
  box-shadow: 0px 2px 8px rgba(100, 100, 255, 0.1);
  color: #4455cc;
  font-weight: 500;
  transition: 0.3s;
  position: relative;
}

.profile-btn img {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  margin-right: 6px;
}

.profile-btn .avatar-initials {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #4455cc;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

.profile-btn:hover {
  background-color: #eef1ff;
}

/* Remove dropdown icon */
.dropdown-toggle::after {
  display: none !important;
}

/* Dropdown menu */
.dropdown-menu {
  border: none;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  background-color: white;
  width: 100%;
  min-width: unset !important;
}

.dropdown-item {
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  padding: 10px 15px;
  transition: 0.3s;
}

.dropdown-item:hover {
  background-color: #eef1ff;
  color: #4455cc;
}

/* Tab Content */
.tab-content {
  /* text-align: center; */
  padding: 40px 0;
  color: #555;
}

/* header css end */

/********************************************** home css start ***********************************************************/





/* Cards */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 16px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Layout */
.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: 2fr 1fr;
}


.grid-2 {
  grid-template-columns:  1fr 1fr;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 8px 4px;
}

thead tr {
  border-bottom: 1px solid #ddd;
}

tbody tr {
  border-bottom: 1px solid #f1f1f1;
}

/* Buttons */
.btn {
  background: #f3f3f3;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.3s;
}

.btn:hover {
  background: #e5e8ff;
  color:#4455cc ;
  border: 1px solid #4455cc;
}

.btn-primary {
  background: #4455cc;
  color: #fff;
}

/* Colors */
.text-red {
  color: #e53935;
}

.text-green {
  color: #43a047;
}

.text-blue {
  color: #1976d2;
  text-decoration: underline;
  cursor: pointer;
}

/* Chart (overdue) */
.chart {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 12px;
  align-items: end;
  height: 180px;
  padding-bottom: 28px;
}

.chart-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.chart-item .bar {
  width: 28px;
  height: var(--h);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #cdb9ff, #a88cf0);
  transition: height 0.4s ease, background 0.3s;
  box-shadow: inset 0 -6px 8px rgba(0, 0, 0, 0.06);
}

.chart-item .bar.highlight {
  background: linear-gradient(180deg, #2e39c4, #3f2dff);
}

.chart-item .bar-value {
  position: absolute;
  bottom: calc(var(--h) + 10px);
  background: #fff;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-width: 32px;
  text-align: center;
}

.chart-item .month {
  margin-top: 6px;
  font-size: 11px;
  color: #444;
  margin-bottom: -4px;
}

/* Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

.section-header i {
  color: #7b5fff;
  font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ********************************home end *************** */

/* *************************************summary **************************** */

.summary-container {
  width: 100%;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 16px;
  /* height: calc(55vh - 190px); */
  /* height: calc(87vh - 200px); */
  /* keeps container within viewport */
  display: flex;
  flex-direction: column;
}
.summary{
  margin-top: 20px;
}

.summary-header {
  text-align: center;
  margin-bottom: 20px;
}

.summary-container h4 {
  padding: 10px 10px;
}
.summary-header h2 {
  font-weight: 600;
  font-size: 26px;
  margin-bottom: 5px;
}

.summary-header p {
  font-size: 14px;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

.top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding-left: 16px;
  padding-right: 16px;
}

.btn-light-custom {
  background-color: #f8f9fc;
  border: 1px solid #4455cc;
  color: #4455cc;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 14px;
}

.search-box {
  position: relative;
  width: 400px;
}

.form-control::placeholder {
  color: #9aa1d0 !important;
}

.form-control {
  border: 1px solid #9aa1d0 !important;
}

.search-box input {
  border-radius: 8px;
  padding-left: 15px;
  color: #9aa1d0 !important;
}

.search-box i {
  position: absolute;
  right: 10px;
  top: 9px;
  color: #4455cc;
}

/* Scroll only inside table container */
.table-container {
  border: 1px solid #e4e6ef;
  border-radius: 12px;
  overflow-y: auto;
  /* vertical scroll enabled */
  overflow-x: auto;
  /* horizontal scroll enabled */
  background-color: #fff;
  width: 100%;
  flex: 1;
  min-height: 0;
  /* important to prevent overflow issue */
  white-space: nowrap;
  /* prevents table wrapping, enables horizontal scroll */
}

/* Optional custom scrollbar */
.table-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #999;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

th {
  background-color: #f9fafc;
  font-weight: 600;
  color: #333;
  position: sticky;
  top: 0;
  z-index: 2;
  cursor: pointer;
}

.sort-icon {
  margin-left: 6px;
  color: #ffffff;
  font-size: 12px;
}
.sort-icon.active {
  color: #fd0000 !important;   /* active black */
}

tr:hover td {
  background-color: #f8f9fc;
}

/* Dropdown custom style */
.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  margin-top: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dropdown-menu.show {
  display: block;
}

/* Alternate row colors */
#summaryTable tbody tr:nth-child(odd) {
  background-color: #f7f7f7;
}

#summaryTable tbody tr:nth-child(even) {
  background-color: #fcfcfc;
}

/* Optional: keep hover effect */
#summaryTable tbody tr:hover td {
  background-color: #f8f9fc;
}

/* ******************************summart end ************************************************ */

/* ******************************QUATATION TRACKER start ************************************************ */

.quotation-container {
  width: 100%;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 16px;
  height: calc(87vh - 200px);
  /* keeps container within viewport */
  display: flex;
  flex-direction: column;
}

.quotation-header {
  text-align: center;
  margin-bottom: 20px;
}

.quotation-header h2 {
  font-weight: 600;
  font-size: 26px;
  margin-bottom: 5px;
}

.quotation-header p {
  font-size: 14px;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

.quotation-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding-left: 16px;
  padding-right: 16px;
}

.btn-light-custom {
  background-color: #f8f9fc;
  border: 1px solid #4455cc;
  color: #4455cc;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 14px;
}

.quotation-search {
  position: relative;
  width: 400px;
}

.form-control::placeholder {
  color: #9aa1d0 !important;
}

.form-control {
  border: 1px solid #9aa1d0 !important;
}

.quotation-search input {
  border-radius: 8px;
  padding-left: 15px;
  color: #9aa1d0 !important;
}

.quotation-search i {
  position: absolute;
  right: 10px;
  top: 9px;
  color: #4455cc;
}

/* Scroll only inside table container */
.quotation-table-container {
  border: 1px solid #e4e6ef;
  border-radius: 12px;
  overflow-y: auto;
  /* vertical scroll enabled */
  overflow-x: auto;
  /* horizontal scroll enabled */
  background-color: #fff;
  width: 100%;
  flex: 1;
  min-height: 0;
  /* important to prevent overflow issue */
  white-space: nowrap;
  /* prevents table wrapping, enables horizontal scroll */
}

/* Optional custom scrollbar */
.quotation-table-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.quotation-table-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.quotation-table-container::-webkit-scrollbar-thumb:hover {
  background: #999;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

th {
  background-color: #f9fafc;
  font-weight: 600;
  color: #333;
  position: sticky;
  top: 0;
  z-index: 2;
  cursor: pointer;
}

.sort-icon {
  margin-left: 6px;
  color: #ffffff;
  font-size: 12px;
}

tr:hover td {
  background-color: #f8f9fc;
}

/* Dropdown custom style */
.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  margin-top: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dropdown-menu.show {
  display: block;
}

/* Alternate row colors */
#quotationTable tbody tr:nth-child(odd) {
  background-color: #f7f7f7;
}

#quotationTable tbody tr:nth-child(even) {
  background-color: #fcfcfc;
}

/* Keep hover effect */
#quotationTable tbody tr:hover td {
  background-color: #f8f9fc;
}

/* ******************************QUATATION TRACKER end ************************************************ */

/* ******************************POPI start ************************************************ */
/* ******************************POPI start ************************************************ */

.popi-container {
  width: 100%;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 16px;
  height: calc(87vh - 200px);
  display: flex;
  flex-direction: column;
}

.popi-header {
  text-align: center;
  margin-bottom: 20px;
}

.popi-header h2 {
  font-weight: 600;
  font-size: 26px;
  margin-bottom: 5px;
}

.popi-header p {
  font-size: 14px;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}




.popi-controls {
  display: flex;
  justify-content: end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding-left: 16px;
  padding-right: 16px;
}

.btn-light-custom {
  background-color: #f8f9fc;
  border: 1px solid #4455cc;
  color: #4455cc;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 14px;
}

.popi-search {
  position: relative;
  width: 400px;
}

.form-control::placeholder {
  color: #9aa1d0 !important;
}

.form-control {
  border: 1px solid #9aa1d0 !important;
}

.popi-search input {
  border-radius: 8px;
  padding-left: 15px;
  color: #9aa1d0 !important;
}

.popi-search i {
  position: absolute;
  right: 10px;
  top: 9px;
  color: #4455cc;
}

.popi-table-container {
  border: 1px solid #e4e6ef;
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: auto;
  background-color: #fff;
  width: 100%;
  flex: 1;
  min-height: 0;
  white-space: nowrap;
}

.popi-table-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.popi-table-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.popi-table-container::-webkit-scrollbar-thumb:hover {
  background: #999;
}

th{
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.application {
  background-color:  #97c2e6;
  color: black;
}
.new{
  background-color: #97d9cc;
  color: black;
}
.email{
  background-color: #92d14e;
  color: black;

}
.zoho{
  background-color:  #fdda66;
  color: black;
}
.manual{
  background-color:  #000;
  color: #fff;
}

th {
  background-color: #4455cc;
  font-weight: 600;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 2;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
}

td.description {
  max-width: 300px; /* Approximate width for ~15 words, adjust as needed */
  white-space: nowrap; /* Keep text on a single line */
  overflow: hidden;
  text-overflow: ellipsis; /* Show ... after truncation */
}

.sort-icon {
  margin-left: 6px;
  color: #ffffff;
  font-size: 12px;
}

.sort-icon.active {
  margin-left: 6px;
  color: #000000;
  font-size: 12px;
}
tr:hover td {
  background-color: #f8f9fc;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  margin-top: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dropdown-menu.show {
  display: block;
}

/* Alternate row colors */
#popiTable tbody tr:nth-child(odd) {
  background-color: #f7f7f7;
}

#popiTable tbody tr:nth-child(even) {
  background-color: #fcfcfc;
}

#popiTable tbody tr:hover td {
  background-color: #f8f9fc;
}

/* ******************************POPI end ************************************************ */

/* ******************************POPI end ************************************************ */

/* ******************************USER start ************************************************ */
.manage-role-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.manage-role-box {
  text-align: center;
  max-width: 100%;
  width: 100%;
}

.manage-role-box h1 {
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 2rem;
}

.manage-role-box p {
  line-height: 1.6;
  font-size: 14px;
  color: #666;
  max-width: 700px;
  margin: 0 auto 30px auto;
  text-align: center;
}

.role-btn-group .nav-link {
  border-radius: 12px;
  font-weight: 500;
  padding: 10px 22px;
  font-size: 0.95rem;
  border: 1px solid #d7dcff;
  color: #5a6efc;
  transition: all 0.25s ease;
}

.role-btn-group .nav-link:hover {
  background-color: rgba(90, 110, 252, 0.1);
}

/* .role-btn-group .nav-link.active {
  background-color: #e5e8ff;
  border-color: #cdd1ff;
  color: #3d4dfc;
} */

.role-btn-group .nav-link.active {
    background-color: #4455cc;
    border-color: #4455cc;
    color: #fff;
}
.tab-content {
  margin-top: 25px;
  border-radius: 12px;
  padding: 25px;
  text-align: left;
}

.card {
  border-radius: 12px;
  overflow-x: auto;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

/* ✅ Dynamic table layout */
.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.table th {
  text-align: center;
  padding: 10px;
  vertical-align: middle;
  word-wrap: break-word;
  white-space: nowrap;
}


.table td {
  text-align: leftw;
  padding: 10px;
  vertical-align: middle;
  word-wrap: break-word;
  white-space: nowrap;
}




.table th {
  color: #ffffff;
  font-weight: 600;
  background-color: #4455cc;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Independent width control */
.manage-role-table th:nth-child(1) {
  width: 60px;
}

/* Narrow delete and edit columns in Manage Role table only */
.manage-role-table th:nth-child(3),
.manage-role-table th:nth-child(4),
.manage-role-table td:nth-child(3),
.manage-role-table td:nth-child(4) {
  width: 70px;
  text-align: center;
}

.fa-pen,
.fa-trash,
.fa-key,
.fa-edit {
  cursor: pointer;
  color: #5a5ae6;
}

.fa-pen:hover,
.fa-trash:hover,
.fa-key:hover,
.fa-edit:hover {
  color: #3434aa;
}

.user-height {
  height: calc(85vh - 200px);
  overflow-y: auto;
  background-color: white;
}

.user-height::-webkit-scrollbar {
  width: 8px;
}

.user-height::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

.user-height::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}


/* New User popup styles (from user-provided design) */
.modal-background{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.swal2-container {
  z-index: 11000 !important;
}
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.register-container {
  max-width: 700px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 40px 50px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  animation: popupFade 0.3s ease;
}
@keyframes popupFade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  background: #f1f1f1;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  border: none;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.register-container h2 { font-size: 32px; font-weight: 600; margin-bottom: 8px; }
.register-container p { color: #555; font-size: 14px; line-height: 1.5; margin-bottom: 30px; }
.form-section { margin-top: 10px; }
.form-section h4 { font-weight: 500; font-size: 16px; margin-bottom: 12px; }
.form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.form-row input { width: 100%; padding: 12px 16px; border: 1px solid #d0d5ff; border-radius: 8px; font-size: 15px; outline: none; transition: border-color 0.2s ease; }
.form-row input:focus { border-color: #5a5cf0; }
.btn-group { display: flex; justify-content: flex-end; gap: 12px; margin-top: 25px; }
.btn { padding: 10px 26px; border-radius: 8px; font-size: 15px; cursor: pointer; border: none; transition: 0.2s ease; }
.btn-cancel { background: #f8f8ff; color: #5a5cf0; }
.btn-cancel:hover { background: #ebeaff; }
.btn-apply { background: #5a5cf0; color: #fff; }
.btn-apply:hover { background: #e5e8ff;  color: #4848d9;}
@media (max-width: 600px) { .form-row { flex-direction: column; } }

/* Role modal styles */
.role-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}
.role-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.role-modal .modal-content.custom-modal {
  position: relative;
  z-index: 1060;
  max-width: 730px;
  margin: 16px;
}

/* small accessibility focus ring removal for custom close button */
.focus-ring-0:focus { outline: none; box-shadow: none; }

.btn-secondary {
  color: #4455cc;
}


#resetPassOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}





.quotationTable th {
  text-align: center;
}



/* loader
 */

/* --------------------------
   FULL SCREEN OVERLAY
---------------------------*/
#overlayLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65); /* dark overlay */
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* --------------------------
   LOADER CORE ANIMATION
---------------------------*/
@property --p {
    syntax: "<integer>";
    initial-value: 0;
    inherits: true;
}

.loader {
    --p: 0;
    clip-path: circle(49%);
    animation: p 15s steps(100) infinite;
    color: hsl(calc(var(--p) * 2), 100%, 65%);
    display: grid;
}

.loader:before,
.loader:after {
    grid-row: 1;
    grid-column: 1;
}

.loader:before {
    border: solid 2em transparent;
    padding: 5em;
    border-radius: 50%;
    box-shadow: inset 0 0 0 0.5em currentcolor;

    --slice: calc(360deg / var(--n));
    --s-gap: calc(var(--f) * var(--slice));
    --solid: calc((1 - var(--f)) * var(--slice));

    background: repeating-conic-gradient(
        from calc(0.5 * var(--s-gap)),
        currentcolor 0% var(--solid),
        transparent 0% var(--slice)
    ) border-box;

    filter: blur(0.5px);

    mask: 
        conic-gradient(red 0% calc(var(--p) * 1%), rgba(255, 0, 0, 0.3) 0%) intersect,
        linear-gradient(red, red) border-box subtract,
        radial-gradient(
            red 0% 5.5em,
            transparent calc(5.5em + 1px) calc(5.75em - 1px),
            red 5.75em calc(6em + 1px),
            transparent calc(6em + 2px)
        );

    content: "";
}

.loader:after {
    place-self: center;
    counter-reset: p var(--p);
    font: 2rem consolas, monaco, ubuntu mono, monospace;
    content: counter(p) "%";
}

@keyframes p {
    90%, 100% {
        --p: 100;
    }
}
