/* ==========================================================================
   PT PUTRA BANYU MAS - ADMIN CMS BACKPANEL STYLESHEET
   Colors: Deep Navy (#091b2c), Teal (#008080), Amber Gold (#f59e0b)
   ========================================================================== */

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

:root {
  --navy-950: #050e18;
  --navy-900: #091b2c;
  --navy-850: #0c233a;
  --navy-800: #102d4b;
  --teal-600: #006666;
  --teal-500: #008080;
  --teal-400: #0d9488;
  --teal-300: #14b8a6;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-title: 'Montserrat', sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
}

/* ==========================================================================
   LOGIN PAGE STYLES
   ========================================================================== */

.login-body {
  background: radial-gradient(circle at top right, #102d4b 0%, #091b2c 50%, #050e18 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  border-top: 6px solid var(--amber-500);
}

.login-header {
  background: var(--navy-900);
  padding: 2.2rem 2rem;
  text-align: center;
  color: #ffffff;
}

.login-header img {
  height: 48px;
  margin: 0 auto 1.2rem;
}

.login-header h2 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.login-header p {
  color: #cbd5e1;
  font-size: 0.88rem;
}

.login-form {
  padding: 2.2rem 2rem;
}

.alert-error {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  color: #166534;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 290px;
  background-color: var(--navy-900);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
  padding: 1.6rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header img {
  height: 42px;
  width: auto;
}

.sidebar-user {
  padding: 1.2rem 1.4rem;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal-500);
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 0 10px rgba(0, 128, 128, 0.4);
}

.user-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.user-info span {
  font-size: 0.75rem;
  color: var(--amber-400);
}

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

.nav-section-title {
  padding: 0.6rem 1.4rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #64748b;
  text-transform: uppercase;
}

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

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.4rem;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border-left: 3.5px solid transparent;
}

.menu-item .menu-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--teal-300);
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.menu-item.active {
  background: rgba(0, 128, 128, 0.2);
  color: #ffffff;
  border-left-color: var(--amber-500);
}

.menu-item.active .menu-badge {
  background: var(--amber-500);
  color: var(--navy-900);
}

/* Top Header */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left h1 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Content Area */
.admin-content {
  padding: 2.2rem;
  overflow-y: auto;
  flex-grow: 1;
}

.editor-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow: hidden;
}

.card-header {
  padding: 1.4rem 1.8rem;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-body {
  padding: 1.8rem;
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  color: var(--text-dark);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* Image Upload Preview Box */
.img-preview-box {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 0.5rem;
  background: #f8fafc;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.img-preview-thumb {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  background: #e2e8f0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  font-family: var(--font-title);
  letter-spacing: 0.3px;
}

.btn-save {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: #091b2c;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-save:hover {
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  transform: translateY(-1px);
}

.btn-teal {
  background: var(--teal-500);
  color: #ffffff;
}

.btn-teal:hover {
  background: var(--teal-600);
}

.btn-outline {
  background: transparent;
  color: var(--navy-900);
  border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-body);
  border-color: #cbd5e1;
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Tab Panels Visibility */
.tab-content-panel {
  display: none;
}

.tab-content-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* Sticky Save Footer in Editor */
.editor-footer-sticky {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 1rem 1.8rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 900px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
  }
}
