@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #cd853f;
  --primary-dark: #a0622d;
  --primary-light: #daa520;
  --accent: #d4af37;
  --success: #6ba587;
  --danger: #ff6b6b;
  --warning: #d4a574;
  --bg-light: #faf8f3;
  --bg-dark: #1a1410;
  --bg-primary: #0f0d0a;
  --bg-secondary: #1a1615;
  --bg-tertiary: #242118;
  --text-primary: #e8e4db;
  --text-secondary: #a89e94;
  --border-light: #2a2420;
  --border-dark: rgba(232, 228, 219, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1410 0%, #0f0d0a 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  position: relative;
  overflow-x: hidden;
}

body.access-locked {
  overflow: hidden;
}

.access-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(212, 175, 55, 0.12), transparent 35%),
    rgba(8, 6, 4, 0.92);
  backdrop-filter: blur(10px);
}

.access-gate.show {
  display: flex;
}

.access-gate-card {
  width: min(100%, 460px);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: linear-gradient(145deg, rgba(31, 25, 20, 0.98), rgba(19, 15, 12, 0.98));
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.access-gate-card h2 {
  margin: 10px 0 8px;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #fff4d0;
}

.access-gate-card .section-desc {
  margin-bottom: 24px;
}

.access-gate-form {
  text-align: left;
}

/* Dust particles animation */
.dust-container {
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  top: 0;
  left: 0;
  z-index: 1;
}

.dust-container::before,
.dust-container::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(139, 69, 19, 0.05), rgba(255, 255, 255, 0)),
    radial-gradient(2px 2px at 60px 70px, rgba(212, 175, 55, 0.05), rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 50px 50px, rgba(139, 69, 19, 0.08), rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 130px 80px, rgba(212, 175, 55, 0.05), rgba(255, 255, 255, 0)),
    radial-gradient(2px 2px at 90px 10px, rgba(139, 69, 19, 0.04), rgba(255, 255, 255, 0));
  background-size: 200px 200px;
  background-repeat: repeat;
  animation: dust-float 8s linear infinite;
}

.dust-container::after {
  animation-delay: 2s;
}

@keyframes dust-float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(100px) translateX(20px);
    opacity: 0;
  }
}

.app-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.2) 0%, rgba(92, 44, 15, 0.25) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 48px 40px;
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.hero-content {
  flex: 1;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.decorative-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
  flex: 1;
}

.brand-text {
  text-align: center;
  animation: fadeInDown 1s ease-out;
}

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

.brand-small {
  margin: 0;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.9);
  font-weight: 600;
}

.brand-main {
  margin: 8px 0;
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(255, 248, 220, 0.8);
  letter-spacing: 1px;
}

.tagline {
  margin: 16px 0 0;
  font-size: 14px;
  color: rgba(255, 248, 220, 0.7);
  opacity: 0.9;
}

.nav-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-bar a {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  color: rgba(255, 248, 220, 0.95);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.nav-bar a:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
  display: grid;
  gap: 32px;
}

.main-tabs-panel {
  display: flex;
  justify-content: center;
}

.main-tabs {
  display: inline-flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 999px;
  background: rgba(20, 16, 12, 0.78);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
}

.main-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.main-tab:hover {
  color: var(--text-primary);
  border-color: rgba(212, 175, 55, 0.18);
}

.main-tab.active {
  background: linear-gradient(135deg, rgba(205, 133, 63, 0.22), rgba(160, 98, 45, 0.34));
  color: #fff4d0;
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 248, 220, 0.08);
}

.tab-panel {
  display: none;
  gap: 32px;
}

.tab-panel.active {
  display: grid;
}

.panel {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

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

.panel:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.section-header h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: var(--text-primary);
  font-weight: 700;
}

.section-desc {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.collapsible-header {
  margin-bottom: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: rgba(212, 175, 55, 0.08);
  color: #f0d98b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.section-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* Articles Table */
.articles-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.articles-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
}

.articles-table thead {
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-light);
}

.articles-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: #d4af37;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-right: 1px solid var(--border-light);
}

.articles-table th:last-child {
  border-right: none;
}

