@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");
* {
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
  margin: 0;
  padding: 0;
}
body {
  background: #e5e7eb;
  display: flex;
  position: relative;
  width: 100%;
}
.d-none {
  display: none !important;
}
#menu {
  background: #111827;
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  width: 270px;
}
#menu .logo {
  align-items: center;
  color: #fff;
  display: flex;
  padding: 30px 0 0 30px;
}
#menu .logo img {
  margin-right: 15px;
  width: 40px;
}
#menu .items li {
  list-style: none;
  padding: 14px 0;
  transition: 0.3s ease;
}
#menu .items li a {
  display: block;
  width: 100%;
}
#menu .items li:hover {
  background: #253047;
  cursor: pointer;
}
.active-tab {
  background-color: #17233c93;
  border-left: 7px solid #fff;
}
#menu .items li i {
  color: #868d97;
  font-size: 14px;
  height: 30px;
  line-height: 30px;
  margin: 0 10px 0 25px;
  text-align: center;
  width: 30px;
}
#menu .items li:hover a,
#menu .items li:hover i {
  color: #f3f4f6;
}
#menu .items li a {
  color: #868d97;
  font-weight: 300px;
  text-decoration: none;
  transition: 0.3s ease;
}

#menu .items li a:hover {
  color: #f3f4f6;
}

#menu .items li:has(a[style*="color"]) {
  opacity: 0.7;
}

#menu .items li:has(a[style*="color"]):hover {
  opacity: 1;
}
#message-box {
  z-index: 2700;
}
#toast-message {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}
.success-toast {
  background: #2ca83a;
}
#toast-type {
  text-align: left;
}
.error-toast {
  background: #c91c10;
}
.show-toast {
  opacity: 1 !important;
}
#interface {
  margin-left: 270px;
  position: relative;
  width: calc(100% - 270px);
  padding-bottom: 50px;
}
#interface .navigation {
  align-items: center;
  background: #fff;
  border-bottom: 3px solid #594ef7;
  display: flex;
  justify-content: space-between;
  padding: 15px 30px;
  position: fixed;
  top: 0;
  z-index: 1000;
  width: calc(100% - 270px);
}
#interface .navigation .search {
  align-items: center;
  border-radius: 4px;
  display: flex;
  justify-content: flex-start;
  padding: 10px 14px;
}
#interface .navigation .search i {
  margin-right: 14px;
}
#interface .navigation .search input {
  border: none;
  font-size: 14px;
  outline: none;
}
.n1 {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}
#menu-btn,
.n1 {
  align-items: center;
}
#menu-btn {
  color: #2b2b2b;
  cursor: pointer;
  display: none;
  font-size: 20px;
}
.i-name {
  color: #444a53;
  font-size: 24px;
  font-weight: 700;
  padding: 30px 30px 0;
  margin-top: 90px; /* Space for fixed navigation header */
}

