/**
 * Careeocity Mentor Dashboard Styles
 * Brand Colors: Navy #1B2B4A, Orange #F47920, Green #7AC142, Background #F5F5F0
 */

/* ========== Dashboard Wrapper ========== */
.careeocity-dashboard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* ========== Dashboard Header ========== */
.careeocity-dashboard-header {
    margin-bottom: 40px;
    text-align: center;
}

.dashboard-title {
    font-size: 32px;
    font-weight: 700;
    color: #1B2B4A;
    margin: 0 0 10px;
}

.dashboard-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ========== Dashboard Grid ========== */
.careeocity-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .careeocity-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .careeocity-dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .widget-sessions {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }
    
    .widget-actions {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
    }
}

/* ========== Dashboard Widgets ========== */
.dashboard-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.dashboard-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.widget-header {
    padding: 20px 24px;
    border-bottom: 2px solid #F5F5F0;
}

.widget-title {
    font-size: 20px;
    font-weight: 600;
    color: #1B2B4A;
    margin: 0;
}

.widget-content {
    padding: 24px;
}

/* ========== Earnings Widget ========== */
.widget-earnings {
    grid-column: 1 / -1;
}

.earnings-stat-large {
    text-align: center;
    padding: 20px 0 30px;
    border-bottom: 1px solid #F5F5F0;
    margin-bottom: 30px;
}

.earnings-stat-large .stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.earnings-stat-large .stat-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
}

.earnings-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.earnings-stat {
    text-align: center;
    padding: 20px;
    background: #F5F5F0;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.earnings-stat:hover {
    transform: translateY(-2px);
}

.earnings-stat-pending {
    background: #FFF4E6;
}

.earnings-stat .stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.earnings-stat .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.earnings-stat .stat-info {
    display: block;
    font-size: 11px;
    color: #999;
}

/* ========== Stat Value Colors ========== */
.stat-primary {
    color: #1B2B4A;
}

.stat-accent {
    color: #F47920;
}

.stat-success {
    color: #7AC142;
}

.stat-warning {
    color: #F47920;
}

/* ========== Filters ========== */
.earnings-filter,
.session-filter {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #F5F5F0;
}

.earnings-filter label,
.session-filter label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    min-width: 140px;
}

.date-separator {
    color: #999;
    font-size: 14px;
}

.btn-filter {
    padding: 8px 20px;
    background: #1B2B4A;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-filter:hover {
    background: #0F1A2E;
}

.custom-result {
    margin-top: 15px;
    padding: 15px;
    background: #F5F5F0;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    color: #1B2B4A;
    text-align: center;
    display: none;
}

.custom-result.show {
    display: block;
}

/* ========== Sessions Widget ========== */
.session-stat-large {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.session-stat-large .stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.session-stat-large .stat-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
}

.session-stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #F5F5F0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #666;
}

.tab-btn.active {
    color: #F47920;
    border-bottom-color: #F47920;
}

.session-period-stats {
    position: relative;
    min-height: 100px;
}

.period-stat {
    display: none;
    text-align: center;
    padding: 20px;
    background: #F5F5F0;
    border-radius: 6px;
}

.period-stat.active {
    display: block;
}

.period-stat .stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.period-stat .stat-label {
    display: block;
    font-size: 14px;
    color: #666;
}

/* ========== Actions Widget ========== */
.action-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #F5F5F0;
    border: 2px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    color: #1B2B4A;
    text-align: left;
}

.action-card:hover {
    border-color: #1B2B4A;
    background: #FAFAF8;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(27, 43, 74, 0.08);
}

.action-card.action-primary {
    background: #1B2B4A;
    color: #fff;
}

.action-card.action-primary:hover {
    background: #0F1A2E;
    border-color: #0F1A2E;
    box-shadow: 0 4px 12px rgba(27, 43, 74, 0.2);
}

.action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 43, 74, 0.08);
    border-radius: 8px;
    flex-shrink: 0;
}

.action-card:hover .action-icon {
    background: rgba(27, 43, 74, 0.12);
}

.action-card.action-primary .action-icon {
    background: rgba(255, 255, 255, 0.15);
}

.action-card.action-primary:hover .action-icon {
    background: rgba(255, 255, 255, 0.25);
}

.action-icon svg {
    stroke-width: 2;
    stroke: currentColor;
}

.action-content {
    flex: 1;
    text-align: left;
}

.action-title {
    font-size: 16px;
    font-weight: 600;
    color: inherit;
    margin: 0 0 4px;
}

.action-desc {
    font-size: 13px;
    color: inherit;
    opacity: 0.8;
    margin: 0;
}

.action-card.action-primary .action-title,
.action-card.action-primary .action-desc {
    color: #fff;
}

/* ========== Modal ========== */
.careeocity-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #F5F5F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1B2B4A;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* ========== Payment History Table ========== */
.payment-history-table {
    width: 100%;
    border-collapse: collapse;
}

.payment-history-table thead {
    background: #F5F5F0;
}

.payment-history-table th,
.payment-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #F5F5F0;
}

.payment-history-table th {
    font-weight: 600;
    color: #1B2B4A;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-history-table td {
    font-size: 14px;
    color: #666;
}

.no-history {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* ========== Notice Messages ========== */
.careeocity-notice {
    padding: 15px 20px;
    background: #FFF4E6;
    border-left: 4px solid #F47920;
    color: #1B2B4A;
    border-radius: 4px;
    margin: 20px 0;
}

/* ========== Payout Request Section ========== */
.payout-request-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #F5F5F0;
}

.payout-schedule-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #F5F5F0;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.payout-schedule-info svg {
    stroke: #1B2B4A;
    flex-shrink: 0;
}

.payout-request-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #FFF4E6;
    border-radius: 6px;
    font-size: 14px;
    color: #F47920;
    font-weight: 600;
}

.btn-payout-request {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: #7AC142;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-payout-request:hover {
    background: #6AB032;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 193, 66, 0.3);
}

.btn-payout-request svg {
    stroke-width: 2.5;
}

.payout-minimum-info {
    padding: 12px 16px;
    background: #F5F5F0;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.payout-info-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: #F5F5F0;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

.payout-info-note svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========== Responsive ========== */
@media (max-width: 767px) {
    .dashboard-title {
        font-size: 24px;
    }
    
    .earnings-stat-large .stat-value {
        font-size: 36px;
    }
    
    .earnings-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .date-range-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-input {
        width: 100%;
    }
    
    .btn-filter {
        width: 100%;
    }
}

/* ========== Loading State ========== */
.dashboard-widget.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-widget {
    animation: fadeIn 0.3s ease;
}

.dashboard-widget:nth-child(1) {
    animation-delay: 0s;
}

.dashboard-widget:nth-child(2) {
    animation-delay: 0.1s;
}

.dashboard-widget:nth-child(3) {
    animation-delay: 0.2s;
}
