/**
 * Mizan Yönetim Sistemi - Ortak Stil Dosyası
 * Tüm sayfalarda kullanılan ortak CSS kuralları
 */

/* === RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === GENEL === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 20px;
    min-height: 100vh;
    color: #2c3e50;
}

/* === CONTAINER === */
.container {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    padding: 30px 30px 40px;
}

/* === HEADER === */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e8ed;
}

.header h1 {
    color: #1e3c72;
    font-size: 2em;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* === BUTTONS === */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

/* === ALERTS === */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: #e9f5ff;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* === TABLE === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

th, td {
    padding: 12px 10px;
    border-bottom: 1px solid #e1e4e8;
    text-align: left;
}

th {
    background: #f6f8fa;
    font-weight: 600;
    color: #495057;
}

tbody tr:hover {
    background: #f9fafb;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #2a5298;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3c72;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
    }
}

/* === SHARED ADMIN BLOCKS (sirketler/index/import/musteriler) === */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.subtitle {
    font-size: 13px;
    color: #6c757d;
}

.section-title {
    margin-top: 24px;
    margin-bottom: 6px;
    font-size: 15px;
    color: #1e3c72;
}

.section-desc {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
}

.btn-link {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    color: #1e3c72;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-link:hover {
    background: #1e3c72;
    color: #fff;
    border-color: #1e3c72;
}

.search-bar {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar input[type="text"] {
    max-width: 360px;
}

.tag {
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 999px;
    background: #e9f5ff;
    color: #1e3c72;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-edit {
    background: #e3f2fd;
    color: #1e3c72;
}

.btn-edit:hover {
    background: #1e3c72;
    color: #fff;
}

.btn-hesap {
    background: #fff4cc;
    color: #7a5b00;
    border: 1px solid #f0d78c;
}

.btn-hesap:hover {
    background: #ffee99;
    color: #7a5b00;
}

.btn-delete {
    background: #fdecea;
    color: #c62828;
}

.btn-delete:hover {
    background: #c62828;
    color: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 10px;
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}
