﻿

/* =========================================================
   SAMMY MEDIA KE
   COMPONENTS STYLESHEET
   ========================================================= */

/* =========================================================
   1. DASHBOARD LAYOUT
   ========================================================= */

.dashboard-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  background: #F5F5F5;
}

.dashboard-sidebar {
  background: #111111;
  color: #FFFFFF;
  min-height: 100vh;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 900;
}

.dashboard-sidebar .brand-name {
  color: #FFFFFF;
}

.dashboard-sidebar .brand-tagline {
  color: #BBBBBB;
}

.dashboard-sidebar .brand {
  padding: 0 10px 25px;
}

.dashboard-sidebar nav {
  display: grid;
  gap: 5px;
}

.sidebar-section-title {
  color: #999999;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 20px 12px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #CCCCCC;
  padding: 11px 12px;
  border-radius: 6px;
  font-size: .83rem;
  font-weight: 600;
  transition: all .2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: #282828;
  color: #D4AF37;
}

.sidebar-link.active {
  border-left: 3px solid #D4AF37;
}

.dashboard-main {
  min-width: 0;
  padding: 28px;
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: #FFFFFF;
  padding: 17px 22px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  margin-bottom: 28px;
}

.dashboard-topbar h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.35rem;
}

.dashboard-topbar p {
  margin: 4px 0 0;
  color: #777777;
  font-size: .8rem;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #D4AF37;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.dashboard-user-name {
  font-size: .83rem;
  font-weight: 700;
}

.dashboard-user-role {
  color: #777777;
  font-size: .72rem;
}

/* =========================================================
   2. DASHBOARD STATISTICS
   ========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: #FFFFFF;
  padding: 22px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  min-width: 0;
}

.stat-card-label {
  color: #777777;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.stat-card-value {
  font-size: 1.8rem;
  line-height: 1.2;
  font-weight: 800;
  color: #111111;
  overflow-wrap: anywhere;
}

.stat-card-description {
  color: #888888;
  font-size: .73rem;
  margin-top: 10px;
}

.stat-card.gold {
  border-top: 3px solid #D4AF37;
}

.stat-card.success {
  border-top: 3px solid #18864B;
}

.stat-card.warning {
  border-top: 3px solid #B77B13;
}

.stat-card.danger {
  border-top: 3px solid #C83232;
}

/* =========================================================
   3. DASHBOARD CONTENT PANELS
   ========================================================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.dashboard-panel {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  min-width: 0;
}

.dashboard-panel.full-width {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.panel-heading h2,
.panel-heading h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  margin: 0;
}

.panel-heading p {
  color: #777777;
  font-size: .78rem;
  margin: 4px 0 0;
}

/* =========================================================
   4. DATA TABLES
   ========================================================= */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: #FFFFFF;
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
  font-size: .82rem;
}

.data-table th {
  background: #F6F6F6;
  color: #555555;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: left;
  padding: 14px 16px;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-top: 1px solid #EEEEEE;
  color: #444444;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #FAFAFA;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* =========================================================
   5. DASHBOARD FORMS
   ========================================================= */

.dashboard-form {
  display: grid;
  gap: 16px;
}

.dashboard-form .form-group {
  margin-bottom: 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.form-control:disabled {
  background: #EEEEEE;
  cursor: not-allowed;
}

/* =========================================================
   6. BADGES AND STATUS
   ========================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 30px;
  font-size: .69rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-gold {
  background: #FFF5D6;
  color: #87650C;
}

.badge-green {
  background: #E4F5EA;
  color: #167343;
}

.badge-red {
  background: #FCE9E9;
  color: #B52D2D;
}

.badge-blue {
  background: #E8F1FC;
  color: #275D9B;
}

.badge-grey {
  background: #EEEEEE;
  color: #555555;
}

/* =========================================================
   7. MODALS
   ========================================================= */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, .65);
  padding: 20px;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: min(600px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}

.modal-header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  color: #777777;
  padding: 5px;
}

/* =========================================================
   8. DROPDOWNS
   ========================================================= */

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .13);
  padding: 8px;
  z-index: 1200;
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a,
.dropdown-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #333333;
  font-size: .82rem;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: #F5F5F5;
  color: #A78318;
}

/* =========================================================
   9. TABS
   ========================================================= */

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 22px;
}

.tab-button {
  border: 0;
  background: transparent;
  color: #777777;
  padding: 12px 16px;
  font-weight: 700;
  font-size: .82rem;
  border-bottom: 3px solid transparent;
}

.tab-button.active {
  color: #111111;
  border-bottom-color: #D4AF37;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* =========================================================
   10. ACCORDIONS
   ========================================================= */

.accordion {
  background: #FFFFFF;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 20px;
  background: #FFFFFF;
  border: 0;
  text-align: left;
  font-weight: 700;
}

.accordion-content {
  display: none;
  padding: 0 20px 18px;
  color: #666666;
}

.accordion.open .accordion-content {
  display: block;
}

/* =========================================================
   11. TOAST NOTIFICATIONS
   ========================================================= */

.sammy-toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 3000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 32px));
}

.sammy-toast {
  padding: 14px 18px;
  border-radius: 7px;
  background: #222222;
  color: #FFFFFF;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .2);
  font-size: .84rem;
  cursor: pointer;
  animation: toast-enter .25s ease;
}