.articles-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
}

.articles-table tbody tr:hover {
  background-color: var(--bg-tertiary);
}

.articles-table td {
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 14px;
  border-right: 1px solid var(--border-light);
}

.articles-table td:last-child {
  border-right: none;
}

.col-id {
  font-weight: 700;
  color: #d4af37;
}

.col-price {
  font-weight: 600;
  color: #cd853f;
  font-family: 'Courier New', monospace;
}

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

.rachat-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #d4af37;
}

.col-actions {
  display: flex;
  gap: 8px;
}

.col-location {
  min-width: 220px;
  max-width: 320px;
  color: #f1dfbf;
  line-height: 1.5;
}

.col-image {
  width: 108px;
}

.table-image-button,
.image-preview-button {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  color: var(--text-secondary);
}

.table-image-thumb,
.image-preview-thumb {
  display: block;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: var(--shadow-sm);
}

.table-image-thumb {
  width: 72px;
  height: 72px;
}

.image-preview-thumb {
  width: min(100%, 260px);
  max-height: 180px;
}

.table-image-empty,
.image-preview-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(212, 175, 55, 0.2);
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.image-preview {
  margin-top: 12px;
}

.image-preview-caption {
  font-size: 12px;
  color: var(--text-secondary);
}

.category-tag {
  display: inline-block;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.article-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 2px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.8), transparent);
  transition: left 0.6s ease;
}

.article-card:hover::before {
  left: 100%;
}

.article-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 12px 32px rgba(139, 69, 19, 0.15);
  transform: translateY(-4px);
}

