
/* =====================================
   SMART CANTEEN - MAIN STYLESHEET
   ===================================== */

/* 1. GLOBAL STYLES */

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

:root {
    --primary: #f47735;
    --primary-dark: #e76324;
    --primary-light: #fff1e9;
    --text: #202020;
    --muted: #777777;
    --border: #eeeeee;
    --background: #ffffff;
    --soft-background: #fff8f3;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
    border: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}


/* 2. NAVIGATION BAR */

.navbar {
    width: 100%;
    min-height: 76px;
    padding: 0 8%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background: white;
    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1.5px;
    white-space: nowrap;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-btn {
    background: transparent;
    color: var(--text);
    font-weight: 600;
}

.login-btn:hover {
    color: var(--primary);
}

.install-app-btn {
    padding: 9px 12px;
    border: 1px solid #ffd8c3;
    border-radius: 7px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.install-app-btn:hover {
    background: #ffe5d8;
}

.install-app-btn[hidden] {
    display: none;
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 9px;

    background: var(--primary);
    color: white;

    padding: 11px 18px;
    border-radius: 7px;

    font-weight: 700;
}

.cart-btn:hover,
.primary-btn:hover {
    background: var(--primary-dark);
}

#cart-count {
    background: white;
    color: var(--primary);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 12px;
}


/* 3. BUTTONS */

.primary-btn {
    display: inline-block;

    background: var(--primary);
    color: white;

    padding: 13px 22px;
    border-radius: 7px;

    font-size: 14px;
    font-weight: 700;

    transition: 0.2s;
}

.secondary-btn {
    display: inline-block;

    padding: 12px 20px;
    border: 1px solid #dddddd;
    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;

    transition: 0.2s;
}

.secondary-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}


/* 4. HERO SECTION */

.hero {
    min-height: 520px;

    padding: 75px 8%;

    background: var(--soft-background);

    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;

    gap: 55px;
}

.hero-content {
    max-width: 550px;
}

.eyebrow {
    color: var(--primary);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;

    margin-bottom: 17px;
}

.hero h1 {
    font-size: clamp(48px, 6vw, 76px);

    line-height: 1.05;
    letter-spacing: -3px;

    margin-bottom: 22px;
}

.hero-description {
    max-width: 440px;

    color: var(--muted);

    font-size: 16px;
    line-height: 1.9;

    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 17px;

    margin-top: 30px;

    color: #666;
    font-size: 12px;
    font-weight: 600;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 355px;

    object-fit: cover;
    border-radius: 18px;
}

.floating-card {
    position: absolute;

    left: -25px;
    bottom: 22px;

    background: white;
    padding: 15px 20px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    gap: 13px;

    box-shadow: 0 8px 35px #00000012;
}

.floating-icon {
    font-size: 27px;
}

.floating-card strong {
    font-size: 14px;
}

.floating-card p {
    color: var(--muted);
    font-size: 12px;
}


/* 5. BENEFITS SECTION */

.benefits {
    padding: 35px 8%;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 30px;

    border-bottom: 1px solid var(--border);
}

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

.benefit > span {
    font-size: 27px;
}

.benefit h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.benefit p {
    color: var(--muted);
    font-size: 12px;
}


/* 6. GENERAL SECTION */

.section {
    padding: 80px 8%;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    margin-bottom: 32px;
}

.section-heading h2,
.owner-content h2 {
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-description {
    color: var(--muted);
    font-size: 14px;
    margin-top: 10px;
}

.text-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.text-link:hover {
    color: var(--primary-dark);
}


/* 7. CANTEEN CARDS */

.canteen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 23px;
}

.canteen-card {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: white;

    transition: transform 0.2s, box-shadow 0.2s;
}

.canteen-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px #0000000c;
}

.canteen-card > img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.canteen-info {
    padding: 20px;
}

.open-label,
.coming-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.open-label {
    color: #16834b;
}

.coming-label {
    color: #b47a32;
}

.canteen-info h3 {
    font-size: 18px;
    margin: 12px 0 5px;
}

.canteen-info p {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 14px;
}

.coming-soon {
    background: #fafafa;
}

.placeholder-icon {
    height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff1e9;
    font-size: 60px;
}


/* 8. FOOD MENU */

.menu-section {
    background: #fcfcfc;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-bottom: 30px;
}

.category {
    background: #f1f1f1;
    color: #555;

    padding: 10px 23px;
    border-radius: 25px;

    font-size: 13px;
    font-weight: 600;

    transition: 0.2s;
}

