/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.7;
  color: #2c3e50;
  background-color: #fdfdfd;
  font-size: 15px;
}

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

/* Header */
.header {
  background: #ffffff;
  color: #2c3e50;
  padding: 1.2rem 0;
  border-bottom: 1px solid #e1e8ed;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
  color: #1a365d;
  letter-spacing: -0.025em;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav a {
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  font-size: 14px;
}

.nav a:hover {
  color: #1a365d;
}

.user-info {
  background: #f7fafc;
  color: #4a5568;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
}

/* Main content */
.main {
  padding: 2rem 0;
  min-height: calc(100vh - 120px);
}

/* Cards */
.card {
  background: white;
  border-radius: 6px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.card-title {
  font-size: 1.3rem;
  color: #1a365d;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card-subtitle {
  color: #718096;
  font-size: 0.875rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #495057;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.1);
}

.form-control[type="file"] {
  padding: 0.5rem;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn-primary {
  background: #4299e1;
  color: white;
  border-color: #4299e1;
}

.btn-primary:hover {
  background: #3182ce;
  border-color: #3182ce;
}

.btn-success {
  background: #38a169;
  color: white;
  border-color: #38a169;
}

.btn-success:hover {
  background: #2f855a;
  border-color: #2f855a;
}

.btn-danger {
  background: #e53e3e;
  color: white;
  border-color: #e53e3e;
}

.btn-danger:hover {
  background: #c53030;
  border-color: #c53030;
}

.btn-secondary {
  background: #a0aec0;
  color: white;
  border-color: #a0aec0;
}

.btn-secondary:hover {
  background: #718096;
  border-color: #718096;
}

.btn-outline {
  background: transparent;
  border: 1px solid #cbd5e0;
  color: #4a5568;
}

.btn-outline:hover {
  background: #f7fafc;
  border-color: #a0aec0;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.table th {
  background: #f7fafc;
  font-weight: 600;
  color: #1a365d;
  border-bottom: 2px solid #e2e8f0;
}

.table tbody tr:hover {
  background: #f7fafc;
}

/* Status badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

.status-approved {
  background: #d1e7dd;
  color: #0f5132;
}

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

.status-active {
  background: #d1e7dd;
  color: #0f5132;
}

.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.status-banned {
  background: #343a40;
  color: white;
}

/* Dashboard stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  border-left: 3px solid #4299e1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1a365d;
  display: block;
}

.stat-label {
  color: #718096;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 2rem;
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Hero section */
.hero {
  background: #ffffff;
  color: #1a365d;
  padding: 3rem 0;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #4a5568;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border-color: #0f5132;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border-color: #721c24;
}

.alert-info {
  background: #cff4fc;
  color: #055160;
  border-color: #055160;
}

/* Paper list */
.paper-item {
  background: white;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  border-left: 3px solid #4299e1;
}

.paper-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.paper-meta {
  color: #718096;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.paper-description {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #4a5568;
}

.paper-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Auth forms */
.auth-container {
  max-width: 400px;
  margin: 2rem auto;
}

.auth-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.auth-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #495057;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .nav {
    flex-direction: column;
    gap: 1rem;
  }

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

  .hero h1 {
    font-size: 2rem;
  }

  .container {
    padding: 0 15px;
  }

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

/* Upload area */
.upload-area {
  border: 2px dashed #cbd5e0;
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  background: #f7fafc;
  transition: all 0.2s;
}

.upload-area:hover {
  border-color: #4299e1;
  background: #ebf8ff;
}

.upload-icon {
  font-size: 2.5rem;
  color: #4299e1;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background: #f7fafc;
  color: #4a5568;
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
  border-top: 1px solid #e2e8f0;
  font-size: 14px;
}

/* Loading states */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.text-muted { color: #6c757d; }
.text-primary { color: #667eea; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