.article-card-id {
  display: inline-block;
  background: var(--primary-light);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.article-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.category-badge {
  display: inline-block;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.buyback-badge {
  display: inline-block;
  background: var(--success);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.article-card-name {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.article-card-prices {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.price-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  font-family: 'Courier New', monospace;
}

.article-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.article-card-actions button {
  flex: 1;
}

.btn-edit,
.btn-delete {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-edit {
  color: var(--primary-dark);
  border-color: var(--primary-light);
}

.btn-edit:hover {
  background: var(--primary-light);
  color: white;
}

.btn-delete {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-delete:hover {
  background: var(--danger);
  color: white;
}

/* Form Section */
.form-panel {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-light);
}

.form-panel-collapsible {
  padding: 0;
  overflow: hidden;
}

.form-panel-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 28px 32px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.form-panel-toggle:hover {
  background: rgba(212, 175, 55, 0.06);
}

.form-panel-toggle .form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
}

.form-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  color: #d4af37;
  font-size: 18px;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.form-panel-collapsible:not(.collapsed) .form-toggle-icon {
  transform: rotate(180deg);
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.45);
}

.form-panel-content {
  padding: 0 32px 32px;
  border-top: 1px solid var(--border-light);
}

.buyback-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 24px;
}

.buyback-form {
  display: grid;
  gap: 18px;
  align-content: start;
}

.buyback-estimate-card,
.summary-card,
.panel-subsection {
  background: linear-gradient(135deg, rgba(26, 22, 21, 0.95), rgba(36, 33, 24, 0.92));
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.buyback-estimate-card {
  padding: 18px;
}

.estimate-label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.estimate-value {
  font-size: 1.8rem;
  color: #f2c66d;
}

.panel-subsection {
  padding: 18px;
}

.buyback-validation {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.buyback-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.summary-card {
  padding: 16px 18px;
}

.summary-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.summary-card strong {
  font-size: 1.6rem;
  color: #fff2c8;
}

.empty-buyback {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.transactions-table tbody tr {
  cursor: help;
}

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

.form-header h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: var(--text-primary);
  font-weight: 700;
}

.form-modern {
  display: grid;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label-modern {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-modern {
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff !important;
  background: #0d0b08 !important;
  transition: all 0.3s ease;
}

.input-modern::placeholder {
  color: #8b7d72 !important;
  font-weight: 400;
}

.input-modern:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(205, 133, 63, 0.1);
}

/* Pour les navigateurs qui appliquent des styles autofill */
.input-modern:-webkit-autofill,
.input-modern:-webkit-autofill:hover,
.input-modern:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0d0b08 inset !important;
  -webkit-text-fill-color: #ffffff !important;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .input-modern {
  flex: 1;
  padding-right: 40px;
}

.input-suffix {
  position: absolute;
  right: 16px;
  color: var(--text-secondary);
  font-weight: 600;
  pointer-events: none;
}

/* Select styling */
select.input-modern {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
  font-weight: 500;
}

select.input-modern option {
  background: var(--bg-secondary);
  color: #ffffff;
  font-weight: 500;
}

select.input-modern:focus {
  border-color: var(--primary-light);
}

/* Checkbox styling */
.checkbox-group {
  display: flex;
  align-items: center;
  margin: 12px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:hover {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(205, 133, 63, 0.1);
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--primary-light);
  border-color: var(--primary-light);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .main-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .main-tab {
    flex: 1;
  }

  .buyback-layout {
    grid-template-columns: 1fr;
  }

  .buyback-summary {
    grid-template-columns: 1fr;
  }

  .form-panel-toggle {
    padding: 22px 20px;
  }

  .form-panel-content {
    padding: 0 20px 24px;
  }

  .header-actions {
    gap: 8px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-message {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin: 0;
  display: none;
  animation: slideIn 0.3s ease-out;
}

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

.form-message.show {
  display: block;
}

.form-message.success {
  background: rgba(107, 165, 135, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.form-message.error {
  background: rgba(199, 84, 73, 0.1);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 8px 16px rgba(139, 69, 19, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(139, 69, 19, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.btn-large {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--text-secondary);
  color: white;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: white;
  font-size: 18px;
  border-radius: 50%;
}

.btn-icon:hover {
  transform: rotate(180deg);
  background: var(--primary-dark);
}

.btn-icon span {
  display: block;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  opacity: 0.9;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-tertiary);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 32px;
}

.modal-body h3 {
  margin: 0 0 24px;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.modal-actions .btn {
  flex: 1;
  min-width: 120px;
}

.modal-close-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.modal-close-btn:hover {
  background: var(--text-secondary);
  color: white;
}

.image-zoom-content {
  max-width: min(92vw, 980px);
  width: auto;
}

.image-zoom-body {
  padding: 56px 24px 24px;
}

.image-zoom-body img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
}

.textarea-modern {
  width: 100%;
  resize: vertical;
  min-height: 90px;
}

.file-input-modern {
  padding: 12px;
}

.field-help {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.btn-inline {
  margin-top: 12px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .app-shell {
    padding: 24px 16px 40px;
  }

  .hero {
    flex-direction: column;
    padding: 32px 24px;
    text-align: center;
  }

  .brand-container {
    flex-direction: column;
  }

  .brand-main {
    font-size: 2.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-bar {
    justify-content: center;
  }

  .panel {
    padding: 20px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .article-card-actions {
    flex-direction: column;
  }

  .article-card-actions button {
    width: 100%;
  }

  .btn-large {
    padding: 12px 16px;
    font-size: 14px;
  }
}

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

.loading {
  animation: spin 1s linear infinite;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead th {
  text-align: left;
  border-bottom: 2px solid rgba(34, 26, 19, 0.18);
  padding: 12px 12px 10px;
  color: var(--dark);
}

tbody tr {
  border-bottom: 1px solid rgba(34, 26, 19, 0.08);
}

tbody td {
  padding: 14px 12px;
}

tbody tr:hover {
  background: rgba(163, 75, 27, 0.08);
}

.form-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  border: 1px solid rgba(34, 26, 19, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff6e6;
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.btn-primary {
  background: linear-gradient(135deg, #b6582d, #8e2f1a);
  color: #fff;
}

.btn-secondary {
  background: #fff7e9;
  color: var(--dark);
  border: 1px solid rgba(34, 26, 19, 0.12);
}

.form-message {
  margin: 0;
  color: var(--accent-strong);
}

@media (max-width: 820px) {
  .hero {
    flex-direction: column;
  }

  .nav-bar {
    flex-wrap: wrap;
  }
}
