/* ==========================================================================
   MİRA YEŞİL - ADMIN DASHBOARD STYLESHEET
   Luxury Emerald & Gold Theme • Secure Auth • Interactive Management
   ========================================================================== */

:root {
  --bg-main: #07090d;
  --bg-surface: #0f121a;
  --bg-surface-elevated: #161b26;
  --bg-card: rgba(18, 22, 33, 0.9);
  --bg-glass: rgba(11, 14, 21, 0.9);

  --emerald-primary: #10b981;
  --emerald-light: #34d399;
  --emerald-dark: #047857;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --emerald-gradient: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);

  --gold-primary: #d4af37;
  --gold-light: #f5e7a9;
  --gold-dark: #aa851d;
  --gold-gradient: linear-gradient(135deg, #f5e7a9 0%, #d4af37 50%, #997a15 100%);

  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8b99ad;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-emerald: rgba(16, 185, 129, 0.35);
  --border-gold: rgba(212, 175, 55, 0.35);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmosphere */
body::before {
  content: '';
  position: fixed;
  top: -15vh;
  right: -10vw;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   AUTH SCREEN (LOGIN GATE)
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 10;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--shadow-lg), 0 0 40px var(--emerald-glow);
  text-align: center;
  position: relative;
  animation: fadeIn 0.4s ease;
}

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

.auth-icon-box {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--border-emerald);
  color: var(--emerald-light);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.auth-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.password-input-group {
  position: relative;
}

.password-input-group input {
  width: 100%;
  padding: 14px 44px 14px 18px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: var(--transition-fast);
}

.password-input-group input:focus {
  border-color: var(--emerald-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.toggle-pass-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.toggle-pass-btn:hover {
  color: #ffffff;
}

.auth-error-msg {
  display: none;
  font-size: 0.85rem;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: left;
}

.auth-error-msg.visible {
  display: block;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background: var(--emerald-gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: #04140d;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.auth-footer-link {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-footer-link a {
  color: var(--emerald-light);
  text-decoration: underline;
}

/* ==========================================================================
   MAIN ADMIN APP CONTAINER
   ========================================================================== */
.admin-app {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 10;
  padding-bottom: 120px;
}

.admin-app.active {
  display: block;
}

/* Top Navbar */
.admin-nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 28px;
}

.admin-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--emerald-gradient);
  color: #03140d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-info h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.brand-info span {
  font-size: 0.75rem;
  color: var(--emerald-light);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.btn-view-site {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--border-emerald);
  color: var(--emerald-light);
}

.btn-view-site:hover {
  background: var(--emerald-gradient);
  color: #03140d;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-logout:hover {
  background: var(--danger);
  color: #ffffff;
}

/* ==========================================================================
   ADMIN MAIN LAYOUT (TABS & CONTENT)
   ========================================================================== */
.admin-container {
  max-width: 1400px;
  margin: 32px auto 0;
  padding: 0 28px;
}

/* Tab Navigation Menu */
.admin-tabs-nav {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 6px;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tabs-nav::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.admin-tab-btn i {
  font-size: 0.95rem;
}

.admin-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-tab-btn.active {
  background: var(--emerald-gradient);
  color: #02120b;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Tab Panels */
.admin-tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.admin-tab-panel.active {
  display: block;
}

/* Admin Cards & Grid */
.admin-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.admin-card-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.card-title-group h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.card-title-group p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Form Layouts */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.admin-form-group {
  margin-bottom: 22px;
}

.admin-form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.admin-form-group label span.label-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.admin-control {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.admin-control:focus {
  border-color: var(--emerald-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

textarea.admin-control {
  resize: vertical;
  min-height: 110px;
}

/* ==========================================================================
   PHOTO MANAGEMENT TAB
   ========================================================================== */
.photo-upload-box {
  background: var(--bg-surface-elevated);
  border: 2px dashed var(--border-emerald);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 32px;
  transition: var(--transition-fast);
}

.photo-upload-box:hover {
  border-color: var(--emerald-light);
  background: rgba(16, 185, 129, 0.04);
}

.upload-icon {
  font-size: 2.4rem;
  color: var(--emerald-light);
  margin-bottom: 12px;
}

.upload-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff;
}

.upload-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.upload-inputs-row {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.file-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-input-wrapper input[type="file"] {
  display: none;
}

.file-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--emerald-gradient);
  color: #03140d;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.file-select-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.upload-preview-area {
  display: none;
  margin-top: 16px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.upload-preview-area img {
  width: 70px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

/* Photo Gallery Cards Grid in Admin */
.admin-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.admin-photo-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-fast);
}

.admin-photo-card:hover {
  border-color: var(--border-emerald);
  transform: translateY(-3px);
}

.admin-photo-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.admin-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-marker-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: var(--gold-gradient);
  color: #120e00;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.category-tag-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: var(--emerald-light);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-emerald);
}

.admin-photo-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.photo-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-photo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-make-hero {
  flex: 1;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-make-hero:hover {
  background: var(--gold-gradient);
  color: #110e00;
}

.btn-delete-photo {
  padding: 7px 12px;
  font-size: 0.85rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-delete-photo:hover {
  background: var(--danger);
  color: #ffffff;
}

/* ==========================================================================
   FIXED BOTTOM ACTION BAR
   ========================================================================== */
.admin-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-emerald);
  padding: 16px 28px;
  z-index: 999;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

.sticky-bar-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.save-status-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-dot-live {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald-light);
  box-shadow: 0 0 10px var(--emerald-light);
}

.sticky-bar-btns {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-save-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  background: var(--emerald-gradient);
  color: #03140d;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  transition: var(--transition-fast);
}

.btn-save-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
}

/* Toast Notifications */
.admin-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-toast {
  padding: 16px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  min-width: 300px;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-success {
  background: #064e3b;
  border: 1px solid var(--emerald-light);
  color: #ffffff;
}

.toast-error {
  background: #7f1d1d;
  border: 1px solid #f87171;
  color: #ffffff;
}

/* Responsive */
@media (max-width: 992px) {
  .form-grid-2, .form-grid-3, .form-grid-4 {
    grid-template-columns: 1fr;
  }

  .admin-container {
    padding: 0 16px;
  }

  .admin-card {
    padding: 24px;
  }
}
