/* --- DEĞİŞKENLER --- */
:root {
    --primary: #0f172a;
    --accent: #2563eb;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
    --white: #ffffff;
}

/* --- GENEL AYARLAR --- */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }
body { background-color: var(--bg); color: var(--text); line-height: 1.5; }

/* --- HEADER --- */
header {
    background: var(--primary);
    color: white;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}
.logo-area { display: flex; align-items: center; gap: 0px; flex-shrink: 0; }
.logo-box { width: 80px; height: 80px; display: grid; place-items: center; font-weight: bold; }
.logo-box img { width: 90px; height: 90px; object-fit: contain; }
.brand-name { letter-spacing: 1px; font-weight: 600; }

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-session {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#clock { font-size: 0.9rem; opacity: 0.8; }

/* --- CONTAINER & CARD --- */
.container { width: 90%; max-width: 1200px; margin: 2rem auto; }
.card { background: var(--white); border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 2rem; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 10px; }

/* --- FORM --- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.full-width { grid-column: 1 / -1; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: #64748b; }
input, textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; outline: none; transition: 0.2s; }
input:focus, textarea:focus { border-color: var(--accent); border-width: 2px; }
.readonly-input { background: #f1f5f9; font-weight: bold; color: var(--accent); }

/* --- BUTONLAR --- */
.btn { padding: 12px 24px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; transition: all 0.2s; }
.btn-add { background: var(--accent); color: white; width: 100%; margin-top: 1rem; }
.btn-add:hover { opacity: 0.9; }
.btn-print { background: #f1f5f9; color: var(--primary); border: 1px solid var(--border); font-size: 0.8rem; }
.btn-print:hover { background: var(--primary); color: white; }

/* --- RESPONSIVE TASARIM --- */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    #search {
        width: 100%;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem 5%;
    }

    .header-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .table-container {
        overflow-x: auto;
    }

    .logo-box {
        width: 60px;
        height: 60px;
    }
    .logo-box img {
        width: 70px;
        height: 70px;
    }
    .brand-name {
        font-size: 1.25rem;
    }
}

/* --- TABLO --- */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th { text-align: left; padding: 15px; background: #f1f5f9; font-size: 0.8rem; color: #64748b; text-transform: uppercase; }
td { padding: 15px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
mark { background: #e2e8f0; padding: 2px 6px; border-radius: 4px; font-weight: bold; color: #0f172a; }

/* --- PDF PRINT STYLES --- */
#printTemplate { display: none; }

@media print {
    body * { visibility: hidden; }
    #printTemplate, #printTemplate * { visibility: visible; }
    #printTemplate {
        display: flex !important;
        flex-direction: column;
        position: absolute; left: 0; top: 0; width: 100%;
        padding: 40px; color: #000; background: white;
        min-height: 100vh;
    }
    .no-print { display: none !important; }
}

.pdf-header { display: flex; justify-content: space-between; border-bottom: 3px solid #0f172a; padding-bottom: 20px; margin-bottom: 30px; }
.pdf-logo { display: flex; align-items: center; gap: 5px; }
.pdf-logo-box { background: #0f172a; color: #fff; width: 60px; height: 60px; display: grid; place-items: center; font-weight: bold; font-size: 28px; border-radius: 4px; }
.pdf-title { text-align: right; }
.pdf-title h1 { color: var(--accent); font-size: 32px; }
.pdf-title p { font-weight: bold; font-size: 18px; margin-top: 5px; }

.pdf-info-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.info-box { border: 1px solid #e2e8f0; padding: 10px; border-radius: 8px; }
.info-box h4 { font-size: 0.7rem; color: #64748b; text-transform: uppercase; margin-bottom: 5px; border-bottom: 1px solid #eee; padding-bottom: 3px; }
.info-box p { font-weight: bold; font-size: 1rem; }

.work-title { font-size: 0.8rem; color: #0f172a; margin-bottom: 10px; font-weight: bold; }
.work-box { border: 1px solid #0f172a; min-height: 250px; padding: 20px; margin-top: 20px; border-radius: 8px; white-space: pre-wrap; line-height: 1.6; }

.price-tag { text-align: right; font-size: 1.6rem; font-weight: bold; margin-top: 40px; color: #0f172a; }
.price-label { font-size: 0.9rem; color: #64748b; font-weight: normal; vertical-align: middle; }

.signature-section { margin-top: 60px; display: flex; justify-content: space-between; margin-bottom: 40px; }
.sig-box { text-align: center; width: 220px; border-top: 2px solid #0f172a; padding-top: 10px; font-weight: bold; }

.pdf-footer-meta { margin-top: auto; padding-top: 20px; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; color: #94a3b8; font-size: 0.75rem; }

.site-footer { text-align: center; margin-top: 3rem; font-size: 0.8rem; color: #94a3b8; padding-bottom: 2rem; }
