/* =========================================================
   style.css
   APLIKASI KASIR & PEMESANAN MAKANAN ONLINE
========================================================= */


/* =========================================================
   1. RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f5f6fa;

    color: #222;

    line-height: 1.6;
}


/* =========================================================
   2. VARIABLE WARNA
========================================================= */

:root {

    --primary: #ff6b00;

    --primary-dark: #e85d00;

    --secondary: #222;

    --white: #ffffff;

    --light: #f5f6fa;

    --gray: #777;

    --border: #e5e5e5;

    --success: #16a34a;

    --warning: #f59e0b;

    --danger: #dc2626;

    --blue: #2563eb;

    --shadow:
        0 5px 20px rgba(0, 0, 0, 0.08);

}


/* =========================================================
   3. GENERAL
========================================================= */

.container {

    width: 90%;

    max-width: 1200px;

    margin: auto;

}


img {

    max-width: 100%;

    display: block;

}


button,
input,
select,
textarea {

    font-family: inherit;

}


button {

    cursor: pointer;

}


/* =========================================================
   4. NAVBAR
========================================================= */

.navbar {

    background: var(--white);

    border-bottom:
        1px solid var(--border);

    position: sticky;

    top: 0;

    z-index: 1000;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.05);

}


.navbar-container {

    width: 90%;

    max-width: 1200px;

    margin: auto;

    min-height: 70px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

}


.logo {

    color: var(--primary);

    font-size: 23px;

    font-weight: bold;

    text-decoration: none;

}


.nav-menu {

    display: flex;

    align-items: center;

    gap: 25px;

    list-style: none;

}


.nav-menu a {

    text-decoration: none;

    color: #333;

    font-weight: 600;

    transition: 0.2s;

}


.nav-menu a:hover {

    color: var(--primary);

}


/* =========================================================
   5. CART BUTTON
========================================================= */

.cart-button {

    position: relative;

    border: none;

    background: var(--primary);

    color: white;

    padding: 11px 17px;

    border-radius: 8px;

    font-weight: bold;

}


.cart-button:hover {

    background: var(--primary-dark);

}


.cart-count {

    position: absolute;

    top: -8px;

    right: -8px;

    width: 23px;

    height: 23px;

    background: var(--danger);

    color: white;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 12px;

    font-weight: bold;

}


/* =========================================================
   6. HERO
========================================================= */

.hero {

    min-height: 430px;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.58),
            rgba(0, 0, 0, 0.58)
        ),
        url("https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=1600")
        center / cover;

    display: flex;

    align-items: center;

    color: white;

}


.hero-content {

    width: 90%;

    max-width: 1200px;

    margin: auto;

}


.hero h1 {

    font-size: 48px;

    max-width: 650px;

    margin-bottom: 15px;

}


.hero p {

    font-size: 18px;

    max-width: 600px;

    color: #eee;

}


/* =========================================================
   7. SECTION
========================================================= */

.section {

    padding: 55px 0;

}


.section-title {

    text-align: center;

    margin-bottom: 35px;

}


.section-title h2 {

    font-size: 32px;

    margin-bottom: 8px;

}


.section-title p {

    color: var(--gray);

}


/* =========================================================
   8. SEARCH
========================================================= */

.search-box {

    display: flex;

    max-width: 600px;

    margin: 0 auto 30px;

}


.search-box input {

    flex: 1;

    padding: 14px 17px;

    border: 1px solid var(--border);

    border-radius:
        8px 0 0 8px;

    outline: none;

    background: white;

}


.search-box button {

    padding: 0 20px;

    border: none;

    background: var(--primary);

    color: white;

    border-radius:
        0 8px 8px 0;

}


/* =========================================================
   9. CATEGORY
========================================================= */

.category-filter {

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 35px;

}


.category-filter button {

    border: 1px solid var(--primary);

    background: white;

    color: var(--primary);

    padding: 9px 18px;

    border-radius: 30px;

}


.category-filter button:hover,

.category-filter button.active {

    background: var(--primary);

    color: white;

}


/* =========================================================
   10. MENU GRID
========================================================= */

.menu-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 25px;

}


.menu-card {

    background: white;

    border-radius: 14px;

    overflow: hidden;

    box-shadow: var(--shadow);

    transition: 0.25s;

}