/* Remove margin-top when app-switcher is present (dashboard pages) */
.app-switcher-card ~ .i-name {
  margin-top: 30px;
}
.values {
  flex-wrap: wrap;
  justify-content: space-between;
  width: 95%;
  margin: 0 auto 30px;
}
.values,
.values .val-box {
  align-items: center;
  display: flex;
}
.values .val-box {
  background: #fff;
  border-radius: 5px;
  justify-content: flex-start;
  padding: 16px 20px;
  width: 23.5%;
}
.values .val-box:first-child i {
  background-color: #7874ce;
}
.values .val-box:nth-child(2) i {
  background-color: #5cbaf0;
}
.values .val-box:nth-child(3) i {
  background-color: #e45d99;
}
.values .val-box:nth-child(4) i {
  background-color: #74daec;
}
.values .val-box i {
  align-items: center;
  background: #7fff00;
  border-radius: 50px;
  color: #fff;
  display: flex;
  font-size: 20px;
  height: 50px;
  justify-content: center;
  margin-right: 10px;
  width: 50px;
}
.values .val-box h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 0;
}
.values .val-box span {
  color: #828997;
}
.board {
  background: #fff;
  border-radius: 8px;
  height: 490px;
  overflow: auto;
  width: 95%;
  margin: 30px auto 30px;
  padding-bottom: 20px;
}
.board img {
  border-radius: 50%;
  height: 20px;
  margin-right: 15px;
  -o-object-fit: cover;
  object-fit: cover;
  width: 20px;
}
.board p {
  color: #787d8d;
  font-weight: 600;
}
table {
  border-collapse: collapse;
}
tr {
  border-bottom: 1px solid #eef0f3;
}
thead td {
  background-color: #f9fafb;
  font-size: 10px;
  font-weight: 400;
  padding: 15px;
  text-align: start;
  text-transform: uppercase;
}
tbody tr td {
  padding: 5px 15px;
}
.balance p {
  background-color: #d7fada;
  border-radius: 40px;
  color: #2b2b2b;
  display: inline-block;
  padding: 2px 10px;
}
@media (max-width: 769px) {
  .active-tab {
    border-left: 3px solid #fff;
  }
  #menu {
    left: -100%;
    position: fixed;
    width: 100%;
  }
  #menu.active {
    left: 0;
  }
  #menu-btn {
    display: initial;
  }
  #interface {
    display: inline-block;
    margin-left: 0;
    transition: 0.3s ease;
    width: 100%;
  }
  #menu.active ~ #interface {
    margin-left: 100%;
    transition: 0.3s ease;
    width: calc(100% - 270px);
  }
  #interface .navigation {
    width: 100%;
  }
  .values {
    justify-content: flex-start;
    padding: 30px 0 30px 30px;
  }
  .values .val-box {
    margin: 10px 20px 10px 0;
    padding: 16px 20px;
  }
  .board {
    overflow-x: auto;
    padding: 0;
    width: 91%;
  }
  table {
    border-collapse: collapse;
    width: 100%;
  }
}
@media (max-width: 477px) {
  #interface .navigation {
    padding: 15px;
  }
  #interface .navigation .search input {
    width: 150px;
  }
  .i-name {
    padding: 30px 15px 0;
  }
  .values {
    padding: 15px 15px 0;
  }
  .values .val-box {
    margin: 8px 0;
    width: 100%;
  }
  .board {
    margin: 30px 15px;
  }
}

/* DIALOG BOX */
.dialog-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 1050;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dialog-box {
  width: 90%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  padding: 25px;
  border-radius: 12px;
  color: #2b2b2b;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.dialog-box h3 {
  margin-bottom: 15px;
  color: #2b2b2b;
  font-weight: 600;
}

.dialog-box p {
  margin-bottom: 20px;
  color: #444a53;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.dialog-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s ease;
}

.dialog-btn-primary {
  background: #594ef7;
  color: white;
}

.dialog-btn-primary:hover {
  background: #4a42d6;
}

.dialog-btn-secondary {
  background: #e5e7eb;
  color: #2b2b2b;
}

.dialog-btn-secondary:hover {
  background: #d1d5db;
}

/* User Details Dialog Styles */
.dialog-content-large {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: dialogSlideIn 0.3s ease;
  position: relative;
  margin: auto;
}

@keyframes dialogSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.dialog-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.dialog-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.dialog-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dialog-body {
  padding: 25px;
}

.user-details-section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e0e0e0;
}

.user-details-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.user-details-section h4 {
  color: #2b2b2b;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-details-section h4 i {
  color: #594ef7;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  font-weight: 600;
  color: #666;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item span {
  color: #2b2b2b;
  font-size: 15px;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 14px;
}

.details-table thead {
  background: #f5f5f5;
}

.details-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #2b2b2b;
  border-bottom: 2px solid #e0e0e0;
}

.details-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
}

.details-table tbody tr:hover {
  background: #f9f9f9;
}

.details-table tbody tr:last-child td {
  border-bottom: none;
}

.btn-view,
.btn-delete {
  background: transparent;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  margin: 0 3px;
}

.btn-view {
  color: #594ef7;
}

.btn-view:hover {
  background: #f0edff;
}