.sammy-toast-success {
  border-left: 4px solid #18864B;
}

.sammy-toast-error {
  border-left: 4px solid #C83232;
}

.sammy-toast-info {
  border-left: 4px solid #D4AF37;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   12. NOTIFICATIONS
   ========================================================= */

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #EEEEEE;
}

.notification-item.unread {
  background: #FFFCF1;
  border-left: 3px solid #D4AF37;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  margin-bottom: 5px;
}

.notification-content p {
  color: #777777;
  font-size: .8rem;
  margin: 0;
}

/* =========================================================
   13. EDITORIAL QUEUE AND ARTICLE PREVIEWS
   ========================================================= */

.article-queue {
  display: grid;
  gap: 15px;
}

.queue-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px;
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #EEEEEE;
}

.queue-item h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  margin-bottom: 6px;
}

.queue-item p {
  color: #777777;
  font-size: .8rem;
  margin: 0;
}

.queue-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* =========================================================
   14. PROFILE AND AVATAR
   ========================================================= */

.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #FFFFFF;
  padding: 25px;
  border-radius: 10px;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  background: #F0E7C8;
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: #111111;
}

/* =========================================================
   15. SWITCHES AND CHECKBOXES
   ========================================================= */

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #EEEEEE;
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-label {
  font-weight: 700;
  font-size: .85rem;
}

.setting-description {
  display: block;
  color: #888888;
  font-size: .75rem;
  margin-top: 4px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 25px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #CCCCCC;
  border-radius: 30px;
  transition: .2s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 3px;
  bottom: 3px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: .2s;
}

.switch input:checked + .switch-slider {
  background: #D4AF37;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(21px);
}

.switch input:focus-visible + .switch-slider {
  outline: 3px solid #B99523;
  outline-offset: 3px;
}

/* =========================================================
   16. CHART CONTAINERS
   ========================================================= */

.chart-container {
  width: 100%;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 15px;
  color: #777777;
  font-size: .76rem;
}

/* =========================================================
   17. PAGINATION
   ========================================================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.pagination button,
.pagination a {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #DDDDDD;
  border-radius: 5px;
  background: #FFFFFF;
  color: #333333;
  font-size: .8rem;
  font-weight: 700;
}

.pagination button.active,
.pagination a.active {
  background: #111111;
  border-color: #111111;
  color: #D4AF37;
}

/* =========================================================
   18. SEARCH AND FILTER TOOLBAR
   ========================================================= */

.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-control {
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #DDDDDD;
  background: #FFFFFF;
  border-radius: 5px;
  font-size: .8rem;
}

/* =========================================================
   19. PROGRESS BARS
   ========================================================= */

.progress {
  height: 9px;
  width: 100%;
  overflow: hidden;
  background: #EEEEEE;
  border-radius: 20px;
}

.progress-bar {
  height: 100%;
  background: #D4AF37;
  border-radius: inherit;
  transition: width .3s ease;
}

/* =========================================================
   20. IMAGE UPLOAD
   ========================================================= */

.upload-area {
  border: 2px dashed #CCCCCC;
  border-radius: 8px;
  padding: 30px 20px;
  background: #FAFAFA;
  text-align: center;
  transition: border-color .2s ease;
}

.upload-area:hover {
  border-color: #D4AF37;
}

.upload-area p {
  color: #777777;
  font-size: .82rem;
}

.upload-preview {
  max-width: 100%;
  max-height: 240px;
  margin: 15px auto 0;
  border-radius: 8px;
  object-fit: contain;
}

/* =========================================================
   21. ACCESS DENIED
   ========================================================= */

.access-denied {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
  text-align: center;
}

.access-denied-content {
  max-width: 480px;
}

.access-denied h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.access-denied p {
  color: #777777;
}

/* =========================================================
   22. RESPONSIVE DASHBOARDS
   ========================================================= */

@media (max-width: 1100px) {
  .dashboard-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-row-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 14px;
  }

  .dashboard-sidebar .brand {
    padding-bottom: 12px;
  }

  .dashboard-sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 5px;
  }

  .sidebar-section-title {
    display: none;
  }

  .sidebar-link {
    flex-shrink: 0;
    padding: 9px 12px;
  }

  .dashboard-main {
    padding: 18px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel.full-width {
    grid-column: auto;
  }

  .dashboard-topbar {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .dashboard-main {
    padding: 12px;
  }

  .dashboard-topbar {
    padding: 15px;
    flex-direction: column;
  }

  .dashboard-topbar h1 {
    font-size: 1.1rem;
  }

  .dashboard-user {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card-value {
    font-size: 1.35rem;
  }

  .dashboard-panel {
    padding: 16px;
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .queue-item {
    flex-direction: column;
  }

  .profile-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal {
    padding: 20px;
  }

  .filter-toolbar {
    align-items: stretch;
  }

  .filter-group {
    width: 100%;
  }

  .filter-control {
    flex: 1;
    min-width: 0;
  }
}

/* =========================================================
   23. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .sammy-toast,
  .progress-bar,
  .switch-slider,
  .switch-slider::before {
    animation: none !important;
    transition: none !important;
  }
}