.menu-card:hover {

    transform:
        translateY(-5px);

}


.menu-card img {

    width: 100%;

    height: 210px;

    object-fit: cover;

}


.menu-content {

    padding: 20px;

}


.kategori {

    display: inline-block;

    background: #fff0e6;

    color: var(--primary);

    padding: 4px 10px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: bold;

    margin-bottom: 8px;

}


.menu-content h3 {

    font-size: 20px;

    margin-bottom: 7px;

}


.menu-content p {

    color: var(--gray);

    font-size: 14px;

    min-height: 45px;

}


.menu-footer {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;

    margin-top: 18px;

}


.menu-footer strong {

    color: var(--primary);

    font-size: 18px;

}


.menu-footer button {

    border: none;

    background: var(--primary);

    color: white;

    padding: 9px 13px;

    border-radius: 7px;

    font-weight: bold;

}


.menu-footer button:hover {

    background: var(--primary-dark);

}


/* =========================================================
   11. CART
========================================================= */

.cart-container {

    max-width: 900px;

    margin: auto;

}


.cart-item {

    background: white;

    padding: 18px;

    margin-bottom: 15px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    gap: 18px;

    box-shadow: var(--shadow);

}


.cart-item img {

    width: 90px;

    height: 90px;

    object-fit: cover;

    border-radius: 9px;

}


.cart-info {

    flex: 1;

}


.cart-info h4 {

    margin-bottom: 4px;

}


.cart-info p {

    color: var(--gray);

}


.quantity {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 10px;

}


.quantity button {

    width: 30px;

    height: 30px;

    border: none;

    border-radius: 5px;

    background: var(--primary);

    color: white;

    font-size: 18px;

}


.quantity span {

    min-width: 25px;

    text-align: center;

    font-weight: bold;

}


.cart-subtotal {

    text-align: right;

}


.cart-subtotal strong {

    display: block;

    color: var(--primary);

    margin-bottom: 8px;

}


/* =========================================================
   12. DELETE BUTTON
========================================================= */

.btn-delete {

    border: none;

    background: #fee2e2;

    color: var(--danger);

    padding: 7px 11px;

    border-radius: 6px;

}


.btn-delete:hover {

    background: var(--danger);

    color: white;

}


/* =========================================================
   13. TOTAL
========================================================= */

.cart-summary {

    background: white;

    padding: 25px;

    border-radius: 12px;

    box-shadow: var(--shadow);

    margin-top: 20px;

}


.cart-total {

    display: flex;

    justify-content: space-between;

    align-items: center;

    font-size: 22px;

    margin-bottom: 20px;

}


.cart-total strong {

    color: var(--primary);

}


/* =========================================================
   14. BUTTON
========================================================= */

.btn {

    border: none;

    padding: 12px 20px;

    border-radius: 8px;

    font-weight: bold;

    text-decoration: none;

    display: inline-block;

}


.btn-primary {

    background: var(--primary);

    color: white;

}


.btn-primary:hover {

    background: var(--primary-dark);

}


.btn-success {

    background: var(--success);

    color: white;

}


.btn-danger {

    background: var(--danger);

    color: white;

}


.btn-blue {

    background: var(--blue);

    color: white;

}


/* =========================================================
   15. FORM
========================================================= */

.form-group {

    margin-bottom: 17px;

}


.form-group label {

    display: block;

    margin-bottom: 6px;

    font-weight: 600;

}


.form-control {

    width: 100%;

    padding: 12px 14px;

    border: 1px solid var(--border);

    border-radius: 8px;

    outline: none;

    background: white;

}


.form-control:focus {

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(255, 107, 0, 0.1);

}


textarea.form-control {

    min-height: 100px;

    resize: vertical;

}


/* =========================================================
   16. CHECKOUT
========================================================= */

.checkout-container {

    max-width: 850px;

    margin: auto;

}


.checkout-card {

    background: white;

    padding: 30px;

    border-radius: 14px;

    box-shadow: var(--shadow);

}


.checkout-card h2 {

    margin-bottom: 25px;

}


/* =========================================================
   17. LOGIN
========================================================= */

.login-page {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #ff6b00,
            #ff9d4d
        );

    padding: 20px;

}


.login-card {

    width: 100%;

    max-width: 420px;

    background: white;

    padding: 35px;

    border-radius: 16px;

    box-shadow:
        0 15px 50px
        rgba(0, 0, 0, 0.2);

}