.category:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.category.active {
    background: var(--primary);
    color: white;
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.food-card {
    overflow: hidden;

    background: white;

    border: 1px solid var(--border);
    border-radius: 12px;

    transition: transform 0.2s, box-shadow 0.2s;
}

.food-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px #0000000c;
}

.food-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.food-info {
    padding: 18px;
}

.food-info h3 {
    font-size: 17px;
    margin-bottom: 5px;
}

.food-info p {
    color: var(--muted);
    font-size: 12px;
}

.food-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 18px;
}

.price {
    font-size: 19px;
    font-weight: 800;
}

.add-btn {
    background: var(--primary-light);
    color: var(--primary-dark);

    padding: 9px 17px;
    border-radius: 6px;

    font-weight: 700;
    font-size: 13px;
}

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


/* 9. HOW IT WORKS */

.how-section {
    background: white;
}

.center-heading {
    display: block;
    text-align: center;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.step-card {
    position: relative;

    padding: 30px;

    text-align: center;

    border: 1px solid var(--border);
    border-radius: 12px;
}

.step-number {
    position: absolute;
    top: 15px;
    right: 18px;

    color: #e8e8e8;

    font-size: 25px;
    font-weight: 800;
}

.step-icon {
    font-size: 40px;
    margin: 15px 0;
}

.step-card h3 {
    margin-bottom: 8px;
}

.step-card p {
    font-size: 13px;
    color: var(--muted);
}


/* 10. OWNER SECTION */

.owner-section {
    background: var(--soft-background);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;
}

.owner-content {
    max-width: 560px;
}

.owner-content h2 {
    margin-bottom: 17px;
}

.owner-content > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;

    margin-bottom: 25px;
}

.owner-illustration {
    width: 320px;
    min-height: 220px;

    border-radius: 16px;
    background: white;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    box-shadow: 0 10px 35px #00000008;
}

.owner-illustration span {
    font-size: 80px;
}

.owner-illustration p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 12px;
}


/* 11. FOOTER */

.footer {
    padding: 50px 8% 20px;
    background: #202020;
    color: white;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;

    padding-bottom: 35px;
}

.footer-top > div:first-child > p {
    color: #aaa;
    font-size: 13px;
    margin-top: 13px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links h4 {
    margin-bottom: 5px;
    font-size: 14px;
}

.footer-links a {
    color: #aaa;
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #444;

    padding-top: 20px;

    display: flex;
    justify-content: space-between;
    gap: 15px;

    color: #aaa;
    font-size: 12px;
}


/* 12. MODAL */

.modal {
    display: none;

    position: fixed;
    inset: 0;

    background: #00000080;

    z-index: 200;

    justify-content: center;
    align-items: center;

    padding: 20px;
}

.modal.show {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.modal-content {
    background: white;

    width: 100%;
    max-width: 430px;

    max-height: 85vh;
    overflow-y: auto;

    padding: 30px;

    border-radius: 13px;
}

.modal-content h2 {
    font-size: 23px;
    margin-bottom: 18px;
}

.modal-content p {
    color: var(--muted);
    font-size: 14px;
    margin: 12px 0;
}

.modal-content input {
    display: block;

    width: 100%;

    padding: 13px;
    margin: 13px 0;

    border: 1px solid #ddd;
    border-radius: 6px;

    outline: none;
}

.modal-content input:focus {
    border-color: var(--primary);
}

.modal-content button {
    margin: 8px 5px 0 0;
}

.cart-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    padding: 12px 0;

    border-bottom: 1px solid var(--border);

    font-size: 14px;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quantity-control button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ffd8c3;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 20px;
}

.menu-message {
    color: var(--muted);
    font-size: 14px;
    margin: -12px 0 22px;
}

.selected-canteen-label {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 10px 0 22px;
    padding: 5px 12px;
    border: 1px solid #ffd8c3;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.college-code-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 520px;
    margin: 0 0 14px;
}

.college-code-form .form-field {
    flex: 1;
}

.auth-role-tabs,
.owner-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.auth-role-tabs button,
.owner-tabs button {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    padding: 9px 14px;
}

.auth-role-tabs button.active,
.owner-tabs button.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.owner-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.owner-dashboard-header h2 {
    margin-bottom: 0;
}

.owner-panel h3 {
    margin: 18px 0 10px;
}

.owner-form {
    margin: 14px 0 22px;
}

.modal-content select {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.owner-menu-list {
    display: grid;
    gap: 8px;
}

.owner-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.owner-menu-item p {
    margin: 4px 0 0;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 22px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
}

.modal-content {
    max-width: 520px;
}

.modal-content .form-field {
    display: block;
    margin: 16px 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.modal-content .form-field input {
    margin: 7px 0 0;
    font-weight: 400;
}

.payment-options {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.payment-handoff {
    display: grid;
    gap: 8px;
    margin: 12px 0 18px;
    padding: 14px;
    border: 1px solid #ffd8c3;
    border-radius: 10px;
    background: var(--soft-background);
}

.payment-handoff p {
    margin: 0;
}

.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
}

.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: #fff9f4;
}

.modal-content .payment-option input[type="radio"] {
    display: inline-block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--primary);
}

.payment-option span,
.receipt-card div {
    display: grid;
    gap: 4px;
}

.payment-option small,
.small-text {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.order-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.full-width {
    width: 100%;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 10px 0 0;
}

.receipt-card,
.tracking-card {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdfb;
}

.receipt-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.receipt-card span,
.tracking-heading span {
    color: var(--muted);
    font-size: 12px;
}

.confirmation-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #e8f7ec;
    color: #21864a;
    font-size: 24px;
    font-weight: 700;
}

.tracking-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff2e8;
    color: var(--primary);
    font-size: 11px;
    letter-spacing: .04em;
}

