/* Appsar Panel - Material style: koyu turuncu, koyu gri, beyaz */
:root {
  --primary: #BF360C;
  --primary-light: #E64A19;
  --primary-dark: #8D2B0B;
  --secondary: #37474F;
  --secondary-light: #546E7A;
  --secondary-dark: #263238;
  --surface: #FFFFFF;
  --surface-variant: #F5F5F5;
  --text-primary: #212121;
  --text-secondary: #757575;
  --divider: #E0E0E0;
  --success: #2E7D32;
  --error: #C62828;
  --shadow: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-sm: 4px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-variant);
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 0 16px 0 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 101;
}
.navbar-left { display: flex; align-items: center; gap: 12px; }
.navbar-toggler {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: white;
}
.navbar-toggler span { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; transition: transform 0.2s; }
body.sidebar-open .navbar-toggler span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.sidebar-open .navbar-toggler span:nth-child(2) { opacity: 0; }
body.sidebar-open .navbar-toggler span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.navbar-brand { font-size: 1.2rem; font-weight: 600; text-decoration: none; color: white; display: inline-flex; align-items: center; }
.navbar-logo { max-height: 32px; width: auto; vertical-align: middle; margin-right: 8px; object-fit: contain; }
.settings-logo-preview { margin-bottom: 10px; }
.settings-logo-img { max-height: 48px; width: auto; display: block; object-fit: contain; border: 1px solid var(--border-color, #ddd); border-radius: 6px; padding: 6px; background: #f9f9f9; }
.navbar-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.navbar-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.navbar-nav a:hover { background: rgba(255,255,255,0.15); color: white; }
.navbar-nav a.active { background: rgba(255,255,255,0.2); color: white; }
.navbar-user { color: rgba(255,255,255,0.85); padding: 0 8px; font-size: 0.95rem; }
.sidebar-user { padding: 12px 24px; color: rgba(255,255,255,0.6); font-size: 0.9rem; display: block; }

/* Container */
.container { max-width: 1280px; margin: 0 auto; padding: 24px 16px; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 24px 16px; }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-header {
  padding: 16px 20px;
  background: var(--secondary-dark);
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}
.card-body { padding: 20px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: var(--secondary-dark); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: rgba(191,54,12,0.08); }
.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #B71C1C; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text-primary); }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(191,54,12,0.15);
}
.form-select { appearance: auto; cursor: pointer; }
textarea.form-control { min-height: 100px; resize: vertical; }
.input-group {
  display: flex;
  gap: 0;
  align-items: stretch;
}
.input-group .form-control { flex: 1; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: nowrap; }
.text-muted { color: var(--text-secondary); font-weight: normal; }

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.alert-success { background: #E8F5E9; color: var(--success); border-left: 4px solid var(--success); }
.alert-error { background: #FFEBEE; color: var(--error); border-left: 4px solid var(--error); }
.alert-warning { background: #FFF8E1; color: #F57F17; border-left: 4px solid #F57F17; }
.alert-info { background: #E3F2FD; color: #1565C0; border-left: 4px solid #1565C0; }

/* Table */
.table-responsive { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
}
table.data-table th,
table.data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--divider); }
table.data-table th {
  background: var(--surface-variant);
  font-weight: 600;
  color: var(--secondary-dark);
}
table.data-table tr:hover td { background: rgba(0,0,0,0.02); }
table.data-table .actions { white-space: nowrap; }
table.data-table .actions a, table.data-table .actions .btn { margin-right: 8px; }

.app-icon-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  background: var(--surface-variant);
}
.app-icon-placeholder {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Grid */
.row { display: flex; flex-wrap: wrap; margin: -12px; }
.col { flex: 1; padding: 12px; min-width: 0; }
.col-1 { flex: 0 0 8.333%; max-width: 8.333%; padding: 12px; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; padding: 12px; }
.col-3 { flex: 0 0 25%; max-width: 25%; padding: 12px; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 12px; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 12px; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 12px; }

/* Stats */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.stat-card .value { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-card .label { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

/* Sidebar layout (admin/customer) — üst bar yok, içerik yukarıdan başlar */
.layout-with-sidebar { display: flex; min-height: 100vh; align-items: stretch; }
/* Mobil: menü butonu sabit sol üst */
.layout-menu-fab {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 201;
}
.layout-menu-fab .navbar-toggler {
  display: flex;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.sidebar {
  width: 260px;
  background: var(--secondary-dark);
  color: white;
  padding: 20px 0;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: background 0.2s;
}
.sidebar a:hover { background: rgba(255,255,255,0.1); color: white; }
.sidebar a.active { background: var(--primary); color: white; }
.sidebar .nav-section { font-size: 0.75rem; text-transform: uppercase; padding: 16px 24px 8px; color: rgba(255,255,255,0.5); }
.sidebar .nav-section.nav-section-head { margin-top: 8px; padding: 10px 24px; background: rgba(255,255,255,0.12); border-radius: 6px; margin-left: 12px; margin-right: 12px; margin-bottom: 4px; }
.sidebar .nav-section.nav-section-head:first-child { margin-top: 12px; }
.sidebar .sidebar-lang-wrap { position: relative; padding: 0 12px 8px; }
.sidebar .sidebar-lang-trigger { width: 100%; text-align: left; padding: 12px 24px; border: none; border-radius: 6px; background: rgba(255,255,255,0.15); color: inherit; font-size: 1rem; cursor: pointer; display: flex; align-items: center; }
.sidebar .sidebar-lang-trigger:hover { background: rgba(255,255,255,0.25); }
.sidebar .sidebar-lang-dropdown { position: absolute; left: 12px; right: 12px; top: 100%; margin-top: 4px; background: #2d2d2d; border-radius: 6px; padding: 6px 0; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 10; }
.sidebar .sidebar-lang-dropdown[hidden] { display: none !important; }
.sidebar .sidebar-lang-dropdown .sidebar-link { border-radius: 4px; margin: 0 6px; }

/* Müşteri paneli sidebar — flat modern, sabit yükseklik, menü kaydırılabilir */
.customer-sidebar {
  display: flex;
  flex-direction: column;
  width: 260px;
  padding: 0;
  max-height: 100vh;
  overflow: hidden;
  border-right: 1px solid rgba(0,0,0,0.06);
}
.customer-sidebar-header {
  flex-shrink: 0;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.customer-sidebar-logo {
  max-height: 32px;
  width: auto;
  object-fit: contain;
}
.customer-sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: inherit;
}
.customer-sidebar-nav {
  flex: 1 1 0;
  min-height: 0;
  padding: 12px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.customer-sidebar-section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px 6px;
  margin-bottom: 2px;
}
.customer-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin: 0 4px 2px;
  border-radius: 6px;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.customer-sidebar-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.customer-sidebar-link.active {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.customer-sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.22);
  border-radius: 9px;
}
.customer-sidebar-footer {
  flex-shrink: 0;
  padding: 12px 8px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.customer-sidebar-footer .customer-sidebar-section-label { margin-bottom: 4px; padding: 0 12px 4px; }
.customer-sidebar-section { position: relative; }
.customer-sidebar-lang-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin: 0 4px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.customer-sidebar-lang-btn:hover { background: rgba(255,255,255,0.14); }
.customer-sidebar-lang-dropdown {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 100%;
  margin-bottom: 6px;
  padding: 6px 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  z-index: 20;
}
.customer-sidebar-lang-dropdown[hidden] { display: none !important; }
.customer-sidebar-lang-dropdown .customer-sidebar-link { margin: 2px 6px; }
.customer-sidebar-user {
  display: block;
  padding: 8px 12px;
  margin: 0 4px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-sidebar-logout { margin-top: 2px; }

/* Admin sidebar: kompakt */
#admin-sidebar {
  width: 220px;
  padding: 10px 0;
}
#admin-sidebar .sidebar-link,
#admin-sidebar a.sidebar-link {
  padding: 8px 16px;
  font-size: 0.875rem;
  gap: 8px;
}
#admin-sidebar .nav-section { padding: 10px 16px 4px; font-size: 0.7rem; }
#admin-sidebar .nav-section.nav-section-head {
  margin-top: 6px;
  margin-bottom: 2px;
  margin-left: 8px;
  margin-right: 8px;
  padding: 6px 12px;
}
#admin-sidebar .nav-section.nav-section-head:first-child { margin-top: 8px; }
#admin-sidebar .sidebar-lang-wrap { padding: 0 8px 6px; }
#admin-sidebar .sidebar-lang-trigger { padding: 8px 16px; font-size: 0.875rem; }
#admin-sidebar .sidebar-lang-dropdown { left: 8px; right: 8px; padding: 4px 0; }
#admin-sidebar .sidebar-lang-dropdown .sidebar-link { padding: 6px 12px; margin: 0 4px; font-size: 0.8125rem; }

.main-content { flex: 1; padding: 24px; overflow-x: hidden; }

/* Sidebar overlay (mobile) - sadece body.sidebar-open iken görünür ve tıklanır */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
body.sidebar-open .sidebar-overlay {
  pointer-events: auto;
}

/* Page title */
.page-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 24px; color: var(--secondary-dark); }

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: #E8F5E9; color: var(--success); }
.badge-warning { background: #FFF8E1; color: #F57F17; }
.badge-secondary { background: var(--surface-variant); color: var(--text-secondary); }
.badge-danger { background: #FFEBEE; color: var(--error); }

/* Responsive */
@media (max-width: 768px) {
  .layout-menu-fab { display: block; }
  .layout-menu-fab .navbar-toggler {
    display: flex;
    background: var(--primary, #8D2B0B);
    color: #fff;
  }
  .navbar-toggler { display: flex; }
  .navbar-nav-desktop { display: none !important; }
  .layout-with-sidebar { flex-direction: row; position: relative; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 85vw;
    max-height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .customer-sidebar { width: 260px; max-width: 85vw; }
  body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.2); }
  body.sidebar-open .sidebar-overlay { display: block; opacity: 1; pointer-events: auto; }
  body.sidebar-open { overflow: hidden; }
  .main-content { width: 100%; min-width: 0; padding: 16px; padding-top: 56px; }
  .customer-sidebar-header { padding: 16px; }
  .customer-sidebar-title { font-size: 1.05rem; }
  .customer-sidebar-nav { padding: 12px 8px; }
  .customer-sidebar-footer { padding: 12px 8px 16px; }
  .col-3, .col-4, .col-6 { flex: 0 0 100%; max-width: 100%; }
  .stat-cards { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .customer-sidebar { width: 100%; max-width: 100%; }
  .customer-sidebar-header { padding: 14px 12px; }
  .customer-sidebar-link { padding: 10px 12px; font-size: 0.9rem; }
}

/* Login page */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 50%, var(--primary-dark) 100%);
  padding: 20px;
}
.login-box {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-box h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: var(--secondary-dark);
  text-align: center;
}
.login-box .subtitle { color: var(--text-secondary); text-align: center; margin-bottom: 28px; font-size: 0.9rem; }
.login-box .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* Müşteri giriş/kayıt sayfası — split layout, sol form sağ banner */
.auth-page { margin: 0; min-height: 100vh; }
.auth-layout {
  display: flex;
  min-height: 100vh;
}
.auth-form-column {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--surface);
}
.auth-form-inner {
  width: 100%;
  max-width: 420px;
}
.auth-form-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 24px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color, #e5e7eb);
}
.auth-tab {
  padding: 12px 20px;
  border: none;
  background: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.auth-tab:hover { color: var(--text-primary); }
.auth-tab.active { color: var(--primary, #1976d2); border-bottom-color: var(--primary, #1976d2); }
.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 20px;
}
.auth-panel .form-group { margin-bottom: 16px; }
.auth-form .form-control { padding: 12px 14px; border-radius: 10px; }
.auth-btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  margin-top: 8px;
}
.auth-divider {
  text-align: center;
  margin: 16px 0 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.btn-google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  text-decoration: none;
}
.btn-google:hover {
  background: #f8f9fa;
  border-color: #dadce0;
  color: #202124;
}
.auth-checkboxes {
  margin: 20px 0;
  padding: 16px;
  background: var(--surface-variant);
  border-radius: 10px;
}
.auth-check {
  display: block;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}
.auth-check:last-child { margin-bottom: 0; }
.auth-check a { color: var(--primary, #1976d2); text-decoration: none; }
.auth-check a:hover { text-decoration: underline; }
.auth-footer-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
}
.auth-footer-link a { color: var(--primary); text-decoration: none; }
.auth-footer-link a:hover { text-decoration: underline; }

.auth-banner-column {
  width: 48%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #fff;
  position: relative;
}
.auth-banner-image-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.auth-banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.auth-banner-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
  text-align: center;
}
.auth-banner-heading {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.3;
}
.auth-banner-text {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.95;
}

@media (max-width: 900px) {
  .auth-layout { flex-direction: column; }
  .auth-form-column { padding: 24px 20px; min-height: auto; }
  .auth-banner-column {
    width: 100%;
    min-height: 280px;
    padding: 32px 24px;
  }
  .auth-banner-heading { font-size: 1.4rem; }
  .auth-banner-text { font-size: 0.95rem; }
}

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state a { margin-top: 16px; }

/* Color preview */
.color-preview {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--divider);
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

/* ========== Uygulama düzenleme sayfası: sekmeler + sağda sabit önizleme ========== */
.app-edit-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 20px;
}
.app-edit-main {
  flex: 1;
  min-width: 0;
}
.app-edit-preview {
  flex: 0 0 320px;
  position: sticky;
  top: 24px;
  align-self: flex-start;
}
/* Uygulama düzenleme: üst menü — modern pill/tab butonlar */
.app-edit-nav {
  margin: 0 0 24px 0;
}
.app-edit-nav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.app-edit-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.app-edit-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.app-edit-nav-btn.active {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 0 2px rgba(255,255,255,0.3);
  transform: none;
}
.app-edit-nav-moduller { background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%); }
.app-edit-nav-moduller:hover { background: linear-gradient(135deg, #1E88E5 0%, #1976D2 100%); }
.app-edit-nav-moduller.active { background: linear-gradient(135deg, #0D47A1 0%, #0A3D91 100%); }
.app-edit-nav-genel { background: linear-gradient(135deg, #388E3C 0%, #2E7D32 100%); }
.app-edit-nav-genel:hover { background: linear-gradient(135deg, #43A047 0%, #388E3C 100%); }
.app-edit-nav-genel.active { background: linear-gradient(135deg, #1B5E20 0%, #145214 100%); }
.app-edit-nav-reklam { background: linear-gradient(135deg, #F57C00 0%, #EF6C00 100%); }
.app-edit-nav-reklam:hover { background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%); }
.app-edit-nav-reklam.active { background: linear-gradient(135deg, #E65100 0%, #BF360C 100%); }
.app-edit-nav-yayinlama { background: linear-gradient(135deg, #7B1FA2 0%, #6A1B9A 100%); }
.app-edit-nav-yayinlama:hover { background: linear-gradient(135deg, #8E24AA 0%, #7B1FA2 100%); }
.app-edit-nav-yayinlama.active { background: linear-gradient(135deg, #4A148C 0%, #38006B 100%); }
.app-edit-nav-iap { background: linear-gradient(135deg, #C62828 0%, #B71C1C 100%); }
.app-edit-nav-iap:hover { background: linear-gradient(135deg, #D32F2F 0%, #C62828 100%); color: #fff; }
.app-edit-nav-iap.active { background: linear-gradient(135deg, #B71C1C 0%, #8B0000 100%); }

.app-edit-panel[hidden] {
  display: none !important;
}
.app-edit-panel {
  display: block;
}

/* Modül ayarları sayfası: sekmeli Ayarlar / İçerik */
.module-config-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--divider);
}
.module-config-tab {
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.module-config-tab:hover { color: var(--text-primary); }
.module-config-tab.active {
  color: var(--primary, #1976d2);
  font-weight: 600;
  border-bottom-color: var(--primary, #1976d2);
}
.module-config-panel {
  display: none;
}
.module-config-panel.active {
  display: block;
}
.module-config-iframe {
  width: 100%;
  min-height: 480px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  background: #fff;
}

/* Modül listesi — kompakt, minimalist, responsive */
.module-list-compact { list-style: none; padding: 0; margin: 0; }
.module-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--divider);
  min-height: 44px;
  flex-wrap: wrap;
}
.module-item:last-child { border-bottom: none; }
.module-item-hidden { opacity: 0.75; background: var(--surface-variant); }
.module-item-hidden .module-title { color: var(--text-secondary); }
.module-handle {
  flex-shrink: 0;
  width: 22px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: grab;
  user-select: none;
  text-align: center;
  line-height: 1;
}
.module-label {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.module-title {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.module-type {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.module-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.module-visibility-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 4px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 6px;
}
.module-visibility-toggle:hover { background: var(--surface-variant); }
.module-visibility-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.module-visibility-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.4;
  transition: background 0.15s, opacity 0.15s;
}
.module-visibility-toggle input:checked + .module-visibility-dot {
  background: var(--success, #22c55e);
  opacity: 1;
}
.module-reorder { display: inline-flex; }
.module-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.module-btn:hover {
  background: var(--surface-variant);
  color: var(--text-primary);
}
.module-btn-remove:hover { background: var(--error-bg, #fef2f2); color: var(--error, #dc2626); }
.module-actions { display: inline-flex; align-items: center; gap: 2px; }
.module-list-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}
@media (max-width: 640px) {
  .module-item { padding: 10px 8px; gap: 8px; }
  .module-title { max-width: 120px; font-size: 13px; }
  .module-type { font-size: 10px; }
  .module-btn { width: 32px; height: 32px; font-size: 14px; }
}

/* Eklenen modüller — modern kart listesi */
.module-list-modern { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.module-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  min-height: 56px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.module-card:hover { border-color: var(--border-hover, #d1d5db); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.module-card-hidden { opacity: 0.82; background: var(--surface-variant); }
.module-card-hidden .module-card-title { color: var(--text-secondary); }
.module-card-drag {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: grab;
  user-select: none;
  border-radius: 8px;
}
.module-card-drag:hover { background: var(--surface-variant); color: var(--text-primary); }
.module-card-drag:active { cursor: grabbing; }
.module-card-drag-icon { letter-spacing: -2px; font-weight: 600; }
.module-card-dragging { opacity: 0.85; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.module-card-dragging .module-card-drag { cursor: grabbing; }
.module-card-drag-over { border-color: var(--primary, #1976d2); background: rgba(25, 118, 210, 0.06); box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2); }
.module-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.module-card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.module-card-type {
  font-size: 12px;
  color: var(--text-secondary);
}
.module-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
/* Aktif toggle — pill switch */
.module-card-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  user-select: none;
}
.module-card-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.module-card-toggle-slider {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--text-secondary);
  opacity: 0.4;
  transition: background 0.2s, opacity 0.2s;
}
.module-card-toggle input:checked + .module-card-toggle-slider {
  background: var(--success, #22c55e);
  opacity: 1;
}
.module-card-toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.module-card-toggle input:checked ~ .module-card-toggle-label { color: var(--text-primary); }
.module-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: var(--surface-variant);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.module-card-btn svg { flex-shrink: 0; }
.module-card-btn:hover {
  background: var(--border-hover, #d1d5db);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.module-card-btn:active { transform: translateY(0); }
.module-card-btn-settings:hover { background: var(--primary-bg, #e3f2fd); color: var(--primary, #1976d2); }
.module-card-btn-content:hover { background: #e8f5e9; color: #2e7d32; }
.module-card-btn-copy:hover { background: #fff3e0; color: #e65100; }
.module-card-btn-remove:hover { background: var(--error-bg, #fef2f2); color: var(--error, #dc2626); }
.module-card-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.module-list-modern + .module-list-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
@media (max-width: 768px) {
  .module-card { padding: 12px 14px; gap: 12px; flex-wrap: wrap; }
  .module-card-actions { width: 100%; justify-content: flex-start; }
  .module-card-btn span { display: none; }
  .module-card-btn { min-width: 40px; padding: 0 10px; }
}
@media (max-width: 480px) {
  .module-card-toggle-label { display: none; }
}

/* Modül ekleme — Eklenen Modüller ile uyumlu modern kart tasarımı */
.module-add-card-wrap .card-body { padding: 20px; }
.module-add-form { margin-bottom: 0; }
.module-add-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}
.module-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.module-add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  font-size: 0.9rem;
  min-height: 72px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.module-add-card:hover {
  background: var(--surface-variant);
  border-color: var(--primary, #1976d2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.module-add-card:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.module-add-icon {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 6px;
}
.module-add-name {
  text-align: center;
  line-height: 1.25;
  font-weight: 600;
  word-break: break-word;
  font-size: 13px;
}
@media (max-width: 600px) {
  .module-add-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
  .module-add-card { padding: 10px 8px; min-height: 66px; }
  .module-add-icon { font-size: 1.2rem; margin-bottom: 4px; }
  .module-add-name { font-size: 12px; }
}

/* Flutter web önizleme iframe — telefon ekranını tam doldurur */
.phone-screen-iframe {
  padding: 0;
  position: relative;
}
.phone-screen-iframe .preview-iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 28px;
}

.preview-card-body { padding: 16px; }
.preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.preview-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border-color, #e5e7eb);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
}
.preview-action-btn svg { flex-shrink: 0; }
.preview-action-btn:hover {
  background: var(--surface-variant);
  border-color: var(--border-hover, #d1d5db);
  transform: translateY(-1px);
}
.preview-action-btn:active { transform: translateY(0); }
.preview-action-open:hover { border-color: var(--primary, #1976d2); color: var(--primary, #1976d2); }
.preview-action-reload:hover { border-color: var(--success, #22c55e); color: var(--success, #22c55e); }

@media (max-width: 1024px) {
  .app-edit-layout { flex-direction: column; }
  .app-edit-preview { flex: none; width: 100%; position: static; }
}

/* ========== Canlı uygulama önizleme (telefon çerçevesi) ========== */
.app-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
}
.phone-frame {
  width: 280px;
  background: #1a1a1a;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.4), 0 0 0 2px #333, inset 0 0 0 2px #222;
  flex-shrink: 0;
}
.phone-screen {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  font-family: var(--preview-font, 'Roboto'), sans-serif;
}
.phone-screen .preview-appbar {
  flex-shrink: 0;
  color: white;
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  position: relative;
}
.phone-screen .preview-appbar .preview-drawer-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  cursor: default;
}
.phone-screen .preview-appbar.has-drawer { padding-left: 48px; }
.phone-screen .preview-appbar .preview-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.phone-screen .preview-content {
  flex: 1;
  overflow: auto;
  background: #f5f5f5;
  padding: 16px;
  font-size: 13px;
  color: #424242;
}
.phone-screen .preview-menu {
  flex-shrink: 0;
  display: flex;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  color: #616161;
}
.phone-screen .preview-menu.preview-menu-top {
  border-top: none;
  border-bottom: 1px solid #e0e0e0;
  order: -1;
}
.phone-screen .preview-menu .preview-tab {
  flex: 1;
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}
.phone-screen .preview-menu .preview-tab .tab-icon {
  font-size: 22px;
  opacity: 0.8;
}
.phone-screen .preview-menu .preview-tab.active {
  color: var(--preview-primary, #E65100);
  font-weight: 600;
}
.phone-screen .preview-fab {
  position: absolute;
  right: 16px;
  bottom: 80px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: default;
}
.phone-screen .preview-sidebar {
  position: absolute;
  left: 0;
  top: 52px;
  bottom: 0;
  width: 72px;
  background: rgba(0,0,0,0.05);
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  gap: 4px;
}
.phone-screen .preview-sidebar .preview-tab {
  padding: 12px;
  text-align: center;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}
.phone-screen .preview-sidebar .preview-tab .tab-icon { font-size: 24px; }
