:root {
    --nzhp-primary: #2563eb;
    --nzhp-primary-hover: #1d4ed8;
    --nzhp-bg: #f8fafc;
    --nzhp-card-bg: #ffffff;
    --nzhp-text: #1e293b;
    --nzhp-text-muted: #64748b;
    --nzhp-accent: #f59e0b;
    --nzhp-border: #e2e8f0;
    --nzhp-radius: 12px;
    --nzhp-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.nzhp-dashboard {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--nzhp-text);
    background: var(--nzhp-bg);
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: var(--nzhp-radius);
    line-height: 1.5;
}

/* Hero Section */
.nzhp-hero {
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--nzhp-radius);
    box-shadow: var(--nzhp-shadow);
}

.nzhp-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    color: #ffffff;
}

.nzhp-subtitle {
    font-size: 1.125rem;
    opacity: 1;
    color: #f8fafc;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.nzhp-next-card {
    margin-top: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: inline-block;
    padding: 1.5rem 3rem;
    border-radius: var(--nzhp-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nzhp-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.nzhp-countdown {
    font-weight: 600;
    color: var(--nzhp-accent);
}

/* Filters */
.nzhp-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--nzhp-card-bg);
    border-radius: var(--nzhp-radius);
    box-shadow: var(--nzhp-shadow);
}

.nzhp-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nzhp-filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--nzhp-text-muted);
}

.nzhp-filter-group select {
    padding: 0.75rem;
    border: 1px solid var(--nzhp-border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

/* Hacks Grid */
.nzhp-hacks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    align-content: start;
    min-height: 200px;
}

.nzhp-hack-card {
    background: var(--nzhp-card-bg);
    padding: 1.5rem;
    border-radius: var(--nzhp-radius);
    box-shadow: var(--nzhp-shadow);
    border: 1px solid var(--nzhp-border);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.nzhp-hack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.nzhp-hack-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--nzhp-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-bottom-left-radius: 8px;
}

.nzhp-hack-card h4 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.nzhp-hack-detail {
    color: var(--nzhp-text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.nzhp-hack-stats {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 1px solid var(--nzhp-border);
}

.nzhp-stat {
    display: flex;
    flex-direction: column;
}

.nzhp-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
}

.nzhp-stat-lbl {
    font-size: 0.75rem;
    color: var(--nzhp-text-muted);
}

.nzhp-stat-highlight .nzhp-stat-val {
    color: var(--nzhp-primary);
}

.nzhp-hack-roi {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #dcfce7;
    color: #166534;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.nzhp-badge-success {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #10b981;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    margin-left: 0.5rem;
}

.nzhp-hack-range {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--nzhp-primary);
}

/* Timelines */
.nzhp-timeline-legend {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: var(--nzhp-text-muted);
    font-weight: 600;
}

.nzhp-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nzhp-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.nzhp-timeline {
    display: flex;
    height: 8px;
    min-height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
    gap: 2px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.nzhp-timeline-bar {
    flex: 1;
    height: 100%;
}

.nzhp-timeline-work { background-color: #e2e8f0; }
.nzhp-timeline-holiday { background-color: #3b82f6; }
.nzhp-timeline-leave { background-color: #10b981; }
.nzhp-timeline-weekend { background-color: #64748b; }

/* Card Classifications */
.nzhp-card-type-mega-break {
    transform: scale(1.02);
    border: 2px solid var(--nzhp-primary);
    box-shadow: 0 10px 15px -3px rgb(37 99 235 / 0.2);
}
.nzhp-badge-mega-break { background-color: var(--nzhp-primary); }

.nzhp-card-type-bridge-opportunity { border-top: 4px solid #8b5cf6; }
.nzhp-badge-bridge-opportunity { background-color: #8b5cf6; }

.nzhp-card-type-smart-extension { border-top: 4px solid #0284c7; }
.nzhp-badge-smart-extension { background-color: #0284c7; }

.nzhp-card-type-automatic-long-weekend { border-top: 4px solid #10b981; }
.nzhp-badge-automatic-long-weekend { background-color: #10b981; }

.nzhp-badge-family-window { 
    background-color: #fef3c7; 
    color: #92400e; 
    border: 1px solid #fde68a;
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    font-weight: 700;
}

/* Table */
.nzhp-table-container {
    background: var(--nzhp-card-bg);
    border-radius: var(--nzhp-radius);
    padding: 1.5rem;
    box-shadow: var(--nzhp-shadow);
    overflow-x: auto;
}

.nzhp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.nzhp-table th {
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--nzhp-text-muted);
    border-bottom: 2px solid var(--nzhp-border);
}

.nzhp-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--nzhp-border);
}

.nzhp-row-observed {
    background: #eff6ff;
}

/* Exports */
.nzhp-exports {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 2rem;
    background: #f1f5f9;
    border-radius: var(--nzhp-radius);
    justify-content: flex-end;
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
}

.nzhp-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.nzhp-btn-primary {
    background: var(--nzhp-primary);
    color: white;
}

.nzhp-btn-primary:hover {
    background: var(--nzhp-primary-hover);
}

.nzhp-btn-secondary {
    background: white;
    color: var(--nzhp-primary);
    border: 1px solid var(--nzhp-primary);
}

.nzhp-btn-secondary:hover {
    background: #f0f7ff;
}

/* Print Styles */
@media print {
    .nzhp-hero, .nzhp-filters, .nzhp-exports {
        display: none !important;
    }
    .nzhp-dashboard {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    .nzhp-hacks-grid {
        grid-template-columns: 1fr 1fr;
    }
    .nzhp-hack-card {
        break-inside: avoid;
    }
}

/* Footer */
.nzhp-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--nzhp-border);
    color: var(--nzhp-text-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
    .nzhp-filters {
        flex-direction: column;
    }
    
    .nzhp-title {
        font-size: 2rem;
    }

    /* Responsive Stacked Table */
    .nzhp-table-container {
        padding: 1rem;
    }

    .nzhp-table, .nzhp-table tbody, .nzhp-table tr, .nzhp-table td {
        display: block;
        width: 100%;
    }

    .nzhp-table thead {
        display: none;
    }

    .nzhp-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--nzhp-border);
        border-radius: 8px;
        padding: 0.5rem;
    }

    .nzhp-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border-bottom: 1px solid var(--nzhp-border);
        text-align: right;
    }

    .nzhp-table td:last-child {
        border-bottom: none;
    }

    .nzhp-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--nzhp-text-muted);
        text-align: left;
        margin-right: 1rem;
    }
}
