* {
    box-sizing: border-box;
}

body {
    margin: 0;
  font-family:'Manrope',sans-serif;
    background: #f4f6fb;
    color: #151522;
}

a {
    text-decoration: none;
    color: inherit;
}

.app {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100vh;
    background: #ffffff;
    padding: 18px 16px 90px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.add-btn {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #111827;
    color: white;
    font-size: 28px;
    line-height: 46px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.search {
    margin-bottom: 18px;
}

.search input,
.form-control {
    width: 100%;
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 0 16px;
    font-size: 15px;
    background: #f9fafb;
    outline: none;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.card {
    height: 104px;
    border-radius: 20px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    font-weight: 800;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(15,23,42,.12);
}

.card span {
    z-index: 2;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,.28), rgba(255,255,255,0));
}

.ah { background: #00a3e0; }
.kruidvat { background: #e60019; }
.hema { background: #e30613; }
.jumbo { background: #f9be28; color: #111; }
.gamma { background: #24447b; }
.ikea { background: #0058a3; color: #ffdb00; }
.airmiles { background: #2f80ed; }
.makro { background: #153b7a; color: #ffd21f; }
.anwb { background: #ffffff; color: #1d63ad; border: 1px solid #e5e7eb; }
.karwei { background: #211d1d; }
.etos { background: #d98c92; }
.sligro { background: #ffffff; color: #00613b; border: 1px solid #e5e7eb; }

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    max-width: 460px;
    width: 100%;
    height: 72px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.nav-item.active {
    color: #111827;
}

.nav-icon {
    font-size: 21px;
}

/* LOGIN REGISTER ORTAK */
.auth-box {
    margin-top: 40px;
}

.auth-box h2 {
    font-size: 28px;
    margin: 0 0 8px;
}

.auth-box p {
    color: #6b7280;
    margin: 0 0 24px;
}

.form-group {
    margin-bottom: 14px;
}

.primary-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 16px;
    background: #111827;
    color: white;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.auth-link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #6b7280;
}

.auth-link a {
    font-weight: 800;
    color: #111827;
}

@media (min-width: 720px) {
    .app {
        margin-top: 28px;
        border-radius: 28px;
        min-height: calc(100vh - 56px);
        box-shadow: 0 20px 60px rgba(15,23,42,.16);
    }

    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bottom-nav {
        border-radius: 24px 24px 0 0;
    }
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}
.toast {
    position: fixed;
    left: 50%;
    bottom: 88px;
    transform: translateX(-50%) translateY(20px);
    width: calc(100% - 32px);
    max-width: 420px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: .25s ease;
    z-index: 9999;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #dcfce7;
    color: #166534;
}

.toast.error {
    background: #fee2e2;
    color: #991b1b;
}

.toast.info {
    background: #e0f2fe;
    color: #075985;
}

.card-logo {
    max-width: 78%;
    max-height: 62px;
    object-fit: contain;
    z-index: 2;
}

.empty-state {
    margin-top: 60px;
    text-align: center;
    padding: 24px 10px;
}

.empty-icon {
    font-size: 54px;
    margin-bottom: 14px;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.empty-state p {
    margin: 0 0 22px;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-card-form label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
}

.color-input {
    width: 100%;
    height: 52px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
    padding: 6px;
}

.icon-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.icon-option input {
    display: none;
}

.icon-option span {
    height: 76px;
    border: 2px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.icon-option img {
    max-width: 100%;
    max-height: 46px;
    object-fit: contain;
}

.icon-option input:checked + span {
    border-color: #111827;
    box-shadow: 0 8px 22px rgba(15,23,42,.14);
}

.small-muted {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.scan-box {
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 24px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.scan-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
}

.scan-box h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.scan-box p {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 14px;
}

.secondary-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 16px;
    background: #e5e7eb;
    color: #111827;
    font-weight: 800;
    font-size: 15px;
}

.soft-note {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 16px;
    padding: 14px;
    font-size: 14px;
    color: #6b7280;
}

.photo-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.photo-upload {
    height: 112px;
    border: 2px dashed #d1d5db;
    border-radius: 20px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 800;
}

.photo-upload input {
    display: none;
}

.photo-upload i {
    font-size: 28px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.round-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-card {
    border-radius: 24px;
    color: #fff;
    padding: 18px;
    box-shadow: 0 18px 35px rgba(15,23,42,.18);
    margin-bottom: 16px;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-name {
    font-size: 21px;
    font-weight: 900;
    line-height: 1.1;
}

.card-subtitle {
    font-size: 13px;
    font-weight: 700;
    opacity: .85;
}

.logo-box {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #fff;
    color: #00a3e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
    overflow: hidden;
}

.logo-box img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.barcode-box {
    background: #fff;
    border-radius: 20px;
    padding: 18px 12px;
    text-align: center;
    color: #111827;
}

.barcode-box svg {
    width: 100%;
    max-width: 100%;
}

.barcode-number {
    margin-top: 10px;
    font-size: 18px;
    letter-spacing: 3px;
    font-weight: 900;
    word-break: break-word;
}

.action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.action-btn {
    border: none;
    border-radius: 14px;
    padding: 13px 10px;
    background: rgba(255,255,255,.23);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.section {
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 22px;
    padding: 16px;
    margin-bottom: 14px;
}

.section h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span {
    color: #6b7280;
}

.info-row strong {
    text-align: right;
    font-weight: 900;
}

.photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.photo-card {
    height: 92px;
    border-radius: 18px;
    background: white;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 800;
    font-size: 14px;
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-title {
    margin: 20px 0 12px;
    font-size: 18px;
    font-weight: 900;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.recent-card {
    height: 76px;
    border-radius: 18px;
    color: white;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15,23,42,.12);
    text-align: center;
    padding: 8px;
    font-size: 14px;
}

.barcode-modal {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.98);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.barcode-modal.show {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 16px;
    background: #111827;
    color: white;
    font-size: 20px;
}

.barcode-full-box {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(15,23,42,.18);
}

.barcode-number.full {
    font-size: 22px;
}

.scanner-box {
    margin-top: 16px;
}

#reader {
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
}

.stop-btn {
    margin-top: 12px;
}
.photo-upload.has-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.sort-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.sort-tabs a {
    flex: 1;
    height: 38px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sort-tabs a.active {
    background: #111827;
    color: #ffffff;
}
.account-card {
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.account-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: #111827;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 26px;
}

.account-card h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.account-card p {
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn {
    height: 48px;
    border-radius: 16px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}