/**
 * Bharat Udyam CRM - Customer Portal Enterprise Styling
 */

.bug-portal-page-area {
    background: #F5F7FA;
    padding: 30px 0 60px 0;
    min-height: calc(100vh - 380px);
}

.bug-portal-wrapper {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 28px;
    margin: 0 auto;
    max-width: 1240px;
    padding: 0 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    align-items: start;
}

/* Sidebar */
.bug-portal-sidebar {
    background: #071D38;
    color: #ffffff;
    border-radius: 12px;
    padding: 24px 18px;
    box-shadow: 0 4px 20px rgba(7, 29, 56, 0.12);
    position: sticky;
    top: 96px;
    z-index: 20;
}

.bug-portal-user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 18px;
}

.bug-portal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #D9A83E;
    color: #071D38;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bug-portal-user-meta {
    overflow: hidden;
}

.bug-portal-user-name {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bug-portal-user-id {
    display: block;
    font-size: 11.5px;
    color: #F4E0A5;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.bug-portal-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bug-portal-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bug-portal-nav a .bug-nav-icon {
    font-size: 15px;
    display: inline-flex;
    align-items: center;
}

.bug-portal-nav a:hover,
.bug-portal-nav a.active {
    background: rgba(217, 168, 62, 0.18);
    color: #F4E0A5;
}

.bug-portal-nav a.active {
    border-left: 3px solid #D9A83E;
}

.bug-portal-logout {
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 14px !important;
    color: #fca5a5 !important;
}

.bug-portal-logout:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* Main Content Column */
.bug-portal-main {
    background: #ffffff;
    border: 1px solid #E2E7ED;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    min-width: 0;
}

.bug-portal-header {
    border-bottom: 1px solid #E2E7ED;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.bug-portal-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: #071D38;
    margin: 0 0 6px 0;
}

.bug-portal-header p {
    font-size: 13.5px;
    color: #687789;
    margin: 0;
}

/* Metrics */
.bug-portal-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.bug-pmetric-card {
    background: #F8FAFD;
    border: 1px solid #E2E7ED;
    border-radius: 10px;
    padding: 16px 18px;
}

.bug-pmetric-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #687789;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bug-pmetric-val {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #071D38;
    margin-top: 4px;
}

/* Section Containers */
.bug-portal-section {
    margin-top: 28px;
}

.bug-psection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.bug-psection-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #071D38;
    margin: 0;
}

/* Data Tables */
.bug-portal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    border: 1px solid #E2E7ED;
    border-radius: 8px;
    overflow: hidden;
}

.bug-portal-table th {
    background: #F8FAFD;
    padding: 12px 14px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    color: #071D38;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #E2E7ED;
}

.bug-portal-table td {
    padding: 14px 14px;
    font-size: 13px;
    color: #19283A;
    border-bottom: 1px solid #F1F5F9;
    vertical-align: middle;
}

.bug-portal-table tr:last-child td {
    border-bottom: none;
}

.bug-portal-table tbody tr:hover td {
    background-color: #fafbfc;
}

/* Status Pills */
.bug-status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.bug-status-pill-lg {
    padding: 6px 14px;
    font-size: 13px;
}

