/* ============================================================
   ALBUM ENGINE — Global CSS
   Color palette sesuai website existing
   ============================================================ */

:root {
  --primary:    #667eea;
  --primary-2:  #764ba2;
  --grad:       linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg:         #f5f7fb;
  --white:      #ffffff;
  --text-dark:  #2d3748;
  --text-mid:   #4a5568;
  --text-light: #718096;
  --border:     #e2e8f0;
  --radius:     12px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 8px 24px rgba(0,0,0,.1);
  --shadow-lg:  0 20px 60px rgba(0,0,0,.15);
  --premium:    #f7971e;
  --premium-2:  #ffd200;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.ae-navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 20px;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.ae-navbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.ae-brand-badge {
  width: 36px; height: 36px;
  background: var(--grad);
  color: white; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}

.ae-brand-title { font-weight: 700; color: var(--text-dark); font-size: 15px; line-height: 1.2; }
.ae-brand-sub   { font-size: 11px; color: var(--text-light); }

.ae-navbar-menu { display: flex; align-items: center; gap: 4px; flex: 1; padding-left: 16px; }

.ae-nav-link {
  padding: 7px 14px; border-radius: 8px;
  color: var(--text-mid); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all .2s;
}
.ae-nav-link:hover { background: #f0f4ff; color: var(--primary); }
.ae-nav-link.active { background: #f0f4ff; color: var(--primary); font-weight: 600; }

.ae-navbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* Buttons */
.ae-btn-primary {
  background: var(--grad); color: white; border: none;
  padding: 8px 18px; border-radius: 8px; font-weight: 600;
  font-size: 14px; text-decoration: none; cursor: pointer;
  transition: all .3s; display: inline-flex; align-items: center; gap: 6px;
}
.ae-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(102,126,234,.4); color: white; }

.ae-btn-outline {
  background: white; border: 2px solid var(--primary); color: var(--primary);
  padding: 6px 16px; border-radius: 8px; font-weight: 600;
  font-size: 14px; text-decoration: none; cursor: pointer; transition: all .2s;
}
.ae-btn-outline:hover { background: var(--primary); color: white; }

/* Badges */
.ae-badge-premium {
  background: linear-gradient(135deg, var(--premium), var(--premium-2));
  color: #3d2b00; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}
.ae-badge-free {
  background: #f0f4ff; color: var(--primary);
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
}
.ae-badge-admin {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}

/* Dropdown */
.ae-dropdown { position: relative; }

.ae-avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: #f7fafc; border: 1px solid var(--border);
  border-radius: 30px; padding: 5px 12px 5px 5px;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.ae-avatar-btn:hover { border-color: var(--primary); background: #f0f4ff; }

.ae-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: white;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ae-avatar-name { font-size: 13px; font-weight: 600; color: var(--text-dark); }

.ae-dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  min-width: 180px; padding: 6px; display: none; z-index: 200;
}
.ae-dropdown-menu.show { display: block; animation: fadeDown .15s ease; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ae-dropdown-item {
  display: flex; align-items: center;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-mid);
  text-decoration: none; transition: all .15s; background: none; border: none; cursor: pointer;
}
.ae-dropdown-item:hover { background: #f7fafc; color: var(--primary); }
.ae-dropdown-item.text-danger:hover { background: #fff5f5; color: #e53e3e; }
.ae-dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ============================================================
   MAIN
   ============================================================ */
.ae-main { padding-top: 60px; min-height: 100vh; }

/* Alerts */
.ae-alert {
  margin: 16px 24px 0;
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center;
}
.ae-alert-success { background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; }
.ae-alert-error   { background: #fff5f5; border: 1px solid #feb2b2; color: #c53030; }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.ae-page { padding: 32px 24px; max-width: 1280px; margin: 0 auto; }
.ae-page-title { font-size: 22px; font-weight: 800; color: var(--text-dark); margin-bottom: 4px; }
.ae-page-sub   { font-size: 14px; color: var(--text-light); margin-bottom: 28px; }

/* ============================================================
   CARDS
   ============================================================ */
.ae-card {
  background: white; border-radius: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  padding: 24px;
}

.ae-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}

.ae-card-title { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.ae-card-sub   { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* Stats Card */
.ae-stat-card {
  background: white; border-radius: 16px;
  border: 1px solid var(--border); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  transition: all .2s;
}
.ae-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.ae-stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.ae-stat-val  { font-size: 24px; font-weight: 800; color: var(--text-dark); line-height: 1; }
.ae-stat-label{ font-size: 12px; color: var(--text-light); margin-top: 3px; }

/* ============================================================
   TABLE
   ============================================================ */
.ae-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ae-table th {
  background: #f8fafc; padding: 10px 14px;
  font-weight: 700; color: var(--text-mid); text-align: left;
  border-bottom: 2px solid var(--border); font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px;
}
.ae-table td { padding: 12px 14px; border-bottom: 1px solid #f0f4f8; vertical-align: middle; }
.ae-table tr:last-child td { border-bottom: none; }
.ae-table tr:hover td { background: #fafbff; }

/* Pill badges in table */
.ae-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.ae-pill-premium { background: linear-gradient(135deg,#f7971e,#ffd200); color: #3d2b00; }
.ae-pill-free    { background: #f0f4ff; color: var(--primary); }
.ae-pill-admin   { background: #fff5f5; color: #e53e3e; }
.ae-pill-active  { background: #f0fff4; color: #276749; }
.ae-pill-inactive{ background: #f7f7f7; color: #999; }

/* ============================================================
   FORM
   ============================================================ */
.ae-form-label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text-mid); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .4px;
}
.ae-form-control {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  background: white; color: var(--text-dark);
}
.ae-form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,.12);
}
.ae-form-control.is-invalid { border-color: #e53e3e; }
.ae-invalid-feedback { font-size: 12px; color: #e53e3e; margin-top: 4px; }

/* ============================================================
   INFO ROW (profile/subscription info)
   ============================================================ */
.ae-info-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid #f0f4f8;
}
.ae-info-row:last-child { border-bottom: none; }
.ae-info-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: #f0f4ff; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.ae-info-label { font-size: 11px; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.ae-info-val   { font-size: 14px; color: var(--text-dark); font-weight: 600; margin-top: 1px; }

/* ============================================================
   PREMIUM BANNER
   ============================================================ */
.ae-premium-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  border-radius: 16px; padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px; position: relative; overflow: hidden;
}
.ae-premium-banner::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(102,126,234,.15);
}
.ae-premium-banner-icon { font-size: 32px; line-height: 1; }
.ae-premium-banner-title { font-size: 15px; font-weight: 800; color: white; }
.ae-premium-banner-sub   { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 2px; }
