* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f6f7f4;
    color: #1f2923;
    font-family: Arial, Helvetica, sans-serif;
}

.login-page {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.login-page::before {
    background: rgba(13, 28, 20, 0.34);
    content: "";
    inset: 0;
    position: fixed;
}

a {
    color: #236b4e;
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: #16392b;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 14px 24px;
}

.brand {
    font-size: 20px;
    font-weight: 700;
}

.layout {
    display: grid;
    gap: 20px;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 56px);
}

.sidebar {
    background: #fff;
    border-right: 1px solid #dfe5dc;
    padding: 18px;
}

.sidebar a {
    border-radius: 6px;
    color: #1f2923;
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 10px 12px;
}

.sidebar a:hover,
.sidebar a.active {
    background: #e7f2ec;
    color: #155438;
}

.sidebar a.nav-notify {
    animation: navNotifyBlink 0.9s ease-in-out infinite;
    background: #fff0f0;
    border: 2px solid #e02020;
    color: #8b1515;
    font-weight: 800;
}

.sidebar a.nav-notify.active {
    background: #ffe5e5;
    color: #8b1515;
}

.nav-badge {
    background: #e02020;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    min-width: 22px;
    padding: 2px 6px;
}

.nav-badge.is-empty {
    display: none;
}

@keyframes navNotifyBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 rgba(224, 32, 32, 0);
    }
    50% {
        opacity: 0.55;
        box-shadow: 0 0 0 3px rgba(224, 32, 32, 0.12);
    }
}

.content {
    padding: 22px 24px 40px 4px;
}

.auth-wrap {
    display: grid;
    min-height: 100vh;
    place-items: center;
    position: relative;
    z-index: 1;
}

.panel,
.card {
    background: #fff;
    border: 1px solid #dfe5dc;
    border-radius: 8px;
    padding: 18px;
}

.auth-card {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
    max-width: 420px;
    width: 92%;
}

.login-logo {
    display: block;
    height: auto;
    margin: 0 auto 14px;
    max-width: 190px;
    width: 58%;
}

.auth-card h1 {
    text-align: center;
}

.remember-row {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 6px;
    font-weight: 700;
    justify-content: flex-start;
    margin: 8px 0 14px;
    width: fit-content;
}

.remember-row input[type="checkbox"] {
    flex: 0 0 auto;
    height: 16px;
    margin: 0;
    padding: 0;
    width: 16px;
}

.login-credit {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(223, 229, 220, 0.9);
    border-radius: 8px;
    bottom: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    color: #16392b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    padding: 8px 10px;
    position: fixed;
    right: 14px;
    text-align: right;
    z-index: 2;
}

.login-credit a {
    color: #236b4e;
}

