* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: white;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    color: black;
    font-family: 'Instrument Serif', serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.title-divider {
    width: 1px;
    height: 56px;
    background-color: #e0e0e0;
}

.icon-link {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.icon-link:hover {
    opacity: 0.8;
}

.title-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

.search-form {
    background: #FAFAFA;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 2px 10px rgba(31, 109, 255, 0.1);
    border: 1px solid #F0F0F0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #F0F0F0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1F6DFF;
}

.search-btn {
    width: 100%;
    background-color: #1F6DFF;
    color: white;
    padding: 0.875rem;
    border: none;
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: inset 2px 2px 0px rgba(255, 255, 255, 0.15), inset 0px 20px 0px rgba(255, 255, 255, 0.15);
}

.search-btn:hover:not(:disabled) {
    background-color: #1a5ce6;
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.search-btn .spinner {
    width: 20px;
    height: 20px;
    color: white;
}

.helper-text {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.info-icon {
    width: 14px;
    height: 14px;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.helper-link {
    color: #6c757d;
    text-decoration: underline;
}

.search-btn:active {
    background-color: #1651cc;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #1F6DFF;
    font-weight: 500;
}

.error {
    background-color: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #fcc;
}

.hidden {
    display: none;
}

.results-container {
    background: #FAFAFA;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 2px 10px rgba(31, 109, 255, 0.1);
    border: 1px solid #F0F0F0;
    margin-top: 2rem;
}

.results-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.results-header h2 {
    color: black;
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 0;
}

.result-row {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
}

.result-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.result-row strong {
    display: block;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-content {
    color: #666;
    line-height: 1.4;
}

.product-name {
    margin-right: 0.75rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
}

.status-active {
    color: #1F6DFF;
    border-color: #1F6DFF;
    background-color: rgba(31, 109, 255, 0.1);
}

.status-cancelled {
    color: #dc3545;
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.status-unknown {
    color: #6c757d;
    border-color: #6c757d;
    background-color: rgba(108, 117, 125, 0.1);
}

.billing-link {
    color: #1F6DFF;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.2s ease;
}

.billing-link:hover {
    border-bottom-color: #1F6DFF;
}

.product-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-image-inline {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}

.chat-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #1F6DFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(31, 109, 255, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1000;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(31, 109, 255, 0.5);
}

.chat-button img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.back-btn {
    background-color: #FAFAFA;
    color: #333;
    padding: 0.875rem;
    border: 1px solid #F0F0F0;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto 0;
    text-align: center;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.back-btn:hover {
    background-color: #f0f0f0;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .status-badge {
        display: block;
        margin-top: 0.5rem;
        width: fit-content;
    }
}