/* =========================================================================
   CMS Desa Marga Mulya - Modern Administrative Stylesheet
   Mengikuti tema situs: Inter + Young Serif, kabut hijau, tinta hutan, aksen padi.
   ========================================================================= */

:root {
  --canvas:       #FBFCF7;
  --subtle:       #F2F6EA;
  --ink:          #14301F;
  --secondary:    #3E5446;
  --tertiary:     #66796D;
  --line:         #DDE4D3;
  --padi:         #2E7D4F;
  --padi-gelap:   #1B5434;
  --air:          #2B8A96;
  --desa-green:   #1B5434;
  --desa-dark:    #14301F;
}

html {
  font-size: 16.5px;
}

@media (max-width: 1023px), (hover: none) {
  body {
    background-attachment: scroll !important;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #C3CDB8;
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #8FA096;
}

/* Form inputs & controls enhancement */
.cms-input,
.cms-select,
.cms-textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #DDE4D3;
  background-color: #FFFFFF;
  padding: 0.72rem 0.95rem;
  font-size: 0.96rem;
  line-height: 1.4rem;
  color: #14301F;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.cms-input:focus,
.cms-select:focus,
.cms-textarea:focus {
  outline: none;
  border-color: #2E7D4F;
  box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.18);
}

.cms-input::placeholder,
.cms-textarea::placeholder {
  color: #8FA096;
}

/* Data Table Utilities */
.cms-table-wrapper {
  background: #FFFFFF;
  border: 1px solid #DDE4D3;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.cms-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.cms-table th {
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #66796D;
  background-color: #F7F9F2;
  border-bottom: 1px solid #DDE4D3;
  white-space: nowrap;
}

.cms-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #EEF3E4;
  color: #14301F;
  vertical-align: middle;
}

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

.cms-table tr:hover td {
  background-color: #F7F9F2;
}

/* Status Badges */
.cms-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.cms-badge--terbit,
.cms-badge--aktif,
.cms-badge--sukses {
  background-color: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.cms-badge--draf,
.cms-badge--menunggu {
  background-color: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.cms-badge--netral {
  background-color: #EEF3E4;
  color: #3E5446;
  border: 1px solid #DDE4D3;
}

/* Card hover tactile feedback */
.cms-card {
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1), border-color 0.2s ease;
}
.cms-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

/* Truncate clamps */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Button tactile active state */
button:active, .button-press:active {
  transform: scale(0.97);
}

/* Judul memakai Young Serif seperti di situs (satu bobot saja) */
.font-display { font-weight: 400 !important; letter-spacing: -0.012em; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--air); outline-offset: 2px; }
.cms-card { border-radius: 1.25rem; }
