/* Shared Dashboard Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('./index.css'); /* Meminjam beberapa token desain dari Homepage */

.dashboard-layout {
  background-color: #f3f4f6; /* bg-secondary */
  margin: 0;
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: white;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.sidebar-nav {
  padding: 1rem 0;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
  background-color: #fffbeb; /* yellow-50 */
  color: var(--primary-color);
  border-right: 4px solid var(--primary-color);
}

.nav-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 70px;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.content-area {
  padding: 2rem;
  overflow-y: auto;
  flex-grow: 1;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

/* Cards & Tables */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

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

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
}

tr:hover {
  background-color: #f9fafb;
}

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

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(216,159,60,0.2);
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-active { background: #dcfce7; color: #166534; }
.status-pending { background: #fef08a; color: #854d0e; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Styling khusus form upload / modal checkout (Advertiser) */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-area:hover {
  border-color: var(--primary-color);
  background: #fffbeb;
}
.checkout-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.checkout-content {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  width: 400px;
  max-width: 90%;
  box-shadow: var(--shadow-lg);
}

/* Styling khusus user dashboard (Premium) */
.premium-banner {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.premium-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  margin-left: 10px;
}