.login-logo {

    text-align: center;

    margin-bottom: 25px;

}


.login-logo h1 {

    color: var(--primary);

    margin-bottom: 5px;

}


.login-logo p {

    color: var(--gray);

}


/* =========================================================
   18. ADMIN LAYOUT
========================================================= */

.admin-layout {

    display: flex;

    min-height: 100vh;

}


.sidebar {

    width: 250px;

    background: #1f2937;

    color: white;

    position: fixed;

    top: 0;

    bottom: 0;

    left: 0;

    padding: 25px 15px;

}


.sidebar-logo {

    font-size: 21px;

    font-weight: bold;

    color: var(--primary);

    padding:
        0 15px 25px;

    border-bottom:
        1px solid #374151;

}


.sidebar-menu {

    list-style: none;

    margin-top: 25px;

}


.sidebar-menu li {

    margin-bottom: 7px;

}


.sidebar-menu a {

    display: block;

    padding: 12px 15px;

    color: #d1d5db;

    text-decoration: none;

    border-radius: 7px;

}


.sidebar-menu a:hover,

.sidebar-menu a.active {

    background: var(--primary);

    color: white;

}


.admin-main {

    margin-left: 250px;

    width: calc(100% - 250px);

    min-height: 100vh;

    background: #f5f6fa;

}


.admin-header {

    background: white;

    min-height: 70px;

    padding:
        0 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid var(--border);

}


.admin-content {

    padding: 30px;

}


/* =========================================================
   19. ADMIN USER
========================================================= */

.admin-user {

    display: flex;

    align-items: center;

    gap: 10px;

}


.admin-avatar {

    width: 40px;

    height: 40px;

    border-radius: 50%;

    background: var(--primary);

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: bold;

}


/* =========================================================
   20. DASHBOARD CARDS
========================================================= */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;

    margin-bottom: 30px;

}


.dashboard-card {

    background: white;

    padding: 23px;

    border-radius: 12px;

    box-shadow: var(--shadow);

}


.dashboard-card span {

    color: var(--gray);

    font-size: 14px;

}


.dashboard-card h2 {

    margin-top: 8px;

    font-size: 28px;

}


.dashboard-card.orange h2 {

    color: var(--primary);

}


.dashboard-card.blue h2 {

    color: var(--blue);

}


.dashboard-card.green h2 {

    color: var(--success);

}


.dashboard-card.red h2 {

    color: var(--danger);

}


/* =========================================================
   21. ADMIN TABLE
========================================================= */

.table-container {

    width: 100%;

    overflow-x: auto;

    background: white;

    border-radius: 12px;

    box-shadow: var(--shadow);

}


table {

    width: 100%;

    border-collapse: collapse;

}


th,
td {

    padding: 14px 16px;

    text-align: left;

    border-bottom:
        1px solid var(--border);

}


th {

    background: #fafafa;

    font-size: 14px;

}


td {

    font-size: 14px;

}


/* =========================================================
   22. ORDER CARD
========================================================= */

.order-card {

    background: white;

    padding: 22px;

    border-radius: 12px;

    margin-bottom: 20px;

    box-shadow: var(--shadow);

}


.order-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;

}


.order-header h3 {

    color: var(--primary);

}


.order-header small {

    color: var(--gray);

}


.customer-info {

    background: #f9fafb;

    padding: 15px;

    border-radius: 8px;

    margin-bottom: 15px;

}


.customer-info p {

    margin-bottom: 5px;

}


.order-products {

    margin-bottom: 15px;

}


.order-product {

    display: flex;

    justify-content: space-between;

    padding: 8px 0;

    border-bottom:
        1px dashed var(--border);

}


.order-total {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding-top: 15px;

    font-size: 18px;

}


.order-total strong {

    color: var(--primary);

}


.order-actions {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 10px;

    margin-top: 20px;

}


.order-actions select {

    padding: 9px 12px;

    border:
        1px solid var(--border);

    border-radius: 7px;

    background: white;

}


/* =========================================================
   23. STATUS
========================================================= */

.status {

    display: inline-block;

    padding: 5px 12px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: bold;

    background: #e5e7eb;

    color: #374151;

}


.status-menunggu {

    background: #fef3c7;

    color: #92400e;

}


