/* ==========================================================
   PAGE HEADER
========================================================== */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;

  h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
  }

  p {
    margin-top: .45rem;
    color: #6b7280;
    font-size: .95rem;
    max-width: 520px;
    line-height: 1.6;
  }
}

/*==========================================================
BUTTON
==========================================================*/

.page-header .btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;

  padding: .9rem 1.4rem;

  border: none;
  border-radius: 12px;

  background: #ffcc00;
  color: #fff;

  font-weight: 900;
  font-size: .95rem;

  cursor: pointer;

  transition: .25s ease;
}

.page-header .btn i {
  font-size: 18px;
}

.page-header .btn:hover {
  background: #03113a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37,99,235,.25);
  transition: .3s ease-in-out;
}

/* ==========================================================
   CATEGORY STATS
========================================================== */

.category-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  position: relative;

  background: #ffffff;

  border-radius: 18px;

  padding: 1.5rem;

  border: 1px solid #eef2f7;

  overflow: hidden;

  transition: .3s ease;

  box-shadow:
    0 10px 35px rgba(15,23,42,.05);
}

.stat-card::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;

  width: 5px;
  height: 100%;

  background: #2563eb;
}

.stat-card:hover {
  transform: translateY(-6px);

  box-shadow:
      0 20px 45px rgba(15,23,42,.10);
}

.stat-card span {
  display: block;

  font-size: .85rem;

  font-weight: 500;

  color: #64748b;

  margin-bottom: .9rem;

  text-transform: uppercase;

  letter-spacing: .8px;
}

.stat-card h3 {
  margin: 0;

  font-size: 2.2rem;

  font-weight: 700;

  color: #0f172a;

  line-height: 1;
}

/*==========================================================
Different Accent Colors
==========================================================*/

.stat-card:nth-child(1)::before {
  background: #2563eb;
}

.stat-card:nth-child(2)::before {
  background: #16a34a;
}

.stat-card:nth-child(3)::before {
  background: #f97316;
}

.stat-card:nth-child(4)::before {
  background: #7c3aed;
}

/*==========================================================
Small label under numbers
==========================================================*/

.stat-card::after {
  content: "";

  position: absolute;

  right: -20px;
  bottom: -20px;

  width: 90px;
  height: 90px;

  border-radius: 50%;

  background: rgba(37,99,235,.05);
}

/*==========================================================
Responsive
==========================================================*/

@media (max-width:1200px){

  .category-stats{
      grid-template-columns:repeat(2,1fr);
  }

}

@media (max-width:768px){

  .page-header{

      flex-direction:column;

      align-items:flex-start;

      gap:1rem;

  }

  .page-header .btn{

      width:100%;

      justify-content:center;

  }

  .category-stats{

      grid-template-columns:1fr;

  }

  .page-header h2{

      font-size:1.7rem;

  }

  .stat-card{

      padding:1.3rem;

  }

  .stat-card h3{

      font-size:2rem;

  }

}


/*==========================================================
TOOLBAR
==========================================================*/

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.search-box i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 52px;

  padding: 0 18px 0 50px;

  border: 1px solid #dbe4ee;
  border-radius: 14px;

  background: #fff;

  font-size: .95rem;
  color: #0f172a;

  transition: all .25s ease;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-input:focus {
  outline: none;

  border-color: #2563eb;

  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}

/*==========================================================
TABLE
==========================================================*/

