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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0070D2 0%, #004a8f 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    width: 100%;
    min-height: 100vh;
}

.view {
    width: 100%;
    min-height: 100vh;
}

/* Login Styles */
#loginView {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    color: #0070D2;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.login-card h2 {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0070D2;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #0070D2;
    color: white;
    width: 100%;
}

.section-header .btn-primary {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 112, 210, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

/* Dashboard Styles */
#dashboardView {
    background: #f5f6fa;
    min-height: 100vh;
}

/* Logo Styles */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 200px;
    height: auto;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #0070D2;
    font-size: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

#userDisplay {
    color: #666;
}

main {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

main h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.status-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.status-card h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    margin-bottom: 10px;
}

.status-icon {
    font-size: 24px;
}

.status-indicator.success .status-icon {
    color: #27ae60;
}

.status-indicator.error .status-icon {
    color: #e74c3c;
}

.status-indicator.loading .status-icon {
    color: #f39c12;
}

.status-text {
    color: #666;
}

.status-details {
    color: #999;
    font-size: 14px;
    margin-top: 10px;
}

/* Projects Section */
.projects-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #333;
    font-size: 24px;
    margin: 0;
}

.projects-loading, .projects-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: #666;
}

.projects-error {
    color: #e74c3c;
}

.projects-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.projects-list {
    display: grid;
    gap: 15px;
}

.project-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.project-card:hover {
    border-color: #0070D2;
    box-shadow: 0 4px 12px rgba(0, 112, 210, 0.1);
    transform: translateY(-2px);
}

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

.project-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.project-location {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.project-id {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
}

.project-state {
    background: #0070D2;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.project-metrics {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.project-metric {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Empty state */
.projects-empty {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content form {
    padding: 20px;
}

.modal-small {
    max-width: 400px;
}

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

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Project card actions */
.project-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-sync {
    background: #0070D2;
    color: white;
}

.btn-sync:hover {
    background: #0056b3;
}

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-edit:hover {
    background: #e08e0b;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.text-muted {
    color: #999;
    font-size: 14px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    main {
        padding: 20px;
    }

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