:root {
    --primary: #6c5ce7;
    --primary-dark: #5649c7;
    --secondary: #a29bfe;
    --accent: #fd79a8;
    --success: #00b894;
    --danger: #ff7675;
    --warning: #fdcb6e;
    --info: #0984e3;
    --dark: #2d3436;
    --light: #f5f6fa;
    --gray: #dfe6e9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', sans-serif;
    background: #f5f6fa;
    margin: 0;
    padding: 0;
    color: #222;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(44,62,80,0.12);
    padding: 32px 24px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    position: relative;
}

.card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 40px 70px rgba(0,0,0,0.3);
}

h1 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
 
h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 600;
}

h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 16px;
    position: relative;
    transform-style: preserve-3d;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark);
}

input, select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.3s;
    background: var(--light);
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    transform: translateZ(10px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.2);
}

button {
    width: 100%;
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 6px;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #6c5ce7;
    color: #fff;
}

.btn-success {
    background: #00b894;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.4);
}

.btn-success:hover {
    background: #00a884;
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.6);
}

.btn-danger {
    background: #d63031;
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 118, 117, 0.4);
}

.btn-danger:hover {
    background: #e66767;
    box-shadow: 0 8px 25px rgba(255, 118, 117, 0.6);
}

.btn-warning {
    background: #fdcb6e;
    color: #222;
    box-shadow: 0 5px 15px rgba(253, 203, 110, 0.4);
}

.btn-warning:hover {
    background: #f7b731;
    box-shadow: 0 8px 25px rgba(253, 203, 110, 0.6);
}

.btn-info {
    background: var(--info);
    color: #fff;
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.4);
}

.btn-info:hover {
    background: #0984e3;
    box-shadow: 0 8px 25px rgba(9, 132, 227, 0.6);
}

.result {
    background: #f1f2f6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.result-header {
    text-align: center;
    margin-bottom: 10px;
}

.result-header strong { /* Or #result .result-header strong for more specificity */
    font-size: 20px;
}

.history-item {
    background: #57606f;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    transform-style: preserve-3d;
}

.history-item:hover {
    transform: translateZ(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.tabs {
    display: flex;
    margin-bottom: 18px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    color: #636e72;
    transition: border 0.2s, color 0.2s;
}

.tab.active {
    border-bottom: 2px solid #6c5ce7;
    color: #6c5ce7;
}

.hidden {
    display: none;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logout-btn {
    background: var(--danger);
    width: auto;
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    font-size: 14px;
}

.particle {
    position: fixed;
    border-radius: 50%;
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}

/* Print bill styles */
@media print {
    body * {
        visibility: hidden !important;
    }
    #printBill, #printBill * {
        visibility: visible !important;
    }
    #printBill {
        position: absolute !important;
        left: 0; top: 0; width: 100vw; background: #fff;
        z-index: 9999;
        min-height: 100vh;
        padding: 20px;
        box-shadow: none;
        color: #000;
    }
}

/* Items table styles */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
}

.items-table th, .items-table td {
    border: 1px solid #dfe4ea;
    padding: 8px;
    text-align: center;
}

.items-table th {
    background: #f1f2f6;
}

.items-table tr:nth-child(even) {
    background-color: var(--light);
}

