/* Variables */
:root {
    --primary-color: #50bd91;
    --primary-dark: #3ca87c;
    --secondary-color: #4c47f8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
}

/* App Layout constraints for mobile-first feel on desktop */
body {
    background-color: #e2e8f0;
    /* Darker outside the mobile view */
    min-height: 100vh;
}

/* Split Layout */
.split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.store-banner {
    flex: 1;
    background: linear-gradient(rgba(30, 60, 114, 0.3), rgba(42, 82, 152, 0.3)), url('../../images/background.jpeg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Store Login Card Styles */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.login-card h2 {
    color: var(--secondary-color);
    margin: 0 0 5px;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-card p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1rem;
}

.login-form-group {
    margin-bottom: 22px;
    text-align: left;
    position: relative;
}

.login-form-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 1.1rem;
    transition: 0.3s;
}

.login-form-group input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #eef2f5;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    background: #f8fafc;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.login-form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(76, 71, 248, 0.1);
}

.login-form-group input:focus+i {
    color: var(--secondary-color);
}

.btn-login {
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-store {
    background: var(--secondary-color);
    box-shadow: 0 10px 20px rgba(76, 71, 248, 0.3);
}

.btn-store:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(37, 61, 142, 0.4);
}

.error-msg {
    background: #fde8e8;
    color: #c0392b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
    border: 1px solid #fadbd8;
}

.footer-links {
    margin-top: 25px;
    font-size: 0.95rem;
    color: #7f8c8d;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #2980b9;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.store-icon {
    background: rgba(76, 71, 248, 0.1);
    color: var(--secondary-color);
}

