/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #1f2937;
}

/* Gradient Background cho trang public */
.gradient-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Card trắng nổi bật */
.card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
  max-width: 500px;
  width: 100%;
}

.card-large {
  max-width: 600px;
}

.card h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #667eea;
  text-align: center;
}

.card h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #667eea;
  text-align: center;
}

.card p {
  text-align: center;
  color: #6b7280;
  margin-bottom: 30px;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  background: #f9fafb;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(245, 87, 108, 0.4);
}

.btn-block {
  width: 100%;
  display: block;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

/* Links */
.text-center {
  text-align: center;
}

.link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Dashboard Layout */
.dashboard {
  display: flex;
  min-height: 100vh;
  background: #f3f4f6;
}

/* Topbar */
.topbar {
  background: white;
  padding: 16px 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 30px;
}

.topbar .user-info {
  color: #374151;
  font-weight: 500;
}

.topbar .user-email {
  color: #667eea;
  font-weight: 600;
}

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #020617 0%, #111827 100%);
  color: white;
  padding: 30px 20px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 40px;
  text-align: center;
  color: #667eea;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 10px;
}

.sidebar-menu a,
.sidebar-menu button {
  display: block;
  padding: 12px 16px;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
}

.sidebar-menu a:hover,
.sidebar-menu button:hover,
.sidebar-menu a.active,
.sidebar-menu button.active {
  background: rgba(102, 126, 234, 0.2);
  color: white;
}

.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 40px;
}

.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-header h1 {
  font-size: 2rem;
  color: #111827;
  margin-bottom: 5px;
}

.dashboard-header p {
  color: #6b7280;
}

/* Dashboard Cards */
.dashboard-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.dashboard-card h2 {
  font-size: 1.5rem;
  color: #111827;
  margin-bottom: 20px;
  text-align: left;
}

/* Table */
.table-container {
  overflow-x: auto;
}

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

thead {
  background: #f9fafb;
}

th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

tbody tr:hover {
  background: #f9fafb;
}

/* Tool Page - Two Cards Side by Side */
.tool-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  width: 100%;
}

.tool-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 30px;
}

.tool-card h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #667eea;
  text-align: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
  font-size: 1.25rem;
  color: #111827;
}

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-footer .btn {
  flex: 1;
}

/* Section Toggle */
.section {
  display: none;
}

.section.active {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .tool-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }
  
  .main-content {
    margin-left: 0;
    padding: 20px;
  }
  
  .dashboard {
    flex-direction: column;
  }
  
  .topbar {
    padding: 12px 20px;
  }
}

/* Utility */
.hidden {
  display: none;
}

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

.gap-2 {
  gap: 10px;
}