.table-card {
  background: #fff;

  border-radius: 18px;

  overflow: hidden;

  border: 1px solid #edf2f7;

  box-shadow: 0 10px 35px rgba(15, 23, 42, .05);

  margin-bottom: 2rem;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card thead {
  background: #f8fafc;
}

.table-card th {
  padding: 18px 22px;

  text-align: left;

  font-size: .85rem;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: .6px;

  color: #64748b;

  white-space: nowrap;

  border-bottom: 1px solid #e2e8f0;
}

.table-card td {
  padding: 20px 22px;

  vertical-align: middle;

  border-bottom: 1px solid #f1f5f9;

  color: #334155;

  font-size: .95rem;
}

.table-card tbody tr {
  transition: .25s ease;
}

.table-card tbody tr:hover {
  background: #f8fbff;
}

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

/*==========================================================
CATEGORY COLUMN
==========================================================*/

.category-name {
  display: flex;
  align-items: center;
  gap: 15px;
}

.avatar {
  width: 48px;
  height: 48px;

  border-radius: 50%;

  background: linear-gradient(135deg, #eb7125, #ffcc00);

  color: #fff;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 1.1rem;
  font-weight: 700;

  flex-shrink: 0;
}

.category-name h5 {
  margin: 0;
  font-size: .98rem;
  color: #111827;
}

.category-name small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
}

/*==========================================================
BLOG COUNT
==========================================================*/

.blog-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 42px;
  height: 32px;

  padding: 0 14px;

  background: #eff6ff;

  color: #2563eb;

  border-radius: 100px;

  font-weight: 600;
}

/*==========================================================
STATUS
==========================================================*/

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 90px;

  padding: .45rem 1rem;

  border-radius: 100px;

  font-size: .8rem;

  font-weight: 600;
}

.status.active {
  background: #dcfce7;
  color: #15803d;
}

.status.inactive {
  background: #fee2e2;
  color: #dc2626;
}

/*==========================================================
ACTIONS
==========================================================*/

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}

.icon-btn {
  width: 40px;
  height: 40px;

  border: none;

  border-radius: 12px;

  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  transition: .25s ease;

  font-size: 18px;
}

.icon-btn.edit {
  background: #eff6ff;
  color: #2563eb;
}

.icon-btn.edit:hover {
  background: #2563eb;
  color: #fff;
}

.icon-btn.delete {
  background: #fef2f2;
  color: #dc2626;
}

.icon-btn.delete:hover {
  background: #dc2626;
  color: #fff;
}

/*==========================================================
EMPTY STATE
==========================================================*/

.empty-state {
  padding: 70px 20px;

  text-align: center;
}

.empty-state img {
  width: 180px;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  margin-bottom: .5rem;
  color: #0f172a;
}

.empty-state p {
  color: #64748b;
  margin-bottom: 1.5rem;
}

/*==========================================================
PAGINATION
==========================================================*/

.pagination-wrapper {
  display: flex;
  justify-content: flex-end;
  gap: .8rem;
}

.pagination-wrapper button {
  padding: .8rem 1.4rem;

  border-radius: 12px;

  border: 1px solid #dbe4ee;

  background: #fff;

  color: #334155;

  font-weight: 600;

  cursor: pointer;

  transition: .25s ease;
}

.pagination-wrapper button:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/*==========================================================
RESPONSIVE TABLE
==========================================================*/

@media (max-width: 992px) {

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .table-card {
    overflow-x: auto;
  }

  .table-card table {
    min-width: 950px;
  }

}

@media (max-width: 768px) {

  .avatar {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .category-name h5 {
    font-size: .9rem;
  }

  .table-card td,
  .table-card th {
    padding: 16px;
  }

  .pagination-wrapper {
    justify-content: center;
  }

}



/*==========================================================
MODAL BACKDROP
==========================================================*/

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 2rem;

  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(6px);

  animation: fadeIn .25s ease;
}

/*==========================================================
CREATE / EDIT MODAL
==========================================================*/

.modal-card {
  width: 100%;
  max-width: 650px;

  background: #fff;
  border-radius: 24px;

  overflow: hidden;

  box-shadow:
      0 25px 80px rgba(15,23,42,.18);

  animation: modalSlide .3s ease;
}

/*==========================================================
HEADER
==========================================================*/

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  padding: 28px 32px;

  border-bottom: 1px solid #edf2f7;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
}

.modal-header p {
  margin-top: .45rem;
  color: #64748b;
  font-size: .92rem;
  line-height: 1.6;
}

/*==========================================================
CLOSE BUTTON
==========================================================*/

