/* Company Portal - Consolidated Styles */

/* ===== Font Face ===== */
@font-face {
    font-family: 'Nunito Sans';
    src: url('../assets/fonts/NunitoSans-Variable.ttf') format('truetype');
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito Sans';
    src: url('../assets/fonts/NunitoSans-Italic-Variable.ttf') format('truetype');
    font-weight: 200 1000;
    font-style: italic;
    font-display: swap;
}

/* ===== CSS Variables ===== */
:root {
    --color-primary: #667eea;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-purple: #6f42c1;

    --color-text: #5F6069;
    --color-text-muted: #6c757d;
    --color-bg: #f8f9fa;
    --color-bg-white: #ffffff;
    --color-border: #e9ecef;

    --font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
    --color-text: #e9ecef;
    --color-text-muted: #adb5bd;
    --color-bg: #1a1a1a;
    --color-bg-white: #2d2d2d;
    --color-border: #404040;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
    background: var(--color-bg);
}

[data-theme="dark"] .nav-bar {
    background: var(--color-bg-white);
    border-bottom-color: var(--color-border);
}

[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .card,
[data-theme="dark"] .section,
[data-theme="dark"] .detail-header {
    background: var(--color-bg-white);
}

[data-theme="dark"] .section-header {
    background: #252525;
    border-bottom-color: var(--color-border);
}

[data-theme="dark"] .card {
    border-color: var(--color-border);
}

[data-theme="dark"] .card:hover {
    border-color: var(--color-primary);
}

[data-theme="dark"] .kpi-item,
[data-theme="dark"] .guideline-section,
[data-theme="dark"] .team-stat-card {
    background: #252525;
}

/* ===== Base Styles ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

button, input, select, textarea {
    font-family: inherit;
}

html {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: "Nunito Sans", Sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8em;
    letter-spacing: -0.4px;
    color: #5F6069;
    background: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation ===== */
.nav-bar {
    background: var(--color-bg-white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.nav-logo:hover {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    background: var(--color-primary);
    color: white;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--color-border);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--color-border);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* ===== Header ===== */
.header {
    text-align: center;
    padding: 4rem 1rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 0;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.3rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

/* ===== Dashboard Grid ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== Dashboard Cards ===== */
.dashboard-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    color: inherit;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

/* Card color variants */
.dashboard-card.training { --card-color: #667eea; }
.dashboard-card.resources { --card-color: #28a745; }
.dashboard-card.onboarding { --card-color: #ffc107; }
.dashboard-card.team { --card-color: #dc3545; }
.dashboard-card.impacts { --card-color: #6f42c1; }

.card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    background: var(--card-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover .card-icon {
    opacity: 1;
}

.card-icon svg {
    width: 32px;
    height: 32px;
    color: white;
    fill: white;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.card-description {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-weight: 600;
    color: var(--card-color);
    font-size: 1.1rem;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* ===== Detail Page Header ===== */
.detail-header {
    background: var(--color-bg-white);
    color: var(--color-text);
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.detail-header p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #5a6fd6;
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* ===== Section ===== */
.section {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

.section-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.section-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
}

.section-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ===== Cards Grid ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--color-bg-white);
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.card .card-description {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ===== Status Badges ===== */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-available {
    background-color: #d4edda;
    color: #155724;
}

.status-coming-soon {
    background-color: #fff3cd;
    color: #856404;
}

/* ===== Team Stats ===== */
.team-stat-card {
    background: var(--color-bg-white);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

/* ===== Subteam Cards ===== */
.subteam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.subteam-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    background: var(--color-bg-white);
    transition: all 0.3s ease;
}

.subteam-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.subteam-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.subteam-header h3 {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.subteam-header p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.subteam-section {
    margin-bottom: 1.5rem;
}

.subteam-section:last-child {
    margin-bottom: 0;
}

.subteam-section h4 {
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* ===== KPI Grid ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.kpi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    border-radius: 4px;
    font-size: 0.85rem;
}

.kpi-label {
    color: var(--color-text-muted);
}

.kpi-value {
    font-weight: 600;
    color: var(--color-text);
}

/* ===== Goals List ===== */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.goal-item {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 0.5rem 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.goal-item:hover {
    background-color: var(--color-bg);
}

.goal-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 0.75rem;
    margin-top: 0.1rem;
    cursor: pointer;
    accent-color: var(--color-success);
}

.goal-text {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.4;
    transition: all 0.2s ease;
}

.goal-item.completed .goal-text {
    text-decoration: line-through;
    color: var(--color-text-muted);
    opacity: 0.8;
}

.goal-item.completed {
    background-color: var(--color-bg);
}

/* ===== Achievements & Updates ===== */
.achievements-scroll,
.updates-scroll {
    max-height: 120px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.achievements-scroll::-webkit-scrollbar,
.updates-scroll::-webkit-scrollbar {
    width: 4px;
}

.achievements-scroll::-webkit-scrollbar-track,
.updates-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.achievements-scroll::-webkit-scrollbar-thumb,
.updates-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.achievement-item,
.update-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f1f1;
}

.achievement-item:last-child,
.update-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.achievement-item p,
.update-item p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-text);
}

/* ===== Branding Section Styles ===== */
.branding-updates {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.update-announcement {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.update-announcement:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.update-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.update-priority.high { background: #dc3545; color: white; }
.update-priority.medium { background: #ffc107; color: #212529; }
.update-priority.low { background: #28a745; color: white; }

.update-date {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.update-announcement h4 {
    color: var(--color-text);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.update-announcement p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.update-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--color-bg);
    color: var(--color-text);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--color-border);
}

/* ===== Brand Guidelines ===== */
.brand-guidelines {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem;
}

.guideline-section {
    padding: 1.5rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.guideline-section h3 {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Color Palette */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.color-item {
    background: var(--color-bg-white);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--color-border);
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    margin: 0 auto 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.color-code {
    font-family: 'Courier New', monospace;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* ===== Upload Section ===== */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.upload-section {
    background: var(--color-bg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
}

.upload-section h4 {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.upload-area:hover {
    border-color: var(--color-primary);
    background: var(--color-bg);
}

.upload-area svg {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-area span {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ===== Impacts Page ===== */
.impacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.impact-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.impact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.impact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.impact-metric {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .header p {
        font-size: 1.1rem;
    }

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

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

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

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

    .detail-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem 3rem;
    }

    .header {
        padding: 3rem 1rem 2rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .dashboard-card {
        padding: 1.5rem;
    }

    .card-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        width: 100%;
        text-align: left;
    }
}
