* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.auth-footer-info {
  margin: 20px auto;
  max-width: 500px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  letter-spacing: 0.5px;
}

.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  padding: 30px;
  margin-bottom: 20px;
}

h1 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

h2 {
  color: #555;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.captcha-box {
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
}

.helper-text {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #777;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #667eea;
}

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

button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.alert {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert-error {
  background: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.alert-success {
  background: #efe;
  color: #3c3;
  border: 1px solid #cfc;
}

.nav {
  background: white;
  padding: 15px 30px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-links a {
  color: #667eea;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background 0.2s;
}

.nav-links a:hover {
  background: #f0f0f0;
}

.nav-links a.active {
  background: #667eea;
  color: white;
}

.btn-logout {
  background: #ff6b6b;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
}

.btn-logout:hover {
  background: #ee5a6f;
  color: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.submissions-table {
  table-layout: fixed;
  min-width: 780px;
}

.admin-table {
  min-width: 920px;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}

th {
  background: #f5f5f5;
  color: #555;
  font-weight: 600;
}

td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

tr:hover {
  background: #f9f9f9;
}

.row-active {
  background: #f4f7ff;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
}

.badge-pending {
  background: #fff3cd;
  color: #856404;
}

.badge-approved {
  background: #d4edda;
  color: #155724;
}

.badge-rejected {
  background: #f8d7da;
  color: #721c24;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  width: auto;
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.btn-success {
  background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

.btn-warning {
  background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
  color: #333;
}

.info-box {
  background: #e7f5ff;
  border: 1px solid #74c0fc;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.info-box p {
  margin-bottom: 8px;
  color: #1864ab;
}

.ip-info {
  font-size: 12px;
  color: #888;
}

.muted-text {
  font-size: 11px;
  color: #999;
}

.text-break {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.table-title-cell {
  width: 15%;
}

.table-content-cell {
  width: 38%;
}

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

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.inline-form {
  display: inline-block;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-info {
  background: linear-gradient(135deg, #339af0 0%, #1c7ed6 100%);
}

.submission-trigger {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #e6ebff;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  color: #333;
  text-align: left;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.08);
}

.submission-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.16);
}

.submission-card-title,
.submission-card-preview {
  display: block;
}

.submission-card-title {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #2f3a7a;
}

.submission-card-preview {
  color: #69707d;
  font-size: 13px;
  line-height: 1.7;
}

.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
  z-index: 9999;
}

.modal-overlay.is-open {
  display: flex !important;
}

.modal-shell {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.modal-glow {
  display: none;
}

.modal-card {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
  border: 1px solid #e5e7eb;
}

.modal-close:hover {
  background: #e5e7eb;
  box-shadow: none;
  transform: none;
}

.modal-topbar {
  margin-bottom: 22px;
  padding-right: 56px;
}

.modal-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.modal-title {
  margin-bottom: 10px;
  color: #1f2a62;
  font-size: 28px;
  line-height: 1.35;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #667085;
  font-size: 13px;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section-label {
  margin-bottom: 10px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.modal-content-box,
.modal-info-card {
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

.modal-content-box {
  min-height: 220px;
  padding: 20px;
  color: #344054;
  line-height: 1.9;
  white-space: pre-wrap;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.modal-info-card {
  padding: 18px;
}

.modal-info-card-full {
  grid-column: 1 / -1;
}

.modal-info-text {
  color: #344054;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.modal-cancel-btn {
  width: auto;
  min-width: 110px;
  background: #e5e7eb;
  color: #374151;
}

.modal-delete-btn {
  width: auto;
  min-width: 120px;
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 8px;
  }

  .action-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-link,
  .btn-small {
    width: 100%;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-card {
    padding: 20px;
    border-radius: 22px;
  }

  .modal-title {
    font-size: 22px;
  }

  .modal-info-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-cancel-btn,
  .modal-delete-btn {
    width: 100%;
  }
}
