/* ===== RESET ===== */
html, body {
  width: 100%;
  height: 100%;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

/* ===== GLOBAL ===== */
body {
  overflow-x: hidden;
  animation: fadePage 0.5s ease-in;
}

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

/* ===== LOGIN PAGE ===== */
.login-body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.login-container {
  width: 360px;
  padding: 35px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.logo {
  width: 90px;
  margin-bottom: 10px;
}

.subtitle {
  color: #666;
  margin-bottom: 20px;
  font-size: 14px;
}

input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #ddd;
  outline: none;
  transition: 0.3s;
  font-size: 14px;
}

input:focus {
  border-color: #4facfe;
  box-shadow: 0 0 6px rgba(79,172,254,0.4);
}

.password-box {
  position: relative;
}

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 13px;
  color: #555;
}

/* Login button only */
.login-container button {
  width: 60%;
  padding: 12px;
  margin-top: 14px;
  border-radius: 8px;
  border: none;
  background: #4facfe;
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-container button:hover {
  background: #2f80ed;
  transform: scale(1.05);
}

.error-box {
  background: #ff4d4d;
  color: white;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* ===== DASHBOARD LAYOUT ===== */
.container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 200px;
  height: 100vh;
  background: #111;
  color: white;
  padding: 28px 22px;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  margin-bottom: 28px;
  font-size: 18px;
  font-weight: 600;
  color: white;
  letter-spacing: 0.3px;
}

.sidebar a {
  display: block;
  color: #bbb;
  margin: 8px 0;
  text-decoration: none;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.sidebar a:hover {
  color: white;
  background: rgba(255,255,255,0.1);
  padding-left: 14px;
}

/* ===== MAIN CONTENT ===== */
.main {
  margin-left: 200px;
  padding: 36px 40px;
  background: #f4f6f9;
  min-height: 100vh;
  width: calc(100% - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main > * {
  width: 100%;
  max-width: 1000px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

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

/* ===== STAT CARDS ===== */
.cards {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin-top: 20px;
  width: 100%;
  max-width: 1000px;
}

.card {
  flex: 1;
  padding: 28px 20px;
  border-radius: 14px;
  background: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  text-align: center;
  transition: 0.3s;
  min-width: 0;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.card h3 {
  margin-bottom: 10px;
  color: #777;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card p {
  font-size: 34px;
  font-weight: 700;
  color: #1a1a1a;
}

/* ===== FORM BOX ===== */
.form-box {
  background: white;
  padding: 28px;
  border-radius: 14px;
  margin-top: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  width: 100%;
  max-width: 1000px;
}

.form-box h2 {
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
}

/* ===== BUTTONS ===== */
.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.btn-group a button,
.form-box > form button,
.form-box button {
  width: auto;
  padding: 10px 20px;
  margin-top: 10px;
  border-radius: 8px;
  border: none;
  background: #4facfe;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-group a button:hover,
.form-box > form button:hover {
  background: #2f80ed;
  transform: scale(1.04);
}

/* Delete button in table */
.btn-delete {
  width: auto !important;
  padding: 6px 14px !important;
  margin-top: 0 !important;
  border-radius: 6px !important;
  border: none !important;
  background: #e74c3c !important;
  color: white !important;
  font-size: 13px !important;
  cursor: pointer;
  transition: 0.2s;
}

.btn-delete:hover {
  background: #c0392b !important;
  transform: none !important;
}

/* Edit link in table */
.action-edit {
  color: #4facfe;
  font-size: 13px;
  text-decoration: none;
  margin-right: 8px;
  font-weight: 500;
}

.action-edit:hover {
  text-decoration: underline;
}

/* ===== TABLE ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 14px;
}

th {
  background: #f0f4f8;
  font-weight: 500;
  color: #666;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

th, td {
  padding: 13px 16px;
  text-align: center;
}

tr {
  border-bottom: 1px solid #edf0f4;
  transition: 0.15s;
}

tr:last-child {
  border-bottom: none;
}

tr:hover {
  background: #f5f9ff;
}