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

:root {
  --primary-light: #E3F2FD;
  --primary: #64B5F6;
  --primary-dark: #1E88E5;
  --accent: #0D47A1;
  --white: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #F44336;
  --info: #2196F3;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 50%, #e8f4f8 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  background: var(--white);
  border-radius: 24px;
  box-shadow: 
    0 2.8px 2.2px rgba(30, 136, 229, 0.034),
    0 6.7px 5.3px rgba(30, 136, 229, 0.048),
    0 12.5px 10px rgba(30, 136, 229, 0.06),
    0 22.3px 17.9px rgba(30, 136, 229, 0.072),
    0 41.8px 33.4px rgba(30, 136, 229, 0.086),
    0 100px 80px rgba(30, 136, 229, 0.12);
  overflow: hidden;
  width: 90%;
  max-width: 1200px;
  min-height: 600px;
  animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(30, 136, 229, 0.08);
}

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

.auth-container {
  max-width: 480px;
  padding: 60px 50px;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
}

.auth-header {
  text-align: center;
  margin-bottom: 50px;
}

.auth-header h1 {
  color: var(--primary-dark);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--gray-600);
  font-size: 15px;
  font-weight: 400;
}

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

.form-group label {
  display: block;
  color: var(--gray-700);
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
  background: var(--white);
  color: var(--gray-800);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--gray-300);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 
    0 0 0 4px rgba(30, 136, 229, 0.1),
    0 4px 12px rgba(30, 136, 229, 0.1);
  transform: translateY(-2px);
}

.form-group input::placeholder {
  color: var(--gray-400);
}

.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 12px;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 50%, #1565c0 100%);
  color: var(--white);
  box-shadow: 
    0 4px 6px -1px rgba(30, 136, 229, 0.2),
    0 2px 4px -1px rgba(30, 136, 229, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 10px 20px -5px rgba(30, 136, 229, 0.4),
    0 4px 6px -2px rgba(30, 136, 229, 0.2);
}

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

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-200);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #FF6B6B 0%, var(--danger) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(244, 67, 54, 0.39);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(244, 67, 54, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, #66BB6A 0%, var(--success) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(76, 175, 80, 0.39);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(76, 175, 80, 0.5);
}

.auth-footer {
  text-align: center;
  margin-top: 35px;
  padding-top: 35px;
  border-top: 1px solid var(--gray-200);
}

.auth-footer a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.auth-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.dashboard {
  display: flex;
  height: 100vh;
  background: var(--gray-50);
  width: 100vw;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 0;
  flex-shrink: 0;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}

.sidebar-header {
  padding: 40px 30px 35px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 1;
}

.sidebar-header h2 {
  font-size: 26px;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sidebar-header p {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 400;
}

.sidebar-menu {
  margin-top: 30px;
  position: relative;
  z-index: 1;
}

.menu-item {
  display: block;
  padding: 16px 30px;
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-left-color: var(--white);
  transform: translateX(3px);
}

.menu-item.active {
  background: rgba(255, 255, 255, 0.2);
  border-left-color: var(--white);
  font-weight: 600;
}

.menu-item i {
  margin-right: 12px;
  width: 20px;
  display: inline-block;
}

.main-content {
  flex: 1;
  background: var(--gray-50);
  overflow-y: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--white);
  padding: 24px 40px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
}

.header h1 {
  color: var(--gray-900);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-info span {
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
}

.user-info strong {
  color: var(--primary-dark);
  font-weight: 600;
}

.content {
  padding: 30px 40px;
  animation: fadeIn 0.4s ease-out;
  flex: 1;
  width: 100%;
}

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

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(30, 136, 229, 0.08);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 16px 16px 0 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  box-shadow: 
    0 10px 15px -3px rgba(30, 136, 229, 0.1),
    0 4px 6px -2px rgba(30, 136, 229, 0.05);
  transform: translateY(-3px);
  border-color: rgba(30, 136, 229, 0.15);
}

.card h3 {
  color: var(--gray-900);
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

.stat-card {
  background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 50%, #1565c0 100%);
  color: var(--white);
  padding: 28px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 
    0 10px 15px -3px rgba(30, 136, 229, 0.3),
    0 4px 6px -2px rgba(30, 136, 229, 0.2);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(10%, 10%) rotate(180deg);
  }
}

.stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 
    0 20px 25px -5px rgba(30, 136, 229, 0.4),
    0 10px 10px -5px rgba(30, 136, 229, 0.2);
}

.stat-card h4 {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.stat-card p {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

table {
  width: 100%;
  min-width: 100%;
}

table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table td {
  color: var(--gray-700);
  font-size: 14px;
}

table tbody tr {
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

table tbody tr:hover {
  background: linear-gradient(90deg, rgba(30, 136, 229, 0.03) 0%, rgba(30, 136, 229, 0.06) 100%);
  transform: scale(1.005);
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.08);
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-success {
  background: #E8F5E9;
  color: #2E7D32;
}

.badge-warning {
  background: #FFF3E0;
  color: #E65100;
}

.badge-danger {
  background: #FFEBEE;
  color: #C62828;
}

.badge-info {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: 20px;
  padding: 36px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideInUp 0.4s ease-out;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.modal-header h3 {
  color: var(--gray-900);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--gray-400);
  transition: all 0.3s;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--gray-600);
  background: var(--gray-100);
  transform: rotate(90deg);
}

.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  border-left: 4px solid;
  animation: slideInLeft 0.3s ease-out;
}

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

.alert-success {
  background: #E8F5E9;
  color: #2E7D32;
  border-left-color: var(--success);
}

.alert-error {
  background: #FFEBEE;
  color: #C62828;
  border-left-color: var(--danger);
}

.alert-warning {
  background: #FFF3E0;
  color: #E65100;
  border-left-color: var(--warning);
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}

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

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    min-width: auto;
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar-menu {
    display: flex;
    overflow-x: auto;
    margin-top: 20px;
  }
  
  .menu-item {
    padding: 12px 20px;
    white-space: nowrap;
  }
  
  .content {
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .auth-container {
    padding: 40px 30px;
  }
  
  .auth-header h1 {
    font-size: 28px;
  }
}
