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

body {
    font-family: "Space Grotesk", Sora, Inter, system-ui, sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

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

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

.logout-btn {
    padding: 8px 16px;
    font-size: 14px;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.user-company {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 2px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fe001b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.dashboard {
    padding: 40px 0;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 50px;
}

.dashboard-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    font-size: 18px;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

.metrics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.metric-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: #fe001b;
}

.metric-value {
    font-size: 32px;
    font-weight: bold;
    color: #fe001b;
    margin-bottom: 10px;
}

.metric-label {
    color: #a0a0a0;
    font-size: 14px;
}

.workflows {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.workflow-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.workflow-card:hover {
    transform: translateY(-8px);
    border-color: #fe001b;
}

.workflow-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.workflow-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #fe001b 0%, #cc0016 100%);
}

.workflow-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
}

.workflow-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: rgba(254, 0, 27, 0.2);
    color: #fe001b;
}

.status-idle {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.workflow-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.mini-metric {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.mini-metric-value {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
}

.mini-metric-label {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 5px;
}

.workflow-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #fe001b 0%, #cc0016 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 0, 27, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #a0a0a0;
    border: 1px solid #333;
}

.btn-secondary:hover {
    border-color: #fe001b;
    color: #fe001b;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fe001b 0%, #cc0016 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

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

.modal-title {
    font-size: 20px;
    font-weight: bold;
}

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

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #fe001b;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #fe001b 0%, #cc0016 100%);
    color: white;
    border-radius: 8px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.notification.show {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .dashboard-title {
        font-size: 32px;
    }
    
    .workflows {
        grid-template-columns: 1fr;
    }
    
    .metrics-overview {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .workflow-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Auth layout */
.auth {
    padding: 60px 0;
    min-height: calc(100vh - 72px);
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #333;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease-out 0.2s forwards;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
