/**
 * eChallan Checker Luxury Theme Layout Stylesheet
 * Integrates perfectly with executive, luxury automotive active themes.
 */

/* Container Setup */
.tp-challan-container {
    max-width: 1120px;
    margin: 40px auto;
    font-family: 'Inter', system-ui, sans-serif;
    color: #1e293b;
}

/* Card layout - Elegant White with Subtle Shadows */
.tp-challan-form-card, 
.tp-card, 
.tp-error-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-card:hover {
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
}

/* Typography pairing */
.tp-form-title {
    font-family: 'Space Grotesk', 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.tp-form-subtitle {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Forms styling */
.tp-form-group {
    margin-bottom: 20px;
}

.tp-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 8px;
}

.tp-required {
    color: #ef4444;
}

.tp-form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    transition: all 0.15s ease-in-out;
}

.tp-form-group input:focus {
    outline: none;
    background: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

/* Luxury buttons */
.tp-btn-submit {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: #0f172a;
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 15px;
    padding: 14px 28px;
    border: 1px solid #0f172a;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.tp-btn-submit:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.tp-btn-text {
    background: none;
    border: none;
    color: #0f172a;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.tp-btn-text:hover {
    text-decoration: underline;
}

.tp-btn-action {
    flex: 1;
    text-align: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tp-btn-action:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Animated Luxury Loader */
.tp-challan-loader {
    text-align: center;
    padding: 60px 20px;
}

.tp-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(15, 23, 42, 0.08);
    border-top-color: #0f172a;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: tp-spin 1s linear infinite;
}

.tp-stage-text {
    font-size: 14px;
    color: #94a3b8;
    margin: 6px 0;
    transition: all 0.2s ease;
}

.tp-stage-text.active {
    color: #0f172a;
    font-weight: 600;
    transform: scale(1.05);
}

@keyframes tp-spin {
    to { transform: rotate(360deg); }
}

/* Grid & Layout Results */
.tp-results-header {
    margin-bottom: 20px;
}

.tp-results-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .tp-results-grid {
        grid-template-columns: 1fr;
    }
}

/* Metadata lists */
.tp-meta-rows {
    margin-top: 16px;
}

.tp-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

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

.tp-meta-row span {
    color: #64748b;
}

.tp-meta-row strong {
    color: #0f172a;
}

/* Summary Box Styling */
.tp-summary-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.tp-summary-box {
    text-align: center;
    padding: 14px 10px;
    border-radius: 8px;
    background: #f8fafc;
}

.tp-summary-box span {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tp-summary-box strong {
    font-size: 20px;
    color: #0f172a;
}

/* Sum Amounts block */
.tp-summary-amount-block {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.tp-amount-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.tp-amount-row:last-child {
    margin-bottom: 0;
    border-top: 1px dashed #cbd5e1;
    padding-top: 10px;
}

.tp-amount-row span {
    color: #64748b;
}

.tp-amount-row strong {
    color: #0f172a;
    font-size: 16px;
}

.tp-gold-text {
    color: #b59410 !important;
}

.tp-summary-actions {
    display: flex;
    gap: 12px;
}

/* Tables styling */
.tp-table-responsive {
    overflow-x: auto;
}

.tp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tp-table th {
    text-align: left;
    padding: 14px 16px;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.tp-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.tp-mono-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: -0.01em;
}

/* Status Badges EXACTLY as requested */
.tp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

/* Pending is Green by request */
.tp-badge-pending {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Paid is Blue by request */
.tp-badge-paid {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Processing is Orange by request */
.tp-badge-processing {
    background: rgba(249, 115, 22, 0.1);
    color: #c2410c;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Cancelled is Red by request */
.tp-badge-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Error layouts */
.tp-error-card {
    text-align: center;
    padding: 48px;
}

.tp-error-icon {
    font-size: 40px;
    margin-bottom: 16px;
}
