
:root {
    --primary-color: #173347; 
    --secondary-color: #234867;   
    --background-color: #e2e8f0;  
    --success-color: #22c55e;     
    --danger-color: #ef4444;      
    --text-color: #1e293b;        
    --card-bg: #ffffff;           
    --hover-color: #0c1a24;       
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #94a3b8, #64748b); 
    color: var(--text-color);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    background: linear-gradient(135deg, #173347, #234867);
    color: white;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    position: relative; 
}

.header h1 {
    font-size: 2.5em;
}

.header h1 .emoji {
    font-size: 1.2em;
}

.btn-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.btn-fullscreen:hover {
    background: var(--hover-color);
    transform: scale(1.1);
}

.btn-fullscreen.active .fullscreen-icon {
    transform: rotate(180deg);
}

.fullscreen-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

:fullscreen {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
}

:-webkit-full-screen {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
}

.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.95); 
    color: var(--text-color);
    border: 1px solid rgba(23, 51, 71, 0.2);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    min-width: 150px;
}

.tab .emoji {
    font-size: 2em;
    margin-bottom: 8px;
}

.tab:hover {
    background-color: var(--hover-color);
    color: white;
    transform: translateY(-2px);
}

.tab.active {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section {
    background-color: rgba(255, 255, 255, 0.95); 
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgb(0, 0, 0 / 0.1);
    margin-bottom: 25px;
    border: 1px solid rgba(23, 51, 71, 0.2); 
}

.section h2 .emoji {
    font-size: 1.5em;
    margin-right: 10px;
}

.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.emoji {
    font-size: 1.5em;
    margin-right: 5px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(23, 51, 71, 0.9); 
    z-index: 1000; 
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    z-index: 1001;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgb(0, 0, 0 / 0.1);
    width: calc(90% - 40px);
    max-width: 1200px; 
    height: 90vh;
    max-height: 900px;
    margin: auto;
    padding: 20px;
    overflow: auto;
    box-sizing: border-box;
    padding-top: 40px; 
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.modal-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

.modal-btn-confirm {
    background-color: var(--primary-color);
    color: white;
}

.modal-btn-cancel {
    background-color: #95a5a6;
    color: white;
}

.delivery-management {
    display: flex;
    gap: 25px;
    flex-direction: row;
    height: auto;
    min-height: 500px;
    margin: 0;
    padding: 10px;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.order-section {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
}

.menu-section {
    flex: 2;
    max-width: calc(100% - 320px);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-right: 15px; 
    overflow-x: hidden; 
    background: rgba(255, 255, 255, 0.98); 
    border-radius: 12px;
    padding: 15px;
}

.menu-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 0;
    background: rgba(240, 242, 245, 0.98); 
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-box {
    width: calc(100% - 24px); 
    padding: 12px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    outline: none;
    position: relative;
    z-index: 1000;
    background: #f8f9fa; 
    box-sizing: border-box; 
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1); 
    padding: 10px;
    border-radius: 8px;
}

.category-filter {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.category-filter:hover {
    transform: translateY(-2px);
    background: var(--hover-color);
}

.category-filter.active {
    background: var(--success-color);
    font-weight: bold;
}

.category-filter:first-child {
    background: var(--primary-color);
}

.category-filter:first-child.active {
    background: var(--success-color);
}

.category-section {
  margin-bottom: 20px;
}

.category-section h4 {
  color: var(--primary-color);
  margin: 10px 0;
  padding: 5px;
  border-bottom: 1px solid var(--primary-color);
  font-size: 1.1em;
  font-weight: 600;
}

.category-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    padding: 10px;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
    flex: 1;
    min-height: 500px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.product-item {
    display: flex;
    align-items: flex-start;
    padding: 8px;
    margin-bottom: 4px;
    background: white;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-item-content {
    flex: 1;
    margin-right: 8px;
}

.menu-item {
    background: white;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-width: 150px;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-color: var(--success-color);
}

.menu-item .item-name {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--primary-color);
    text-align: center;
    padding: 3px;
    border-bottom: 1px solid #e2e8f0;
}

.menu-item .stock-info {
    font-size: 0.8em;
    text-align: center;
    padding: 2px;
    background: #f8fafc;
    border-radius: 4px;
}

.menu-item .item-price {
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    color: var(--success-color);
    padding: 2px;
}

.product-comment {
    width: calc(100% - 10px);
    margin-top: 5px;
    padding: 8px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-size: 0.9em;
    resize: vertical;
    min-height: 20px;
    max-height: 60px;
    background-color: white;
    color: var(--text-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    line-height: 1.2;
}

.product-comment:hover, 
.product-comment:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }

  body {
    width: 80mm;
    margin: 0;
    padding: 4mm;
    font-size: 9pt;
    line-height: 1.2;
  }
}

.customer-info {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--primary-color);
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.customer-info input, 
.customer-info textarea {
    width: 100%;
    padding: 10px;
    margin: 3px 0 8px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.customer-info input:focus, 
.customer-info textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(35, 72, 103, 0.2);
    outline: none;
}

.customer-info textarea {
    resize: vertical;
    min-height: 60px;
}

.customer-info label {
    font-weight: 500;
    color: var(--primary-color);
    display: block;
    margin-bottom: 3px;
}

.form-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.form-group {
    flex: 1;
}

.customer-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--primary-color);
}

.info-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(23, 51, 71, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--primary-color);
}

.info-value {
    color: var(--text-color);
}

.delivery-status {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.delivery-status select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    margin-top: 5px;
}

.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-direction: column;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.order-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgb(0, 0, 0 / 0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--primary-color);
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 8px -1px rgb(0, 0, 0 / 0.2);
}

.order-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.order-details {
    margin-top: 10px;
}

.order-details div {
    margin-bottom: 5px;
}

.status-pending {
    background-color: #f97316;
    color: white;
}

.status-preparing {
    background-color: #3b82f6;
    color: white;
}

.status-delivering {
    background-color: #a855f7;
    color: white;
}

.status-completed {
    background-color: #22c55e;
    color: white;
}

.status-cancelled {
    background-color: #ef4444;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.order-delete-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-product-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.remove-product-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
}

.custom-notification {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
    font-size: 1.1em;
    max-width: 300px;
}

.custom-notification.show {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sales-summary {
    background-color: rgba(10, 178, 239, 0.9);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sales-amount {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
}

.reset-sales-btn {
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-sales-btn:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.sales-controls {
    display: flex;
    gap: 10px;
}

.sales-adjustment-modal {
    max-width: 400px !important;
    height: auto !important;
    padding: 25px;
}

.sales-adjustment-input {
    display: flex;
    margin: 20px 0;
    align-items: center;
    gap: 10px;
}

.sales-adjustment-input input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-size: 16px;
}

.sales-adjustment-input input:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(35, 72, 103, 0.2);
}

.sales-adjustment-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.adjustment-option {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.adjustment-option:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

.adjustment-option.selected {
    background-color: var(--success-color);
    font-weight: bold;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.modal-close-btn:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}
.btn-control-panel {
    position: absolute; 
    top: 65px;  
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-control-panel:hover {
    background: var(--hover-color);
    transform: scale(1.1);
}