/* =====================================================
   GREEN CHEF - PROFILE PAGE CSS
   Profil sayfasi ozel stilleri
   ===================================================== */

/* Top bar buton solda */
.top-bar-actions {
    position: absolute;
    left: 1rem;
    right: auto;
}

/* Main */
.main { padding: 1.5rem 1rem; max-width: 600px; margin: 0 auto; }

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

/* =====================================================
   PROFILE CARD
   ===================================================== */
.profile-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px var(--shadow);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-name { font-size: 1.25rem; font-weight: 700; }
.profile-since { font-size: 0.85rem; color: var(--text-muted); }

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 12px;
}

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.info-content { flex: 1; }
.info-label { font-size: 0.75rem; color: var(--text-muted); }
.info-value { font-size: 0.95rem; font-weight: 600; }

/* =====================================================
   LOYALTY CARD
   ===================================================== */
.loyalty-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.3);
}

.loyalty-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.loyalty-info { flex: 1; }
.loyalty-points {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.loyalty-label {
    font-size: 0.9rem;
    opacity: 0.9;
}
.loyalty-hint {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Loyalty History */
.loyalty-history { margin-top: 1rem; }
.loyalty-history-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.loyalty-tx {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}
.loyalty-tx:last-child { border-bottom: none; }
.loyalty-tx-desc { font-size: 0.85rem; color: var(--text); }
.loyalty-tx-date { font-size: 0.75rem; color: var(--text-muted); }
.loyalty-tx-points { font-weight: 700; }
.loyalty-tx-points.earn { color: var(--success); }
.loyalty-tx-points.spend { color: var(--danger); }

.edit-btn {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    background: var(--primary-glow);
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-btn:hover { background: var(--primary); color: #fff; }

.logout-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.logout-btn:hover { background: #ef4444; color: #fff; }

/* =====================================================
   ADMIN REPORTS
   ===================================================== */
.admin-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.stat-card {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}
.stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.25rem;
}
.stat-card.primary .stat-value { color: var(--primary-light); }
.stat-card.warning .stat-value { color: #fbbf24; }
.stat-card.danger .stat-value { color: #f87171; }
.stat-card.blue .stat-value { color: #60a5fa; }
.admin-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
}
.admin-link:hover { background: var(--primary-dark); }
.admin-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin: 1rem 0 0.5rem;
    font-weight: 600;
}
.top-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.top-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}
.top-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
}
.top-item:nth-child(1) .top-rank { background: #fbbf24; color: #1a1a1a; }
.top-item:nth-child(2) .top-rank { background: #9ca3af; color: #1a1a1a; }
.top-item:nth-child(3) .top-rank { background: #cd7f32; color: #1a1a1a; }
.top-name {
    flex: 1;
    font-size: 0.8rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-count {
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 600;
}
.category-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.category-icon { font-size: 1rem; }
.category-name {
    flex: 1;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
}
.category-revenue {
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 600;
}

/* =====================================================
   ORDERS SECTION
   ===================================================== */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-card:hover { border-color: var(--primary-light); box-shadow: 0 4px 20px var(--shadow); }

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.order-number { font-weight: 700; font-size: 0.95rem; }
.order-date { font-size: 0.8rem; color: var(--text-muted); }

.order-status {
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-preparing { background: #dbeafe; color: #1e40af; }
.status-ready { background: #dcfce7; color: #166534; }
.status-delivered { background: #f3f4f6; color: #374151; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 1rem;
}

.order-items-preview {
    font-size: 0.85rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-total { font-weight: 700; color: var(--primary); }

.order-details {
    background: var(--bg);
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: none;
}

.order-details.active { display: block; }

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.order-item:last-child { border-bottom: none; }

.item-name { font-size: 0.9rem; }
.item-qty { font-size: 0.8rem; color: var(--text-muted); margin-left: 0.5rem; }
.item-price { font-weight: 600; font-size: 0.9rem; }

.order-points-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem -0.5rem;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.order-footer-label { font-size: 0.85rem; color: var(--text-light); }
.order-footer-total { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

.order-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reorder-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}
.reorder-btn-small svg { flex-shrink: 0; }

.reorder-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reorder-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-icon { font-size: 3rem; margin-bottom: 0.75rem; opacity: 0.5; }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.page-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* =====================================================
   LEGAL LINKS
   ===================================================== */
.legal-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.legal-link:hover { background: var(--primary-glow); }

.legal-link span { font-size: 0.9rem; font-weight: 500; }

.legal-link-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* =====================================================
   MOBILE
   ===================================================== */
@media (max-width: 768px) {
    .main { padding: 1rem; }
}
