/*Accont Blade*/
.account-section {
    font-family: 'Roboto', sans-serif;
    /* Arka plana çok hafif bir gradyan ekleyerek derinlik katıyoruz */
    background: linear-gradient(120deg, #f9f9f9 0%, #eef2f7 100%);
    min-height: 90vh;
    padding-top: 10rem;
    padding-bottom: 10rem;
}

.account-grid {
    display: grid;
    /* Sol menü için 300px, kalan alan ana içerik için */
    grid-template-columns: 300px 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: auto;
}

/* Ortak Kart Stili */
.account-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f7;
}

/* Sol Sütun: Profil Kenar Çubuğu */
.profile-sidebar {
    text-align: center;
}

.avatar-container {
    margin-bottom: 20px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #2196F3; /* Ana mavi rengimiz */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.profile-sidebar .user-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.profile-sidebar .user-email {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    margin: 0;
}
.profile-sidebar .user-type {
    font-size: 0.95rem;
    color: #64748b;
    word-break: break-all;
}

.profile-nav {
    margin-top: 30px;
    text-align: left;
}

.profile-nav a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-bottom: 8px;
}

.profile-nav a svg {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.profile-nav a:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}
.profile-nav a:hover svg {
    color: #2196F3;
}

/* Çıkış linkini kırmızı ile vurguluyoruz */
.profile-nav a.logout:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}
.profile-nav a.logout:hover svg {
    color: #b91c1c;
}


/* Sağ Sütun: Ana İçerik Alanı */
.account-main-content .section-header {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2f7;
}

.placeholder-box {
    border: 2px dashed #e2e8f0;
    padding: 60px 40px;
    text-align: center;
    border-radius: 8px;
    background-color: #f8fafc;
}
.placeholder-box .placeholder-icon {
    width: 50px;
    height: 50px;
    color: #cbd5e1;
    margin: 0 auto 20px auto;
}
.placeholder-box p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.6);
    z-index:9999;
}
.modal-content{
    background:#fff;
    max-width:600px;
    margin:10% auto;
    padding:20px;
    border-radius:12px;
    position:relative;
    max-height: 70vh;
    overflow: hidden;
}

