* { box-sizing: border-box; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    margin: 0;
    color: #222;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

h1, h2 { margin-top: 0; }

.topbar {
    background: #2c3e50;
    color: #fff;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar a { color: #fff; text-decoration: none; margin-left: 15px; }
.topbar a:hover { text-decoration: underline; }

/* Dashboard buttons - rounded rectangles like the hand sketch */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 320px;
    margin: 40px auto;
}

.dash-btn {
    display: block;
    text-align: center;
    padding: 22px 15px;
    border: 2px solid #222;
    border-radius: 40px;
    font-weight: bold;
    text-decoration: underline;
    color: #222;
    background: #fff;
    font-size: 16px;
}

.dash-btn:hover { background: #eef3f8; }

form label { display: block; margin-top: 14px; font-weight: bold; }

input[type=text], input[type=number], input[type=date], input[type=password] {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid #bbb;
    border-radius: 5px;
}

button, .btn {
    margin-top: 18px;
    padding: 10px 20px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}

button:hover, .btn:hover { background: #1a252f; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
    font-size: 14px;
}

th { background: #ecf0f1; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.filters div { flex: 1; min-width: 150px; }

.alert { padding: 10px 14px; border-radius: 6px; margin-top: 12px; }
.alert-error { background: #fdecea; color: #c0392b; }
.alert-success { background: #eafaf1; color: #1e8449; }

.total-box {
    font-size: 18px;
    font-weight: bold;
    margin-top: 15px;
}

/* =========================================================
   Customer scratch-card panel
   ========================================================= */

.panel-wrap {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.panel-card {
    background: linear-gradient(160deg, #fffdf7 0%, #fff3d6 55%, #ffe6ab 100%);
    border: 1px solid #f0d189;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(184, 134, 11, 0.18);
}

.panel-title {
    text-align: center;
    margin: 0 0 4px;
    color: #7a4f01;
    font-size: 24px;
}

.panel-subtitle {
    text-align: center;
    margin: 0 0 24px;
    color: #a07a2e;
    font-size: 14px;
}

/* Two cards per row on desktop/tablet, one per row on small phones */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

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

/* ---- Shared look for both the live scratch card and the revealed result ---- */
.scratch-wrap,
.reveal-card {
    position: relative;
    height: 190px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    border: 1px solid #e2b354;
}

.reveal-card {
    background: linear-gradient(150deg, #fffdf8 0%, #fff2d4 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px;
}

.scratch-reveal {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, #fffdf8 0%, #fff2d4 100%);
    text-align: center;
    padding: 14px;
}

/* Reveal text, styled after the client's sample card */
.cashback-label {
    margin: 0;
    font-weight: bold;
    letter-spacing: 1px;
    color: #d32f2f;
    font-size: 15px;
}

.cashback-amount {
    margin: 2px 0 10px;
    font-weight: bold;
    color: #d32f2f;
    font-size: 19px;
}

.cashback-meta {
    color: #1a3e8c;
    font-size: 12px;
    line-height: 1.6;
}

.cashback-meta p { margin: 0; }

.scratch-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;   /* stops the page from scrolling while scratching on mobile */
    cursor: pointer;
}

.scratch-fallback {
    display: block;
    margin: 8px auto 0;
    text-align: center;
    font-size: 12px;
    color: #a07a2e;
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
}

.expired-box {
    height: 190px;
    border: 2px dashed #c0392b;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #c0392b;
    background: #fdecea;
}