/* Document Badges */
.bug-doc-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.bug-doc-verified { background: #dcfce7; color: #15803d; }
.bug-doc-rejected { background: #fee2e2; color: #b91c1c; }
.bug-doc-under_verification { background: #e0f2fe; color: #0284c7; }
.bug-doc-requested { background: #fef3c7; color: #b45309; }

/* Journey Timeline */
.bug-journey-timeline {
    position: relative;
    padding-left: 28px;
    margin-top: 18px;
}

.bug-journey-timeline::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 8px;
    width: 2px;
    background: #E2E7ED;
}

.bug-jtimeline-item {
    position: relative;
    padding-bottom: 20px;
}

.bug-jtimeline-item:last-child {
    padding-bottom: 0;
}

.bug-jtimeline-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #D9A83E;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1.5px #D9A83E;
}

.bug-jtimeline-content {
    background: #F8FAFD;
    border: 1px solid #E2E7ED;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.bug-jtimeline-content strong {
    display: block;
    font-size: 13.5px;
    color: #071D38;
    margin-bottom: 3px;
}

.bug-jtimeline-content p {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 6px 0;
}

.bug-jtimeline-content small {
    display: block;
    font-size: 11.5px;
    color: #94a3b8;
}

/* Application Detail Tracking Screen */
.bug-app-tracking-banner {
    background: #071D38;
    color: #ffffff;
    padding: 22px 24px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.bug-papp-code {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: #F4E0A5;
    background: rgba(217, 168, 62, 0.18);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.bug-tracking-title-wrap h2 {
    color: #ffffff;
    font-size: 20px;
    margin: 0;
}

.bug-gov-submission-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.bug-gov-submission-card h4 {
    margin: 0 0 12px 0;
    font-size: 14.5px;
    color: #1e3a8a;
    font-weight: 700;
}

.bug-gov-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    font-size: 13px;
}

.bug-gov-meta-grid .text-muted {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 2px;
}

/* Application Cards in List */
.bug-apps-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bug-portal-app-card {
    border: 1px solid #E2E7ED;
    border-radius: 10px;
    padding: 20px;
    background: #ffffff;
    transition: box-shadow 0.2s ease;
}

.bug-portal-app-card:hover {
    box-shadow: 0 4px 12px rgba(7, 29, 56, 0.06);
}

.bug-papp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.bug-papp-title {
    font-size: 17px;
    font-weight: 700;
    color: #071D38;
    margin: 0;
}

.bug-papp-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
    font-size: 13px;
}

.bug-papp-details .text-muted {
    display: block;
    font-size: 11.5px;
    color: #64748b;
}

.bug-papp-note {
    background: #f8fafc;
    border-left: 3px solid #D9A83E;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #475569;
    margin: 12px 0;
    border-radius: 0 6px 6px 0;
}

.bug-papp-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

/* Wizard */
.bug-wizard-step {
    background: #F8FAFD;
    border: 1px solid #E2E7ED;
    border-radius: 8px;
    padding: 20px;
}

.bug-wizard-step h3 {
    font-size: 16px;
    font-weight: 700;
    color: #071D38;
    margin: 0 0 16px 0;
}

/* Forms inside Portal */
.bug-form-group {
    margin-bottom: 14px;
}

.bug-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #19283A;
    margin-bottom: 6px;
}

.bug-form-group input,
.bug-form-group select,
.bug-form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    font-size: 13.5px;
    color: #19283A;
    background: #ffffff;
    box-sizing: border-box;
}

.bug-form-group input:focus,
.bug-form-group select:focus,
.bug-form-group textarea:focus {
    outline: none;
    border-color: #071D38;
    box-shadow: 0 0 0 2px rgba(7, 29, 56, 0.1);
}

.bug-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Generic Helpers */
.text-green { color: #059669 !important; }
.text-amber { color: #d97706 !important; }
.text-danger { color: #dc2626 !important; }
.text-muted { color: #64748b !important; }

/* Buttons inside Portal */
.bug-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.bug-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.bug-btn-lg {
    padding: 12px 24px;
    font-size: 14.5px;
}

.bug-btn-gold {
    background: #D9A83E;
    color: #071D38 !important;
    font-weight: 700;
}

.bug-btn-gold:hover {
    background: #c5952b;
    color: #071D38 !important;
}

.bug-btn-outline-navy {
    background: transparent;
    border-color: #071D38;
    color: #071D38 !important;
}

.bug-btn-outline-navy:hover {
    background: #071D38;
    color: #ffffff !important;
}

.bug-btn-block {
    width: 100%;
}

.bug-empty-box {
    background: #F8FAFD;
    border: 1px dashed #CBD5E1;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* Login Wrapper */
.bug-login-box-wrap {
    max-width: 440px;
    margin: 60px auto;
    padding: 0 20px;
}

.bug-login-card {
    background: #ffffff;
    border: 1.5px solid #E2E7ED;
    border-radius: 12px;
    padding: 36px 30px;
    box-shadow: 0 10px 30px rgba(7, 29, 56, 0.08);
}

.bug-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.bug-login-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #071D38;
    margin: 0 0 6px 0;
}

.bug-login-header p {
    font-size: 13.5px;
    color: #687789;
    margin: 0;
}

.bug-login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12.5px;
    color: #687789;
}

@media (max-width: 860px) {
    .bug-portal-wrapper {
        grid-template-columns: 1fr;
    }
    .bug-portal-sidebar {
        position: static;
        top: auto;
    }
    .bug-portal-metrics,
    .bug-gov-meta-grid,
    .bug-papp-details {
        grid-template-columns: 1fr;
    }
}
