/* =========================================
   1. GENEL AYARLAR VE KAPLAYICI
   ========================================= */
.erp-container {
    max-width: 1200px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    color: #333;
    position: relative;
    /* Margin çökmesini engellemek için */
    overflow: hidden; 
    min-height: 500px;
}

/* =========================================
   2. NAVİGASYON (ÜST MENÜ)
   ========================================= */
.erp-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    flex-wrap: wrap;
    justify-content: center; /* Menüyü ortala */
}

.erp-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 15px;
    background: #f8f9fa;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px; /* Eşit yükseklik için */
}

.erp-nav a:hover { background: #e2e6ea; color: #333; }
.erp-nav a.active { background: #0073aa; color: #fff; box-shadow: 0 2px 5px rgba(0, 115, 170, 0.3); }

/* =========================================
   3. FORMLAR VE BUTONLAR (OPTİK DÜZELTME)
   ========================================= */
.erp-form-group { margin-bottom: 20px; }
.erp-label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; font-size: 14px; }

/* Input, Select, Date, Number hepsini eşitle */
.erp-input, 
select.erp-input, 
input[type="date"].erp-input, 
input[type="number"].erp-input,
textarea.erp-input {
    width: 100%;
    height: 45px; /* Sabit yükseklik */
    padding: 0 12px; /* Dikey padding iptal, line-height ile ortala */
    line-height: 43px; /* border dahil 45px */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px; /* Zoom yapmaması için */
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: #fff;
    -webkit-appearance: none; /* iOS stilini sıfırla */
    -moz-appearance: none;
    appearance: none;
    color: #333;
}

textarea.erp-input {
    height: auto; /* Textarea uzayabilsin */
    padding: 12px;
    line-height: 1.5;
}

/* Select oku manuel ekle (appearance:none sonrası kaybolur) */
select.erp-input {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
}

.erp-input:focus { border-color: #0073aa; outline: none; box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1); }

.erp-btn {
    background: #28a745; color: white; padding: 0 25px; height: 45px; line-height: 45px; 
    border: none; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: 600; 
    display: inline-block; text-decoration: none; transition: background 0.2s;
    text-align: center;
}
.erp-btn:hover { background: #218838; }

/* Dosya Yükleme */
.file-upload-wrapper {
    position: relative; width: 100%; height: 100px; border: 2px dashed #ccc; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; background: #fdfdfd; transition: all 0.3s; cursor: pointer;
}
.file-upload-wrapper:hover { border-color: #0073aa; background: #f0f8ff; }
.file-upload-wrapper input[type="file"] { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-upload-text { color: #777; font-weight: bold; pointer-events: none; }

/* =========================================
   4. TABLOLAR
   ========================================= */
.table-responsive {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin-top: 20px; border-radius: 5px; border: 1px solid #eee;
}
.erp-table { width: 100%; border-collapse: collapse; background: white; min-width: 700px; }
.erp-table th, .erp-table td { padding: 15px; border-bottom: 1px solid #eee; text-align: left; vertical-align: middle; }
.erp-table th { background: #f1f3f5; font-weight: 700; color: #495057; text-transform: uppercase; font-size: 13px; letter-spacing: 0.5px; }
.erp-table tr:hover { background-color: #f8f9fa; }

/* =========================================
   5. DASHBOARD & KARTLAR
   ========================================= */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-bottom: 30px; }
.dash-card {
    background: #fff; padding: 25px; border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid #eee;
    display: flex; align-items: center; transition: transform 0.2s;
}
.dash-card:hover { transform: translateY(-3px); }
.card-green { border-left: 5px solid #28a745; }
.card-blue { border-left: 5px solid #0073aa; }
.card-orange { border-left: 5px solid #fd7e14; }
.card-red { border-left: 5px solid #dc3545; }

.dash-icon { font-size: 32px; margin-right: 20px; width: 60px; height: 60px; background: #f8f9fa; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dash-content { display: flex; flex-direction: column; width: 100%; }
.dash-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.dash-value { font-size: 26px; font-weight: bold; color: #333; margin: 5px 0; }
.dash-sub { font-size: 12px; color: #666; display: flex; gap: 10px; margin-top: 5px; }

/* FİRMA ROZETİ */
.company-badge {
    position: absolute; top: 20px; right: 20px;
    background: #e3f2fd; color: #0d47a1; padding: 8px 20px;
    border-radius: 50px; font-weight: bold; font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid #bbdefb;
    z-index: 10;
}

/* =========================================
   6. MOBİL UYUMLULUK
   ========================================= */
@media (max-width: 768px) {
    .erp-container { padding: 15px; margin: 10px auto; overflow: visible; }
    
    /* Mobil Menü: Eşit grid yapısı */
    .erp-nav {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 sütun */
        gap: 10px;
    }
    .erp-nav a {
        width: auto; /* Grid içine yayıl */
        padding: 10px 5px;
        font-size: 13px;
    }

    .flex-mobile-col { flex-direction: column !important; gap: 15px !important; }
    .dash-grid { grid-template-columns: 1fr; }
    
    /* Firma Rozeti: Mobilde Menünün Üstüne */
    .company-badge {
        position: relative; top: auto; right: auto; left: auto;
        margin: 0 auto 20px auto; /* Ortala ve alt boşluk bırak */
        text-align: center;
        display: table; /* İçerik kadar genişlik */
    }

    /* Dashboard Hızlı Erişim Butonları */
    .erp-btn { width: 100%; text-align: center; } /* Butonlar tam genişlik */
}