* { 
  box-sizing: border-box; 
}

:root {
  /* Light Mode (Varsayılan) */
  --bg-body: linear-gradient(135deg, #eef6ff 0%, #dfeeff 100%);
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f8fafc;
  --bg-surface-hover: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-hover: #93c5fd;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --primary-text: #ffffff;
  --heading-color: #1e40af;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.12);
  --info-bar-bg: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  --info-bar-border: #93c5fd;
  --info-bar-text: #1e40af;
  --info-value-bg: #ffffff;
  --info-value-text: #1e3a8a;
  --highlight-bg: #fef08a;
  --highlight-text: #854d0e;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-focus-bg: #f0f7ff;
  --success-bg: #d1fae5;
  --success-border: #10b981;
  --success-text: #065f46;
  --error-bg: #fee2e2;
  --error-border: #ef4444;
  --error-text: #7f1d1d;
  --dup-warn-bg: #fffbeb;
  --dup-warn-border: #fcd34d;
  --dup-warn-text: #92400e;
  --dup-item-bg: #ffffff;
  --dup-item-border: #fde68a;
  --dup-item-text: #1f2937;
  --dup-success-bg: #f0fdf4;
  --dup-success-border: #86efac;
  --dup-success-text: #166534;
  --spinner-track: rgba(37, 99, 235, 0.15);
  --spinner-head: #2563eb;
}

html.dark-mode, body.dark-mode {
  /* Dark Mode */
  --bg-body: linear-gradient(135deg, #0b0f19 0%, #111827 100%);
  --bg-surface: #1e293b;
  --bg-surface-secondary: #0f172a;
  --bg-surface-hover: #273548;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --border-hover: #3b82f6;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #1e293b;
  --primary-border: #3b82f6;
  --primary-text: #ffffff;
  --heading-color: #60a5fa;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.6);
  --info-bar-bg: linear-gradient(135deg, #1e293b 0%, #1e3a5f 100%);
  --info-bar-border: #2563eb;
  --info-bar-text: #93c5fd;
  --info-value-bg: #0f172a;
  --info-value-text: #60a5fa;
  --highlight-bg: #854d0e;
  --highlight-text: #fef08a;
  --input-bg: #0f172a;
  --input-border: #475569;
  --input-focus-bg: #1e293b;
  --success-bg: #064e3b;
  --success-border: #059669;
  --success-text: #a7f3d0;
  --error-bg: #7f1d1d;
  --error-border: #ef4444;
  --error-text: #fee2e2;
  --dup-warn-bg: #451a03;
  --dup-warn-border: #b45309;
  --dup-warn-text: #fde68a;
  --dup-item-bg: #1e293b;
  --dup-item-border: #78350f;
  --dup-item-text: #f3f4f6;
  --dup-success-bg: #064e3b;
  --dup-success-border: #059669;
  --dup-success-text: #a7f3d0;
  --spinner-track: rgba(96, 165, 250, 0.2);
  --spinner-head: #60a5fa;
}

html {
  min-height: 100%;
  background: var(--bg-body);
  background-attachment: fixed;
}

body {
  margin: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-body);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Top Controls (Theme Toggle & Language Switcher) */
.top-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  padding: 3px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.lang-switch:hover {
  border-color: var(--primary);
  box-shadow: var(--card-shadow-hover);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  user-select: none;
}

.lang-btn .flag-icon {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.lang-btn:hover .flag-icon {
  transform: scale(1.08);
}

.lang-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-secondary);
}

.lang-btn.active {
  background: var(--primary);
  color: var(--primary-text);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.lang-btn.active .flag-icon {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.theme-toggle-btn {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--card-shadow);
  padding: 0;
  line-height: 1;
}

.theme-toggle-btn:hover {
  transform: scale(1.08) rotate(15deg);
  border-color: var(--primary);
  box-shadow: var(--card-shadow-hover);
}

.theme-toggle-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Alert Mesajları */
.alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
  border-left: 4px solid;
  animation: fadeIn 0.3s ease-in-out;
}

.alert-success {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.alert-error {
  background-color: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

.container {
  max-width: 1600px;
  margin: 40px auto;
  padding: 20px;
}

/* İçerik Wrapper - Yan Yana Layout */
.content-wrapper {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: nowrap;
  width: 100%;
}

h1, h2 {
  text-align: center;
  margin-top: 0;
  color: var(--heading-color);
  transition: color 0.3s ease;
}

h1 {
  font-size: 28px;
  margin-bottom: 30px;
}

h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.form-box, .list-box, .search-box {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  transition: box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.top-form-box {
  width: 100%;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 260px 1fr 140px;
  gap: 16px;
  align-items: flex-end;
}

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

.form-group-name input {
  height: 48px;
}

.form-group-desc textarea {
  min-height: 48px;
  height: 48px;
  padding: 12px 14px;
  resize: vertical;
}

.form-group-btn button {
  height: 48px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-search-box {
  flex: 0 0 320px;
  margin-bottom: 0;
  position: sticky;
  top: 20px;
}

.search-tip-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-surface-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.search-tip-box p {
  margin: 0;
}

.list-box {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.form-box:hover, .list-box:hover, .search-box:hover {
  box-shadow: var(--card-shadow-hover);
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-form {
  display: flex;
  gap: 12px;
  flex-direction: row;
  align-items: center;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input-wrapper input {
  width: 100%;
  padding-right: 42px;
  box-sizing: border-box;
}

.search-spinner {
  position: absolute;
  right: 14px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--spinner-head);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  width: auto;
  display: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.search-clear-btn:hover {
  color: #ef4444;
  background: none;
  transform: scale(1.15);
  box-shadow: none;
}

.highlight {
  background-color: var(--highlight-bg);
  color: var(--highlight-text);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.list-box {
  transition: opacity 0.2s ease-in-out, background 0.3s ease, border-color 0.3s ease;
}

/* Kayıt Formu - Benzer Kayıt Kontrolü & Uyarı Kutusu */
.input-with-status {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-status input {
  width: 100%;
  padding-right: 36px;
}

.form-check-spinner {
  position: absolute;
  right: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--spinner-head);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
  pointer-events: none;
}

.duplicate-warning-box {
  margin-top: 4px;
  margin-bottom: 6px;
  animation: fadeIn 0.25s ease-in-out;
}

.duplicate-alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}

.duplicate-alert.warning {
  background-color: var(--dup-warn-bg);
  border: 1px solid var(--dup-warn-border);
  color: var(--dup-warn-text);
}

.duplicate-alert.success {
  background-color: var(--dup-success-bg);
  border: 1px solid var(--dup-success-border);
  color: var(--dup-success-text);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.duplicate-alert-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.duplicate-hint {
  margin: 2px 0 8px 0;
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.4;
}

.duplicate-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.duplicate-item {
  background: var(--dup-item-bg);
  color: var(--dup-item-text);
  border: 1px solid var(--dup-item-border);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.duplicate-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.duplicate-item-header strong {
  color: var(--dup-item-text);
  font-size: 13.5px;
}

.duplicate-date {
  font-size: 11px;
  color: var(--text-muted);
}

.duplicate-desc {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-word;
}

.duplicate-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  transition: all 0.2s ease;
}

.duplicate-edit-btn:hover {
  background: var(--primary);
  color: var(--primary-text);
}

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

label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
}

input, textarea, select, button {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  font-size: 16px;
  transition: all 0.3s ease;
  font-family: inherit;
  background-color: var(--input-bg);
  color: var(--text-main);
}

input, textarea {
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  background-color: var(--input-focus-bg);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

button {
  background: var(--primary);
  color: var(--primary-text);
  border: none;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:active {
  transform: translateY(0);
}

/* Records List & Expandable Cards */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.record-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface-secondary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
}

.record-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
  background: var(--bg-surface-hover);
}

.record-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 0;
  transition: background 0.2s ease;
  user-select: none;
}

.record-card.expanded .card-header {
  background: rgba(37, 99, 235, 0.04);
}

body.dark-mode .record-card.expanded .card-header {
  background: rgba(59, 130, 246, 0.08);
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  color: var(--primary);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.record-card.expanded .card-chevron {
  transform: rotate(90deg);
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-info strong {
  font-size: 15.5px;
  color: var(--text-main);
  line-height: 1.3;
}

.date {
  font-size: 12.5px;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: default;
}

.card-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.35s ease;
  padding: 0 16px;
  cursor: default;
}

.record-card.expanded .card-body {
  max-height: 1200px;
  opacity: 1;
  padding: 0 16px 16px 16px;
  border-top: 1px dashed var(--border-color);
}

.card-desc {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.desc-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.card-desc p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.6;
  font-size: 14px;
  word-break: break-word;
  opacity: 0.95;
}

.btn-edit, .btn-delete {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 36px;
  height: 36px;
}

.btn-edit {
  border-color: #fbbf24;
  color: #d97706;
}

.btn-edit:hover {
  background: #fef3c7;
  border-color: #d97706;
}

.btn-delete {
  border-color: #ef4444;
  color: #dc2626;
}

.btn-delete:hover {
  background: #fee2e2;
  border-color: #dc2626;
}

body.dark-mode .btn-edit {
  border-color: #d97706;
  color: #fbbf24;
}

body.dark-mode .btn-edit:hover {
  background: #451a03;
}

body.dark-mode .btn-delete {
  border-color: #b91c1c;
  color: #f87171;
}

body.dark-mode .btn-delete:hover {
  background: #450a0a;
}

.inline-form {
  display: contents;
}

li p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.6;
  word-break: break-word;
  opacity: 0.92;
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 16px;
}

.button-group {
  display: flex;
  gap: 12px;
  flex-direction: column;
}

.btn-cancel {
  display: inline-block;
  padding: 12px 14px;
  background: var(--text-muted);
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  font-size: 16px;
}

.btn-cancel:hover {
  background: #475569;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-cancel:focus {
  outline: 2px solid var(--text-muted);
  outline-offset: 2px;
}

.info-box {
  background: var(--info-bar-bg);
  border: 1px solid var(--info-bar-border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  color: var(--info-bar-text);
}

.info-box p {
  margin: 0;
  font-size: 14px;
}

/* List Başlığı ve Per Page Form */
.record-info-bar {
  background: var(--info-bar-bg);
  border: 1px solid var(--info-bar-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.info-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--info-bar-text);
}

.info-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--info-value-text);
  background: var(--info-value-bg);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 6px;
  min-width: 40px;
  text-align: center;
}

.info-separator {
  color: var(--info-bar-border);
  margin: 0 4px;
}

.search-info {
  font-size: 13px;
  color: var(--info-bar-text);
}

.search-info strong {
  color: var(--heading-color);
  font-weight: 700;
}

/* List Header & Pagination Toolbar Panel */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 18px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
}

.list-header h2 {
  margin: 0;
  flex: 1;
  min-width: 150px;
}

.list-stats {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.record-count {
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
}

.per-page-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.per-page-form label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
}

.per-page-form select {
  padding: 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.per-page-form select:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Header Pagination (Üst Sayfalama) */
.header-pagination {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Pagination (Genel) */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination.pagination-top {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  gap: 4px;
  box-shadow: none;
}

.pagination-bottom {
  margin: 28px 0 16px 0;
  padding: 16px 20px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-pagination {
  padding: 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pagination-top .btn-pagination {
  padding: 5px 9px;
  font-size: 12.5px;
  border-radius: 6px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.pagination-top .btn-pagination:hover:not(.disabled) {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
  transform: none;
  box-shadow: none;
}

.btn-pagination:hover:not(.disabled) {
  background: var(--primary);
  color: var(--primary-text);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-pagination.disabled {
  color: var(--text-muted);
  border-color: transparent;
  cursor: not-allowed;
  opacity: 0.4;
  box-shadow: none;
}

.page-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
}

.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pagination-top .page-number {
  width: 28px;
  height: 28px;
  font-size: 12.5px;
  border-radius: 6px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.pagination-top .page-number:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.page-number:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.page-number.active {
  background: var(--primary);
  color: var(--primary-text);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  font-weight: 700;
}

.pagination-top .page-number.active {
  background: var(--primary);
  color: var(--primary-text);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.page-ellipsis {
  color: var(--text-muted);
  padding: 0 2px;
  font-size: 13px;
}

.pagination-info {
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 10px;
}

.pagination-info strong {
  color: var(--heading-color);
  font-weight: 700;
}

.btn-clear {
  display: inline-block;
  padding: 12px 16px;
  background: #ef4444;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-clear:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Responsive Design */
@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .top-form-box textarea {
    min-height: 80px;
    height: auto;
  }

  .content-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .side-search-box {
    flex: 1;
    width: 100%;
    position: static;
  }

  .list-box {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    margin: 20px auto;
    padding: 16px;
    padding-top: 55px;
  }

  .top-controls {
    top: 12px;
    right: 12px;
    gap: 6px;
  }

  .lang-btn {
    padding: 5px 8px;
    font-size: 12px;
  }

  .theme-toggle-btn {
    width: 36px;
    height: 36px;
    font-size: 17px;
  }

  .content-wrapper {
    flex-direction: column;
    gap: 16px;
  }

  .form-box, .list-box {
    flex: 1;
    width: 100%;
    margin-bottom: 24px;
  }

  h1 {
    font-size: 24px;
  }

  .form-box, .list-box {
    padding: 20px;
    border-radius: 12px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card-actions {
    align-self: flex-end;
    margin-top: 4px;
  }

  input, textarea, button, .btn-cancel {
    font-size: 16px;
    padding: 12px;
  }

  .button-group {
    flex-direction: row;
  }

  .button-group button,
  .button-group .btn-cancel {
    width: 100%;
  }

  .list-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .header-pagination {
    justify-content: center;
    width: 100%;
  }

  .pagination.pagination-top {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    width: 100%;
  }

  .pagination.pagination-bottom {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
  }

  .btn-pagination {
    padding: 6px 10px;
    font-size: 13px;
    text-align: center;
  }

  .page-numbers {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-number {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .container {
    margin: 10px auto;
    padding: 12px;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  h2 {
    font-size: 18px;
  }

  .form-box, .list-box {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 16px;
  }

  li {
    padding: 12px;
    border-radius: 10px;
  }

  .card-info strong {
    font-size: 15px;
  }

  .date {
    font-size: 12px;
  }

  .btn-edit, .btn-delete {
    min-width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group button,
  .button-group .btn-cancel {
    width: 100%;
  }

  .record-info-bar {
    padding: 12px;
  }

  .info-label {
    font-size: 13px;
  }

  .info-value {
    font-size: 16px;
  }

  .search-info {
    font-size: 12px;
  }
}
