/* Custom styles for MyTestingBuddy.com */

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* Layout Components */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #1976d2;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    color: white;
}

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

.navbar-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.navbar-nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Cards and Components */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.2);
}

.form-control.error {
    border-color: #f44336;
}

.error-message {
    color: #f44336;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-align: center;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1565c0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25,118,210,0.3);
}

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

.btn-secondary:hover:not(:disabled) {
    background: #616161;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #45a049;
}

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

.btn-danger:hover:not(:disabled) {
    background: #d32f2f;
}

.btn-outline {
    background: transparent;
    border: 2px solid #1976d2;
    color: #1976d2;
}

.btn-outline:hover:not(:disabled) {
    background: #1976d2;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: #1976d2;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
}

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

.dashboard-stat {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1976d2;
}

.dashboard-stat-label {
    color: #666;
    margin-top: 0.5rem;
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.project-name {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

.project-description {
    color: #666;
    margin-bottom: 1rem;
}

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

/* Test Plan Components */
.test-suite {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.test-suite-header {
    background: #f5f5f5;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.test-suite-header:hover {
    background: #eeeeee;
}

.test-suite-name {
    font-weight: 500;
    color: #333;
}

.test-suite-content {
    background: white;
}

.test-case-list {
    list-style: none;
}

.test-case-item {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.test-case-item:last-child {
    border-bottom: none;
}

.test-case-info {
    flex: 1;
}

.test-case-id {
    font-weight: 500;
    color: #1976d2;
    font-size: 0.875rem;
}

.test-case-title {
    margin: 0.25rem 0;
    color: #333;
}

.test-case-meta {
    font-size: 0.875rem;
    color: #666;
}

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

/* Test Execution Interface */
.execution-header {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.execution-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.test-steps-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.test-steps-table table {
    width: 100%;
    border-collapse: collapse;
}

.test-steps-table th {
    background: #f5f5f5;
    padding: 1rem;
    text-align: left;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

.test-steps-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.test-steps-table tr:last-child td {
    border-bottom: none;
}

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

.step-status-pass {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.step-status-fail {
    background: #f44336;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Comments Section */
.comments-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comments-list {
    margin-bottom: 1rem;
}

.comment {
    padding: 0.75rem;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.add-comment {
    display: flex;
    gap: 0.5rem;
}

.add-comment textarea {
    flex: 1;
    resize: vertical;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-not-run {
    background: #e0e0e0;
    color: #666;
}

.status-pass {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-fail {
    background: #ffebee;
    color: #c62828;
}

.status-on-hold {
    background: #fff3e0;
    color: #ef6c00;
}

.status-skipped {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Priority badges */
.priority-high {
    color: #d32f2f;
    font-weight: 500;
}

.priority-medium {
    color: #f57c00;
    font-weight: 500;
}

.priority-low {
    color: #388e3c;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .page-container {
        padding: 1rem;
    }
    
    .dashboard-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .execution-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .test-steps-table {
        overflow-x: auto;
    }
    
    .test-steps-table table {
        min-width: 600px;
    }
    
    .add-comment {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

/* Loading states */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1976d2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #666;
}

.breadcrumbs a {
    color: #1976d2;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-warning {
    background: #fff3e0;
    color: #ef6c00;
    border-left: 4px solid #ff9800;
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196f3;
}