/* Reset y variables */
* {
    box-sizing: border-box;
}

.customer-portal-home {
    background: #ffffff;
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* Welcome Section */
.portal-welcome-section {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 2.5rem 0;
}

.welcome-header {
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-info {
    text-align: center;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 600;
    color: #000000;
    margin: 0 0 0.5rem 0;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #666666;
    margin: 0;
}

/* Main Content */
.portal-main-content {
    padding-top: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #666666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Card */
.section-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.section-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

/* Quick Links Grid */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1px;
    background: #e5e5e5;
}

.quick-link-item {
    background: #ffffff;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #000000;
    transition: background 0.2s;
}

.quick-link-item:hover {
    background: #f8f8f8;
    text-decoration: none;
    color: #000000;
}

.link-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000000;
    border-radius: 50%;
    transition: transform 0.2s;
}

.quick-link-item:hover .link-icon {
    transform: scale(1.1);
}

.link-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Chart Card */
.chart-card {
    grid-column: 1 / 2;
}

.chart-container {
    padding: 2rem 1.5rem;
    min-height: 300px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 250px;
    gap: 1rem;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.chart-bar-wrapper {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bar {
    width: 100%;
    max-width: 60px;
    background: #000000;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.5rem;
    min-height: 30px;
    transition: opacity 0.2s;
}

.chart-bar:hover {
    opacity: 0.8;
}

.bar-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
}

.chart-label {
    font-size: 0.875rem;
    color: #666666;
    font-weight: 500;
}

.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
    color: #999999;
}

.chart-empty svg {
    margin-bottom: 1rem;
    opacity: 0.3;
}

.chart-empty p {
    margin: 0;
    font-size: 0.875rem;
}

/* Activity List */
.activity-list {
    padding: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    text-decoration: none;
    color: #000000;
    transition: background 0.2s;
}

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

.activity-item:hover {
    background: #f8f8f8;
    text-decoration: none;
    color: #000000;
}

.activity-icon {
    flex-shrink: 0;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #000000;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666666;
}

.activity-type {
    font-weight: 500;
}

.activity-separator {
    color: #cccccc;
}

.activity-date {
    color: #999999;
}

.activity-status {
    flex-shrink: 0;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    white-space: nowrap;
}

.status-badge.status-primary {
    background: #f0f0f0;
    color: #000000;
}

.status-badge.status-success {
    background: #000000;
    color: #ffffff;
}

.status-badge.status-warning {
    background: #f0f0f0;
    color: #666666;
    border: 1px solid #cccccc;
}

.status-badge.status-danger {
    background: #f0f0f0;
    color: #333333;
    border: 1px solid #999999;
}

.status-badge.status-default {
    background: #f8f8f8;
    color: #666666;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    color: #999999;
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* Logout Section */
.logout-section {
    text-align: center;
    padding: 2rem 0;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-logout:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .chart-card {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    .portal-welcome-section {
        padding: 2rem 0;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .quick-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-link-item {
        padding: 1.25rem 0.75rem;
    }

    .link-icon {
        width: 40px;
        height: 40px;
    }

    .link-icon svg {
        width: 20px;
        height: 20px;
    }

    .chart-bars {
        gap: 0.5rem;
    }

    .chart-bar {
        max-width: 40px;
    }

    .bar-value {
        font-size: 0.75rem;
    }

    .chart-label {
        font-size: 0.75rem;
    }

    .activity-item {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
    }

    .activity-title {
        font-size: 0.875rem;
    }

    .activity-meta {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .activity-status {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .portal-welcome-section {
        padding: 1.5rem 0;
    }
    .welcome-title {
        font-size: 1.25rem;
    }

    .welcome-subtitle {
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        padding: 1rem 1.25rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .chart-container {
        padding: 1.5rem 1rem;
        min-height: 250px;
    }

    .chart-bars {
        height: 200px;
    }

    .chart-bar-wrapper {
        height: 150px;
    }

    .btn-logout {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
    .stat-value {
        font-size: 1.75rem;
    }

    .link-label {
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .btn-logout,
    .logout-section {
        display: none;
    }
    .customer-portal-home {
        background: white;
    }

    .section-card,
    .stat-card {
        border: 1px solid #000000;
        page-break-inside: avoid;
    }
}