/* Dashboard Styles */
:root {
    --warm-taupe: #C9B8A8;
    --soft-mint: #B8DED1;
    --ivory: #F8F6F1;
    --moss-green: #7A9A7E;
    --muted-teal: #88B5B5;
    --dusty-lavender: #B5A7C4;
    --danger: #E57373;
    --warning: #FFB74D;
    --success: #81C784;
    --shadow: rgba(0, 0, 0, 0.1);
    --text-dark: #333;
    --text-light: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--ivory);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background-color: white;
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.logo {
    font-size: 1.5rem;
}

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

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--moss-green);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: white;
    padding: 2rem 0;
    box-shadow: 2px 0 8px var(--shadow);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.menu-item:hover {
    background-color: var(--ivory);
    color: var(--moss-green);
}

.menu-item.active {
    background-color: var(--soft-mint);
    color: var(--moss-green);
    font-weight: 600;
}

.menu-item .icon {
    font-size: 1.25rem;
}

.menu-item .badge {
    margin-left: auto;
    background-color: var(--danger);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

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

.view-header h1 {
    font-size: 2rem;
    color: var(--text-dark);
}

.subtitle {
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #6A8A6E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-secondary {
    background-color: white;
    color: var(--text-dark);
    border: 2px solid var(--warm-taupe);
}

.btn-secondary:hover {
    background-color: var(--warm-taupe);
    color: white;
}

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

.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px var(--shadow);
}

.stat-icon {
    font-size: 2.5rem;
}

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

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Projects List */
.projects-list {
    display: grid;
    gap: 1rem;
}

.project-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s;
}

.project-card:hover {
    box-shadow: 0 4px 16px var(--shadow);
}

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

.project-info h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.project-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: var(--success);
    color: white;
}

.status-badge.paused {
    background-color: var(--warning);
    color: white;
}

.health-score {
    font-size: 0.875rem;
    color: var(--text-light);
}

.health-bar {
    width: 100px;
    height: 6px;
    background-color: var(--ivory);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.health-fill {
    height: 100%;
    background-color: var(--success);
    transition: width 0.3s;
}

.project-scope {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--ivory);
}

.project-budget {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--moss-green);
}

.project-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-pause {
    background-color: var(--warning);
    color: white;
}

.btn-resume {
    background-color: var(--success);
    color: white;
}

.btn-view {
    background-color: var(--muted-teal);
    color: white;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--warm-taupe);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--moss-green);
}

/* Analysis Results */
.analysis-result, .translation-result {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-top: 2rem;
}

.analysis-result.hidden, .translation-result.hidden {
    display: none;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-icon {
    font-size: 3rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.result-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.result-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
}

.badge-info {
    background-color: var(--muted-teal);
    color: white;
}

.badge-success {
    background-color: var(--success);
    color: white;
}

.result-details {
    display: grid;
    gap: 1rem;
}

.detail-row {
    display: flex;
    padding: 1rem;
    background-color: var(--ivory);
    border-radius: 8px;
}

.detail-label {
    font-weight: 600;
    min-width: 200px;
    color: var(--text-dark);
}

.detail-value {
    color: var(--text-light);
}

.translation-box {
    background-color: var(--soft-mint);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--moss-green);
    margin-top: 1rem;
    white-space: pre-wrap;
    line-height: 1.8;
}

/* Alerts */
.alerts-list {
    display: grid;
    gap: 1rem;
}

.alert-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    border-left: 4px solid var(--muted-teal);
}

.alert-card.unread {
    border-left-color: var(--moss-green);
    background-color: var(--soft-mint);
}

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

.alert-title {
    font-weight: 700;
    font-size: 1.125rem;
}

.alert-time {
    color: var(--text-light);
    font-size: 0.875rem;
}

.alert-message {
    color: var(--text-light);
    line-height: 1.6;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--ivory);
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--ivory);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background-color: var(--moss-green);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(150%);
    transition: transform 0.3s;
    z-index: 3000;
    font-weight: 600;
}

.toast.show {
    transform: translateY(0);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem 0;
    }

    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
    }

    .menu-item {
        padding: 1rem;
        white-space: nowrap;
    }

    .main-content {
        padding: 1rem;
    }

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

    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}