.receipt-items {
    display: grid;
    gap: 9px;
    margin: 14px 0;
    padding: 0;
    list-style: none;
}

.receipt-items li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.error-message {
    color: #b42318 !important;
}

.staff-queue-title,
.staff-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.staff-order-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.staff-order-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.staff-order-items {
    margin: 12px 0;
    padding-left: 20px;
    color: var(--muted);
    font-size: 13px;
}

.primary-btn:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.canteen-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    max-width: min(360px, calc(100vw - 32px));
    padding: 13px 18px;
    border-radius: 10px;
    background: #202020;
    color: #fff;
    box-shadow: 0 5px 20px #00000025;
}

@media (max-width: 480px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        max-height: 92vh;
        padding: 22px;
    }

    .receipt-card {
        gap: 12px;
    }
}


/* 13. RESPONSIVE TABLETS */

@media (max-width: 1000px) {

    .navbar {
        padding: 0 5%;
    }

    .hero,
    .section {
        padding-left: 5%;
        padding-right: 5%;
    }

    .food-grid,
    .canteen-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 55px;
    }

}


/* 14. RESPONSIVE MOBILE */

@media (max-width: 768px) {

    .navbar {
        min-height: 70px;
        padding: 0 5%;
    }

    .logo {
        font-size: 21px;
    }

    .nav-links {
        display: none;
    }

    .nav-actions {
        gap: 9px;
    }

    .install-app-btn {
        padding: 8px 9px;
        font-size: 12px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 55px 6%;
        gap: 35px;
    }

    .hero h1 {
        font-size: 54px;
    }

    .hero-image img {
        height: 260px;
    }

    .floating-card {
        left: 10px;
    }

    .benefits {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 35px 6%;
    }

    .section {
        padding: 55px 6%;
    }

    .section-heading h2,
    .owner-content h2 {
        font-size: 29px;
    }

    .food-grid,
    .canteen-grid,
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .owner-illustration {
        width: 100%;
    }

    .footer {
        padding: 40px 6% 20px;
    }

}


/* 15. SMALL MOBILE */