.status-diproses {

    background: #dbeafe;

    color: #1e40af;

}


.status-siap {

    background: #dcfce7;

    color: #166534;

}


.status-selesai {

    background: #bbf7d0;

    color: #166534;

}


.status-dibatalkan {

    background: #fee2e2;

    color: #991b1b;

}


/* =========================================================
   24. TRACKING
========================================================= */

.tracking-card {

    max-width: 700px;

    margin: auto;

    background: white;

    padding: 30px;

    border-radius: 14px;

    box-shadow: var(--shadow);

}


.tracking-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;

}


.tracking-header h2 {

    color: var(--primary);

}


.tracking-items {

    margin-top: 20px;

}


.status-item {

    display: flex;

    justify-content: space-between;

    padding: 10px 0;

    border-bottom:
        1px dashed var(--border);

}


.tracking-total {

    display: flex;

    justify-content: space-between;

    margin-top: 20px;

    font-size: 20px;

}


.tracking-total strong {

    color: var(--primary);

}


/* =========================================================
   25. EMPTY
========================================================= */

.empty {

    background: white;

    padding: 50px 20px;

    text-align: center;

    border-radius: 12px;

    color: var(--gray);

    box-shadow: var(--shadow);

}


/* =========================================================
   26. ALERT
========================================================= */

.alert {

    padding: 13px 16px;

    border-radius: 8px;

    margin-bottom: 20px;

}


.alert-success {

    background: #dcfce7;

    color: #166534;

}


.alert-danger {

    background: #fee2e2;

    color: #991b1b;

}


.alert-warning {

    background: #fef3c7;

    color: #92400e;

}


/* =========================================================
   27. FOOTER
========================================================= */

.footer {

    background: #1f2937;

    color: white;

    padding: 30px 0;

    text-align: center;

    margin-top: 50px;

}


.footer p {

    color: #d1d5db;

    font-size: 14px;

}


/* =========================================================
   28. RESPONSIVE TABLET
========================================================= */

@media (max-width: 992px) {

    .menu-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .dashboard-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .sidebar {

        width: 220px;

    }


    .admin-main {

        margin-left: 220px;

        width:
            calc(100% - 220px);

    }

}


/* =========================================================
   29. RESPONSIVE MOBILE
========================================================= */

@media (max-width: 768px) {

    .navbar-container {

        flex-wrap: wrap;

        padding: 12px 0;

    }


    .nav-menu {

        width: 100%;

        justify-content: center;

        gap: 15px;

    }


    .hero {

        min-height: 350px;

    }


    .hero h1 {

        font-size: 34px;

    }


    .menu-grid {

        grid-template-columns: 1fr;

    }


    .dashboard-grid {

        grid-template-columns: 1fr 1fr;

    }


    .sidebar {

        position: static;

        width: 100%;

        min-height: auto;

    }


    .admin-layout {

        display: block;

    }


    .admin-main {

        margin-left: 0;

        width: 100%;

    }


    .admin-header {

        padding: 15px 20px;

    }


    .admin-content {

        padding: 20px;

    }


    .sidebar-menu {

        display: flex;

        overflow-x: auto;

        gap: 5px;

    }


    .sidebar-menu li {

        flex-shrink: 0;

    }


    .cart-item {

        align-items: flex-start;

        flex-wrap: wrap;

    }


    .cart-info {

        min-width: 180px;

    }


    .cart-subtotal {

        width: 100%;

        text-align: left;

        padding-left: 108px;

    }


    .order-header {

        flex-direction: column;

        align-items: flex-start;

    }


    .order-actions {

        justify-content: flex-start;

        flex-wrap: wrap;

    }

}


/* =========================================================
   30. RESPONSIVE SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .container {

        width: 92%;

    }


    .hero h1 {

        font-size: 28px;

    }


    .hero p {

        font-size: 15px;

    }


    .section {

        padding: 40px 0;

    }


    .section-title h2 {

        font-size: 25px;

    }


    .dashboard-grid {

        grid-template-columns: 1fr;

    }


    .login-card {

        padding: 25px 20px;

    }


    .cart-item img {

        width: 70px;

        height: 70px;

    }


    .cart-subtotal {

        padding-left: 0;

    }


    .tracking-card {

        padding: 20px;

    }

}
