/* =========================================================
   PTTP Global Styles
   ========================================================= */

:root {

  /* Page background */
  --bg-main: #f5f3ef;

  /* Panels / cards */
  --bg-panel: #ffffff;
  --bg-panel-hover: #f1efe9;
  --bg-input: #fbfaf7;

  /* Text */
  --text-main: #2f3437;
  --text-muted: #6b7280;

  /* Primary accent (slate blue) */
  --accent-primary: #4f6d7a;
  --accent-primary-hover: #3f5964;

  /* Secondary accent (earth green) */
  --accent-secondary: #6b8e73;

  /* Borders */
  --border-color: #e3dfd6;
  --border-strong: #cfc8ba;

  /* Alerts */
  --danger: #c05656;

  /* Shadows */
  --shadow-soft: 0 6px 16px rgba(0,0,0,0.06);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
}

a {
  color: var(--accent-primary);
}

a:hover {
  color: var(--accent-primary-hover);
}

/* =========================================================
   Layout
   ========================================================= */

.container {
  max-width: 1100px;
  margin: auto;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--text-main);
}

p {
  color: var(--text-main);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   Page Titles / Banners
   ========================================================= */

.page-header {
  margin-bottom: 24px;
}

.page-title {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

.page-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* =========================================================
   Panel
   ========================================================= */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   Forms & Buttons
   ========================================================= */

.form-card {
  max-width: 720px;
  margin: 24px auto;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
  box-shadow: var(--shadow-soft);
}

.label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
}

.textarea {
  resize: vertical;
}

.input::placeholder,
.select::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 109, 122, 0.15);
}

.row {
  margin-bottom: 10px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
  color: var(--text-main);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: var(--bg-panel-hover);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
}

.btn-link {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
  color: var(--text-main);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-link:hover {
  background: var(--bg-panel-hover);
  border-color: var(--accent-primary);
}

.msg {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.msg.error {
  color: var(--danger);
}

.helper-text {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* =========================================================
   Navigation
   ========================================================= */

.site-header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  background: transparent;
  border-bottom: none;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.15s ease, border-color 0.15s ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}

.nav-link:hover {
  color: var(--accent-primary);
}

.nav-link.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.site-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 16px;
  flex-shrink: 0;
}

.site-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-brand-link:hover .header-podium {
  transform: translateY(-1px);
}

.header-podium {
  height: 120px;
  width: auto;
  display: block;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.15s ease;
}

/* =========================================================
   Cards / Content Blocks
   ========================================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.card,
.content-card,
.comment-card,
.toolbar-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.card {
  display: block;
  padding: 16px;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.1s ease, border-color 0.1s ease, background 0.1s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  background: var(--bg-panel-hover);
}

.content-card,
.comment-card,
.toolbar-card {
  padding: 16px;
}

.content-card {
  padding: 20px;
}

.card-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.card-cta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent-primary);
}

.comment-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.comment-card p {
  margin: 0 0 6px;
}

.comment-card small {
  font-size: 12px;
  color: var(--text-muted);
}

/* =========================================================
   Tables
   ========================================================= */

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-soft);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  background: var(--bg-panel);
}

.table thead {
  background: var(--bg-panel-hover);
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.table td {
  color: var(--text-main);
  font-size: 14px;
}

.table tbody tr {
  transition: background 0.12s ease;
}

.table tbody tr:hover {
  background: rgba(79, 109, 122, 0.08);
}

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

/* Optional utility if you later want highlighted top rows */
.table .rank-1 {
  background: rgba(107, 142, 115, 0.10);
}

.table .rank-2,
.table .rank-3 {
  background: rgba(79, 109, 122, 0.04);
}

/* =========================================================
   FAQ
   ========================================================= */

.faq-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.faq-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-panel-hover);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
}

.faq-item[open] summary {
  color: var(--accent-primary);
}

.faq-answer {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-main);
}

/* =========================================================
   Loading Skeletons
   ========================================================= */

.skeleton {
  height: 20px;
  background: var(--bg-panel-hover);
  border-radius: 6px;
  margin-bottom: 10px;
  animation: skeletonPulse 1.4s ease-in-out infinite;
}

.skeleton.title {
  height: 28px;
  width: 220px;
  margin-bottom: 16px;
}

.skeleton.text {
  height: 16px;
}

.skeleton.short {
  width: 35%;
}

.skeleton.medium {
  width: 55%;
}

.skeleton.long {
  width: 85%;
}

.skeleton.table-row {
  height: 44px;
  margin-bottom: 8px;
}

@keyframes skeletonPulse {
  0% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.45;
  }
}

/* =========================================================
   Utilities
   ========================================================= */

.stack-md > * + * {
  margin-top: 16px;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  background: transparent;
}

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

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .page-title {
    font-size: 24px;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .nav {
    width: 100%;
    gap: 12px 16px;
    padding: 8px 0 0;
  }

  .site-brand {
    padding-left: 0;
    justify-content: flex-start;
  }

  .header-podium {
    margin-left: 0;
    height: 34px;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .table th,
  .table td {
    padding: 10px 12px;
  }

  .panel,
  .content-card,
  .comment-card,
  .toolbar-card {
    padding: 14px;
  }
}
