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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-image {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#loginForm input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#loginForm button {
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#loginForm button:hover {
    background: #2980b9;
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 24px;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-actions button {
    padding: 8px 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tab-button {
    padding: 10px 20px;
    background: #ecf0f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button.active {
    background: #3498db;
    color: white;
}

.tab-content {
    display: none;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
}

.calendar-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

#selectedDate, #filterDate, #reportDate {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn-primary {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #229954;
}

.daily-view {
    margin-bottom: 30px;
}

.daily-view h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#appointmentsList {
    display: grid;
    gap: 10px;
}

.appointment-card {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.appointment-card.completed {
    border-left-color: #27ae60;
    opacity: 0.7;
}

.appointment-info {
    flex: 1;
}

.appointment-time {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.appointment-customer {
    color: #7f8c8d;
}

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

.appointment-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.btn-complete {
    background: #27ae60;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.time-slot {
    padding: 15px;
    text-align: center;
    background: #ecf0f1;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.time-slot.available {
    background: #d5f4e6;
}

.time-slot.occupied {
    background: #fadbd8;
    cursor: pointer;
}

.time-slot.occupied.merged-slot {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    border: 2px solid #c0392b;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.time-slot.occupied.merged-slot:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5);
}

.slot-time {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.slot-customer {
    font-size: 12px;
    margin-bottom: 3px;
    text-align: center;
}

.slot-duration {
    font-size: 11px;
    opacity: 0.9;
}

.time-slot:hover:not(.occupied) {
    background: #a9dfbf;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#customerSearchResults {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: none;
}

.customer-result {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.customer-result:hover {
    background: #f8f9fa;
}

#newCustomerForm {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

#newCustomerForm input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#selectedCustomerInfo {
    margin-top: 15px;
    padding: 15px;
    background: #d5f4e6;
    border-radius: 5px;
    display: none;
}

#appointmentSummary {
    margin-top: 20px;
    padding: 15px;
    background: #e8f6f3;
    border-radius: 5px;
}

.search-container {
    margin-bottom: 20px;
}

#customerSearch {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#customersList {
    display: grid;
    gap: 10px;
}

.customer-card {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.customer-card:hover {
    background: #e8f6f3;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.customer-info {
    flex: 1;
}

.customer-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.customer-phone {
    color: #7f8c8d;
}

.customer-stats {
    text-align: right;
    color: #95a5a6;
    font-size: 14px;
}

.history-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

.history-item.completed {
    border-left-color: #27ae60;
}

.history-date {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.history-details {
    color: #7f8c8d;
    font-size: 14px;
}

.history-payment {
    margin-top: 5px;
    color: #27ae60;
    font-weight: 500;
}

#dailyReport {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.report-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.report-item:last-child {
    border-bottom: none;
}

.report-label {
    font-weight: 500;
    color: #2c3e50;
}

.report-value {
    font-weight: bold;
    color: #3498db;
}

.appointments-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.appointments-filter select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.template-card {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.template-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
}

.template-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
}

.template-textarea {
    width: 100%;
    min-height: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
}

.template-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.template-info {
    background: #e8f6f3;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #2c3e50;
}

.admin-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.admin-section h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-success:hover {
    background: #229954;
}

#importStatus {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.status-success {
    background: #d5f4e6;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status-error {
    background: #fadbd8;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.customers-info {
    margin-bottom: 15px;
    padding: 10px;
    background: #e8f6f3;
    border-radius: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-info {
    font-size: 14px;
    color: #7f8c8d;
}

.customer-actions {
    display: flex;
    gap: 5px;
}

.customer-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-edit:hover {
    background: #e67e22;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    header h1 {
        font-size: 20px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
    }

    .calendar-controls {
        flex-direction: column;
        width: 100%;
    }

    #selectedDate, .btn-primary {
        width: 100%;
    }

    .appointment-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .appointment-actions {
        width: 100%;
    }

    .appointment-actions button {
        flex: 1;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .modal-content {
        width: 95%;
        margin: 10px auto;
        padding: 20px;
    }

    .appointments-filter {
        flex-direction: column;
    }

    .appointments-filter input, .appointments-filter select {
        width: 100%;
    }
}

/* Rapor stiller */
.reports-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.report-section {
    display: none;
}

.report-section.active {
    display: block;
}

.month-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.month-navigation button {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.month-navigation button:hover {
    background: #5a6268;
}

#currentMonthDisplay {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
    min-width: 200px;
    text-align: center;
}

.monthly-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 14px;
}

.report-details {
    margin-top: 30px;
}

.report-details h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.daily-breakdown {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.day-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.day-item:last-child {
    border-bottom: none;
}

/* Masraf Yönetimi Stilleri */
.expense-form-container, .expense-list-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.expense-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.expense-category {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.expense-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.expense-category.selected {
    border-color: #3498db;
    background: #e3f2fd;
}

.category-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: #333;
}

.expense-filter {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
    flex-wrap: wrap;
}

.expense-filter input, .expense-filter select {
    flex: 1;
    min-width: 150px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.expense-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expense-item-info {
    flex: 1;
}

.expense-item-category {
    display: inline-block;
    padding: 4px 8px;
    background: #e0e0e0;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 10px;
}

.expense-item-amount {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

.expense-item-description {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.expense-item-date {
    color: #999;
    font-size: 12px;
}

.expense-item-actions {
    display: flex;
    gap: 10px;
}

.btn-delete-expense {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.btn-delete-expense:hover {
    background: #c0392b;
}

.expense-summary {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.expense-summary-item {
    display: inline-block;
    margin: 0 15px;
}

.expense-summary-label {
    font-size: 12px;
    color: #666;
}

.expense-summary-value {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
}

@media (max-width: 768px) {
    .expense-categories {
        grid-template-columns: repeat(3, 1fr);
    }

    .expense-category {
        padding: 10px 5px;
    }

    .category-icon {
        font-size: 20px;
    }

    .category-name {
        font-size: 10px;
    }

    .expense-filter {
        flex-direction: column;
    }

    .expense-filter input, .expense-filter select {
        width: 100%;
    }

    .expense-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .expense-item-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
}