.close-btn {
  width: 44px;
  height: 44px;

  border: none;
  border-radius: 12px;

  background: #f8fafc;

  display: flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;

  transition: .25s;
}

.close-btn i {
  font-size: 20px;
}

.close-btn:hover {
  background: #ef4444;
  color: white;
  transform: rotate(90deg);
}

/*==========================================================
FORM
==========================================================*/

.modal-card form {
  padding: 30px 32px;
}

.form-group {
  margin-bottom: 22px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;

  margin-bottom: .6rem;

  font-size: .9rem;
  font-weight: 600;

  color: #334155;
}

/*==========================================================
INPUTS
==========================================================*/

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;

  padding: 14px 16px;

  border: 1px solid #dbe4ee;
  border-radius: 14px;

  background: #fff;

  font-size: .95rem;

  color: #0f172a;

  transition: .25s;
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;

  border-color: #ffcc00;

  box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}

/*==========================================================
FOOTER
==========================================================*/

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;

  margin-top: 35px;

  padding-top: 24px;

  border-top: 1px solid #edf2f7;
}

/*==========================================================
BUTTONS
==========================================================*/

.modal-footer .btn {
  min-width: 150px;
  height: 48px;

  border-radius: 12px;

  font-weight: 600;

  transition: .25s;
}

.btn-light {
  background: #fff;
  color: #475569;
  border: 1px solid #dbe4ee;
}

.btn-light:hover {
  background: #f8fafc;
}

.btn-primary {
  background: #ffcc00;
  color: white;
  border: none;
}

.btn-primary:hover {
  background: #cfad26;
}

.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/*==========================================================
DELETE MODAL
==========================================================*/

.delete-card {
  width: 100%;
  max-width: 480px;

  background: white;

  border-radius: 24px;

  padding: 40px;

  text-align: center;

  box-shadow:
      0 25px 80px rgba(15,23,42,.18);

  animation: modalSlide .3s ease;
}

/*==========================================================
DELETE ICON
==========================================================*/

.delete-icon {
  width: 90px;
  height: 90px;

  margin: 0 auto 1.5rem;

  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;

  background: #fef2f2;

  color: #dc2626;
}

.delete-icon i {
  font-size: 42px;
}

/*==========================================================
DELETE TEXT
==========================================================*/

.delete-card h3 {
  margin-bottom: 1rem;

  color: #0f172a;

  font-size: 1.5rem;
}

.delete-card p {
  margin-bottom: .8rem;

  color: #64748b;

  line-height: 1.7;
}

.delete-card strong {
  color: #0f172a;
}

.warning {
  color: #dc2626 !important;
  font-weight: 600;
}

/*==========================================================
DELETE BUTTONS
==========================================================*/

.delete-actions {
  display: flex;
  justify-content: center;
  gap: 14px;

  margin-top: 2rem;
}

.delete-actions .btn {
  min-width: 150px;
  height: 48px;

  border-radius: 12px;

  font-weight: 600;
}

.btn-danger {
  background: #dc2626;
  color: white;
  border: none;

  transition: .25s;
}

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

/*==========================================================
ANIMATIONS
==========================================================*/

@keyframes fadeIn {

  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

@keyframes modalSlide {

  from {
    opacity: 0;
    transform: translateY(25px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

}

/*==========================================================
RESPONSIVE
==========================================================*/

@media (max-width:768px) {

  .modal-backdrop {
    padding: 1rem;
  }

  .modal-card,
  .delete-card {
    max-width: 100%;
    border-radius: 20px;
  }

  .modal-header,
  .modal-card form {
    padding: 24px;
  }

  .delete-card {
    padding: 28px;
  }

  .modal-footer,
  .delete-actions {
    flex-direction: column-reverse;
  }

  .modal-footer .btn,
  .delete-actions .btn {
    width: 100%;
  }

  .delete-icon {
    width: 72px;
    height: 72px;
  }

  .delete-icon i {
    font-size: 32px;
  }

}

.ellipsis {
  max-width: 250px; /* adjust as needed */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