.items-table tr:hover {
    background-color: #f1f1f1;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.shop-settings {
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.status-bar {
    display: flex;
    gap: 18px;
    margin-bottom: 12px;
}

.status-item {
    background: #dfe4ea;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.98em;
}

.badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: #6c5ce7;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.95em;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: var(--dark);
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #fff;
    color: #222;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.12);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 9999;
}
.toast.show {
    opacity: 1;
    pointer-events: auto;
}
.toast.success { border-left: 6px solid #00b894; }
.toast.error { border-left: 6px solid #d63031; }
.toast.warning { border-left: 6px solid #fdcb6e; }
.toast.info { border-left: 6px solid #0984e3; }
.toast i {
    margin-right: 10px;
    font-size: 1.3em;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.dark-mode {
    background: #232946;
    color: #fff;
}
.dark-mode .container,
.dark-mode .card {
    background: #232946;
    color: #fff;
}
.dark-mode .input-group input,
.dark-mode .input-group select {
    background: #232946;
    color: #fff;
    border: 1px solid #393e46;
}
.dark-mode .items-table th,
.dark-mode .result,
.dark-mode .status-item {
    background: #393e46;
    color: #fff;
}

/* UPI Payment Styles */
.upi-payment-section {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
}

.upi-payment-section.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.qr-code-container {
    text-align: center;
    margin: 20px auto;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 300px;
}

#qrCodePreview, #billQrCode {
    margin: 0 auto;
    padding: 10px;
    background: white;
    border: 1px solid #eee;
    width: 150px;
    height: 150px;
}

.payment-instructions {
    font-size: 14px;
    color: #555;
    margin-top: 10px;
    text-align: center;
}

.payment-instructions p {
    margin: 5px 0;
}

.qr-preview {
    margin-top: 15px;
    text-align: center;
}

#authSection h1 {
    text-align: center;
    margin-bottom: 20px;
}

#authSection .btn-primary {
    margin-top: 10px; /* Or use a more specific selector if needed */
}

#authSection .form-separator {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px; /* Added for consistency */
}

#authSection .btn-otp {
    margin-left: 10px;
}

/* Utility class if not already present */
.hidden {
    display: none !important; 
}

/* Add these to your styles.css file */

.result-header {
    text-align: center;
    margin-bottom: 10px;
}

.result-header strong { /* Or #result .result-header strong for more specificity */
    font-size: 20px;
}

#exportOutput {
    margin-top: 20px;
    padding: 15px;
    background: var(--light); /* Ensure --light CSS variable is defined in :root or body */
    border-radius: 10px;
    border: 1px solid var(--border-color); /* Optional: add a border if --light is very light */
    min-height: 50px; /* Optional: give it some initial height */
    white-space: pre-wrap; /* To respect newlines in text output */
    word-wrap: break-word; /* To break long strings */
}

@media (max-width: 600px) {
    .container {
        padding: 8px 2vw;
        max-width: 100vw;
        border-radius: 0;
        box-shadow: none;
    }
    .card {
        padding: 12px 4px;
        margin-bottom: 12px;
    }
    .input-group label {
        font-size: 1em;
    }
    .input-group input,
    .input-group select {
        font-size: 1em;
        padding: 8px 6px;
    }
    .tabs {
        flex-direction: column;
    }
    .tab {
        padding: 10px 0;
        font-size: 1em;
    }
    .items-table, .items-table th, .items-table td {
        font-size: 0.95em;
        padding: 4px;
    }
    .status-bar {
        flex-direction: column;
        gap: 6px;
    }
    .btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-secondary, .google-login-button {
        width: 100%;
        margin-bottom: 8px;
        font-size: 1em;
    }
    .result {
        padding: 8px;
        font-size: 1em;
    }
    #printBill {
        padding: 8px !important;
    }
}

/* --- Auth Welcome UI --- */
.auth-welcome {
    max-width: 400px;
    margin: 40px auto;
    padding: 32px 24px;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44,62,80,0.16);
    background: #fff;
    text-align: center;
}
.auth-brand {
    margin-bottom: 18px;
}
.auth-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
}
.brand-highlight {
    color: #6c5ce7;
    font-weight: 700;
}
.auth-subtitle {
    color: #636e72;
    font-size: 1.05em;
    margin-bottom: 8px;
}
.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}
.auth-tab {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    color: #636e72;
    cursor: pointer;
    font-size: 1.1em;
    transition: border 0.2s, color 0.2s;
}
.auth-tab.active {
    border-bottom: 2.5px solid #6c5ce7;
    color: #6c5ce7;
}
.btn-block {
    width: 100%;
    margin-bottom: 10px;
}
.google-login-button.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
@media (max-width: 600px) {
    .auth-welcome {
        max-width: 98vw;
        padding: 16px 2vw;
    }
}

button[type="button"].btn-success {
    width: auto;
    margin: 0 auto;
    display: block;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 6px;
    border: none;
    background: #00b894;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    box-shadow: 0 4px 8px rgba(0, 184, 148, 0.2);
}

button[type="button"].btn-success:hover {
    background: #00a884;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 184, 148, 0.3);
}

button[type="button"].btn-success:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 184, 148, 0.2);
}
