/* ============================================
   THE CLIMATE LEDGER — EXECUTIVE CLIENT PORTAL V2
   Trainline Group Executive Theme: Clean White Cards,
   Mint (#00a88f) Accents, Forest Navy (#002326) Typography
   ============================================ */

.dashboard-page {
    padding-top: 175px;
    padding-bottom: 90px;
    background: #f8fafc;
    min-height: 100vh;
}

/* Executive Header Banner */
.dash-executive-header {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.25rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 35, 38, 0.04);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dash-user-identity {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.dash-avatar-badge {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #00a88f 0%, #002326 100%);
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 168, 143, 0.25);
    flex-shrink: 0;
}

.dash-user-details h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #002326;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.dash-meta-tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dash-tag-org {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.dash-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e6faf6;
    color: #00a88f;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(0, 168, 143, 0.25);
}

.dash-pulse-dot {
    width: 7px;
    height: 7px;
    background: #00a88f;
    border-radius: 50%;
    animation: dashPulse 2s infinite;
}

@keyframes dashPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 168, 143, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 168, 143, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 168, 143, 0); }
}

.dash-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-dash-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dash-logout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

/* Tab Navigation */
.dash-tabs-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    padding: 6px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 35, 38, 0.03);
    overflow-x: auto;
}

.dash-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.dash-tab-btn:hover {
    color: #002326;
    background: #f8fafc;
}

.dash-tab-btn.active {
    background: #002326;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 35, 38, 0.15);
}

.dash-tab-btn.active svg {
    stroke: #00a88f;
}

/* Stat KPI Cards Grid */
.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .dash-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dash-stat-grid {
        grid-template-columns: 1fr;
    }
}

.dash-stat-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 35, 38, 0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dash-stat-card:hover {
    transform: translateY(-4px);
    border-color: #00a88f;
    box-shadow: 0 12px 30px rgba(0, 35, 38, 0.08);
}

.dash-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dash-stat-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e6faf6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00a88f;
}

.dash-stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: #002326;
    line-height: 1;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.dash-stat-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.2rem;
}

.dash-stat-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

/* White Section Card */
.dash-white-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 2.25rem;
    box-shadow: 0 4px 20px rgba(0, 35, 38, 0.04);
    margin-bottom: 2rem;
}

.dash-section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1.5px solid #f1f5f9;
}

.dash-section-header-row h3,
.dash-white-card h2,
.dash-white-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #002326;
    margin: 0;
}

/* Modern Clean Table */
.dash-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
}

.dash-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1rem 1.25rem;
    border-bottom: 1.5px solid #e2e8f0;
}

.dash-table td {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.dash-table tbody tr {
    cursor: pointer;
    transition: background 0.18s ease;
}

.dash-table tbody tr:hover {
    background: #f0fdf9;
}

.dash-table tbody tr:last-child td {
    border-bottom: none;
}

.ticket-number-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: #00a88f;
}

.ticket-subject-cell {
    font-weight: 600;
    color: #002326;
}

/* Status & Priority Pills */
.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.28rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pill-open { background: #e0f2fe; color: #0284c7; }
.pill-in-progress { background: #fef3c7; color: #d97706; }
.pill-resolved { background: #d1fae5; color: #059669; }
.pill-closed { background: #f1f5f9; color: #64748b; }

.pill-priority-critical { background: #ffe4e6; color: #e11d48; }
.pill-priority-high { background: #ffedd5; color: #ea580c; }
.pill-priority-medium { background: #fef3c7; color: #b45309; }
.pill-priority-low { background: #ecfdf5; color: #047857; }

.pill-category {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Activity Timeline */
.dash-activity-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.15rem 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: flex-start;
}

.dash-activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-activity-dot-col {
    padding-top: 5px;
}

.dash-activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00a88f;
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.2);
}

.dash-activity-text {
    color: #1e293b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.dash-activity-time {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Ticket Details View */
.dash-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #00a88f;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.dash-back-btn:hover {
    background: #f0fdf9;
    border-color: #00a88f;
}

.dash-ticket-detail-desc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #00a88f;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
}

.dash-comment-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 35, 38, 0.03);
}

.dash-comment-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.dash-comment-author {
    font-weight: 700;
    color: #002326;
    font-size: 0.92rem;
}

.dash-comment-textarea {
    width: 100%;
    min-height: 110px;
    padding: 1rem;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #002326;
    font-size: 0.92rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.dash-comment-textarea:focus {
    border-color: #00a88f;
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.15);
}

/* Forms */
.dash-form-group {
    margin-bottom: 1.5rem;
}

.dash-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #002326;
}

.dash-form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #002326;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.dash-form-control:focus {
    border-color: #00a88f;
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.15);
}

/* Empty State */
.dash-clean-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    color: #64748b;
}

.dash-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}
