/* Yeni Ay Çerez Admin - Sidebar layout, mağaza renkleriyle uyumlu */
:root {
    --primary: #e76f51;
    --primary-dark: #d64933;
    --secondary: #2a9d8f;
    --sidebar-bg: #2c2416;
    --sidebar-hover: rgba(255,255,255,0.08);
    --bg-light: #f4f7f6;
    --text-dark: #333;
    --text-light: #8898aa;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0,0,0,0.05);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; background: var(--bg-light); min-height: 100vh; font-family: 'Segoe UI', Tahoma, sans-serif; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--white);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}
.admin-brand {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 32px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}
.admin-brand i { color: var(--primary); }
.admin-menu-item {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255,255,255,0.75);
    border-radius: 0;
    margin: 0;
    transition: 0.2s;
    font-weight: 500;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.admin-menu-item:hover {
    background: var(--sidebar-hover);
    color: var(--white);
}
.admin-menu-item.active {
    background: var(--sidebar-hover);
    color: var(--white);
    border-left-color: var(--primary);
}
.admin-menu-item.active i { color: var(--primary); }
.admin-menu-item i { width: 20px; text-align: center; font-size: 16px; }

/* Main */
.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.admin-header {
    height: 64px;
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    box-shadow: var(--shadow);
}
.admin-search {
    background: var(--bg-light);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 14px;
}
.admin-search input { border: none; background: transparent; outline: none; width: 200px; }
.admin-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.admin-header-right a { font-size: 14px; color: var(--text-dark); font-weight: 500; }
.admin-header-right a:hover { color: var(--primary); }
.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}
.admin-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
}

/* Content */
.admin-content {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}
.admin-page-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-dark);
}

/* Cards grid (dashboard) */
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}
.admin-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
}
.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.admin-card-info h5 { font-size: 13px; color: var(--text-light); font-weight: 500; margin-bottom: 6px; }
.admin-card-info h2 { font-size: 20px; color: var(--text-dark); font-weight: 700; }
.admin-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.admin-card-icon.primary { background: rgba(231, 111, 81, 0.12); color: var(--primary); }
.admin-card-icon.secondary { background: rgba(42, 157, 143, 0.12); color: var(--secondary); }
.admin-card-icon.dark { background: rgba(44, 36, 22, 0.1); color: var(--sidebar-bg); }

/* Table container */
.admin-table-wrap {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.admin-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.admin-section-head h3 { font-size: 17px; color: var(--text-dark); font-weight: 600; }
.admin-btn-sm {
    padding: 8px 14px;
    background: var(--bg-light);
    color: var(--text-light);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.admin-btn-sm:hover { background: #e8ecea; color: var(--text-dark); }

/* Tables */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    text-align: left;
    padding: 14px 16px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
}
.admin-table td {
    padding: 14px 16px;
    color: var(--text-dark);
    font-size: 14px;
    border-bottom: 1px solid #eee;
}
.admin-table tbody tr:hover { background: #fafafa; }

/* Forms (sayfa içi) */
.admin-form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}
.admin-form-section:last-of-type { border-bottom: none; }
.admin-form-section h2 { font-size: 17px; margin-bottom: 16px; color: var(--text-dark); }
.admin-form-section .form-group { margin-bottom: 16px; }
.admin-form-section label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.admin-form-section input[type="text"],
.admin-form-section input[type="number"],
.admin-form-section input[type="email"],
.admin-form-section input[type="url"],
.admin-form-section select,
.admin-form-section textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}
.admin-form-section input:focus,
.admin-form-section select:focus,
.admin-form-section textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(231, 111, 81, 0.15);
}
.admin .btn {
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.admin .btn:hover { background: var(--primary-dark); }
.admin .btn-secondary { background: #6c757d; }
.admin .btn-secondary:hover { background: #5a6268; }

/* Modal (mevcut sayfalarla uyum) */
.admin .modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: auto;
    padding: 20px;
    display: none;
    align-items: flex-start;
    justify-content: center;
}
.admin .modal.show { display: flex; }
.admin .modal-content {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    margin: 40px auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.admin .modal-content .form-group { margin-bottom: 16px; }
.admin .modal-content label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.admin .modal-content input[type="text"],
.admin .modal-content input[type="number"],
.admin .modal-content select,
.admin .modal-content textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

/* Sipariş Detay Modal - Modern Arayüz */
.order-detail-modal {
    max-width: 720px !important;
    padding: 0 !important;
    overflow: hidden;
}
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 24px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}
.order-detail-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}
.order-number-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(231,111,81,0.12), rgba(42,157,143,0.12));
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
}
.order-detail-close {
    width: 40px;
    height: 40px;
    border: none;
    background: #f4f7f6;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-light);
    transition: 0.2s;
}
.order-detail-close:hover {
    background: #eee;
    color: var(--text-dark);
}
#orderDetail {
    padding: 24px;
    max-height: 65vh;
    overflow-y: auto;
}
.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.order-detail-card {
    background: #f8faf9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8eeec;
}
.order-detail-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(42,157,143,0.08), rgba(42,157,143,0.04));
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary);
}
.order-detail-card-header i {
    font-size: 16px;
}
.order-detail-invoice .order-detail-card-header {
    background: linear-gradient(135deg, rgba(231,111,81,0.08), rgba(42,157,143,0.06));
    color: var(--primary);
}
.invoice-type-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    background: var(--secondary);
    color: white;
    border-radius: 6px;
}
.order-detail-card-body {
    padding: 16px;
}
.order-detail-card-body p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-dark);
}
.order-detail-card-body p:last-child { margin-bottom: 0; }
.order-detail-card-body strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 4px;
}
.order-detail-invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.order-detail-invoice-table tr { border-bottom: 1px solid #eee; }
.order-detail-invoice-table tr:last-child { border-bottom: none; }
.order-detail-invoice-table td { padding: 10px 0; vertical-align: top; }
.order-detail-invoice-table .inv-label {
    width: 120px;
    color: var(--text-light);
    font-weight: 500;
}
.order-detail-invoice-table .inv-value { color: var(--text-dark); }
.order-detail-invoice-table .inv-value a {
    color: var(--secondary);
    text-decoration: none;
}
.order-detail-invoice-table .inv-value a:hover { text-decoration: underline; }
.inv-address-block {
    line-height: 1.7 !important;
    white-space: pre-line;
}
.inv-email-row { margin-top: 12px !important; }
.inv-email-row a { color: var(--secondary); text-decoration: none; }
.order-detail-products { grid-column: 1 / -1; }
.order-products-table { margin: 0 !important; }
.order-products-table th { padding: 12px 16px !important; }
.order-products-table td { padding: 12px 16px !important; }
.order-detail-summary {
    background: linear-gradient(135deg, #f8faf9, #f4f7f6);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #e8eeec;
}
.order-detail-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}
.order-detail-summary .summary-total {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 2px solid #ddd;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}
.order-detail-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #fafbfc;
}
.order-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.order-status-row label { font-weight: 600; font-size: 14px; }
.order-status-row select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    min-width: 160px;
}
@media (max-width: 640px) {
    .order-detail-grid { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar { width: 72px; padding: 16px 0; }
    .admin-sidebar .admin-brand span { display: none; }
    .admin-sidebar .admin-menu-item span { display: none; }
    .admin-sidebar .admin-menu-item { padding: 14px; justify-content: center; }
    .admin-main { margin-left: 72px; }
    .admin-search input { width: 120px; }
    .admin-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    .admin-cards { grid-template-columns: 1fr; }
}
