/* Reset and Base Styles */
* {
    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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

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

.login-card h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #667eea;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.small-text {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

#verify-screen {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* App Screen */
.app-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 16px 0;
}

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

.header-content h1 {
    font-size: 24px;
    color: #667eea;
}

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

.user-info {
    color: #666;
    font-size: 14px;
}

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

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

.deals-header h2 {
    font-size: 28px;
    color: white;
}

.deals-header .btn-primary {
    width: auto;
    padding: 10px 20px;
}

.deals-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.deal-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

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

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

.deal-card .deal-company {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.deal-card .deal-value {
    font-size: 20px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 12px;
}

.deal-card .deal-stage {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #f0f0f0;
    color: #666;
}

.deal-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.deal-actions button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
}

.loading {
    text-align: center;
    color: white;
    padding: 40px;
    font-size: 16px;
}

.empty-state {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    opacity: 0.9;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal form {
    padding: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions button {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .deals-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .deals-header .btn-primary {
        width: 100%;
    }
    
    .deals-list {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

