/* =========================================================
   ESİLA — Kurumsal Zümrüt Yeşili Marka Teması
   Mobil öncelikli, responsive tasarım
   ========================================================= */

:root {
    --esila-emerald-900: #043d2e;
    --esila-emerald-800: #065f46;
    --esila-emerald-700: #047857;
    --esila-emerald-600: #059669;
    --esila-emerald-500: #10b981;
    --esila-emerald-400: #34d399;
    --esila-emerald-100: #d1fae5;
    --esila-emerald-50:  #ecfdf5;

    --esila-gold: #c9a227;
    --esila-ink: #0f2419;
    --esila-gray-600: #5b6b64;
    --esila-gray-300: #d7e3dd;
    --esila-bg: #f4faf7;
    --esila-white: #ffffff;
    --esila-danger: #dc2626;
    --esila-warning: #d97706;

    --esila-radius: 14px;
    --esila-shadow: 0 4px 18px rgba(4, 61, 46, 0.10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
    background: var(--esila-bg);
    color: var(--esila-ink);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--esila-emerald-700); text-decoration: none; }
a:hover { color: var(--esila-emerald-900); }

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 90px;
    min-height: 100vh;
}

/* ---------- Üst Marka Barı ---------- */
.esila-topbar {
    background: linear-gradient(135deg, var(--esila-emerald-800), var(--esila-emerald-600));
    color: var(--esila-white);
    padding: 18px 20px;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--esila-shadow);
    position: sticky;
    top: 0;
    z-index: 20;
}

.esila-topbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.5px;
}

.esila-topbar .brand .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--esila-white);
    color: var(--esila-emerald-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.esila-topbar .subtitle {
    font-size: 12.5px;
    opacity: 0.85;
    margin-top: 2px;
}

.esila-topbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.esila-topbar .icon-btn {
    color: var(--esila-white);
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
}

/* ---------- Kartlar ---------- */
.card {
    background: var(--esila-white);
    border-radius: var(--esila-radius);
    box-shadow: var(--esila-shadow);
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--esila-emerald-100);
}

.card h3 {
    margin: 0 0 8px;
    color: var(--esila-emerald-800);
    font-size: 16px;
}

/* ---------- Form Elemanları ---------- */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--esila-emerald-900);
    margin: 12px 0 6px;
}

input[type=text], input[type=email], input[type=password],
input[type=tel], input[type=number], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--esila-gray-300);
    border-radius: 10px;
    font-size: 15px;
    background: var(--esila-white);
    color: var(--esila-ink);
    outline: none;
    transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--esila-emerald-500);
}

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

.btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 13px 16px;
    border-radius: 12px;
    border: none;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: transform 0.05s, background 0.15s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--esila-emerald-700), var(--esila-emerald-500));
    color: var(--esila-white);
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.30);
}
.btn-primary:hover { background: var(--esila-emerald-800); }
.btn-primary:active { transform: scale(0.99); }

.btn-outline {
    background: transparent;
    color: var(--esila-emerald-700);
    border: 1.5px solid var(--esila-emerald-500);
}

.btn-sm { width: auto; padding: 8px 14px; font-size: 13.5px; margin-top: 0; }
.btn-danger { background: var(--esila-danger); color: #fff; }

/* ---------- Uyarılar ---------- */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 14px;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--esila-emerald-50); color: var(--esila-emerald-800); border: 1px solid var(--esila-emerald-100); }
.alert-info    { background: #eef6ff; color: #1e3a8a; border: 1px solid #dbeafe; }

/* ---------- Rozet / Durum ---------- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
}
.badge-open        { background: #fef3c7; color: #92400e; }
.badge-in_progress { background: #dbeafe; color: #1e40af; }
.badge-closed      { background: var(--esila-emerald-100); color: var(--esila-emerald-800); }

/* ---------- Liste Öğeleri ---------- */
.list-item {
    display: block;
    background: var(--esila-white);
    border: 1px solid var(--esila-emerald-100);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
}
.list-item:hover { border-color: var(--esila-emerald-400); }
.list-item .top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.list-item .meta { font-size: 12px; color: var(--esila-gray-600); }

/* ---------- Alt Navigasyon (Mobil) ---------- */
.esila-bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--esila-white);
    border-top: 1px solid var(--esila-gray-300);
    display: flex;
    justify-content: space-around;
    padding: 8px 4px 10px;
    box-shadow: 0 -4px 16px rgba(4,61,46,0.08);
    z-index: 30;
}
.esila-bottomnav a {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--esila-gray-600);
    padding: 6px 2px;
}
.esila-bottomnav a.active { color: var(--esila-emerald-700); font-weight: 700; }
.esila-bottomnav .nav-icon { font-size: 19px; display: block; margin-bottom: 2px; }

/* ---------- Kontör Paketleri ---------- */
.package-card {
    border: 2px solid var(--esila-emerald-100);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--esila-white);
    position: relative;
}
.package-card.featured { border-color: var(--esila-gold); background: linear-gradient(180deg, #fffdf5, #fff); }
.package-card .price { font-size: 22px; font-weight: 800; color: var(--esila-emerald-700); }
.package-card .credit { font-size: 13px; color: var(--esila-gray-600); margin-bottom: 8px; }
.ribbon {
    position: absolute; top: -10px; right: 14px;
    background: var(--esila-gold); color: #fff; font-size: 11px;
    padding: 3px 10px; border-radius: 20px; font-weight: 700;
}

.credit-balance {
    background: linear-gradient(135deg, var(--esila-emerald-900), var(--esila-emerald-600));
    color: #fff; border-radius: 16px; padding: 18px; text-align: center; margin-bottom: 18px;
}
.credit-balance .num { font-size: 32px; font-weight: 800; }
.credit-balance .lbl { font-size: 12.5px; opacity: 0.85; }

/* ---------- Sohbet Balonları ---------- */
.chat-window {
    background: var(--esila-white);
    border-radius: 14px;
    border: 1px solid var(--esila-emerald-100);
    padding: 14px;
    height: 55vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.4; }
.bubble .time { display: block; font-size: 10px; margin-top: 3px; opacity: 0.65; }
.bubble-customer { align-self: flex-end; background: var(--esila-emerald-600); color: #fff; border-bottom-right-radius: 3px; }
.bubble-rep { align-self: flex-start; background: var(--esila-emerald-50); color: var(--esila-ink); border: 1px solid var(--esila-emerald-100); border-bottom-left-radius: 3px; }

.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; }
.chat-input-row button {
    background: var(--esila-emerald-600); color: #fff; border: none;
    border-radius: 10px; padding: 0 18px; font-weight: 700; cursor: pointer;
}

.empty-state { text-align: center; color: var(--esila-gray-600); padding: 40px 10px; }
.empty-state .big-icon { font-size: 40px; margin-bottom: 10px; }

.link-center { text-align: center; margin-top: 14px; font-size: 13.5px; }

.small-text { font-size: 12.5px; color: var(--esila-gray-600); }

hr.esila-divider { border: none; border-top: 1px solid var(--esila-gray-300); margin: 18px 0; }

/* Admin (temsilci) paneli için biraz daha geniş görünüm */
.admin-wrap .container { max-width: 900px; }
.admin-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) {
    .admin-list { grid-template-columns: 1fr 1fr; }
}