.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .split-layout {
        flex-direction: column-reverse;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .store-banner {
        padding: 40px 20px;
        flex: none;
        min-height: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .app-container {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        min-height: 100vh;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .login-card {
        padding: 30px 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .app-main {
        padding: 20px 15px;
    }

    .app-header {
        padding: 16px 15px;
    }
}

.app-header {
    background-color: var(--card-bg);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.app-main {
    background-color: var(--bg-color);
    min-height: calc(100vh - 65px);
    padding: 24px 20px;
}

/* Hero Section */
.hero-section {
    margin-bottom: 32px;
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    color: var(--text-main);
}

.hero-section h1 span {
    color: var(--primary-color);
}

.hero-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Search Form */
.search-form {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

/* Upload Group */
.upload-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-btn {
    background-color: #f1f5f9;
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    border: 1px dashed var(--text-muted);
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.upload-btn:hover {
    background-color: #e2e8f0;
}

#uploadStatus {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Checkbox */
.checkbox-group {
    margin-top: -4px;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1.4;
}

.custom-checkbox input {
    margin-top: 3px;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* Submit Button */
.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background 0.3s ease, transform 0.1s ease;
    margin-top: 8px;
}

.submit-btn:hover {
    background-color: var(--primary-dark);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Status Loading */
.request-status {
    margin-top: 32px;
    text-align: center;
    padding: 32px 24px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.hidden {
    display: none !important;
}

.pulse-loader {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    margin: 0 auto 16px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(14, 165, 233, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
    }
}

/* Fit to Screen on Desktop */
@media (min-width: 769px) {
    .split-layout {
        height: 100vh;
        overflow: hidden;
    }
    
    .store-banner {
        height: 100vh;
        overflow: hidden;
    }
    
    .app-container {
        height: 100vh;
        overflow-y: auto;
    }
}

/* Modern Guest Search Redesign */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(80, 189, 145, 0.1) 0%, rgba(37, 61, 142, 0.1) 100%);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 15px;
    border: 1px solid rgba(80, 189, 145, 0.2);
    box-shadow: 0 4px 10px rgba(80, 189, 145, 0.05);
}

.search-form-modern {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.04), 0 2px 10px rgba(15, 23, 42, 0.02) !important;
    padding: 22px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.search-form-modern:hover {
    border-color: rgba(80, 189, 145, 0.3) !important;
    box-shadow: 0 20px 50px rgba(80, 189, 145, 0.06), 0 4px 15px rgba(15, 23, 42, 0.03) !important;
}

.search-form-modern .input-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: relative;
}

.search-form-modern .input-group label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #94a3b8 !important;
    margin-left: 2px;
}

.search-form-modern .input-field-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-form-modern .input-field-wrapper i.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.05rem;
    transition: color 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.search-form-modern textarea.input-textarea {
    width: 100%;
    min-height: 60px !important;
    padding: 12px 50px 12px 42px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    color: var(--text-main) !important;
    background: #f8fafc !important;
    resize: none !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
}

.search-form-modern textarea.input-textarea:focus {
    border-color: var(--primary-color) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(80, 189, 145, 0.15) !important;
    outline: none !important;
}

.search-form-modern textarea.input-textarea:focus ~ i.search-icon {
    color: var(--primary-color);
}

.search-form-modern select.input-select {
    width: 100%;
    padding: 12px 40px 12px 42px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    color: var(--text-main) !important;
    background: #f8fafc !important;
    appearance: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.search-form-modern select.input-select:focus {
    border-color: var(--primary-color) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(80, 189, 145, 0.15) !important;
    outline: none !important;
}

.search-form-modern select.input-select:focus ~ i.search-icon {
    color: var(--primary-color);
}

.search-form-modern select.input-select:disabled {
    opacity: 0.6;
    background: #f1f5f9 !important;
    cursor: not-allowed !important;
}

.search-form-modern .input-text {
    width: 100%;
    padding: 12px 16px 12px 42px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    color: var(--text-main) !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
}

.search-form-modern .input-text:focus {
    border-color: var(--primary-color) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(80, 189, 145, 0.15) !important;
    outline: none !important;
}

.search-form-modern .input-text:focus ~ i.search-icon {
    color: var(--primary-color);
}

/* Floating microphone button */
.search-form-modern #micBtn {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(80, 189, 145, 0.1) !important;
    border: none !important;
    font-size: 1rem !important;
    color: var(--primary-color) !important;
    cursor: pointer !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    z-index: 10;
}

.search-form-modern #micBtn:hover {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.05) !important;
}

/* Modern dashed drag-and-drop file upload zone (compact) */
.search-form-modern .upload-zone-compact {
    width: 100%;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.search-form-modern .upload-zone-compact:hover {
    border-color: var(--primary-color);
    background: rgba(80, 189, 145, 0.02);
}

.search-form-modern .upload-zone-compact i {
    font-size: 1.4rem;
    color: #64748b;
    transition: color 0.25s ease;
}

.search-form-modern .upload-zone-compact:hover i {
    color: var(--primary-color);
}

.search-form-modern .upload-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.search-form-modern .upload-zone-compact .upload-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.search-form-modern .upload-zone-compact .upload-subtitle {
    font-size: 0.72rem;
    color: #64748b;
}

.search-form-modern #uploadStatus {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
    text-align: left;
    display: block;
}

/* Premium Gradient Button */
.submit-btn-premium {
    background: linear-gradient(135deg, #50bd91 0%, #3ca87c 100%) !important;
    box-shadow: 0 6px 20px rgba(80, 189, 145, 0.2) !important;
    border-radius: 12px !important;
    padding: 14px !important;
    font-weight: 700 !important;
    font-size: 0.98rem !important;
    letter-spacing: 0.5px !important;
    width: 100%;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease !important;
}

.submit-btn-premium:hover {
    transform: translateY(-1.5px) !important;
    box-shadow: 0 10px 25px rgba(80, 189, 145, 0.3) !important;
    background: linear-gradient(135deg, #3ca87c 0%, #2e8c65 100%) !important;
}

.submit-btn-premium:active {
    transform: translateY(0.5px) scale(0.99) !important;
}

.submit-btn-premium i {
    transition: transform 0.3s ease;
}

.submit-btn-premium:hover i {
    transform: translateX(4px);
}

/* Smart Header Login Button */
.btn-header-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.btn-header-login:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(80, 189, 145, 0.25);
    transform: translateY(-1.5px);
}

.btn-header-login:hover i {
    transform: translateX(4px);
}

/* Testing Mode Ribbon */
.test-mode-ribbon {
    position: fixed;
    top: 22px;
    left: -48px;
    width: 180px;
    background-color: var(--secondary-color);
    color: #ffffff;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 26px;
    transform: rotate(-45deg);
    box-shadow: 0 2px 10px rgba(76, 71, 248, 0.25);
    z-index: 999999;
    pointer-events: none;
}

.btn-header-login:active {
    transform: translateY(0.5px);
}

.btn-header-login i {
    font-size: 0.95rem;
}