/* ============================================================
   assets/css/main.css – Teklif Yönetim Sistemi Ana Stilleri
   ============================================================ */

:root {
    --tema-renk:    #2563eb;
    --sidebar-bg:   #1e293b;
    --sidebar-w:    240px;
    --topbar-h:     56px;
    --bg:           #f1f5f9;
    --card-bg:      #ffffff;
    --text:         #1e293b;
    --text-muted:   #64748b;
    --border:       #e2e8f0;
    --danger:       #dc2626;
    --success:      #16a34a;
    --warning:      #d97706;
    --info:         #0891b2;
    --radius:       8px;
    --shadow:       0 1px 3px rgba(0,0,0,.1);
    --shadow-md:    0 4px 12px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14px;
       color: var(--text); background: var(--bg); }

a { color: var(--tema-renk); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── AUTH ─────────────────────────────────────────────────── */
.auth-body { display: flex; align-items: center; justify-content: center;
             min-height: 100vh; background: var(--bg); }

.auth-container { width: 100%; max-width: 400px; padding: 1rem; }

.auth-card { background: var(--card-bg); border-radius: var(--radius);
             padding: 2rem; box-shadow: var(--shadow-md); }

.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo h1 { font-size: 1.2rem; margin-top: .5rem; color: var(--text); }

/* ── PANEL LAYOUT ─────────────────────────────────────────── */
.panel-body { display: flex; min-height: 100vh; }

.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg);
           display: flex; flex-direction: column; position: fixed;
           top: 0; left: 0; height: 100vh; overflow-y: auto;
           transition: transform .25s; z-index: 100; }

.sidebar-logo { display: flex; align-items: center; gap: .6rem;
                padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08);
                color: #fff; font-weight: 600; font-size: .95rem; }
.sidebar-logo-img { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; }
.sidebar-logo i { font-size: 1.4rem; color: var(--tema-renk); }

.sidebar-nav { flex: 1; padding: .5rem 0; }
.nav-item { display: flex; align-items: center; gap: .65rem;
            padding: .65rem 1.25rem; color: #cbd5e1;
            transition: background .15s, color .15s; font-size: .875rem; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.07); color: #fff;
                                     text-decoration: none; }
.nav-item.active { border-left: 3px solid var(--tema-renk); }
.nav-item i { width: 18px; text-align: center; }

.sidebar-user { padding: .75rem 1rem; border-top: 1px solid rgba(255,255,255,.08);
                display: flex; align-items: center; justify-content: space-between;
                color: #94a3b8; font-size: .8rem; }
.btn-logout { color: #94a3b8; padding: .3rem .5rem; border-radius: 4px; }
.btn-logout:hover { color: var(--danger); text-decoration: none; }

.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex;
                flex-direction: column; min-height: 100vh; }

.topbar { height: var(--topbar-h); background: var(--card-bg);
          border-bottom: 1px solid var(--border); display: flex;
          align-items: center; padding: 0 1.5rem; gap: 1rem;
          position: sticky; top: 0; z-index: 50; }

.page-title { font-size: 1rem; font-weight: 600; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.badge-firma { background: var(--tema-renk); color: #fff; padding: .25rem .65rem;
               border-radius: 20px; font-size: .75rem; font-weight: 600; }
.sidebar-toggle { background: none; border: none; cursor: pointer;
                  font-size: 1.1rem; color: var(--text-muted); padding: .4rem; }

.content-wrapper { padding: 1.5rem; flex: 1; }

/* ── CARDS ────────────────────────────────────────────────── */
.card { background: var(--card-bg); border-radius: var(--radius);
        box-shadow: var(--shadow); margin-bottom: 1rem; }
.card-header { display: flex; align-items: center; justify-content: space-between;
               padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-header h3 { font-size: .95rem; font-weight: 600; }
.card-body { padding: 1.25rem; }

/* ── DASHBOARD ────────────────────────────────────────────── */
.dashboard-grid { display: grid;
                  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
                  gap: .75rem; margin-bottom: 1rem; }

.stat-card { background: var(--card-bg); border-radius: var(--radius);
             padding: 1rem; display: flex; align-items: center; gap: .75rem;
             box-shadow: var(--shadow); }
.stat-card--highlight { grid-column: span 2; }
.stat-icon { font-size: 1.5rem; }
.stat-sayi { font-size: 1.4rem; font-weight: 700; }
.stat-label { font-size: .75rem; color: var(--text-muted); }

.dashboard-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 260px; }
.flex-2 { flex: 2; min-width: 400px; }

.stok-list { list-style: none; }
.stok-item { display: flex; justify-content: space-between; padding: .6rem 1.25rem;
             border-bottom: 1px solid var(--border); }
.stok-sifir { background: #fef2f2; }
.stok-miktar { font-weight: 600; }

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: .35rem;
                    font-size: .85rem; }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], select, textarea {
    width: 100%; padding: .55rem .75rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: .875rem; color: var(--text);
    background: #fff; transition: border-color .15s; }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--tema-renk);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea { resize: vertical; min-height: 100px; }

.input-icon-right { position: relative; }
.input-icon-right input { padding-right: 2.5rem; }
.input-icon-right i { position: absolute; right: .75rem; top: 50%;
                       transform: translateY(-50%); cursor: pointer;
                       color: var(--text-muted); }

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem;
       border-radius: var(--radius); border: none; cursor: pointer;
       font-size: .875rem; font-weight: 500; transition: opacity .15s; }
.btn:hover { opacity: .88; text-decoration: none; }
.btn-primary  { background: var(--tema-renk); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-warning  { background: var(--warning); color: #fff; }
.btn-outline  { background: transparent; color: var(--tema-renk);
                border: 1px solid var(--tema-renk); }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-sm  { padding: .3rem .65rem; font-size: .8rem; }
.btn-lg  { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── TABLE ────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { background: #f8fafc; font-weight: 600; padding: .65rem .9rem;
             text-align: left; border-bottom: 2px solid var(--border); white-space: nowrap; }
.table td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fafc; }

/* ── BADGES ───────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .3rem;
         padding: .25rem .6rem; border-radius: 20px; font-size: .75rem;
         font-weight: 600; color: #fff; }

/* ── ALERTS ───────────────────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem;
         font-size: .875rem; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ── MODALS ───────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0;
                 background: rgba(0,0,0,.45); z-index: 200;
                 align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); padding: 1.5rem;
         min-width: 360px; max-width: 600px; width: 100%; box-shadow: var(--shadow-md);
         max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center;
                margin-bottom: 1rem; }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 1.25rem;
               cursor: pointer; color: var(--text-muted); }
.modal-footer { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1rem; }

/* ── UTILITIES ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .stat-card--highlight { grid-column: span 2; }
}
