/* style.css */


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #fdfaf6;
    color: #1f2937;
}

header {
    background: linear-gradient(135deg, #b91c1c 0%, #ea580c 55%, #d97706 100%);
    color: #ffffff;
    padding: 16px 20px;
    box-shadow: 0 4px 18px rgba(185, 28, 28, 0.2);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.brand-info {
    text-align: left;
}

.brand-info h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.brand-info p {
    margin-top: 3px;
    font-size: 13px;
    color: #fef08a;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* HARI ICONS */
.hari-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    margin-right: 8px;
}

.hari-icon-sm {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    margin-right: 6px;
}

.hari-icon-btn {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    margin-right: 6px;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 15px;
}

/* DASHBOARD */
.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.card {
    background: #ffffff;
    padding: 18px 20px;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(180, 83, 9, 0.05);
    border: 1px solid #f3e8df;
}

.card.cash {
    border-left: 4px solid #16a34a;
    background: linear-gradient(180deg, #ffffff 60%, #f0fdf4 100%);
}

.card.online {
    border-left: 4px solid #2563eb;
    background: linear-gradient(180deg, #ffffff 60%, #eff6ff 100%);
}

.card.total {
    border-left: 4px solid #ea580c;
    background: linear-gradient(180deg, #ffffff 60%, #fff7ed 100%);
}

.card h3 {
    font-size: 13px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.card strong {
    font-size: 26px;
    font-weight: 800;
}

.cash strong {
    color: #15803d;
}

.online strong {
    color: #1d4ed8;
}

.total strong {
    color: #c2410c;
}

/* MAIN SECTION */
.main {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
}

.section {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #f3e8df;
    box-shadow: 0 4px 16px rgba(180, 83, 9, 0.06);
}

.section-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.section h2 {
    font-size: 19px;
    font-weight: 700;
    color: #9a3412;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-top h2 {
    margin-bottom: 0;
}

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    padding: 9px 12px;
    border: 1px solid #e7d8cb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #fffcf9;
    color: #1f2937;
    transition: 0.2s;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #ea580c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

/* PRODUCTS */
.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.product {
    border: 1px solid #f0e4d8;
    border-radius: 12px;
    padding: 13px;
    background: #ffffff;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product:hover {
    background: #fffaf5;
    border-color: #fdba74;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.1);
}

.product .product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 5px;
}

.product h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.product .category-badge {
    font-size: 11px;
    color: #92400e;
    background: #fef3c7;
    padding: 2px 7px;
    border-radius: 5px;
    white-space: nowrap;
    font-weight: 600;
}

.product p {
    color: #c2410c;
    font-weight: 700;
    font-size: 15px;
    margin: 8px 0;
}

.product button {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: #ffffff;
    border: 0;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

.product button:hover {
    background: linear-gradient(135deg, #c2410c, #9a3412);
    transform: scale(1.02);
}

/* CART & BILL */
.bill-section {
    display: flex;
    flex-direction: column;
}

.table-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5ebe1;
}

.table-input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #78350f;
}

.table-input-group input {
    padding: 9px 12px;
    border: 1px solid #e7d8cb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #fffcf9;
    color: #1f2937;
    transition: 0.2s;
}

.table-input-group input:focus {
    border-color: #ea580c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

#cart {
    flex-grow: 1;
    max-height: 380px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f5ebe1;
    padding: 10px 0;
}

.qty button {
    border: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.minus {
    background: #fee2e2;
    color: #b91c1c;
}

.minus:hover {
    background: #fecaca;
}

.plus {
    background: #dcfce7;
    color: #15803d;
}

.plus:hover {
    background: #bbf7d0;
}

.bill-total {
    font-size: 20px;
    font-weight: 800;
    margin: 14px 0;
    color: #9a3412;
    background: #fff7ed;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px dashed #fdba74;
    text-align: center;
}

.place-order-btn {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    width: 100%;
    border: 0;
    padding: 13px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.25);
}

.place-order-btn:hover {
    background: linear-gradient(135deg, #15803d, #166534);
}

.place-order-btn:active {
    transform: scale(0.98);
}

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

.payment button {
    padding: 13px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    transition: opacity 0.2s;
}

.payment button:hover {
    opacity: 0.9;
}

.cash-btn {
    background: #16a34a;
}

.online-btn {
    background: #2563eb;
}

.clear {
    background: #ef4444;
    color: #ffffff;
    width: 100%;
    border: 0;
    padding: 12px;
    border-radius: 10px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.2s;
}

.clear:hover {
    background: #dc2626;
}

/* TABLES SECTION */
.tables-section {
    margin-top: 20px;
}

.tables-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tables-section-header h2 {
    margin-bottom: 0;
}

.tables-subtext {
    font-size: 13px;
    color: #6b7280;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.table-card {
    background: #ffffff;
    border: 2px solid #f0e4d8;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.table-card.available-table {
    background: #f0fdf4;
    border-color: #bbf7d0;
    cursor: pointer;
}

.table-card.available-table:hover {
    border-color: #16a34a;
    background: #ecfdf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
}

.table-card.active-table {
    border-color: #ea580c;
    background: #fff7ed;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
}

/* Active Order Card Styles */
.table-card.active-order-card {
    border-color: #fcd34d;
    background: #fffbeb;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.14);
    text-align: left;
}

.table-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 8px;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-icon {
    font-size: 18px;
}

.table-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.table-time-badge {
    font-size: 11px;
    color: #78350f;
    background: #fde68a;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.table-status-wrap {
    margin-bottom: 8px;
}

.table-card-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    letter-spacing: 0.3px;
}

.table-card-status.available {
    background: #dcfce7;
    color: #166534;
}

.table-card-status.occupied {
    background: #fee2e2;
    color: #b91c1c;
}

.table-empty-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 12px;
}

/* Order Details inside table card */
.table-order-details {
    background: #ffffff;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 8px 10px;
    margin: 6px 0 10px;
}

.table-items-list {
    max-height: 100px;
    overflow-y: auto;
    font-size: 12px;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 3px;
    border-bottom: 1px dashed #f5ebe1;
}

.table-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.item-qty-tag {
    color: #ea580c;
    font-weight: 700;
}

.item-price {
    font-weight: 600;
    color: #1f2937;
}

.table-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #fde68a;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.table-total-row .total-amount {
    font-size: 15px;
    color: #c2410c;
    font-weight: 800;
}

/* Table Payment Buttons */
.table-pay-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 4px;
}

.table-pay-btn {
    padding: 8px 4px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-align: center;
}

.table-pay-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.table-pay-btn:active {
    transform: scale(0.97);
}

.table-cash-btn {
    background: #16a34a;
}

.table-online-btn {
    background: #2563eb;
}

.table-cancel-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    text-align: center;
    width: 100%;
    padding: 3px 0;
    transition: color 0.2s;
}

.table-cancel-btn:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.table-select-btn {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.table-select-btn:hover {
    background: #15803d;
}

.table-card.active-order-card .active-select-btn {
    margin-top: 8px;
    background: linear-gradient(135deg, #ea580c, #c2410c);
    border: none;
}

.table-card.active-order-card .active-select-btn:hover {
    background: #c2410c;
}

/* ORDER HISTORY */
.history {
    margin-top: 20px;
}

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

.history-header h2 {
    margin-bottom: 0;
}

.clear-history-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.clear-history-btn:hover {
    background: #dc2626;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 11px 12px;
    border-bottom: 1px solid #f5ebe1;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #fef3e2;
    color: #78350f;
    font-weight: 700;
    border-bottom: 2px solid #fed7aa;
}

/* FIXED TABLE COLUMN WIDTHS */
.orders-table, .summary-table {
    min-width: 800px;
}

.col-bill {
    width: 75px;
    min-width: 75px;
    white-space: nowrap;
}

.col-time {
    width: 95px;
    min-width: 95px;
    white-space: nowrap;
}

.col-table {
    width: 115px;
    min-width: 115px;
    white-space: nowrap;
}

.col-items {
    min-width: 220px;
    white-space: normal;
    word-break: break-word;
}

.col-amount {
    width: 95px;
    min-width: 95px;
    white-space: nowrap;
}

.col-payment {
    width: 95px;
    min-width: 95px;
    white-space: nowrap;
}

.col-paytime {
    width: 105px;
    min-width: 105px;
    white-space: nowrap;
}

.col-action {
    width: 95px;
    min-width: 95px;
    white-space: nowrap;
    text-align: center;
}

/* DAILY SUMMARY TABLE COLUMNS */
.col-summary-id {
    width: 65px;
    min-width: 65px;
    white-space: nowrap;
}

.col-summary-date {
    width: 120px;
    min-width: 120px;
    white-space: nowrap;
}

.col-summary-time {
    width: 95px;
    min-width: 95px;
    white-space: nowrap;
}

.col-summary-cash {
    width: 140px;
    min-width: 130px;
    white-space: nowrap;
}

.col-summary-online {
    width: 140px;
    min-width: 130px;
    white-space: nowrap;
}

.col-summary-total {
    width: 140px;
    min-width: 130px;
    white-space: nowrap;
}

.print-btn {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: #ffffff;
    border: 0;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.print-btn:hover {
    background: #c2410c;
}

.table-badge {
    background: #ffffff;
    color: #1f2937;
    font-weight: 700;
    font-size: 14px;
    padding: 5px 12px;
    border-radius: 8px;
    display: inline-block;
    border: 1.5px solid #e7d8cb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    letter-spacing: 0.3px;
}

.empty {
    text-align: center;
    color: #888;
    padding: 20px;
}

/* RESPONSIVENESS */
@media (max-width: 900px) {
    .tables-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .main {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .brand-logo {
        width: 70px;
        height: 70px;
    }

    .brand-info {
        text-align: center;
    }

    .brand-info h1 {
        font-size: 22px;
    }
}

@media (max-width: 550px) {
    .tables-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .products {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 7px;
    }

    .section-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-bar {
        width: 100%;
    }

    .filter-bar input,
    .filter-bar select {
        flex: 1;
    }
}
/* Admin Login */
.admin-login-btn{position:absolute;right:20px;top:20px;background:#fff;color:#991b1b;border:0;border-radius:10px;padding:10px 15px;font-weight:800;cursor:pointer;box-shadow:0 3px 10px rgba(0,0,0,.15);z-index:5}
header{position:relative}
.login-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;padding:20px;z-index:9999}
.login-modal.show{display:flex}
.login-box{position:relative;width:min(420px,100%);background:#fff;border-radius:18px;padding:26px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.login-box h2{margin:0 0 6px;color:#991b1b}.login-box p{margin:0 0 18px;color:#666;font-size:14px}
.login-box form{display:grid;gap:12px}.login-box input{width:100%;padding:12px;border:1px solid #ddd;border-radius:10px;font-size:15px}
.login-box form button{padding:12px;border:0;border-radius:10px;background:#ea580c;color:#fff;font-weight:800;cursor:pointer}
.login-close{position:absolute;right:12px;top:8px;border:0;background:none;font-size:28px;cursor:pointer;color:#666}
#loginMessage{min-height:18px;color:#b91c1c;font-size:13px}
@media(max-width:600px){.admin-login-btn{right:10px;top:12px;padding:8px 10px;font-size:12px}.brand-info{padding-right:75px}}

/* Admin/dashboard + occupied table refinements */
.occupied-table{border-color:#fdba74!important;background:#fff7ed!important}.table-card-status.occupied{background:#fee2e2!important;color:#991b1b!important}.table-select-btn:disabled{opacity:.6;cursor:not-allowed}.table-card{min-width:0}@media(max-width:700px){.tables-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.main{grid-template-columns:1fr!important}.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}.bill-section{position:static!important}.orders-table,.summary-table{min-width:760px}}@media(max-width:480px){.tables-grid{grid-template-columns:1fr 1fr!important}.products{grid-template-columns:1fr 1fr!important}.product-card{min-width:0}.product-card img{height:140px!important;object-fit:cover}}