/* SADECE İÇERİK KAYDIRILSIN */
#modalBody{
    max-height: calc(70vh - 60px); /* close butonu + padding düş */
    overflow-y: auto;
    padding-right: 10px; /* scrollbar içeriğe binmesin */
}
.close{
    position:absolute;
    right:15px;
    top:10px;
    font-size:24px;
    cursor:pointer;
}
.pricing-single-style-2 {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.pricing-single-style-2 ul {
    flex-grow: 1;
    margin-top: 20px;
    margin-bottom: 20px;
}
.pricing-btn {
    margin-top: auto;
    display:flex;
    gap:12px;
    justify-content:center;
    flex-wrap:wrap;
}
.pricing-btn .btn-buy{
    color:#fff;
    background:#ff6d60;
    padding:14px 32px;
    border-radius:13px;
    border:none;
}
.pricing-btn .btn-detail{
    color:#ff6d60;
    background:#fff;
    border:2px solid #ff6d60;
    padding:12px 28px;
    border-radius:13px;
    cursor:pointer;
}
/* Mobil uyumluluk */
@media (max-width: 992px) {
    .account-grid {
        grid-template-columns: 1fr; /* Sütunları alt alta sırala */
    }
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.history-table thead {
    background-color: #f8fafc;
}
.history-table th, .history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eef2f7;
}
.history-table th {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.history-table td {
    font-size: 0.95rem;
    color: #334155;
}
.history-table tbody tr:hover {
    background-color: #f9fafb;
}
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.8rem;
}
.status-badge.active { background-color: #d1fae5; color: #065f46; }
.status-badge.expired { background-color: #fee2e2; color: #991b1b; }
.empty-row td {
    text-align: center;
    padding: 40px 0;
    color: #64748b;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
    list-style: none;
    padding: 0;
}
.pagination li a {
    padding: 8px 15px;
    margin: 0 4px;
    border-radius: 6px;
    text-decoration: none;
    color: #475569;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.pagination li a:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}
.pagination li.active a {
    background-color: #2196F3;
    color: #fff;
    border-color: #2196F3;
    font-weight: 600;
}
.pagination li.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination li.disabled a {
    pointer-events: none;
}

/* ================================
   PROFİLİ DÜZENLE FORM
   ================================ */

.profile-form {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Form alanları */
.profile-form .form-group {
    margin-bottom: 18px;
}

.profile-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

/* Inputlar */
.profile-form .form-control {
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    transition: all .2s ease;
}

.profile-form .form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* Readonly / disabled alan */
.profile-form .form-control[disabled] {
    background: #f3f4f6;
    color: #374151;
    font-weight: 500;
    cursor: not-allowed;
}

/* Kaydet butonu */
.profile-form .form-actions {
    margin-top: 26px;
}

.profile-form .btn-primary {
    background: #2563eb;
    color: #fff;
    padding: 11px 26px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background .2s ease;
}

.profile-form .btn-primary:hover {
    background: #1d4ed8;
}
/* Profil formu grid */
.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
}

/* Bazı alanlar tam genişlik olsun istersen */
.profile-form-grid .full {
    grid-column: 1 / -1;
}

.remaining-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}

.remaining-badge.active {
    background: #e6f4ea;
    color: #1e7e34;
}

.remaining-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.remaining-badge.expired {
    background: #f8d7da;
    color: #721c24;
}

.remaining-badge.unknown {
    background: #e2e3e5;
    color: #6c757d;
}

.cart-page {
    max-width: 1200px;
    margin: 120px auto;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
}

.cart-title {
    font-size: 26px;
    margin-bottom: 24px;
}

/* LAYOUT */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

/* SOL TARAF */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
}

/* ICON */
.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: #f4f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #9aa3af;
}

.cart-item-title {
    font-size: 14px;
    margin-bottom: 2px;
}

.cart-item-desc {
    font-size: 12px;
    color: #777;
}

/* ACTIONS */
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* ADET */
.cart-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-qty button {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: none;
    background: #eef2f7;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.cart-qty span {
    min-width: 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

/* REMOVE ICON */
.cart-item-remove button {
    background: none;
    border: none;
    cursor: pointer;
    color: #ff6d60;
    padding: 4px;
}

.cart-item-remove i {
    font-size: 13px;
}

/* SAĞ TARAF */
.cart-summary {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    height: fit-content;
}

.cart-summary h2 {
    margin-bottom: 16px;
    font-size: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
}

.summary-row.total {
    font-size: 16px;
    font-weight: 600;
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: 14px;
}

.checkout-btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #ff6d60;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: .3s;
}

.checkout-btn:hover {
    background: #e85a4f;
}

/* ===============================
SEPET GÜNCELLENİYOR OVERLAY
================================ */
.cart-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35); /* 🔴 arka plan karartma */
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Beyaz modal kutu */
.cart-loading-box {
    background: #fff;
    width: 320px;
    padding: 30px 24px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    font-family: 'Poppins', sans-serif;
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #eee;
    border-top-color: #ff6d60; /* 🔴 tema rengi */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cart-loading-box h3 {
    font-size: 16px;
    margin-bottom: 6px;
    font-weight: 600;
}

.cart-loading-box p {
    font-size: 13px;
    color: #777;
}

/* MOBILE */
@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 50px 1fr;
        grid-template-areas:
                "img info"
                "actions actions";
    }

    .cart-item-image { grid-area: img; }
    .cart-item-info { grid-area: info; }

    .cart-item-actions {
        grid-area: actions;
        justify-content: space-between;
        margin-top: 6px;
    }
    .cart-qty button:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
}

/* Mobilde tek sütun */
@media (max-width: 768px) {
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
    .history-table thead {
        display: none;
    }

    .history-table,
    .history-table tbody,
    .history-table tr,
    .history-table td {
        display: block;
        width: 100%;
    }

    .history-table tr {
        margin-bottom: 15px;
        padding: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        background: #fff;
    }

    .history-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .history-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        text-align: left;
        font-weight: 600;
        color: #666;
    }
}
