/* website/assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors - RAL 5002 & RAL 1006 focus */
    --primary: #20214F;       /* Ultramarine Blue */
    --primary-light: #2d2e6e;
    --primary-soft: rgba(32, 33, 79, 0.08);
    --accent: #E4A700;        /* Corn Yellow */
    --accent-hover: #f0b400;
    --accent-soft: rgba(228, 167, 0, 0.15);
    
    /* UI Palette */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Premium Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-premium: 0 10px 40px -10px rgba(32, 33, 79, 0.12);
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Layout Skeleton --- */
.crm-container {
    display: flex;
    min-height: 100vh;
}

.crm-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
}

.crm-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.crm-content {
    padding: 40px;
    max-width: 1400px;
}

/* --- Sidebar Details --- */
.crm-sidebar .logo-area {
    padding: 30px 24px;
    margin-bottom: 10px;
}

.crm-sidebar nav {
    flex: 1;
    padding: 0 16px;
    overflow-y: auto;
}

.nav-section {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    padding: 20px 12px 10px 12px;
    text-transform: uppercase;
}

.nav-item-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item-link i {
    width: 22px;
    font-size: 18px;
    margin-right: 12px;
    transition: transform 0.2s;
}

.nav-item-link:hover {
    background-color: var(--primary-soft);
    color: var(--primary);
}

.nav-item-link:hover i {
    transform: translateX(3px);
}

.nav-item-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, #31337c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(32, 33, 79, 0.2);
}

.nav-item-link.active i {
    color: var(--accent);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #fee2e2;
    color: var(--danger);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #fef2f2;
    transform: translateY(-2px);
}

/* --- Header System --- */
.crm-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.search-container {
    flex: 1;
    max-width: 450px;
    position: relative;
}

.search-container i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 50px;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.search-input:focus {
    background: white;
    border-color: var(--primary-soft);
    box-shadow: 0 0 0 4px var(--primary-soft);
    outline: none;
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 6px;
    padding-left: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-pill:hover {
    border-color: var(--primary-soft);
    box-shadow: var(--shadow-sm);
}

.avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, #31337c 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

/* --- Premium Cards --- */
.stat-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at top right, var(--primary-soft), transparent 70%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(32, 33, 79, 0.15);
}

.stat-card h4 {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-card .trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}

/* --- Table System --- */
.table-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.table-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.premium-table th {
    padding: 16px 24px;
    background: #fcfdfe;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
}

.premium-table td {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: var(--text-main);
    vertical-align: middle;
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table tr:hover td {
    background: #fafbfc;
}

/* --- Buttons --- */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(32, 33, 79, 0.1);
}

.btn-premium:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(32, 33, 79, 0.2);
}

.btn-accent {
    background: var(--accent);
    color: var(--primary);
}

.btn-accent:hover {
    background: var(--accent-hover);
}

/* --- Badges --- */
.badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* --- Forms --- */
.form-group { margin-bottom: 20px; }
.form-label { font-size: 12px; font-weight: 800; color: var(--text-muted); margin-bottom: 8px; display: block; }
.form-control-premium {
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control-premium:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
    outline: none;
}

/* =============================================================
   UTILITY & COMPONENT CLASSES
   (Eski sayfalara geriye dönük uyum — sidebar position:fixed
   olduğu için .main-content sadece margin-left yeterli)
   ============================================================= */

/* --- Layout -------------------------------------------------- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 40px;
    background: var(--bg-body);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.content-body {
    padding: 40px;
}

/* Sayfa başlığı (header.php sticky barı değil, sayfa içi başlık) */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.header-title h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.header-title p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.page-header p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

/* --- Card ---------------------------------------------------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    margin-bottom: 24px;
    overflow: hidden;
}

/* --- Stat Grid ---------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.trend { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.trend.up  { color: var(--success); }
.trend.down { color: var(--danger); }

/* --- Tables -------------------------------------------------- */
.table-container,
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table,
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.data-table th {
    padding: 13px 18px;
    background: #fcfdfe;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    text-align: left;
}

.table td,
.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: var(--text-main);
    vertical-align: middle;
}

.table tr:last-child td,
.data-table tr:last-child td { border-bottom: none; }

.table tr:hover td,
.data-table tr:hover td { background: #fafbfc; }

/* --- Buttons ------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(32, 33, 79, 0.18);
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(32, 33, 79, 0.25);
}

.btn-outline {
    background: white;
    color: var(--primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.btn-accent-solid {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    font-weight: 800;
}

.btn-accent-solid:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-icon {
    padding: 7px 9px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.2s;
    line-height: 1;
}

.btn-icon:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--border-color);
}

.btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-brand:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* --- Forms --------------------------------------------------- */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s;
    appearance: auto;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* --- Badges -------------------------------------------------- */
.badge-light {
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid rgba(32, 33, 79, 0.3);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-primary {
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-accent {
    background: var(--accent-soft);
    color: #78350f;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

/* --- Utilities ----------------------------------------------- */
.text-center  { text-align: center !important; }
.text-right   { text-align: right !important; }
.text-left    { text-align: left !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-danger  { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.semi-bold    { font-weight: 600; }
.bold         { font-weight: 700; }
.margin-top   { margin-top: 20px; }
.margin-bottom { margin-bottom: 20px; }

/* --- Modal System -------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px -10px rgba(0,0,0,0.25);
    width: 620px;
    max-width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(-12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.close-btn:hover { color: var(--danger); background: #fee2e2; }

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 28px;
    border-top: 1px solid var(--border-color);
    background: #fafbfc;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}

/* --- Auth / Login Page --------------------------------------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #31337c 60%, #1a1b40 100%);
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.35);
    padding: 48px 44px;
    width: 100%;
    max-width: 440px;
    animation: modalIn 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0 0 0;
}

.logo-text {
    display: inline-block;
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 3px;
    background: var(--accent-soft);
    border: 2px solid var(--accent);
    padding: 8px 20px;
    border-radius: var(--radius-md);
}

.btn-brand {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
    letter-spacing: 1px;
}

/* --- Responsive ---------------------------------------------- */
@media (max-width: 1024px) {
    .main-content { padding: 24px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .content-body { padding: 24px; }
}

@media (max-width: 768px) {
    .crm-sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; padding: 16px; }
    .crm-content  { padding: 16px; }
    .content-body { padding: 16px; }
    .stat-grid { grid-template-columns: 1fr; }
    .header { flex-direction: column; align-items: flex-start; }
}
/* --- Filter & Card System (Faz 3) --- */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: flex-start;
}

.filter-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.filter-group:last-child { border-bottom: none; }

.filter-group h5 {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-main);
}

.filter-option input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-soft);
}

.product-image {
    width: 100%;
    height: 160px;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-cat {
    font-size: 8px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.product-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.attr-tag {
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 700;
}

.product-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.price-box label {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
}

.price-box .price {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8fafc;
    color: #cbd5e1;
    font-size: 20px;
}
