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

:root {
  --sidebar-width: 260px;
  --header-height: 70px;
  --bg-dash: #f8fafc;
  --primary: #7C5CFF;
  --primary-light: #ece8ff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.dash-body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dash);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.dash-sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 30px;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  padding: 20px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Main Content */
.dash-main {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dash-header {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.dash-content {
  padding: 40px;
}

/* Grid Layout */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--white);
  padding: 24px;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.stat-card h4 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
}

/* Recent Posts Table */
.recent-activity {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  padding: 30px;
}

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

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

.activity-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.activity-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-scheduled { background: #e0f2fe; color: #0369a1; }
.badge-published { background: #dcfce7; color: #166534; }
.badge-failed { background: #fee2e2; color: #991b1b; }

/* Auth Forms */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #ece8ff, transparent 40%),
              radial-gradient(circle at bottom right, #e0f2fe, transparent 40%);
  background-color: var(--bg-dash);
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  z-index: 0;
}

.auth-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0,0,0,0.05);
  width: 100%;
  max-width: 450px;
  border: 1px solid rgba(255,255,255,0.8);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.auth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0,0,0,0.05);
}

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

.auth-header h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 10px 0;
}

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

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: inherit;
  box-sizing: border-box;
  background: #f8fafc;
  transition: all 0.2s ease;
  font-size: 14px;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #5b3ce8);
  color: white;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.3);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.4);
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}
