/* Citizen Track Report Styles */

.citizen-navbar {
    position: relative;
}

.track-hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f4f8 100%);
    padding: 3rem 2rem 4rem;
    min-height: 100vh;
}

.track-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 1rem;
}

.page-header h1 {
    color: #1e3a5f;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #7a8a99;
    font-size: 1.1rem;
}

/* Search Card */
.search-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.08);
    margin-bottom: 2rem;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f5f7fa;
    border: 2px solid #e5e9ed;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.search-group:focus-within {
    border-color: #1976d2;
    background: #ffffff;
}

.search-group svg {
    color: #7a8a99;
    flex-shrink: 0;
}

.search-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 0.5rem;
    font-size: 1rem;
    color: #1e3a5f;
    outline: none;
}

.search-group input::placeholder {
    color: #b0bac4;
}

.search-btn {
    background: linear-gradient(135deg, #1976d2 0%, #0a2647 100%);
    color: #ffffff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: linear-gradient(135deg, #1565c0 0%, #082038 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
}

.search-hint {
    text-align: center;
    color: #7a8a99;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Loading State */
.loading-state {
    background: #ffffff;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.08);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e9ed;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: #7a8a99;
    font-size: 1.1rem;
}

/* Error State */
.error-state {
    background: #ffffff;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.08);
}

.error-state svg {
    color: #d32f2f;
    margin-bottom: 1.5rem;
}

.error-state h3 {
    color: #1e3a5f;
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.error-state p {
    color: #7a8a99;
    font-size: 1.1rem;
}

/* Report Result */
.report-result {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.08);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e9ed;
}

.result-header h2 {
    color: #1e3a5f;
    font-size: 1.8rem;
    font-weight: 700;
}

.status-badge {
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.investigating {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.resolved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.closed {
    background: #f5f5f5;
    color: #616161;
}

/* Info Section */
.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    color: #1e3a5f;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.info-item label {
    color: #7a8a99;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: #1e3a5f;
    font-size: 1rem;
    font-weight: 500;
}

.description-text {
    color: #1e3a5f;
    font-size: 1rem;
    line-height: 1.7;
    background: #f5f7fa;
    padding: 1.5rem;
    border-radius: 10px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e9ed;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.3rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1976d2;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #1976d2;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-status {
    color: #1e3a5f;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.timeline-message {
    color: #7a8a99;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.timeline-date {
    color: #b0bac4;
    font-size: 0.85rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0a2647 0%, #1565c0 100%);
    color: #ffffff;
    padding: 2.5rem 2rem;
    margin-top: 0;
    border-top: 4px solid #1976d2;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-motto {
    font-size: 1rem;
    font-weight: 600;
    color: #ffa726;
    margin-bottom: 0.8rem;
    font-style: italic;
}

.footer-copyright {
    font-size: 0.95rem;
    color: #e3f2fd;
    margin: 0;
}

.footer-credits {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
}

.credits-text {
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.credits-text .heart {
    color: #ff5252;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(1); }
}

.credits-text strong {
    color: #ffa726;
    font-weight: 700;
}

.credits-text a {
    color: #90caf9;
    text-decoration: none;
    transition: color 0.3s ease;
}

.credits-text a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.credits-note {
    font-size: 0.85rem;
    color: #b3e5fc;
    margin: 0;
}

.credits-note .year {
    font-weight: 600;
    color: #ffa726;
}

/* Responsive Design */
@media (max-width: 768px) {
    .track-hero {
        padding: 2rem 1rem 3rem;
    }

    .search-card {
        padding: 2rem 1.5rem;
    }

    .page-header {
        padding-top: 0.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .search-group {
        flex-direction: column;
        align-items: stretch;
    }

    .search-btn {
        width: 100%;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .report-result {
        padding: 2rem 1.5rem;
    }
}


/* Attachments Section */
.attachments-note {
    color: #7a8a99;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.info-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section h3 svg {
    color: #d4a574;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.attachment-card {
    background: #f5f7fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e5e9ed;
    transition: all 0.3s ease;
}

.attachment-card:hover {
    border-color: #d4a574;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.2);
    transform: translateY(-2px);
}

.attachment-preview-container {
    width: 100%;
    height: 200px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.attachment-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-icon-large {
    color: #d4a574;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-icon-large svg {
    width: 64px;
    height: 64px;
}

.attachment-info {
    padding: 1rem;
}

.attachment-name {
    color: #1e3a5f;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.attachment-size,
.attachment-date {
    color: #7a8a99;
    font-size: 0.8rem;
}

.attachment-message {
    background: #e8f4f8;
    padding: 0.7rem;
    border-radius: 8px;
    color: #1e3a5f;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.attachment-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #d4a574 0%, #c89860 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.attachment-download:hover {
    background: linear-gradient(135deg, #c89860 0%, #b88850 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.attachment-download svg {
    flex-shrink: 0;
}

/* Responsive Attachments */
@media (max-width: 768px) {
    .attachments-grid {
        grid-template-columns: 1fr;
    }
    
    .attachment-preview-container {
        height: 180px;
    }
}


/* ===== Email Lookup / 2-method Track Styles ===== */

/* Tab switcher */
.track-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: #fff;
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.07);
}

.track-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: #7a8a99;
    background: transparent;
    transition: all 0.25s ease;
}

.track-tab.active {
    background: linear-gradient(135deg, #1976d2 0%, #0a2647 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(25, 118, 210, 0.3);
}

.track-tab:not(.active):hover {
    background: #f0f4f8;
    color: #1e3a5f;
}

/* Email lookup header inside card */
.email-lookup-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid #e5e9ed;
}

.email-lookup-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1976d2;
    flex-shrink: 0;
}

.email-lookup-header h3 {
    color: #1e3a5f;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
}

.email-lookup-header p {
    color: #7a8a99;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Step label row */
.step-label-row {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid #e5e9ed;
}

.step-pill {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.6rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.step-label-row h3 {
    color: #1e3a5f;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
}

.step-label-row p {
    color: #7a8a99;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Report preview cards */
.report-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.2rem 0;
}

.preview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f8fafc;
    border: 2px solid #e5e9ed;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    transition: border-color 0.2s ease;
}

.preview-card:hover {
    border-color: #1976d2;
}

.preview-card-body {
    flex: 1;
}

.preview-type {
    color: #1e3a5f;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.preview-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.preview-status {
    font-weight: 600;
}

.preview-dot {
    color: #b0bac4;
}

.preview-date {
    color: #7a8a99;
}

.preview-note {
    color: #b0bac4;
    font-size: 0.8rem;
    margin: 0;
    font-style: italic;
}

.preview-select-btn {
    white-space: nowrap;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Error display inside cards */
.lookup-error {
    background: #ffebee;
    color: #c62828;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.8rem;
}

/* Back/link button */
.btn-link {
    background: none;
    border: none;
    color: #1976d2;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    display: inline-block;
}

.btn-link:hover {
    color: #0a2647;
}

/* Secondary small button */
.btn-secondary-sm {
    padding: 0.6rem 1.2rem;
    border: 2px solid #e5e9ed;
    border-radius: 8px;
    background: #f5f7fa;
    color: #1e3a5f;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary-sm:not(:disabled):hover {
    background: #e5e9ed;
}

/* OTP timer */
.otp-timer {
    background: white;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    border: 1px solid #e5e9ed;
    color: #7a8a99;
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .track-tabs {
        flex-direction: column;
    }

    .preview-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .preview-select-btn {
        width: 100%;
    }

    .email-lookup-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}


/* ===== Improved Hero Banner ===== */

/* Override the plain navbar to match citizen-portal */
.citizen-navbar {
    background: linear-gradient(135deg, #0a2647 0%, #144272 100%) !important;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    gap: 0.7rem;
}

.portal-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.portal-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

/* Hero banner below navbar */
.track-hero-banner {
    background: linear-gradient(135deg, #0a2647 0%, #1565c0 100%);
    padding: 2.8rem 2rem 2.4rem;
    position: relative;
    overflow: hidden;
}

.track-hero-banner::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.track-hero-banner::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 160px; height: 160px;
    background: rgba(255, 167, 38, 0.08);
    border-radius: 50%;
}

.track-hero-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.track-hero-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.35);
}

.track-hero-text h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
    line-height: 1.2;
}

.track-hero-text p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* Remove the old page-header since the banner replaces it */
.page-header {
    display: none;
}

/* Tighten the top padding of the main section now that banner handles the title */
.track-hero {
    padding-top: 2rem;
}

@media (max-width: 600px) {
    .track-hero-banner {
        padding: 2rem 1.2rem;
    }

    .track-hero-icon {
        width: 54px;
        height: 54px;
    }

    .track-hero-text h1 {
        font-size: 1.5rem;
    }

    .track-hero-text p {
        font-size: 0.9rem;
    }

    .portal-title span {
        display: none;
    }
}
