:root {
    /* Premium Dark Black UPI Palette */
    --bg-color: #000000;
    --card-bg: #111111;
    --border-color: #27272a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #3b82f6; /* Electric blue, typical for UPI apps */
    --success-color: #10b981;
    --danger-color: #ef4444;
    --radius: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
}

/* In a dark theme, .text-white should just map to the primary white text */
.text-white {
    color: var(--text-primary) !important;
}

body {
    background: var(--bg-color);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Ensure verify.php centers nicely */
body.centered-body {
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

/* Navbar */
.navbar {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar.fixed-top-nav {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    display: flex;
    justify-content: center;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--accent-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 0.95rem;
    margin-left: 1rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

/* Main Containers and Cards */
.stack-container {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1rem;
}

.stack-container.wide {
    max-width: 800px;
}

.stack-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stack-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #3f3f46;
}

/* Verify App Card specific */
.centered-stack-card {
    padding: 40px;
    margin-top: 60px;
    text-align: center;
    max-width: 450px;
    width: 100%;
}

/* Buttons */
.btn-main {
    width: 100%;
    background: var(--text-primary); /* White button on black bg stands out */
    color: var(--bg-color); /* Black text */
    border: none;
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: all 0.2s;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

.btn-main:hover:not(:disabled) {
    background: var(--accent-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-main:disabled {
    background: #27272a;
    color: #52525b;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px;
    border-radius: 12px;
    width: 100%;
    font-weight: 700;
    transition: 0.2s;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-cancel {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 20px;
    display: inline-block;
    transition: 0.2s;
}

.btn-cancel:hover {
    color: var(--danger-color);
}

/* Custom Inputs and Content Boxes */
.custom-input,
.form-control {
    width: 100%;
    border: 1px solid var(--border-color);
    background: #18181b; /* Slightly lighter than card bg for depth */
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.custom-input {
    text-align: center;
}

.custom-input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.custom-input::placeholder,
.form-control::placeholder {
    color: #52525b;
}

.custom-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #09090b;
}

.data-box {
    background: #18181b;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.95rem;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.data-box:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: var(--card-bg);
}

/* Index / Store specifics */
.banner-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e3a8a 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.banner-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.live-dot {
    height: 8px;
    width: 8px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: blink 2s infinite;
    margin-right: 6px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.stock-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.stock-num {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--accent-color);
}

.stock-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.stock-zero {
    color: var(--danger-color);
}

.qty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.qty-btn {
    background: #18181b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: var(--text-primary);
}

.qty-btn:hover {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
}

.qty-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    transform: scale(0.98);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.qty-btn h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: inherit;
}

.qty-btn small {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 1;
}

.qty-btn.active small {
    color: rgba(255, 255, 255, 0.8);
}

.qty-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--border-color);
    pointer-events: none;
    background: var(--card-bg);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.f-item {
    padding: 1rem;
    background: #18181b;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.f-icon {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.f-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--text-primary);
}

.f-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-icon {
    color: var(--accent-color);
    margin-top: 2px;
}

/* Contact Specifics */
.wa-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25d366;
    color: white;
    height: 3.5rem;
    width: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s;
    z-index: 99;
    text-decoration: none;
}

.wa-float:hover {
    transform: scale(1.05);
    color: white;
}

/* Verify QR and Modal */
.qr-frame {
    background: #ffffff; /* MUST remain white so UPI scanner apps can read the code */
    padding: 15px;
    border-radius: var(--radius);
    display: inline-block;
    margin: 20px 0;
    border: 4px solid var(--border-color);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.qr-img {
    width: 100%;
    max-width: 250px;
    display: block;
}

.timer-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.timer-bar {
    height: 4px;
    background: var(--border-color);
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.timer-progress {
    height: 100%;
    background: var(--accent-color);
    width: 100%;
    transition: width 1s linear;
}

.success-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.success-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    color: var(--text-primary);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15); /* Subtle success glow */
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Lookup Tabs and Tables */
.nav-tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    border: none;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-secondary) !important;
    padding: 1rem 1.5rem;
    background: transparent;
    border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
}

.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--accent-color) !important;
    border-bottom: 3px solid var(--accent-color);
}

.table-custom {
    margin-top: 1rem;
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
}

.table-custom th {
    background: #18181b;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.table-custom td {
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.badge-found {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
}

.badge-miss {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
}

.copy-btn {
    background: #18181b;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}
