/* ==================== Query Page ==================== */
.query-page {
    min-height: 100vh;
    background: #FFFEE8;
    position: relative;
    overflow-x: hidden;
}

/* Watermark overlay */
.query-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 80px, rgba(210,241,246,0.15) 80px, rgba(210,241,246,0.15) 82px),
        repeating-linear-gradient(-45deg, transparent, transparent 80px, rgba(210,241,246,0.15) 80px, rgba(210,241,246,0.15) 82px);
    pointer-events: none;
    z-index: 0;
}

.query-page::after {
    content: 'LUMI AUTHORIZED AGENT SYSTEM';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 60px;
    font-weight: 700;
    color: rgba(210,241,246,0.15);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    letter-spacing: 20px;
}

/* Header */
.query-header {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 1;
}

.query-header .logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #D2F1F6, #7BC0DE);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(74,158,191,0.25);
}

.query-header .logo-icon svg {
    width: 40px;
    height: 40px;
    fill: #2E7A9A;
}

.query-header h1 {
    font-size: 32px;
    color: #3D2F1F;
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.query-header p {
    color: rgba(61,47,31,0.5);
    font-size: 15px;
    letter-spacing: 2px;
}

/* Search Card */
.search-card {
    max-width: 560px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.search-box {
    background: #FFFFF5;
    border: 1px solid rgba(74,158,191,0.2);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: 0 4px 24px rgba(61,47,31,0.08);
}

.search-box .input-wrap {
    display: flex;
    gap: 12px;
}

.search-box input {
    flex: 1;
    padding: 14px 20px;
    background: #FFFEE8;
    border: 1px solid rgba(61,47,31,0.12);
    border-radius: var(--radius);
    color: #3D2F1F;
    font-size: 16px;
    letter-spacing: 2px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #4A9EBF;
}

.search-box input::placeholder {
    color: rgba(61,47,31,0.4);
    letter-spacing: 1px;
}

.search-box .query-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #D2F1F6, #7BC0DE);
    border: none;
    border-radius: var(--radius);
    color: #2E7A9A;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 2px;
}

.search-box .query-btn:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(74,158,191,0.35);
    transform: translateY(-1px);
}

.search-box .query-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Result Card */
.result-card {
    display: none;
    max-width: 560px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.result-card.show {
    display: block;
    animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-inner {
    background: #FFFFF5;
    border: 1px solid rgba(74,158,191,0.15);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(61,47,31,0.08);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(61,47,31,0.08);
}

.result-header h3 {
    font-size: 18px;
    color: #3D2F1F;
}

.result-header .status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-tag.valid {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(16,185,129,0.3);
}

.status-tag.invalid {
    background: var(--gray-bg);
    color: var(--gray);
    border: 1px solid rgba(156,163,175,0.3);
}

.result-body {
    padding: 24px 28px;
}

.result-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid rgba(61,47,31,0.05);
}

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

.result-row .label {
    width: 100px;
    color: rgba(61,47,31,0.5);
    font-size: 14px;
    flex-shrink: 0;
}

.result-row .value {
    color: rgba(61,47,31,0.92);
    font-size: 14px;
    flex: 1;
}

/* Error message */
.error-card {
    display: none;
    max-width: 560px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.error-card.show {
    display: block;
    animation: fadeUp 0.4s ease;
}

.error-inner {
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
}

.error-inner .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-inner h3 {
    color: #3D2F1F;
    font-size: 18px;
    margin-bottom: 8px;
}

.error-inner p {
    color: rgba(61,47,31,0.5);
    font-size: 14px;
}

/* Recent History */
.history-section {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 20px 60px;
    position: relative;
    z-index: 1;
}

.history-section h3 {
    font-size: 14px;
    color: rgba(61,47,31,0.5);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-item {
    padding: 6px 14px;
    background: rgba(210,241,246,0.3);
    border: 1px solid rgba(74,158,191,0.2);
    border-radius: 20px;
    color: rgba(61,47,31,0.7);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-family: monospace;
    letter-spacing: 1px;
}

.history-item:hover {
    background: rgba(210,241,246,0.5);
    border-color: #4A9EBF;
    color: #2E7A9A;
}

/* Footer */
.query-footer {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.query-footer p {
    color: rgba(61,47,31,0.2);
    font-size: 12px;
}

.query-footer a {
    color: rgba(61,47,31,0.5);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 640px) {
    .query-header { padding: 40px 20px 24px; }
    .query-header .logo-icon { width: 64px; height: 64px; border-radius: 16px; }
    .query-header .logo-icon svg { width: 32px; height: 32px; }
    .query-header h1 { font-size: 24px; letter-spacing: 2px; }
    .search-box { padding: 24px; }
    .search-box .input-wrap { flex-direction: column; }
    .search-box .query-btn { padding: 14px; }
    .result-body .result-row { flex-direction: column; gap: 4px; }
    .result-row .label { width: auto; }
    .query-page::after { font-size: 30px; letter-spacing: 10px; }
}