@media (max-width: 480px) {

    .navbar {
        padding: 0 4%;
    }

    .login-btn {
        font-size: 12px;
    }

    .install-app-btn {
        padding: 7px 8px;
        font-size: 11px;
    }

    .cart-btn {
        padding: 9px 11px;
        font-size: 12px;
    }

    .hero h1 {
        font-size: 46px;
        letter-spacing: -2px;
    }

    .hero-actions {
        align-items: stretch;
    }

    .hero-actions a {
        text-align: center;
    }

    .food-grid,
    .canteen-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

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

    .categories {
        gap: 8px;
    }

    .category {
        padding: 9px 15px;
        font-size: 12px;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .footer-top > div:first-child {
        grid-column: 1 / -1;
    }

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

}


/* 16. MOBILE EXPERIENCE
   Keep navigation reachable, controls easy to tap and forms comfortable on phones. */

@media (max-width: 768px) {
    html {
        scroll-padding-top: 145px;
    }

    body {
        overflow-x: hidden;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .navbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "links links";
        gap: 8px 12px;
        min-height: auto;
        padding: 10px 5%;
    }

    .navbar > .logo {
        grid-area: brand;
        min-width: 0;
    }

    .nav-links {
        grid-area: links;
        display: flex;
        justify-content: flex-start;
        gap: 6px;
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        padding: 2px 0;
    }

    .nav-links::-webkit-scrollbar,
    .categories::-webkit-scrollbar,
    .owner-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        min-height: 40px;
        padding: 0 12px;
        border-radius: 999px;
        background: var(--soft-background);
        font-size: 13px;
    }

    .nav-actions {
        grid-area: actions;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 7px;
        min-width: 0;
    }

    .nav-actions .login-btn {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-actions button {
        min-height: 44px;
    }

    .hero {
        min-height: auto;
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .hero-image img {
        height: clamp(210px, 45vw, 300px);
    }

    .section-heading {
        gap: 12px;
    }

    .categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        padding: 2px 0 8px;
    }

    .category {
        flex: 0 0 auto;
        min-height: 42px;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        max-height: min(92vh, 900px);
        max-height: min(92dvh, 900px);
        padding: 24px 22px calc(22px + env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
        overscroll-behavior: contain;
    }

    .modal-content input,
    .modal-content select {
        min-height: 46px;
        font-size: 16px;
    }

    .modal-content .payment-option input[type="radio"] {
        min-height: 18px;
    }

    .modal-content button,
    .primary-btn,
    .secondary-btn,
    .category,
    .add-btn,
    .canteen-info button,
    .owner-content button,
    .text-button,
    .auth-role-tabs button,
    .owner-tabs button,
    .quantity-control button {
        min-height: 44px;
    }

    .modal-content .full-width {
        width: 100%;
        margin-right: 0;
        margin-left: 0;
    }

    .owner-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        padding-bottom: 6px;
    }

    .owner-tabs button {
        flex: 0 0 auto;
    }

    .owner-menu-item,
    .staff-order-head {
        min-width: 0;
    }

    .owner-menu-item > div {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .staff-order-card,
    .owner-menu-item {
        padding: 14px;
    }

    .canteen-toast {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 12px;
        max-width: none;
        text-align: center;
    }
}

@media (max-width: 480px) {
    html {
        scroll-padding-top: 150px;
    }

    .navbar {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "brand"
            "actions"
            "links";
        gap: 7px;
        padding: 10px 4%;
    }

    .nav-actions {
        justify-content: space-between;
        width: 100%;
    }

    .nav-actions .login-btn {
        max-width: 46%;
    }

    .nav-actions button {
        padding: 8px 10px;
        font-size: 12px;
    }

    .install-app-btn {
        font-size: 12px;
    }

    .login-btn {
        white-space: nowrap;
    }

    .hero {
        padding: 38px 5% 42px;
        gap: 28px;
    }

    .hero h1 {
        font-size: clamp(38px, 11vw, 46px);
        line-height: 1.08;
    }

    .hero-description {
        font-size: 15px;
        line-height: 1.7;
    }

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

    .hero-actions .primary-btn,
    .hero-actions .secondary-btn {
        min-height: 46px;
        text-align: center;
    }

    .hero-features {
        gap: 10px 14px;
        line-height: 1.5;
    }

    .hero-image img {
        height: 230px;
        border-radius: 14px;
    }

    .floating-card {
        bottom: 12px;
        padding: 11px 14px;
    }

    .section {
        padding: 44px 5%;
    }

    .section-heading h2,
    .owner-content h2 {
        font-size: 27px;
    }

    .food-grid,
    .canteen-grid,
    .steps-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .food-card img,
    .canteen-card > img {
        height: 205px;
    }

    .food-info {
        padding: 16px;
    }

    .add-btn {
        min-width: 76px;
        min-height: 44px;
    }

    .college-code-form {
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
    }

    .college-code-form .primary-btn {
        width: 100%;
        min-height: 46px;
    }

    .footer {
        padding-right: 5%;
        padding-left: 5%;
    }

    .footer-top {
        gap: 26px 16px;
    }

    .modal-content {
        max-height: 94vh;
        max-height: 94dvh;
        padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
    }

    .modal-content h2 {
        font-size: 21px;
    }

    .auth-role-tabs button {
        flex: 1;
    }

    .owner-dashboard-header {
        align-items: center;
    }

    .owner-dashboard-header h2 {
        font-size: 20px;
        overflow-wrap: anywhere;
    }

    .owner-menu-item {
        align-items: flex-start;
    }

    .owner-menu-item .text-button {
        flex: 0 0 auto;
        padding: 6px 8px 0;
    }

    .staff-order-head,
    .tracking-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .cart-line {
        align-items: center;
        flex-wrap: wrap;
    }

    .quantity-control {
        flex: 0 0 auto;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 20px;
    }

    .nav-actions {
        gap: 5px;
    }

    .nav-actions button {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 11px;
    }

    .modal-content {
        padding-right: 15px;
        padding-left: 15px;
    }

    .receipt-card {
        grid-template-columns: 1fr;
    }
}
