/* css/style.css */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.5;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a252f;
    color: #fff;
    padding: 12px 24px;
}

.nav-brand strong {
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: #4cd137;
}

.nav-links a {
    color: #dcdde1;
    text-decoration: none;
    margin-right: 20px;
    font-weight: 500;
}

.nav-links a.active, .nav-links a:hover {
    color: #4cd137;
}

.nav-links a.public-link {
    background-color: #27ae60;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
}

.nav-user {
    font-size: 0.95rem;
}

.btn-logout {
    color: #e74c3c;
    margin-left: 15px;
    text-decoration: none;
    font-weight: bold;
}

/* LOGIN */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #2c3e50;
}

.login-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}

.login-card h2 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.login-card p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.login-footer {
    margin-top: 20px;
    font-size: 0.9rem;
}

/* MAIN CONTAINER */
.main-container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* DASHBOARD HEADER */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 15px;
}

.jackpot-val {
    font-size: 1.5rem;
    color: #f1c40f;
    background: #2c3e50;
    padding: 4px 12px;
    border-radius: 6px;
}

.badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}
.badge-success { background-color: #d4edda; color: #155724; }
.badge-secondary { background-color: #e2e3e5; color: #383d41; }
.badge-danger { background-color: #f8d7da; color: #721c24; }

/* COMMANDS GRID */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.command-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

/* CLOSED COMMAND CARD COLORS */
.command-card.card-neutral {
    border-color: #bdc3c7;
    background-color: #f8f9fa;
}
.command-card.card-positive {
    border-color: #2ecc71;
    background-color: #e8f8f5;
}
.command-card.card-negative {
    border-color: #e74c3c;
    background-color: #fadbd8;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.card-code {
    background: #2c3e50;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.card-body .info-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.card-body .final-line {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #ccc;
}

.card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.card-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 6px;
    text-align: center;
}

/* TRANSACTION HISTORY DETAILS & DELETE BUTTON */
.info-section-title {
    font-size: 0.8rem;
    color: #555;
    border-bottom: 1px solid #eee;
    margin-bottom: 3px;
}

.tx-history-box {
    margin: 2px 0 6px 0;
    padding: 4px 8px;
    background: rgba(0,0,0,0.03);
    border-radius: 4px;
    max-height: 120px;
    overflow-y: auto;
}

.transaction-detail-row {
    align-items: center;
}

.btn-cancel-tx {
    background-color: #e74c3c;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 2px 6px;
    margin-left: 8px;
    line-height: 1.2;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-block;
}

.btn-cancel-tx:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}
.btn-primary { background-color: #2980b9; color: #fff; }
.btn-success { background-color: #27ae60; color: #fff; }
.btn-warning { background-color: #f39c12; color: #fff; }
.btn-danger  { background-color: #c0392b; color: #fff; }
.btn-secondary { background-color: #7f8c8d; color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 12px 24px; font-size: 1.1rem; }

/* FORMS */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

/* MODALS */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.modal-lg { max-width: 800px; }
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* DATA TABLES */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-top: 15px;
}
.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.data-table th {
    background-color: #2c3e50;
    color: #fff;
    font-weight: 600;
}

/* PUBLIC PAGE STYLES */
.public-body {
    background-color: #1a252f;
    color: #ecf0f1;
    min-height: 100vh;
    padding: 15px;
}
.public-container {
    max-width: 500px;
    margin: 0 auto;
}
.public-header {
    text-align: center;
    margin-bottom: 20px;
}
.public-header h1 {
    color: #2ecc71;
    font-size: 2rem;
    letter-spacing: 2px;
}
.public-search-card, .public-result-card {
    background: #2c3e50;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}
.search-input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.search-input-group input {
    flex: 1;
    text-transform: uppercase;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 3px;
    font-weight: bold;
}
.public-result-card hr {
    border: none;
    border-top: 1px solid #34495e;
    margin: 15px 0;
}
.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1.05rem;
}
.final-result-box {
    text-align: center;
    background: #34495e;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}
.final-result-box h2 {
    font-size: 2.2rem;
    margin: 5px 0;
}
.payment-notice {
    font-weight: bold;
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
}
.notice-club-pays { background: #27ae60; color: #fff; }
.notice-player-pays { background: #e74c3c; color: #fff; }
.notice-zero { background: #7f8c8d; color: #fff; }

.live-indicator {
    text-align: center;
    font-size: 0.85rem;
    color: #bdc3c7;
    margin-top: 15px;
}
.live-indicator .dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    margin-right: 5px;
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* 58MM THERMAL PRINTER STYLES */
.thermal-print-area {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }
    .thermal-print-area, .thermal-print-area * {
        visibility: visible;
    }
    .thermal-print-area {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 58mm;
        padding: 2mm;
        margin: 0;
        font-family: 'Courier New', Courier, monospace;
        font-size: 11px;
        line-height: 1.2;
        color: #000;
        background: #fff;
    }
    .thermal-receipt {
        width: 100%;
        text-align: center;
    }
    .thermal-receipt header {
        font-size: 14px;
        font-weight: bold;
        border-bottom: 1px dashed #000;
        padding-bottom: 4px;
        margin-bottom: 6px;
    }
    .thermal-receipt .section {
        text-align: left;
        margin-bottom: 6px;
        border-bottom: 1px dashed #000;
        padding-bottom: 4px;
    }
    .thermal-receipt .line {
        display: flex;
        justify-content: space-between;
    }
    .thermal-receipt .big-text {
        font-size: 14px;
        font-weight: bold;
        margin: 4px 0;
    }
    .thermal-receipt footer {
        font-size: 9px;
        margin-top: 6px;
    }
}
