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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-color: #2c3e50;
    --border-color: #bdc3c7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--white);
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 0.8;
}

.nav-links .logout-btn {
    background: rgba(231, 76, 60, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-links .logout-btn:hover {
    background: rgba(231, 76, 60, 0.6);
    opacity: 1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    padding: 2rem 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #95a5a6;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

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

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    transition: all 0.3s;
}

/* Forms */
.form-section {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    color: var(--primary-color);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Stats */
.stats-section {
    margin-top: 3rem;
}

.stats-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.stat-label {
    color: #7f8c8d;
    margin-top: 0.5rem;
}

/* Products List */
.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.product-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-category {
    display: inline-block;
    background-color: var(--light-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
    margin: 0.75rem 0;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Tables Grid */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.table-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    border: 3px solid transparent;
}

.table-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.table-card.empty {
    border-color: var(--success-color);
}

.table-card.occupied {
    border-color: var(--danger-color);
    background-color: #fef5e7;
}

.table-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.table-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.table-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.table-status.empty {
    background-color: #d5f4e6;
    color: var(--success-color);
}

.table-status.occupied {
    background-color: #fadbd8;
    color: var(--danger-color);
}

.table-amount {
    margin-top: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    line-height: 1;
}

.close-btn:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Orders */
.add-order-section {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.orders-list {
    margin: 1rem 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.order-info {
    flex: 1;
}

.order-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.order-details {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
}

.total-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    text-align: right;
}

.total-section h3 {
    color: var(--primary-color);
}

.total-section span {
    color: var(--success-color);
}

/* Receipt - 80mm Epson TM-T20X için optimize edildi */
.receipt {
    font-family: 'Courier New', monospace;
    background-color: var(--white);
    padding: 1.5rem;
    border: 2px dashed var(--border-color);
    max-width: 320px;
    margin: 0 auto;
}

.receipt-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.receipt-header {
    text-align: center;
    margin-bottom: 1rem;
}

.receipt-header h2 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.receipt-header p {
    font-size: 0.8rem;
    color: #666;
}

.receipt-separator {
    text-align: center;
    font-size: 0.7rem;
    color: #999;
    margin: 0.5rem 0;
    letter-spacing: -1px;
}

.receipt-info {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.receipt-items-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 0.85rem;
}

.receipt-items {
    margin: 0.5rem 0;
}

.receipt-item {
    margin-bottom: 0.75rem;
}

.receipt-item-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.receipt-item-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #555;
    padding-left: 0.5rem;
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.5rem 0;
}

.receipt-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #555;
}

.receipt-emoji {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Receipt Modal */
.receipt-modal .modal-content {
    max-width: 380px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #7f8c8d;
}

/* Utilities */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

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

    .products-list {
        grid-template-columns: 1fr;
    }

    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .form-actions {
        flex-direction: column;
    }

    .modal-footer {
        flex-direction: column;
    }
}

/* Print Styles - Epson TM-T20X 80mm Termal Yazıcı için optimize edildi */
@media print {
    /* Sayfayı gizle */
    body * {
        visibility: hidden;
    }
    
    /* Sadece adisyonu göster */
    #printArea, #printArea * {
        visibility: visible !important;
    }
    
    #printArea {
        position: fixed;
        left: 0;
        top: 0;
        width: 80mm;
        padding: 2mm;
        font-family: 'Courier New', monospace;
        font-size: 12px;
        line-height: 1.3;
        color: #000;
        background: #fff;
    }

    /* Gereksiz elementleri gizle */
    .modal-footer,
    .modal-header .close-btn,
    .no-print {
        display: none !important;
    }

    /* Sayfa ayarları */
    @page {
        size: 80mm auto;
        margin: 0;
    }
}