.btn-delete {
  color: #dc3545;
}

.btn-delete:hover {
  background: #ffe6e6;
}

/* App Cards */
.app-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  margin: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: calc(33.333% - 30px);
  min-width: 280px;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #594ef7, #764ba2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.app-card:hover::before {
  transform: scaleX(1);
}

.app-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: #594ef7;
}

.app-card-icon {
  font-size: 56px;
  margin-bottom: 20px;
  color: white;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #594ef7 0%, #764ba2 100%);
  box-shadow: 0 4px 12px rgba(89, 78, 247, 0.3);
  transition: transform 0.3s ease;
}

.app-card:hover .app-card-icon {
  transform: scale(1.1) rotate(5deg);
}

.app-card h3 {
  color: #2b2b2b;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 600;
}

.app-card p {
  color: #828997;
  font-size: 14px;
  margin: 0 0 20px 0;
  line-height: 1.6;
}

.app-card-stats {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}

.app-card-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #594ef7;
  font-size: 13px;
  font-weight: 500;
}

.app-card-stats span i {
  font-size: 14px;
}

/* Mini App Cards for App Switcher */
.app-card-mini {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  width: calc(16.666% - 20px);
  min-width: 140px;
  border: 2px solid transparent;
  text-align: center;
}

.app-card-mini:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: #594ef7;
}

.app-card-active {
  border-color: #594ef7;
  background: #f8f9ff;
}

.app-card-icon-mini {
  font-size: 36px;
  margin: 0 auto 12px;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.app-card-mini:hover .app-card-icon-mini {
  transform: scale(1.1) rotate(5deg);
}

.app-card-mini h4 {
  color: #2b2b2b;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.app-switcher-card {
  background: #fff;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 90px;
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}

.apps-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 30px 0;
  padding: 0 30px;
}

/* Compact Row Layout for App Switcher */
.apps-grid-compact {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.app-card-compact {
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.app-card-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  border-color: #594ef7;
}

.app-card-compact.app-card-active {
  border-color: #594ef7;
  background: #f8f9ff;
}

.app-card-icon-compact {
  font-size: 20px;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.app-card-compact:hover .app-card-icon-compact {
  transform: scale(1.05);
}

.app-card-name {
  color: #2b2b2b;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1024px) {
  .apps-grid-compact {
    flex-wrap: wrap;
  }
  .app-card-compact {
    flex: 1 1 calc(33.333% - 10px);
    min-width: 140px;
  }
}

@media (max-width: 768px) {
  .app-card-compact {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 477px) {
  .apps-grid-compact {
    flex-direction: column;
  }
  .app-card-compact {
    width: 100%;
    flex: 1;
  }
}

@media (max-width: 768px) {
  .app-card {
    width: calc(50% - 30px);
    min-width: 240px;
  }
}

@media (max-width: 477px) {
  .app-card {
    width: 100%;
    margin: 10px 0;
    min-width: auto;
  }
  .apps-grid {
    padding: 0 15px;
  }
  .app-card-icon {
    width: 60px;
    height: 60px;
    font-size: 40px;
  }
  .app-card-mini {
    width: calc(50% - 20px);
    min-width: 120px;
  }
  .app-switcher-section {
    padding: 15px;
  }
}

/* Spinner Styles */
#spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 2300;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner-container {
  text-align: center;
  padding: 1rem 3rem;
  border-radius: 0.375rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.spinner-container p {
  color: #2b2b2b;
  font-size: 0.7rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #594ef7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Button Styles */
.btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s ease;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

.btn-primary {
  background: #594ef7;
  color: white;
}

.btn-primary:hover {
  background: #4a42d6;
}

.btn-danger {
  background: #c91c10;
  color: white;
}

.btn-danger:hover {
  background: #a0160c;
}

.btn-success {
  background: #2ca83a;
  color: white;
}

.btn-success:hover {
  background: #238a2e;
}

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

.text-center {
  text-align: center;
}

.text-success {
  color: #2ca83a;
}

.text-warning {
  color: #f59e0b;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