h1,
h2,
h3 {
    margin: 0 0 16px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
select,
textarea {
    border: 1px solid #cfd8d1;
    border-radius: 6px;
    font: inherit;
    padding: 10px;
    width: 100%;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

button,
.button {
    background: #236b4e;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: 10px 14px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button-muted {
    background: #66756c;
}

.button-danger {
    background: #a63b36;
}

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

th,
td {
    border-bottom: 1px solid #e4e9e2;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f0f4ee;
}

.customer-letter-row td {
    background: #e7f2ec;
    color: #155438;
    font-size: 18px;
    font-weight: 900;
    padding: 8px 12px;
}

.flash {
    border-radius: 6px;
    margin-bottom: 14px;
    padding: 12px;
}

.flash.success {
    background: #e7f4eb;
    color: #14562c;
}

.flash.error {
    background: #fae9e8;
    color: #8a2420;
}

.muted {
    color: #66756c;
}

.badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

.pending {
    background: #fff4cf;
    color: #7b5a00;
}

.approved {
    background: #e0f3e7;
    color: #166334;
}

.rejected {
    background: #f9dddd;
    color: #8d2621;
}

.product-img {
    background: #edf1ec;
    border-radius: 6px;
    height: 58px;
    object-fit: cover;
    width: 76px;
}

.product-img-placeholder {
    align-items: center;
    color: #66756c;
    display: flex;
    font-size: 11px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    padding: 6px;
    text-align: center;
}

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

.actions .button {
    text-align: center;
}

.full {
    grid-column: 1 / -1;
}

.star {
    color: #c69313;
    font-weight: 700;
}

.version-info {
    color: #66756c;
    font-size: 12px;
    margin-top: 24px;
    text-align: right;
}

.payment-account-box {
    margin-top: 20px;
}

.payment-account-box p {
    margin: 0 0 8px;
}

.modal-backdrop {
    align-items: center;
    background: rgba(12, 24, 18, 0.62);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 40;
}

.announcement-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    max-width: 560px;
    padding: 24px;
    width: 100%;
}

.announcement-modal p {
    line-height: 1.5;
}

.announcement-alert {
    animation: announcementBlink 1s ease-in-out infinite;
    background: #a63b36;
    border-radius: 6px;
    color: #fff;
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

@keyframes announcementBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

.category-section {
    border-top: 1px solid #e4e9e2;
    margin-top: 18px;
    padding-top: 16px;
}

.category-section:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.category-section h2 {
    color: #16392b;
    font-size: 20px;
    margin-bottom: 10px;
}

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

.product-card {
    background: #fff;
    border: 1px solid #dfe5dc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-start;
    min-height: 292px;
    min-width: 0;
    overflow: visible;
    padding: 12px;
}

.product-card-image {
    align-items: center;
    background: #f3f6f2;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.product-card-image .product-img {
    aspect-ratio: 4 / 3;
    display: block;
    height: auto;
    max-height: 172px;
    object-fit: contain;
    width: 100%;
}

.product-card h3 {
    font-size: 14px;
    line-height: 1.25;
    margin: 8px 0 4px;
}

.product-card-price {
    color: #236b4e;
    font-weight: 800;
    margin: 0;
}

.product-card-stock {
    color: #66756c;
    font-size: 12px;
    margin: 0;
}

.product-card label {
    display: block;
    font-size: 12px;
    margin: 4px 0 3px;
}

.qty-panel {
    background: #f8fbf7;
    border: 1px solid #dfe5dc;
    border-radius: 8px;
    flex: 0 0 auto;
    margin-top: auto;
    padding: 8px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.product-card input {
    -webkit-appearance: none;
    appearance: textfield;
    background: #fff;
    border: 2px solid #236b4e;
    box-sizing: border-box;
    color: #14251d;
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 42px;
    min-width: 58px;
    opacity: 1;
    padding: 9px 10px;
    text-align: center;
    touch-action: manipulation;
    width: 100%;
}

.qty-stepper {
    align-items: stretch;
    display: grid;
    gap: 6px;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    min-width: 0;
    width: 100%;
}

.qty-btn {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 22px;
    font-weight: 900;
    justify-content: center;
    min-height: 42px;
    min-width: 42px;
    padding: 0;
}

.qty-btn:disabled {
    opacity: 0.45;
}

.product-card input::-webkit-inner-spin-button,
.product-card input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.shop-search {
    background: #ffffff;
    border: 2px solid #236b4e;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(35, 107, 78, 0.12);
    margin-bottom: 18px;
    padding: 16px;
}

.shop-heading {
    align-items: center;
    display: grid;
    gap: 14px;
    justify-content: center;
    text-align: center;
}

.shop-heading h1 {
    margin-bottom: 0;
    width: 100%;
}

.shop-greeting {
    background: #fff8e6;
    border: 1px solid #f2d28a;
    border-radius: 8px;
    color: #7a4a00;
    font-size: 20px;
    font-weight: 900;
    margin: 0 auto;
    max-width: 360px;
    padding: 10px 16px;
    text-align: center;
    width: 100%;
}

.daily-tip {
    background: #ffffff;
    border: 1px solid #b8d8c6;
    border-left: 6px solid #236b4e;
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(22, 57, 43, 0.12);
    color: #16392b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 auto;
    max-width: 720px;
    padding: 14px 18px;
    position: relative;
    text-align: center;
    width: 100%;
}

.daily-tip::before {
    content: "Günün Hap Bilgisi";
    color: #236b4e;
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.shop-search input {
    border: 2px solid #9dbbad;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 14px;
}

.shop-search input:focus {
    border-color: #236b4e;
    box-shadow: 0 0 0 3px rgba(35, 107, 78, 0.16);
    outline: none;
}

.shop-search-row {
    display: block;
}

.shop-search .muted {
    display: block;
    margin-top: 8px;
}

.product-search-empty {
    margin-top: 10px;
}

.order-submit-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 18px;
}

.floating-order-submit {
    position: fixed;
    right: 24px;
    bottom: 22px;
    z-index: 20;
    margin: 0;
    padding: 0;
}

.order-submit-button {
    background: #155438;
    animation: orderPulse 1.8s ease-in-out infinite;
    box-shadow: 0 10px 24px rgba(21, 84, 56, 0.34);
    font-size: 16px;
    min-width: 220px;
    padding: 14px 22px;
}

.order-submit-button:hover:not(:disabled) {
    background: #0f412b;
    transform: translateY(-1px);
}

@keyframes orderPulse {
    0% {
        box-shadow: 0 10px 24px rgba(21, 84, 56, 0.28);
    }
    50% {
        box-shadow: 0 12px 30px rgba(21, 84, 56, 0.48);
    }
    100% {
        box-shadow: 0 10px 24px rgba(21, 84, 56, 0.28);
    }
}

@media (max-width: 800px) {
    .layout,
    .form-grid,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content {
        padding: 16px 16px 98px;
    }

    .product-card {
        min-height: 324px;
        overflow: visible;
        padding: 12px;
    }

    .product-card-image .product-img {
        aspect-ratio: 4 / 3;
        max-height: 190px;
    }

    .product-card h3 {
        font-size: 15px;
    }

    .product-card input {
        border-width: 2px;
        font-size: 18px;
        min-height: 48px;
        padding: 10px 8px;
    }

    .qty-stepper {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
    }

    .qty-btn {
        min-height: 48px;
    }

    .qty-panel {
        padding: 9px;
    }

    .login-credit {
        bottom: 8px;
        font-size: 11px;
        left: 8px;
        right: 8px;
        text-align: center;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid #dfe5dc;
    }

    .floating-order-submit {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .floating-order-submit .order-submit-button {
        min-width: 0;
        width: 100%;
    }

}

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

    .product-card {
        min-height: 0;
    }

    .product-card-image .product-img {
        max-height: 230px;
    }

    .qty-stepper {
        grid-template-columns: 54px minmax(76px, 1fr) 54px;
    }

    .qty-btn,
    .product-card input {
        min-height: 52px;
    }
}

@media (min-width: 801px) and (max-width: 1150px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .product-card {
        min-height: 0;
    }

    .product-card-image .product-img {
        max-height: 240px;
    }
}
